
  :root {
    color-scheme: light;
    --bg: #f6f9ff;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --line: rgba(37, 99, 235, 0.12);
    --text: #0f172a;
    --muted: #51607b;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --shadow: 0 24px 60px rgba(29, 55, 102, 0.1);
  }

  * { box-sizing: border-box; }
  html { background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 38%, #eef5ff 100%); }
  body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
      radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
      radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
      linear-gradient(180deg, #f6f9ff 0%, #eef5ff 100%);
  }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  .shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 112px;
  }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
  }
  .brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.06em;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
  }
  .brand strong { color: var(--accent); }
  .converter.panel {
    width: min(720px, 100%);
    margin: 20px auto 18px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }
  .converter h1 {
    margin: 0 0 10px;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.04em;
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
  }
  .swap-box {
    border: 1px solid rgba(45, 72, 120, 0.14);
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
      0 14px 32px rgba(29, 55, 102, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }
  .mode-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    text-align: left;
  }
  .mode-row label {
    color: #33415c;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .mode-row select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(45, 72, 120, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 255, 0.98));
    padding: 8px 12px;
    font-size: 1rem;
    color: var(--text);
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 1px 0 rgba(29, 55, 102, 0.03);
    font-weight: 600;
  }
  .mode-row select:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow:
      0 0 0 3px rgba(37, 99, 235, 0.14),
      0 8px 20px rgba(37, 99, 235, 0.1);
  }
  .mode-row p {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: #687791;
    font-size: 0.84rem;
    line-height: 1.5;
  }
  .swap-note {
    margin: 10px 2px 0;
    color: #52607a;
    font-size: 0.86rem;
    line-height: 1.55;
  }
  .swap-note strong {
    color: var(--text);
    font-weight: 700;
  }
  .swap-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 14px;
    align-items: center;
  }
  .swap-row input,
  .swap-row select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(45, 72, 120, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 255, 0.96));
    padding: 8px 12px;
    font-size: 1rem;
    color: var(--text);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      0 1px 0 rgba(29, 55, 102, 0.02);
  }
  .swap-row input { text-align: center; }
  .swap-row select {
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 255, 0.98));
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 1px 0 rgba(29, 55, 102, 0.03);
    color: var(--text);
    font-weight: 600;
    padding-right: 34px;
  }
  .swap-row select:hover {
    border-color: rgba(37, 99, 235, 0.52);
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.14),
      0 6px 18px rgba(37, 99, 235, 0.08);
  }
  .swap-row select:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow:
      0 0 0 3px rgba(37, 99, 235, 0.14),
      0 8px 20px rgba(37, 99, 235, 0.1);
  }
  .swap-row select option { color: var(--text); }
  .swap-row + .swap-row { margin-top: 16px; }
  .swap-divider {
    margin: 6px 0 8px;
    font-size: 1.85rem;
    line-height: 1;
    font-weight: 600;
    color: #3b4a6b;
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    text-align: center;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
  }
  .hero-card, .panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
  }
  .hero-card { padding: 28px; }
  .hero-card h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
  }
  .hero-card p {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 62ch;
  }
  .meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
  }
  .meta {
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.86);
  }
  .meta span { display: block; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; }
  .meta strong { display: block; margin-top: 4px; font-size: 1rem; }
  .panel { padding: 18px; }
  .panel h2, .section h2 {
    margin: 0 0 14px;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
  }
  .table-wrap { overflow-x: auto; }
  table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
  }
  th, td {
    padding: 12px 10px;
    border-top: 1px solid rgba(37, 99, 235, 0.08);
    text-align: left;
    vertical-align: top;
  }
  th {
    border-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
  }
  td strong { font-size: 0.96rem; }
  .sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
  }
  .section {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 18px 44px rgba(29, 55, 102, 0.06);
    padding: 18px;
  }
  .section p, .section li {
    color: var(--muted);
    line-height: 1.7;
  }
  .section ul { margin: 0; padding-left: 18px; }
  .link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .link-grid a {
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(255,255,255,0.92);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
  }
  .footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(37, 99, 235, 0.12);
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.7;
  }
  .footer small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
  }
  .help-banner {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 60;
    width: min(720px, calc(100vw - 20px));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 56px 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.34);
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(191, 219, 254, 0.98));
    box-shadow:
      0 18px 40px rgba(37, 99, 235, 0.18),
      0 1px 0 rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(16px);
    pointer-events: auto;
    transform: translateZ(0);
  }
  .help-banner-text {
    color: #1e3a8a;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
  }
  .help-banner-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 0 8px;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 700;
  }
  .help-banner-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1e3a8a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
  }
  .help-banner-close:hover {
    background: rgba(239, 246, 255, 1);
  }
  .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.86rem;
  }
  .breadcrumbs span { color: var(--muted); }
  .breadcrumbs strong { color: var(--text); }
  .callout {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.12);
  }
  .callout strong { color: var(--text); }
  .faq details {
    border-top: 1px solid rgba(37, 99, 235, 0.08);
    padding: 12px 0;
  }
  .faq summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq p { margin: 8px 0 0; }
  .menu-wrap {
    position: relative;
    margin-left: auto;
  }
  .menu-button {
    width: 48px;
    height: 44px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(29, 55, 102, 0.08);
  }
  .menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
  }
  .site-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(260px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 18px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 24px 48px rgba(29, 55, 102, 0.16);
    backdrop-filter: blur(16px);
    display: none;
    z-index: 40;
  }
  .site-menu-open { display: grid; gap: 4px; }
  .site-menu a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 600;
  }
  .site-menu a:hover {
    background: rgba(37, 99, 235, 0.08);
    text-decoration: none;
  }
  @media (max-width: 900px) {
    .hero, .sections { grid-template-columns: 1fr; }
    .topbar { flex-direction: row; align-items: center; }
  }
  @media (max-width: 780px) {
    .shell { padding: 28px 12px 132px; }
    .mode-row,
    .swap-row {
      grid-template-columns: 1fr;
    }
    .mode-row select {
      width: 100%;
    }
    .help-banner {
      width: calc(100vw - 20px);
      padding: 12px 52px 12px 14px;
      bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .help-banner-action {
      min-height: 34px;
      gap: 6px;
    }
    .help-banner-close { width: 32px; height: 32px; right: 10px; }
  }
