/* ============================================================
   FunExtension Design System v2
   Premium Tech + Automation + Digital Marketplace
   Палитра (по спецификации):
   #080808 background · #111111 surface · #171717 elevated
   #F5F5F5 primary text · #9A9A9A secondary · #FF6A00 brand
   ============================================================ */

/* ---------- 1. Токены ---------- */
:root {
  /* цвета */
  --fe-bg: #080808;
  --fe-surface: #111111;
  --fe-elevated: #171717;
  --fe-elevated-2: #1d1d1d;
  --fe-text: #f5f5f5;
  --fe-muted: #9a9a9a;
  --fe-faint: #5f5f5f;
  --fe-accent: #ff6a00;
  --fe-accent-2: #ff8c3a;
  --fe-accent-soft: rgba(255, 106, 0, 0.11);
  --fe-accent-line: rgba(255, 106, 0, 0.28);

  /* семантика */
  --fe-success: #34c759;
  --fe-error: #ff453a;
  --fe-warning: #ffd60a;
  --fe-info: #ff8c3a;
  --fe-line: rgba(255, 255, 255, 0.06);
  --fe-line-strong: rgba(255, 255, 255, 0.12);

  /* типографика */
  --fe-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fe-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --fe-fs-xs: 12px;
  --fe-fs-sm: 13.5px;
  --fe-fs-md: 15px;
  --fe-fs-lg: 17px;
  --fe-fs-h4: 19px;
  --fe-fs-h3: 24px;
  --fe-fs-h2: clamp(28px, 4vw, 42px);
  --fe-fs-h1: clamp(36px, 5.4vw, 60px);

  /* spacing (4px base) */
  --fe-sp-1: 4px;  --fe-sp-2: 8px;  --fe-sp-3: 12px; --fe-sp-4: 16px;
  --fe-sp-5: 24px; --fe-sp-6: 32px; --fe-sp-7: 48px; --fe-sp-8: 64px;
  --fe-sp-9: 96px;

  /* радиусы */
  --fe-r-sm: 10px; --fe-r-md: 14px; --fe-r-lg: 18px; --fe-r-xl: 26px;
  --fe-r-full: 999px;

  /* сетка */
  --fe-container: 1180px;
  --fe-gap: 20px;

  /* тени и переходы */
  --fe-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --fe-shadow-accent: 0 6px 22px rgba(255, 106, 0, 0.28);
  --fe-tr: 0.18s ease;

  /* Liquid Glass (iOS-стиль): полупрозрачность + blur + спекулярные блики */
  --fe-glass-bg:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 38%, rgba(255, 255, 255, 0.10) 78%, rgba(255, 255, 255, 0.05));
  --fe-glass-blur: blur(22px) saturate(1.6);
  --fe-glass-line: rgba(255, 255, 255, 0.17);
  --fe-glass-spec:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset 1px 0 0 rgba(255, 255, 255, 0.07);
  --fe-glass-shadow:
    0 18px 44px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset 1px 0 0 rgba(255, 255, 255, 0.07);
}

/* ---------- 2. База / типографика ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--fe-bg);
  color: var(--fe-text);
  position: relative;
  font-family: var(--fe-font);
  font-size: var(--fe-fs-md);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Многослойный фон: мягкие свечения + точечная текстура + тонкая геометрия.
   Только цвета палитры, без сетки и неона. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(640px 420px at 82% -6%, rgba(255, 106, 0, 0.10), transparent 70%),
    radial-gradient(520px 380px at -8% 22%, rgba(255, 106, 0, 0.05), transparent 70%),
    radial-gradient(760px 520px at 50% 118%, rgba(245, 245, 245, 0.035), transparent 70%),
    linear-gradient(180deg, #0a0a0a 0%, var(--fe-bg) 30%, var(--fe-bg) 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(rgba(245, 245, 245, 0.045) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 106, 0, 0.05) 1px, transparent 1.6px),
    repeating-linear-gradient(115deg, rgba(245, 245, 245, 0.016) 0 1px, transparent 1px 150px);
  background-size: 26px 26px, 118px 118px, auto;
  background-position: 0 0, 40px 70px, 0 0;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.85));
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.85));
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(255, 106, 0, 0.3); }

h1, .fe-h1 { font-size: var(--fe-fs-h1); font-weight: 800; line-height: 1.1; letter-spacing: -1.4px; }
h2, .fe-h2 { font-size: var(--fe-fs-h2); font-weight: 800; line-height: 1.15; letter-spacing: -1px; }
h3, .fe-h3 { font-size: var(--fe-fs-h3); font-weight: 700; letter-spacing: -0.5px; }
h4, .fe-h4 { font-size: var(--fe-fs-h4); font-weight: 700; letter-spacing: -0.2px; }
.fe-lead { color: var(--fe-muted); font-size: var(--fe-fs-lg); }
.fe-muted { color: var(--fe-muted); }
.fe-faint { color: var(--fe-faint); }
.fe-mono { font-family: var(--fe-mono); font-size: 0.92em; }
.fe-grad {
  background: linear-gradient(115deg, var(--fe-accent), #ffb36b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fe-kicker {
  color: var(--fe-accent); font-size: var(--fe-fs-sm); font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
}

/* ---------- 3. Фоновые визуалы (глубина без ущерба читаемости) ---------- */
.fe-bg-decor {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    /* мягкие световые пятна */
    radial-gradient(560px 380px at 12% -6%, rgba(255, 106, 0, 0.075), transparent 70%),
    radial-gradient(720px 520px at 92% 8%, rgba(255, 106, 0, 0.045), transparent 70%),
    radial-gradient(900px 700px at 50% 115%, rgba(255, 106, 0, 0.035), transparent 70%);
}
.fe-bg-decor::before {
  /* редкая точечная текстура с глубиной (вместо крупной сетки) */
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 106, 0, 0.10) 1px, transparent 1.8px);
  background-size: 26px 26px, 92px 92px;
  background-position: 0 0, 13px 40px;
  mask-image: radial-gradient(ellipse 95% 78% at 50% 0%, #000 25%, transparent 80%);
}
.fe-bg-decor::after {
  /* фирменная тонкая orange-линия сверху */
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 106, 0, 0.5), transparent);
}

/* ---------- 4. Сетка ---------- */
.fe-container { max-width: var(--fe-container); margin: 0 auto; padding: 0 var(--fe-sp-5); }
.fe-grid { display: grid; gap: var(--fe-gap); }
.fe-grid-2 { grid-template-columns: repeat(2, 1fr); }
.fe-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fe-grid-4 { grid-template-columns: repeat(4, 1fr); }
.fe-row { display: flex; gap: var(--fe-sp-3); align-items: center; }
.fe-row.wrap { flex-wrap: wrap; }
.fe-row.between { justify-content: space-between; }
.fe-row.end { justify-content: flex-end; }
.fe-section { padding: var(--fe-sp-8) 0; position: relative; z-index: 1; }
.fe-stack > * + * { margin-top: var(--fe-sp-4); }

/* ---------- 5. Кнопки ---------- */
.fe-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fe-sp-2);
  padding: 12px 22px; border-radius: 12px;
  font-family: var(--fe-font); font-weight: 700; font-size: var(--fe-fs-md);
  border: 1px solid transparent; cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform 0.15s, box-shadow var(--fe-tr), background var(--fe-tr), border-color var(--fe-tr), opacity var(--fe-tr);
}
.fe-btn:hover { transform: translateY(-1px); }
.fe-btn:active { transform: translateY(0); }
.fe-btn:disabled, .fe-btn.is-disabled {
  opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}
.fe-btn-primary {
  background: linear-gradient(135deg, var(--fe-accent), #e05a00);
  color: #fff; box-shadow: var(--fe-shadow-accent);
}
.fe-btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 106, 0, 0.42); }
.fe-btn-ghost { background: var(--fe-elevated); color: var(--fe-text); border-color: var(--fe-line); }
.fe-btn-ghost:hover { border-color: var(--fe-accent-line); }
.fe-btn-outline { background: transparent; border-color: var(--fe-accent-line); color: var(--fe-accent-2); }
.fe-btn-outline:hover { background: var(--fe-accent-soft); }
.fe-btn-danger { background: rgba(255, 69, 58, 0.1); color: var(--fe-error); border-color: rgba(255, 69, 58, 0.3); }
.fe-btn-sm { padding: 9px 16px; font-size: var(--fe-fs-sm); border-radius: 10px; }
.fe-btn-lg { padding: 16px 32px; font-size: var(--fe-fs-lg); border-radius: 14px; }
.fe-btn-block { width: 100%; }

/* ---------- 6. Карточки ---------- */
.fe-card {
  background: var(--fe-glass-bg), rgba(17, 17, 17, 0.55);
  -webkit-backdrop-filter: var(--fe-glass-blur); backdrop-filter: var(--fe-glass-blur);
  border: 1px solid var(--fe-glass-line);
  box-shadow: var(--fe-glass-spec);
  border-radius: var(--fe-r-lg); padding: 28px;
  transition: transform var(--fe-tr), border-color var(--fe-tr), box-shadow var(--fe-tr);
}
.fe-card:hover { transform: translateY(-3px); border-color: var(--fe-accent-line); box-shadow: var(--fe-shadow); }
.fe-card.flat:hover { transform: none; box-shadow: none; border-color: var(--fe-line); }
.fe-card.elevated { background: var(--fe-elevated); }
.fe-card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--fe-accent-soft); border: 1px solid rgba(255, 106, 0, 0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: var(--fe-sp-4);
}
.fe-card h3 { margin-bottom: var(--fe-sp-2); }
.fe-card p { color: var(--fe-muted); font-size: 14.5px; }

/* ---------- 7. Badges ---------- */
.fe-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--fe-r-full);
  font-size: var(--fe-fs-xs); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  border: 1px solid var(--fe-line-strong); color: var(--fe-muted);
  background: var(--fe-elevated);
}
.fe-badge-accent { color: var(--fe-accent-2); background: var(--fe-accent-soft); border-color: var(--fe-accent-line); }
.fe-badge-success { color: var(--fe-success); background: rgba(52, 199, 89, 0.09); border-color: rgba(52, 199, 89, 0.26); }
.fe-badge-error { color: var(--fe-error); background: rgba(255, 69, 58, 0.09); border-color: rgba(255, 69, 58, 0.26); }
.fe-badge-warning { color: var(--fe-warning); background: rgba(255, 214, 10, 0.07); border-color: rgba(255, 214, 10, 0.22); }
.fe-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 8. Inputs / Search / Filter / Dropdown ---------- */
.fe-field { display: flex; flex-direction: column; gap: 7px; }
.fe-label { font-size: var(--fe-fs-sm); font-weight: 600; color: var(--fe-muted); }
.fe-input, .fe-select, .fe-textarea {
  width: 100%; padding: 13px 16px;
  background: var(--fe-elevated); border: 1px solid var(--fe-line);
  border-radius: 12px; color: var(--fe-text);
  font-family: var(--fe-font); font-size: var(--fe-fs-md);
  transition: border-color var(--fe-tr), box-shadow var(--fe-tr);
  outline: none;
}
.fe-select { appearance: none; cursor: pointer; }
.fe-input::placeholder, .fe-textarea::placeholder { color: var(--fe-faint); }
.fe-input:focus, .fe-select:focus, .fe-textarea:focus {
  border-color: var(--fe-accent); box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.13);
}
.fe-input.is-error, .fe-textarea.is-error { border-color: var(--fe-error); }
.fe-input:disabled { opacity: 0.5; cursor: not-allowed; }
.fe-hint { font-size: var(--fe-fs-xs); color: var(--fe-faint); }
.fe-hint.error { color: var(--fe-error); }
.fe-search { position: relative; }
.fe-search .fe-input { padding-left: 42px; }
.fe-search::before {
  content: ""; position: absolute; left: 15px; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%); pointer-events: none; opacity: 0.55;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239a9a9a' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.fe-chip {
  padding: 8px 16px; border-radius: var(--fe-r-full);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), rgba(23, 23, 23, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--fe-glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--fe-muted); font-size: var(--fe-fs-sm); font-weight: 600;
  cursor: pointer; transition: all var(--fe-tr); white-space: nowrap;
}
.fe-chip:hover { border-color: var(--fe-accent-line); color: var(--fe-text); }
.fe-chip.active { background: var(--fe-accent); border-color: var(--fe-accent); color: #fff; }

.fe-dropdown { position: relative; display: inline-block; }
.fe-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px;
  background: var(--fe-glass-bg), rgba(23, 23, 23, 0.72);
  -webkit-backdrop-filter: var(--fe-glass-blur); backdrop-filter: var(--fe-glass-blur);
  border: 1px solid var(--fe-glass-line);
  border-radius: var(--fe-r-md); padding: 6px; z-index: 60;
  box-shadow: var(--fe-glass-shadow);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--fe-tr), transform var(--fe-tr);
}
.fe-dropdown.open .fe-dropdown-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fe-dropdown-menu a, .fe-dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: none; background: none; border-radius: 9px;
  color: var(--fe-text); font-size: var(--fe-fs-md); font-family: var(--fe-font);
  cursor: pointer; text-align: left; transition: background var(--fe-tr);
}
.fe-dropdown-menu a:hover, .fe-dropdown-menu button:hover { background: var(--fe-surface-2, #1d1d1d); }
.fe-dropdown-sep { height: 1px; background: var(--fe-line); margin: 6px 4px; }

/* ---------- 9. Navbar / UserMenu ---------- */
.fe-header {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 55%), rgba(8, 8, 8, 0.6);
  border-bottom: 1px solid var(--fe-glass-line);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.fe-header-inner { display: flex; align-items: center; gap: 26px; height: 68px; }
.fe-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.3px; }
.fe-logo-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--fe-accent), #c24700);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff;
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.32);
}
.fe-nav { display: flex; gap: 2px; margin-left: 6px; }
.fe-nav a {
  padding: 8px 13px; border-radius: 10px;
  color: var(--fe-muted); font-size: 14.5px; font-weight: 500;
  transition: color var(--fe-tr), background var(--fe-tr);
}
.fe-nav a:hover { color: var(--fe-text); background: rgba(255, 255, 255, 0.04); }
.fe-nav a.active { color: var(--fe-text); background: rgba(255, 255, 255, 0.06); }
.fe-header-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.fe-burger {
  display: none; background: none; border: 1px solid var(--fe-line);
  border-radius: 10px; color: var(--fe-text); font-size: 19px;
  padding: 6px 12px; cursor: pointer;
}

.fe-usermenu { display: flex; align-items: center; gap: 12px; }
.fe-usermenu .fe-balance-pill {
  padding: 7px 14px; border-radius: var(--fe-r-full);
  background: var(--fe-elevated); border: 1px solid var(--fe-line);
  font-weight: 700; font-size: var(--fe-fs-sm); color: var(--fe-text);
}
.fe-usermenu .fe-balance-pill b { color: var(--fe-accent-2); }
.fe-avatar-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 9px; color: var(--fe-text); font-weight: 600; font-size: var(--fe-fs-sm); }

.fe-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--fe-accent-soft); border: 1px solid var(--fe-accent-line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--fe-accent-2); flex-shrink: 0; overflow: hidden;
}
.fe-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 10. Hero ---------- */
.fe-hero { position: relative; padding: var(--fe-sp-9) 0 var(--fe-sp-8); z-index: 1; overflow: hidden; }
.fe-hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--fe-sp-7); align-items: center; }
.fe-hero h1 { margin: 18px 0 20px; }
.fe-hero .fe-lead { max-width: 520px; margin-bottom: 34px; }
.fe-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.fe-hero-visual {
  position: relative; border-radius: var(--fe-r-xl);
  border: 1px solid var(--fe-line-strong);
  background:
    radial-gradient(300px 200px at 70% 20%, rgba(255, 106, 0, 0.14), transparent 70%),
    var(--fe-surface);
  min-height: 340px; overflow: hidden;
  display: flex; flex-direction: column;
}
.fe-hero-visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.fe-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--fe-r-full);
  background: var(--fe-accent-soft); border: 1px solid var(--fe-accent-line);
  color: var(--fe-accent-2); font-size: var(--fe-fs-sm); font-weight: 600;
}

/* ---------- 11. Stats ---------- */
.fe-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--fe-gap); }
.fe-stat {
  background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-lg); padding: 24px;
}
.fe-stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.6px; }
.fe-stat b span { color: var(--fe-accent); }
.fe-stat small { color: var(--fe-muted); font-size: var(--fe-fs-sm); }

/* ---------- 12. ProductCard / Grid / Gallery ---------- */
.fe-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--fe-gap); }
.fe-product-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--fe-glass-bg), rgba(17, 17, 17, 0.55);
  -webkit-backdrop-filter: var(--fe-glass-blur); backdrop-filter: var(--fe-glass-blur);
  border: 1px solid var(--fe-glass-line);
  box-shadow: var(--fe-glass-spec);
  border-radius: var(--fe-r-lg);
  transition: transform var(--fe-tr), border-color var(--fe-tr), box-shadow var(--fe-tr);
}
.fe-product-card:hover { transform: translateY(-4px); border-color: var(--fe-accent-line); box-shadow: var(--fe-shadow); }
.fe-product-cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    radial-gradient(240px 160px at 70% 20%, rgba(255, 106, 0, 0.13), transparent 70%),
    var(--fe-elevated);
}
.fe-product-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.fe-product-card:hover .fe-product-cover img { transform: scale(1.04); }
.fe-product-cover .fe-badge { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(6px); }
.fe-product-owned {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 11px; border-radius: var(--fe-r-full);
  background: rgba(52, 199, 89, 0.14); border: 1px solid rgba(52, 199, 89, 0.35);
  color: var(--fe-success); font-size: var(--fe-fs-xs); font-weight: 700;
  backdrop-filter: blur(6px);
}
.fe-product-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.fe-product-title { font-size: 17.5px; font-weight: 700; letter-spacing: -0.2px; }
.fe-product-title .ver { color: var(--fe-faint); font-weight: 600; font-size: 13px; margin-left: 6px; }
.fe-product-desc {
  color: var(--fe-muted); font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fe-product-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.fe-product-meta span {
  font-size: var(--fe-fs-xs); color: var(--fe-faint); font-weight: 600;
  padding: 4px 9px; border-radius: 7px; background: var(--fe-elevated);
  border: 1px solid var(--fe-line);
}
.fe-product-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--fe-line); }
.fe-price { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.fe-price small { display: block; font-size: 11px; color: var(--fe-faint); font-weight: 600; }

.fe-gallery { display: flex; flex-direction: column; gap: 12px; }
.fe-gallery-main {
  border-radius: var(--fe-r-lg); overflow: hidden; border: 1px solid var(--fe-line);
  aspect-ratio: 16 / 9; background: var(--fe-elevated);
}
.fe-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.fe-gallery-thumbs { display: flex; gap: 10px; }
.fe-gallery-thumbs button {
  width: 76px; height: 52px; border-radius: 10px; overflow: hidden; padding: 0;
  border: 1px solid var(--fe-line); background: var(--fe-elevated); cursor: pointer;
  transition: border-color var(--fe-tr);
}
.fe-gallery-thumbs button.active, .fe-gallery-thumbs button:hover { border-color: var(--fe-accent); }
.fe-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 13. Tabs / Breadcrumbs ---------- */
.fe-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--fe-line); overflow-x: auto; }
.fe-tab {
  padding: 11px 18px; background: none; border: none; cursor: pointer;
  color: var(--fe-muted); font-family: var(--fe-font); font-size: var(--fe-fs-md); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color var(--fe-tr), border-color var(--fe-tr);
}
.fe-tab:hover { color: var(--fe-text); }
.fe-tab.active { color: var(--fe-text); border-bottom-color: var(--fe-accent); }

.fe-breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: var(--fe-fs-sm); color: var(--fe-faint); flex-wrap: wrap; }
.fe-breadcrumbs a { color: var(--fe-muted); transition: color var(--fe-tr); }
.fe-breadcrumbs a:hover { color: var(--fe-accent-2); }
.fe-breadcrumbs .sep { opacity: 0.5; }
.fe-breadcrumbs .current { color: var(--fe-text); font-weight: 600; }

/* ---------- 14. Modal / Drawer ---------- */
.fe-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fe-overlay.open { opacity: 1; pointer-events: auto; }
.fe-modal {
  width: 100%; max-width: 460px; max-height: 86vh; overflow-y: auto;
  background: var(--fe-glass-bg), rgba(23, 23, 23, 0.78);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid var(--fe-glass-line);
  box-shadow: var(--fe-glass-shadow);
  border-radius: var(--fe-r-lg); padding: 28px;
  transform: translateY(14px) scale(0.98); transition: transform 0.22s ease;
}
.fe-overlay.open .fe-modal { transform: none; }
.fe-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.fe-modal-close {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--fe-line);
  background: var(--fe-surface); color: var(--fe-muted); font-size: 16px; cursor: pointer;
  transition: all var(--fe-tr);
}
.fe-modal-close:hover { color: var(--fe-text); border-color: var(--fe-accent-line); }

.fe-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(420px, 92vw);
  background: var(--fe-surface); border-left: 1px solid var(--fe-line-strong);
  transform: translateX(100%); transition: transform 0.28s ease;
  display: flex; flex-direction: column;
}
.fe-drawer.open { transform: none; }
.fe-drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--fe-line); display: flex; justify-content: space-between; align-items: center; }
.fe-drawer-body { padding: 24px; overflow-y: auto; flex: 1; }

/* ---------- 15. Timeline ---------- */
.fe-timeline { position: relative; padding-left: 30px; }
.fe-timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, var(--fe-accent-line), var(--fe-line));
}
.fe-timeline-item { position: relative; padding-bottom: 26px; }
.fe-timeline-item:last-child { padding-bottom: 0; }
.fe-timeline-item::before {
  content: ""; position: absolute; left: -26px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fe-accent); box-shadow: 0 0 0 4px var(--fe-accent-soft);
}
.fe-timeline-item .date { font-size: var(--fe-fs-xs); color: var(--fe-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }

/* ---------- 16. Account: Sidebar / BalanceCard / License / Purchase / Referral ---------- */
.fe-account { display: grid; grid-template-columns: 250px 1fr; gap: var(--fe-sp-6); align-items: start; }
.fe-sidebar {
  background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-lg); padding: 12px; position: sticky; top: 88px;
}
.fe-sidebar a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--fe-muted); font-size: var(--fe-fs-md); font-weight: 500;
  transition: all var(--fe-tr);
}
.fe-sidebar a:hover { color: var(--fe-text); background: rgba(255, 255, 255, 0.04); }
.fe-sidebar a.active { color: var(--fe-text); background: var(--fe-accent-soft); }
.fe-sidebar a.active::before {
  content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--fe-accent);
  margin-left: -14px; margin-right: 0; position: relative; left: 0;
}

.fe-balance-card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(280px 160px at 90% -10%, rgba(255, 106, 0, 0.16), transparent 70%),
    var(--fe-elevated);
  border: 1px solid var(--fe-accent-line); border-radius: var(--fe-r-lg); padding: 26px 28px;
}
.fe-balance-card .amount { font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 6px 0 16px; }
.fe-balance-card .label { color: var(--fe-muted); font-size: var(--fe-fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; }

.fe-license-card {
  background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.fe-key-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--fe-bg); border: 1px dashed var(--fe-line-strong);
  border-radius: 10px; padding: 12px 14px;
  font-family: var(--fe-mono); font-size: 13.5px; letter-spacing: 0.4px;
  overflow-x: auto; white-space: nowrap;
}
.fe-key-box button {
  margin-left: auto; flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--fe-accent-2); font-weight: 700; font-size: var(--fe-fs-sm); font-family: var(--fe-font);
}
.fe-key-box button:hover { text-decoration: underline; }

.fe-purchase-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-md); padding: 16px 18px;
}
.fe-purchase-card .thumb {
  width: 64px; height: 44px; border-radius: 9px; flex-shrink: 0;
  background: var(--fe-elevated); border: 1px solid var(--fe-line); overflow: hidden;
}
.fe-purchase-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.fe-purchase-card .info { flex: 1; min-width: 0; }
.fe-purchase-card .info b { display: block; font-size: var(--fe-fs-md); }
.fe-purchase-card .info small { color: var(--fe-faint); }

.fe-referral-card {
  background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-lg); padding: 26px;
}
.fe-ref-link {
  display: flex; align-items: center; gap: 10px;
  background: var(--fe-bg); border: 1px solid var(--fe-line-strong);
  border-radius: 10px; padding: 12px 14px; font-family: var(--fe-mono); font-size: 13px;
  overflow-x: auto; white-space: nowrap;
}

/* ---------- 17. Состояния ---------- */
.fe-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--fe-line-strong); border-top-color: var(--fe-accent);
  animation: fe-spin 0.8s linear infinite;
}
.fe-spinner.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes fe-spin { to { transform: rotate(360deg); } }
.fe-skeleton {
  border-radius: var(--fe-r-md);
  background: linear-gradient(90deg, var(--fe-surface) 25%, var(--fe-elevated-2) 50%, var(--fe-surface) 75%);
  background-size: 200% 100%;
  animation: fe-shimmer 1.4s infinite;
}
@keyframes fe-shimmer { to { background-position: -200% 0; } }

.fe-empty, .fe-error-state {
  text-align: center; padding: var(--fe-sp-8) var(--fe-sp-5);
  border: 1px dashed var(--fe-line-strong); border-radius: var(--fe-r-lg);
}
.fe-error-state { border-color: rgba(255, 69, 58, 0.3); }
.fe-empty .icon, .fe-error-state .icon { font-size: 42px; margin-bottom: 14px; opacity: 0.75; }
.fe-empty h3, .fe-error-state h3 { margin-bottom: 8px; }
.fe-empty p, .fe-error-state p { color: var(--fe-muted); max-width: 400px; margin: 0 auto 20px; }

.fe-alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 18px; border-radius: var(--fe-r-md);
  border: 1px solid var(--fe-line); background: var(--fe-elevated);
}
.fe-alert-error { border-color: rgba(255, 69, 58, 0.32); background: rgba(255, 69, 58, 0.07); color: #ffb3ad; }
.fe-alert-success { border-color: rgba(52, 199, 89, 0.32); background: rgba(52, 199, 89, 0.07); color: #a9eabb; }
.fe-alert-warning { border-color: rgba(255, 214, 10, 0.26); background: rgba(255, 214, 10, 0.06); color: #ffe27a; }
.fe-alert-info { border-color: var(--fe-accent-line); background: var(--fe-accent-soft); color: #ffc79a; }

.fe-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--fe-glass-bg), rgba(23, 23, 23, 0.8);
  -webkit-backdrop-filter: var(--fe-glass-blur); backdrop-filter: var(--fe-glass-blur);
  border: 1px solid var(--fe-glass-line);
  color: var(--fe-text); padding: 13px 22px; border-radius: 12px;
  font-weight: 600; z-index: 120; opacity: 0; pointer-events: none;
  transition: all 0.25s ease; box-shadow: var(--fe-glass-shadow);
}
.fe-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fe-toast.success { border-color: rgba(52, 199, 89, 0.4); }
.fe-toast.error { border-color: rgba(255, 69, 58, 0.4); }

/* ---------- 18. FAQ / таблица / footer ---------- */
.fe-faq-item {
  border: 1px solid var(--fe-glass-line); border-radius: var(--fe-r-md);
  background: var(--fe-glass-bg), rgba(17, 17, 17, 0.5);
  -webkit-backdrop-filter: var(--fe-glass-blur); backdrop-filter: var(--fe-glass-blur);
  box-shadow: var(--fe-glass-spec);
  margin-bottom: 12px; overflow: hidden;
}
.fe-faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--fe-text); font-size: 16px; font-weight: 600; font-family: var(--fe-font);
  padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.fe-faq-q::after { content: "+"; font-size: 22px; color: var(--fe-accent); transition: transform var(--fe-tr); flex-shrink: 0; }
.fe-faq-item.open .fe-faq-q::after { transform: rotate(45deg); }
.fe-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.fe-faq-a p { padding: 0 24px 20px; color: var(--fe-muted); }
.fe-faq-item.open .fe-faq-a { max-height: 320px; }

.fe-table { width: 100%; border-collapse: collapse; }
.fe-table th {
  text-align: left; padding: 12px 16px; color: var(--fe-muted);
  font-size: var(--fe-fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--fe-line-strong);
}
.fe-table td { padding: 14px 16px; border-bottom: 1px solid var(--fe-line); }
.fe-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.fe-footer {
  border-top: 1px solid var(--fe-line); padding: 56px 0 36px;
  position: relative; z-index: 1; background: #0a0a0a;
}
.fe-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.fe-footer h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.fe-footer ul { list-style: none; }
.fe-footer li { margin-bottom: 9px; }
.fe-footer a { color: var(--fe-muted); font-size: 14px; transition: color var(--fe-tr); }
.fe-footer a:hover { color: var(--fe-accent-2); }
.fe-footer-desc { color: var(--fe-muted); font-size: 14px; max-width: 300px; margin-top: 12px; }
.fe-footer-bottom {
  border-top: 1px solid var(--fe-line); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--fe-faint); font-size: 13px;
}

/* страницы */
.fe-page { padding: var(--fe-sp-7) 0 var(--fe-sp-9); position: relative; z-index: 1; }
.fe-page h1 { margin-bottom: 12px; }
.fe-page .fe-lead { max-width: 640px; margin-bottom: 40px; }

/* ---------- 19. Mobile layout ---------- */
/* страница товара: основная двухколоночная сетка */
#product-main { grid-template-columns: 1.05fr 0.95fr; }

@media (max-width: 900px) {
  /* Шапка: навигация сворачивается в бургер, иначе обрезается на планшете */
  .fe-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; padding: 12px 20px 20px; gap: 4px;
    background: rgba(8, 8, 8, 0.97); border-bottom: 1px solid var(--fe-line);
  }
  .fe-nav.open { display: flex; }
  .fe-burger { display: block; }
  #product-main { grid-template-columns: 1fr !important; }
  .fe-grid-3, .fe-grid-4, .fe-product-grid { grid-template-columns: 1fr 1fr; }
  .fe-stats { grid-template-columns: 1fr 1fr; }
  .fe-footer-grid { grid-template-columns: 1fr 1fr; }
  .fe-hero-grid { grid-template-columns: 1fr; }
  .fe-hero-visual { min-height: 240px; }
  .fe-account { grid-template-columns: 1fr; }
  .fe-sidebar { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .fe-sidebar a { white-space: nowrap; }
}
@media (max-width: 720px) {
  :root { --fe-gap: 14px; }
  .fe-container { padding: 0 var(--fe-sp-4); }
  .fe-section { padding: var(--fe-sp-7) 0; }
  .fe-header-cta { margin-left: auto; }
  .fe-usermenu .username { display: none; }
  .fe-grid-3, .fe-grid-4, .fe-grid-2, .fe-product-grid { grid-template-columns: 1fr; }
  .fe-card { padding: 22px; }
  .fe-hero { padding: var(--fe-sp-8) 0 var(--fe-sp-7); }
  .fe-table { display: block; overflow-x: auto; }
  .fe-purchase-card { flex-wrap: wrap; }
}

/* ---------- 26. Scroll-reveal и «живые» карточки ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* мягкая подсветка, следующая за курсором (аккуратно, без перегруза) */
.fe-card, .fe-product-card { position: relative; overflow: hidden; }
/* «жидкий» блик, медленно скользящий по стеклу */
.fe-card::before, .fe-product-card::before {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none; z-index: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.10) 50%, transparent 58%);
  transform: translateX(-70%);
  animation: fe-glass-sheen 7s ease-in-out infinite;
}
.fe-product-card::before { animation-delay: 2.4s; }
@keyframes fe-glass-sheen {
  0%, 55% { transform: translateX(-70%); }
  85%, 100% { transform: translateX(70%); }
}
@media (prefers-reduced-motion: reduce) {
  .fe-card::before, .fe-product-card::before { animation: none; opacity: 0.4; transform: none; }
}
.fe-card > *, .fe-product-card > * { position: relative; z-index: 1; }
.fe-card::after, .fe-product-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 106, 0, 0.07), transparent 65%);
  opacity: 0; transition: opacity var(--fe-tr);
}
.fe-card:hover::after, .fe-product-card:hover::after { opacity: 1; }

/* ---------- 27. Платформы (hero) ---------- */
.fe-platforms { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.fe-platforms .fe-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--fe-r-full);
  border: 1px solid var(--fe-line-strong); background: var(--fe-surface);
  font-size: 13.5px; font-weight: 600; color: var(--fe-text);
  transition: border-color var(--fe-tr), background var(--fe-tr), transform var(--fe-tr);
}
.fe-platforms .fe-chip:hover { border-color: var(--fe-accent-line); background: var(--fe-accent-soft); transform: translateY(-2px); }
.fe-platforms .fe-chip .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--fe-accent); box-shadow: 0 0 8px rgba(255, 106, 0, 0.55); }

/* ---------- 28. Корзина ---------- */
.fe-cart-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; font-size: 17px;
  background: var(--fe-elevated); border: 1px solid var(--fe-line);
  color: var(--fe-text); cursor: pointer; text-decoration: none;
  transition: border-color var(--fe-tr), background var(--fe-tr), transform var(--fe-tr);
}
.fe-cart-btn:hover { border-color: var(--fe-accent-line); background: var(--fe-accent-soft); transform: translateY(-1px); }
.fe-cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 999px; background: var(--fe-accent); color: #0a0a0a;
  font-size: 11px; font-weight: 800; display: none; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--fe-bg);
}
.fe-cart-badge.show { display: inline-flex; }

.fe-cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.fe-cart-item {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  padding: 18px; background: var(--fe-surface); border: 1px solid var(--fe-line);
  border-radius: var(--fe-r-lg); transition: border-color var(--fe-tr);
}
.fe-cart-item:hover { border-color: var(--fe-accent-line); }
.fe-cart-item.unavailable { opacity: 0.55; }
.fe-cart-cover {
  width: 92px; height: 64px; border-radius: 10px; overflow: hidden;
  background: var(--fe-elevated); display: flex; align-items: center; justify-content: center;
  font-size: 24px; border: 1px solid var(--fe-line);
}
.fe-cart-cover img { width: 100%; height: 100%; object-fit: cover; }
.fe-cart-name { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.fe-cart-name a { color: var(--fe-text); text-decoration: none; }
.fe-cart-name a:hover { color: var(--fe-accent-2); }
.fe-qty {
  display: inline-flex; align-items: center; border: 1px solid var(--fe-line-strong);
  border-radius: 10px; overflow: hidden; background: var(--fe-elevated);
}
.fe-qty button {
  width: 34px; height: 34px; background: none; border: none; color: var(--fe-text);
  font-size: 17px; cursor: pointer; transition: background var(--fe-tr);
}
.fe-qty button:hover { background: var(--fe-accent-soft); color: var(--fe-accent-2); }
.fe-qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: 14px; }
.fe-cart-remove {
  background: none; border: none; color: var(--fe-faint); font-size: 13px;
  cursor: pointer; padding: 4px 0; transition: color var(--fe-tr);
}
.fe-cart-remove:hover { color: var(--fe-error); }
.fe-pay-method {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--fe-elevated); border: 1px solid var(--fe-line);
  color: var(--fe-text); font-family: var(--fe-font); font-size: 14.5px; font-weight: 600;
  transition: border-color var(--fe-tr), background var(--fe-tr);
}
.fe-pay-method:hover:not(:disabled) { border-color: var(--fe-accent-line); }
.fe-pay-method.active { border-color: var(--fe-accent); background: var(--fe-accent-soft); }
.fe-pay-method:disabled { opacity: 0.55; cursor: not-allowed; }
.fe-pay-method .radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--fe-line-strong); transition: border-color var(--fe-tr), box-shadow var(--fe-tr);
}
.fe-pay-method.active .radio { border-color: var(--fe-accent); box-shadow: inset 0 0 0 4px var(--fe-bg), 0 0 0 0; background: var(--fe-accent); }

@media (max-width: 900px) {
  .fe-cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .fe-cart-item { grid-template-columns: 72px 1fr; }
  .fe-cart-cover { width: 72px; height: 52px; }
  .fe-cart-item .fe-cart-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}

/* ---------- 29. «Живая машина выдачи» (hero) ---------- */
.fe-machine { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.fe-machine svg { width: 100%; height: 100%; }
.fm-lines path {
  stroke: rgba(255, 255, 255, 0.10); stroke-width: 1.2; fill: none;
  stroke-linejoin: round;
}
.fm-ports circle { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.2; }
.fm-node rect {
  fill: rgba(17, 17, 17, 0.92); stroke: var(--fe-line-strong); stroke-width: 1;
  transition: stroke var(--fe-tr);
}
.fm-node text {
  fill: var(--fe-muted); font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
}
.fm-node .fm-dot { fill: var(--fe-faint); }
.fm-node.active rect { stroke: var(--fe-accent-line); }
.fm-node.active text { fill: var(--fe-text); }
.fm-node.active .fm-dot { fill: var(--fe-accent); filter: drop-shadow(0 0 5px rgba(255, 106, 0, 0.8)); }
.fm-node-top rect { fill: var(--fe-elevated); stroke: var(--fe-accent-line); }
.fm-node-top text { fill: var(--fe-text); letter-spacing: 1px; }
.fm-ring { stroke: rgba(255, 106, 0, 0.35); stroke-width: 1.2; fill: none; stroke-dasharray: 3 7; }
.fm-sonar { stroke: rgba(255, 106, 0, 0.5); stroke-width: 1; fill: none; }
.fm-halo { animation: fm-breathe 4.5s ease-in-out infinite; }
@keyframes fm-breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.fm-core rect {
  fill: #111111; stroke: var(--fe-accent); stroke-width: 1.4;
  filter: drop-shadow(0 0 18px rgba(255, 106, 0, 0.45));
}
.fm-core text {
  fill: var(--fe-accent-2); font-family: "JetBrains Mono", monospace;
  font-size: 25px; font-weight: 700; letter-spacing: 1px;
}
.fm-pulses circle { fill: #F5F5F5; opacity: 0.85; }
.fm-pulses .p2 { fill: var(--fe-accent); filter: drop-shadow(0 0 5px rgba(255, 106, 0, 0.9)); }
.fm-pulses .p3 { fill: var(--fe-success, #34C759); filter: drop-shadow(0 0 6px rgba(52, 199, 89, 0.8)); }
.fe-machine-chips {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 0 14px 14px;
}
.fe-machine-chips[hidden] { display: none; }
.fe-machine-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--fe-r-full);
  background: rgba(17, 17, 17, 0.9); border: 1px solid var(--fe-line-strong);
  font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fe-muted);
}
.fe-machine-chip b { color: var(--fe-text); font-weight: 700; }
.fe-machine-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fe-success, #34C759); box-shadow: 0 0 8px rgba(52, 199, 89, 0.7);
  animation: fm-breathe 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .fm-pulses, .fm-sonar { display: none; }
  .fm-halo, .fe-machine-chip .dot { animation: none; }
}

/* ---------- 30. Поток заказов из узла ВЫДАЧА ---------- */
.fm-node-out rect { fill: rgba(17, 17, 17, 0.95); }
.fm-node-out text { fill: var(--fe-text); }
.fm-orders { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fm-order {
  position: absolute; bottom: auto;
  padding: 5px 11px; border-radius: var(--fe-r-full);
  background: rgba(17, 17, 17, 0.94); border: 1px solid rgba(52, 199, 89, 0.4);
  color: #7ee2a0; font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  box-shadow: 0 0 14px rgba(52, 199, 89, 0.12);
  opacity: 0;
  animation: fm-order-float var(--dur, 3.4s) ease-out forwards;
}
@keyframes fm-order-float {
  0% { opacity: 0; transform: translate(0, 8px) scale(0.85); }
  14% { opacity: 1; transform: translate(0, 0) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift, 0px), var(--rise, -42px)) scale(0.96); }
}
.fe-machine-chip.fm-live {
  position: absolute; left: 14px; top: 12px; bottom: auto;
}
.fe-machine-chip .dot-live { background: var(--fe-accent); box-shadow: 0 0 8px rgba(255, 106, 0, 0.7); }
@media (prefers-reduced-motion: reduce) {
  .fm-orders, .fm-live { display: none; }
}
