html, body {
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      scroll-behavior: smooth;
    }

    :root {
      --glow-primary: rgba(99, 102, 241, 0.5);
      --glow-secondary: rgba(56, 189, 248, 0.4);
      --glow-accent: rgba(168, 85, 247, 0.3);
      --glass-border: rgba(255, 255, 255, 0.08);
      --glass-bg: rgba(15, 23, 42, 0.6);
      --card-shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
      --card-shadow-hover: 0 35px 70px -30px var(--glow-primary), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    body {
      position: relative;
      overflow-x: hidden;
      background: #020617;
      background-image:
        radial-gradient(900px 500px at 15% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(700px 420px at 85% 20%, rgba(56, 189, 248, 0.15), transparent 60%),
        radial-gradient(900px 520px at 50% 90%, rgba(168, 85, 247, 0.12), transparent 60%);
    }

    body::before {
      content: "";
      position: fixed;
      inset: -25%;
      pointer-events: none;
      z-index: 0;
      background:
        radial-gradient(circle at 20% 25%, rgba(99, 102, 241, 0.4), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(56, 189, 248, 0.3), transparent 45%),
        radial-gradient(circle at 55% 85%, rgba(168, 85, 247, 0.2), transparent 45%);
      filter: blur(70px);
      opacity: 0.6;
      animation: bgFloat 18s ease-in-out infinite alternate;
    }

    body::after {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
      background-size: 28px 28px;
      opacity: 0.2;
      mask-image: radial-gradient(circle at 50% 20%, #000 30%, transparent 80%);
    }

    @keyframes bgFloat {
      0% { transform: translate3d(-2%, -2%, 0) scale(1); }
      100% { transform: translate3d(3%, 3%, 0) scale(1.08); }
    }

    .reveal {
      opacity: 0;
      transform: translateY(24px);
      filter: blur(8px);
      transition: opacity 800ms cubic-bezier(0.2, 0.9, 0.3, 1),
                  transform 800ms cubic-bezier(0.2, 0.9, 0.3, 1),
                  filter 800ms cubic-bezier(0.2, 0.9, 0.3, 1);
      will-change: opacity, transform, filter;
    }
    body.is-loaded .reveal {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.15s; }
    .reveal:nth-child(3) { transition-delay: 0.25s; }

    .glass-card {
      position: relative;
      overflow: hidden;
      backdrop-filter: blur(16px) saturate(180%);
      -webkit-backdrop-filter: blur(16px) saturate(180%);
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      box-shadow: var(--card-shadow);
      transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    }
    .glass-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0;
      background:
        radial-gradient(600px 200px at 20% 0%, rgba(99, 102, 241, 0.3), transparent 60%),
        radial-gradient(500px 220px at 80% 10%, rgba(56, 189, 248, 0.25), transparent 60%);
      transition: opacity 0.5s ease;
    }
    .glass-card:hover {
      border-color: rgba(99, 102, 241, 0.3);
      box-shadow: var(--card-shadow-hover);
    }
    .glass-card:hover::before { opacity: 1; }

    .hover-lift {
      transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.3s ease;
    }
    .hover-lift:hover { transform: translateY(-6px); }

    .input-glass {
      background: rgba(2, 6, 23, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(8px);
      transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
    }
    .input-glass:hover {
      background: rgba(2, 6, 23, 0.7);
      border-color: rgba(99, 102, 241, 0.3);
    }
    .input-glass:focus {
      outline: none;
      border-color: rgba(99, 102, 241, 0.8);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 10px 30px -20px rgba(99, 102, 241, 0.6);
      background: rgba(2, 6, 23, 0.8);
      transform: translateY(-2px);
    }

    .custom-checkbox {
      appearance: none;
      width: 1.3rem;
      height: 1.3rem;
      background: rgba(2, 6, 23, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 0.375rem;
      backdrop-filter: blur(4px);
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    .custom-checkbox:checked {
      background: linear-gradient(145deg, #4f46e5, #6366f1);
      border-color: #818cf8;
      box-shadow: 0 0 10px #6366f1;
    }
    .custom-checkbox:checked::after {
      content: "✓";
      color: white;
      font-size: 0.9rem;
      font-weight: bold;
    }
    .custom-checkbox:focus {
      outline: 2px solid rgba(99, 102, 241, 0.5);
      outline-offset: 2px;
    }

    .holiday-fields {
      overflow: hidden;
      max-height: 0;
      opacity: 0;
      transform: translateY(-8px);
      transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                  opacity 0.3s ease,
                  transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .holiday-fields.is-open {
      max-height: 280px;
      opacity: 1;
      transform: translateY(0);
    }

    .btn-reset {
      background: linear-gradient(145deg, #1e293b, #0f172a);
      border: 1px solid rgba(255,255,255,0.1);
      box-shadow: 0 10px 25px -12px #00000080;
      transition: all 0.2s;
    }
    .btn-reset:hover {
      background: linear-gradient(145deg, #334155, #1e293b);
      border-color: rgba(99, 102, 241, 0.4);
      box-shadow: 0 18px 35px -18px #6366f1;
      transform: scale(1.02);
    }
    .btn-reset:active { transform: scale(0.98); }

    .nav-link { position: relative; transition: color 0.2s; }
    .nav-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 1rem;
      right: 1rem;
      height: 2px;
      background: linear-gradient(90deg, #6366f1, #38bdf8);
      border-radius: 2px;
      opacity: 0;
      transform: scaleX(0.7);
      transition: opacity 0.2s, transform 0.2s;
    }
    .nav-link.active::after,
    .nav-link:hover::after { opacity: 1; transform: scaleX(1); }

    .mobile-top-nav {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.125rem;
    }

    .mobile-top-nav a {
      white-space: nowrap;
    }

    @media (max-width: 640px) {
      .glass-card { backdrop-filter: blur(20px); }
      .input-glass { font-size: 16px; padding-top: 14px; padding-bottom: 14px; }
      .btn-reset { height: 56px; }
      .pt-safe { padding-top: 7rem; }

      .mobile-top-nav {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        max-width: calc(100vw - 92px);
        white-space: nowrap;
        touch-action: pan-x;
      }

      .mobile-top-nav::-webkit-scrollbar {
        display: none;
      }

      .mobile-top-nav a {
        flex: 0 0 auto;
        font-size: 0.72rem !important;
        padding: 5px 7px !important;
      }
    }
    @media (min-width: 768px) {
      .pt-safe { padding-top: 6rem; }
    }

    #errorBox:not(.hidden) { animation: shake 0.3s ease-in-out; }
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-5px); }
      40% { transform: translateX(5px); }
      60% { transform: translateX(-3px); }
      80% { transform: translateX(3px); }
    }

    @media (prefers-reduced-motion: reduce) {
      * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }

    /* =========================
       Confidential results mask
       ========================= */
    .results-wrap { position: relative; }
    .results-wrap.is-hidden .results-content {
      filter: blur(10px);
      user-select: none;
      pointer-events: none;
    }
    .results-wrap .results-mask {
      display: none;
      position: absolute;
      inset: 0;
      border-radius: 1.5rem;
      background: rgba(2, 6, 23, 0.62);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.10);
      box-shadow: 0 30px 80px -50px rgba(0,0,0,0.8);
      align-items: center;
      justify-content: center;
      z-index: 5;
    }
    .results-wrap.is-hidden .results-mask { display: flex; }

    .results-mask .mask-pill {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: rgba(226,232,240,0.9);
      font-size: 12px;
      font-weight: 600;
    }

/* =========================
   Driver.js 0.9.8 custom
   ========================= */

/* затемнение */
#driver-page-overlay {
  background: rgba(2, 6, 23, 0.58) !important;
  backdrop-filter: blur(4px) !important;
}

/* убираем белую подложку вокруг highlighted stage */
#driver-highlighted-element-stage {
  background: transparent !important;
  box-shadow: none !important;
}

/* подсветка элемента */
.driver-highlighted-element {
  background: transparent !important;
  border-radius: 18px !important;
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.95),
    0 0 0 6px rgba(99, 102, 241, 0.18),
    0 14px 34px rgba(15, 23, 42, 0.35) !important;
}

/* САМОЕ ВАЖНОЕ: старый driver.js рисует поповер через #driver-popover-item */
#driver-popover-item.alvisa-tour {
  background: linear-gradient(
    135deg,
    rgba(10, 19, 52, 0.96) 0%,
    rgba(20, 32, 74, 0.92) 55%,
    rgba(35, 24, 78, 0.90) 100%
  ) !important;
  color: #eef2ff !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  min-width: 280px !important;
  max-width: 360px !important;
  box-shadow:
    0 24px 60px rgba(2, 6, 23, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(99, 102, 241, 0.14) !important;
}

/* скрываем стандартный треугольник, чтобы не было белой стрелки */
#driver-popover-item.alvisa-tour .driver-popover-tip {
  display: none !important;
}

/* заголовок */
#driver-popover-item.alvisa-tour .driver-popover-title {
  color: #f8fbff !important;
  font-size: 1.06rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.01em !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
}

/* описание */
#driver-popover-item.alvisa-tour .driver-popover-description {
  color: rgba(226, 232, 240, 0.92) !important;
  font-size: 0.94rem !important;
  line-height: 1.58 !important;
  font-weight: 400 !important;
  margin: 0 !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
}

/* footer */
#driver-popover-item.alvisa-tour .driver-popover-footer {
  display: block !important;
  margin-top: 18px !important;
}

/* левая кнопка */
#driver-popover-item.alvisa-tour .driver-popover-footer .driver-close-btn {
  float: left !important;
}

/* правая группа кнопок */
#driver-popover-item.alvisa-tour .driver-popover-footer .driver-btn-group,
#driver-popover-item.alvisa-tour .driver-popover-footer .driver-close-only-btn {
  float: right !important;
  display: flex !important;
  gap: 10px !important;
}

/* все кнопки */
#driver-popover-item.alvisa-tour .driver-popover-footer button {
  appearance: none !important;
  border: none !important;
  border-radius: 14px !important;
  min-height: 42px !important;
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
  text-shadow: none !important;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22) !important;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease !important;
  cursor: pointer !important;
}

/* secondary */
#driver-popover-item.alvisa-tour .driver-close-btn,
#driver-popover-item.alvisa-tour .driver-prev-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #dbeafe !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* primary */
#driver-popover-item.alvisa-tour .driver-next-btn {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* hover */
#driver-popover-item.alvisa-tour .driver-close-btn:hover,
#driver-popover-item.alvisa-tour .driver-prev-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px) !important;
}

#driver-popover-item.alvisa-tour .driver-next-btn:hover {
  background: linear-gradient(135deg, #7074ff 0%, #8b5cf6 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.34) !important;
}

/* active */
#driver-popover-item.alvisa-tour .driver-next-btn:active,
#driver-popover-item.alvisa-tour .driver-prev-btn:active,
#driver-popover-item.alvisa-tour .driver-close-btn:active {
  transform: translateY(0) !important;
}
    @font-face {
      font-family: "Anticva";
      src: url("../../fonts/Anticva-Regular.otf") format("opentype");
      font-display: swap;
    }

    :root {
      --alvisa-ink: #0b0d0f;
      --alvisa-graphite: #15191d;
      --alvisa-line: rgba(241, 238, 232, 0.11);
      --alvisa-muted: #9ca3ab;
      --alvisa-porcelain: #f1eee8;
      --alvisa-wine: #7a1638;
      --alvisa-steel: #6ea8e8;
      --alvisa-gold: #c6a15b;
    }

    body.calculator-page { background: var(--alvisa-ink); background-image: none; color: var(--alvisa-porcelain); }
    body.calculator-page::before, body.calculator-page::after { display: none; }
    .calculator-shell { max-width: 1180px; }
    .calculator-header { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--alvisa-line); }
    .calculator-kicker { color: #d2aebe; font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .calculator-title {
      margin-top: 9px;
      font-family: "Anticva", Georgia, serif;
      font-size: clamp(38px, 5vw, 58px) !important;
      font-weight: 400 !important;
      line-height: 1;
      letter-spacing: 0;
      color: var(--alvisa-porcelain);
    }
    .calculator-title span { background: none !important; color: inherit !important; -webkit-text-fill-color: currentColor; }
    .calculator-intro { margin-top: 10px !important; max-width: 620px; color: var(--alvisa-muted) !important; line-height: 1.6; }
    .calculator-layout { gap: 20px; align-items: start; }
    .calculator-panel {
      overflow: visible;
      border-radius: 9px !important;
      background: rgba(21, 25, 29, 0.82);
      border-color: var(--alvisa-line);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    }
    .calculator-panel::before { display: none; }
    .calculator-panel:hover { transform: none; border-color: rgba(241, 238, 232, 0.16); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25); }
    .calculator-section-heading {
      font-family: "Anticva", Georgia, serif;
      font-size: 24px !important;
      font-weight: 400 !important;
      letter-spacing: 0;
      background: none !important;
      color: var(--alvisa-porcelain) !important;
      -webkit-text-fill-color: currentColor;
    }
    .calculator-page label { color: #d7d3cd !important; }
    .calculator-page .input-glass {
      border-radius: 6px !important;
      background: #0f1215;
      border-color: rgba(241, 238, 232, 0.12);
      color: var(--alvisa-porcelain);
      backdrop-filter: none;
    }
    .calculator-page .input-glass:hover { background: #111417; border-color: rgba(198, 161, 91, 0.30); }
    .calculator-page .input-glass:focus {
      background: #111417;
      border-color: rgba(198, 161, 91, 0.62);
      box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.11);
      transform: none;
    }
    .calculator-page .custom-checkbox { border-radius: 4px; background: #0f1215; border-color: rgba(241, 238, 232, 0.16); box-shadow: none; }
    .calculator-page .custom-checkbox:checked { background: var(--alvisa-wine); border-color: #a44664; box-shadow: none; }
    .calculator-page .custom-checkbox:focus { outline-color: rgba(198, 161, 91, 0.46); }
    .calculator-page .btn-reset {
      border-radius: 6px !important;
      background: rgba(241, 238, 232, 0.05);
      border-color: rgba(241, 238, 232, 0.11);
      box-shadow: none;
    }
    .calculator-page .btn-reset:hover { background: rgba(241, 238, 232, 0.09); border-color: rgba(241, 238, 232, 0.18); box-shadow: none; transform: none; }
    #okladPeekBtn { border-radius: 5px !important; }
    #errorBox { border-radius: 6px !important; }
    .calculator-header-button { border-radius: 6px !important; }
    .calculator-result-panel { position: sticky; top: 92px; }
    .calculator-toggle { border-radius: 6px !important; background: rgba(241, 238, 232, 0.05) !important; }
    .calculator-total {
      padding: 20px 0 22px;
      border-top: 1px solid var(--alvisa-line);
      border-bottom: 1px solid var(--alvisa-line);
    }
    .calculator-total #net {
      font-family: "Anticva", Georgia, serif;
      font-size: clamp(38px, 5vw, 52px) !important;
      font-weight: 400 !important;
      letter-spacing: 0;
      color: var(--alvisa-porcelain);
      filter: none;
    }
    .calculator-badge { border-radius: 5px !important; background: rgba(110, 168, 232, 0.09) !important; color: #b9d4ef !important; }
    .calculator-metric {
      border-radius: 6px !important;
      background: rgba(11, 13, 15, 0.42) !important;
      border: 1px solid var(--alvisa-line) !important;
      box-shadow: none !important;
      padding: 16px !important;
    }
    .calculator-metric::before { display: none !important; }
    .calculator-metric p[id] { color: var(--alvisa-porcelain); }
    .calculator-beta { border-radius: 4px !important; background: rgba(198, 161, 91, 0.10) !important; color: #ddc18e !important; }
    .results-wrap .results-mask { border-radius: 7px; background: rgba(11, 13, 15, 0.76); border-color: var(--alvisa-line); }
    .results-mask .mask-pill { border-radius: 5px; background: #15191d; border-color: rgba(241, 238, 232, 0.14); color: #c9c5be; }
    .calculator-signup {
      border-radius: 7px !important;
      border-color: rgba(198, 161, 91, 0.22) !important;
      background: rgba(198, 161, 91, 0.06) !important;
      box-shadow: inset 3px 0 0 rgba(198, 161, 91, 0.55);
    }
    .calculator-signup-label { border-radius: 4px !important; background: rgba(241, 238, 232, 0.05) !important; color: #ddc18e !important; }
    .calculator-signup-title { font-family: "Anticva", Georgia, serif; font-size: 22px !important; font-weight: 400 !important; letter-spacing: 0; }
    .calculator-signup-primary { border-radius: 6px !important; background: var(--alvisa-wine) !important; color: #fff7f8 !important; }
    .calculator-signup-secondary { border-radius: 6px !important; }

    #driver-popover-item.alvisa-tour {
      border-radius: 8px !important;
      border-color: rgba(241, 238, 232, 0.14) !important;
      background: #15191d !important;
      color: var(--alvisa-porcelain) !important;
      box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52) !important;
    }
    #driver-popover-item.alvisa-tour .driver-popover-title { font-family: "Anticva", Georgia, serif !important; font-size: 1.35rem !important; font-weight: 400 !important; letter-spacing: 0 !important; }
    #driver-popover-item.alvisa-tour .driver-popover-description { color: #aaa6a0 !important; }
    #driver-popover-item.alvisa-tour .driver-popover-footer button { border-radius: 5px !important; box-shadow: none !important; }
    #driver-popover-item.alvisa-tour .driver-next-btn { background: var(--alvisa-wine) !important; }
    #driver-popover-item.alvisa-tour .driver-next-btn:hover { background: #8c1b42 !important; box-shadow: none !important; }
    .driver-highlighted-element { border-radius: 7px !important; box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.78), 0 0 0 6px rgba(198, 161, 91, 0.12) !important; }

    @media (max-width: 1023px) { .calculator-result-panel { position: static; } }
    @media (max-width: 640px) {
      .calculator-header { margin-bottom: 18px; padding-bottom: 18px; }
      .calculator-header-row { align-items: flex-start !important; }
      .calculator-header-actions { align-self: stretch !important; flex-wrap: wrap; }
      .calculator-header-actions > * { flex: 1 1 auto; text-align: center; }
      .calculator-panel { padding: 20px !important; }
      .calculator-layout { gap: 14px; }
      .calculator-title { font-size: 40px !important; }
    }
