  :root {
    --bg: #0a0a0a;
    --bar: #0a0a0a;
    --menu: #151515;
    --line: rgba(255, 255, 255, 0.14);
    --text: #ededed;
    --muted: #9b9b9b;
    --focus: #d0d0d0;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  }
  body { padding-top: 60px; }
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
    padding: 0 24px;
    background: transparent;
    transition: padding 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
  }
  .navbar.scrolled::before { opacity: 1; }

  @media (min-width: 481px) {
    .navbar.scrolled { padding-inline: max(24px, calc((100% - 900px) / 2)); }
  }
  @media (prefers-reduced-motion: reduce) {
    .navbar, .navbar::before { transition: none; }
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .logo img { width: 30px; height: 30px; display: block; }
  .navbar-divider { width: 1px; height: 26px; background: var(--line); }

  nav { display: flex; align-items: center; gap: 4px; }
  nav a, .dropdown-button {
    color: var(--muted);
    text-decoration: none;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 12px;
    transition: color 0.15s, background 0.15s;
  }
  nav a:hover, .dropdown-button:hover, .dropdown-button[aria-expanded="true"] {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
  }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .nav-download-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: #0a0a0a;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
  }
  .nav-download-button:hover { background: #e2e2e2; }
  .nav-download-button:active { transform: scale(0.97); }
  .nav-download-button svg { width: 16px; height: 16px; flex: none; }

  @keyframes word-in {
    from { opacity: 0; transform: translateY(28px); filter: blur(14px); }
    60%  { opacity: 1; }
    to   { opacity: 1; transform: none; filter: blur(0); }
  }
  .fade-in {
    animation: word-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: var(--delay, 0s);
  }
  .donate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: clamp(28px, 6vh, 64px) 24px 80px;
  }
  .donate-card {
    width: min(440px, 100%);
    padding: 28px;
    background: #101010;
    border: 1px solid var(--line);
    border-radius: 22px;
    text-align: center;
  }
  .swappable {
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  }
  .swappable.fading-out { opacity: 0; filter: blur(6px); transform: scale(0.97); }
  .donate-title {
    margin: 0 0 20px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .qr-code {
    display: block;
    width: min(260px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto 22px;
    object-fit: cover;
    border-radius: 18px;
    -webkit-user-drag: none;
    user-select: none;
  }
  .address-row { display: flex; align-items: center; gap: 10px; }
  .address {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: var(--text);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .copy-button {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
  }
  .copy-button:hover { background: rgba(255, 255, 255, 0.1); }
  .copy-button:active { transform: scale(0.95); }
  .copy-icon {
    grid-area: 1 / 1;
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: scale(0.7);
    filter: blur(4px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  }
  .copy-icon.active { opacity: 1; transform: none; filter: blur(0); }

  .coin-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(440px, 100%);
    gap: 10px;
    padding: 14px 22px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: #0a0a0a;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
  }
  .coin-switch:hover { background: #e2e2e2; }
  .coin-switch:active { transform: scale(0.97); }
  .coin-switch-label { display: inline-flex; align-items: center; gap: 10px; }
  .thank-you {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
  }
  .thank-you svg { width: 20px; height: 20px; flex: none; }
  .coin-switch svg { width: 24px; height: 24px; flex: none; }
  @media (prefers-reduced-motion: reduce) {
    .fade-in { animation: none; }
    .swappable, .copy-icon { transition: none; }
  }

  .dropdown { position: relative; }
  .dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    line-height: inherit;
  }
  .dropdown-button .dropdown-arrow { width: 16px; height: 16px; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
  .dropdown-button[aria-expanded="true"] .dropdown-arrow { transform: rotate(180deg); }

  .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 6px;
    background: var(--menu);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    z-index: 10;
  }
  .dropdown-menu {
    transform-origin: top left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px) scale(0.96);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
  }
  .dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 0.14s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
  }
  .submenu { transform: translateX(-6px) scale(0.96); }
  .dropdown-menu a, .dropdown-menu .submenu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .dropdown-menu a:hover, .dropdown-menu .submenu-button:hover, .dropdown-menu .submenu-button[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.05);
  }
  .dropdown-menu svg { width: 16px; height: 16px; flex: none; }
  .dropdown-menu .submenu-button .submenu-arrow { margin-left: auto; }

  .dropdown-menu-wide { width: 250px; }
  .dropdown-menu a.has-description { align-items: flex-start; }
  .dropdown-menu a.has-description svg { margin-top: 2px; }
  .menu-item-text { display: flex; flex-direction: column; gap: 3px; }
  .menu-item-description { color: var(--muted); font-size: 0.78rem; font-weight: 400; line-height: 1.4; }

  .submenu-wrapper { position: relative; }
  .submenu { left: calc(100% + 8px); top: -6px; }

  @media (prefers-reduced-motion: reduce) {
    .dropdown-button .dropdown-arrow { transition: none; }
    .dropdown-menu, .submenu { transition: none !important; }
  }
  @media (max-width: 480px) {
    .navbar { gap: 8px; padding: 0 12px; }
    nav { gap: 0; }
    .nav-download-button span { display: none; }
    .nav-download-button { padding: 10px 12px; }
    .logo span { display: none; }
    nav a, .dropdown-button { padding: 8px; }
    .dropdown-menu { position: fixed; left: 12px; right: 12px; top: 64px; }
    .dropdown-menu-wide { width: auto; }
    .submenu {
      position: static;
      transform: none;
      box-shadow: none;
      background: rgba(255, 255, 255, 0.04);
      max-height: 0;
      margin-top: 0;
      padding-top: 0;
      padding-bottom: 0;
      border-width: 0;
      overflow: hidden;
      transition: max-height 0.15s ease, margin 0.15s ease, padding 0.15s ease, opacity 0.12s ease, visibility 0s linear 0.15s;
    }
    .submenu.open {
      max-height: 200px;
      margin-top: 4px;
      padding-top: 6px;
      padding-bottom: 6px;
      border-width: 1px;
      transition: max-height 0.22s cubic-bezier(0.16, 1, 0.3, 1), margin 0.22s cubic-bezier(0.16, 1, 0.3, 1), padding 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.14s ease-out, visibility 0s;
    }
  }

.delay-1 { --delay: 0.2s; }
.delay-2 { --delay: 0.4s; }
.delay-3 { --delay: 0.6s; }
