:root {
      --white: #fff;
      --bg: #f6f6f7;
      --muted: #6b6b6b;
      --card-border: #e7e7e8;
      --accent: #9aa0a6;
      --accent-weak: rgba(154,160,166,0.06);
      --accent-strong: rgba(154,160,166,0.12);
      --radius: 6px;
      --max-width: 1180px;
      --easing: cubic-bezier(.18,.9,.32,1);
      --shadow: 0 8px 22px rgba(13,24,40,0.08);
      --brand: #c62828;
      --footer-bg: #0f1720;
      --footer-muted: #9aa3ab;
    }
    * { box-sizing: border-box; margin: 0; padding: 0 }
    html, body { height: 100% }
    body {
      font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      background: var(--bg); color: #0b1220; -webkit-font-smoothing: antialiased;
      line-height: 1.45; font-size: 15px;
    }
    /* Header */
    header {
      position: sticky; top: 0; background: var(--white); border-bottom: 1px solid var(--card-border); z-index: 60;
    }
    .header-inner {
      max-width: var(--max-width); margin: 0 auto; padding: 12px 18px; display: flex; gap: 12px; align-items: center;
    }
    .logo {
      font-weight: 800; color: var(--brand); font-size: 20px; text-decoration: none;
    }
    .search {
      flex: 1; max-width: 760px; display: flex; gap: 8px;
    }
    .search input {
      flex: 1; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 8px; background: #fff;
    }
    .search button {
      background: var(--brand); color: #fff; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
    }
    .burger-wrap {
      margin-left: auto; display: flex; align-items: center;
    }
    .burger {
      width: 44px; height: 36px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.06); display: inline-flex; align-items: center; justify-content: center; background: #fff; cursor: pointer; padding: 6px;
    }
    .lines {
      width: 22px; height: 16px; position: relative; display: block;
    }
    .lines span {
      position: absolute; left: 0; right: 0; height: 2px; background: #111; border-radius: 2px;
    }
    .lines span:nth-child(1) { top: 0; }
    .lines span:nth-child(2) { top: 7px; }
    .lines span:nth-child(3) { top: 14px; }
    .burger.open .lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .burger.open .lines span:nth-child(2) { opacity: 0; }
    .burger.open .lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Modal */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(8,12,20,0.18); opacity: 0; z-index: 120; pointer-events: none; transition: opacity 0.2s;
    }
    .modal-overlay.show { opacity: 1; pointer-events: auto; }
    .modal {
      position: fixed; top: 64px; right: 18px; transform: translateY(0); opacity: 0; width: clamp(280px, 86vw, 420px); max-height: 80vh; overflow: hidden; border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,0.78), #ffffff); box-shadow: 0 8px 28px rgba(8,12,20,0.12); z-index: 140; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,0.65); pointer-events: none; transition: opacity 0.2s;
    }
    .modal.show { opacity: 1; pointer-events: auto; }
    @media (max-width: 520px) {
      .modal { left: 50%; right: auto; transform: translateX(-50%); width: 92vw; top: 56px; }
    }
    .modal-header {
      display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid rgba(15,23,34,0.04);
    }
    .modal-title {
      display: flex; flex-direction: column;
    }
    .modal-title h2 {
      font-size: 16px; margin: 0;
    }
    .modal-sub {
      font-size: 13px; color: var(--muted);
    }
    .modal-body {
      padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; scroll-behavior: auto;
    }
    @media (max-width: 620px) { .modal-body { grid-template-columns: 1fr; } }
    .section {
      display: flex; flex-direction: column; gap: 8px;
    }
    .section h3 {
      margin: 0; font-size: 13px; color: var(--muted); font-weight: 700;
    }
    .item {
      display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; transition: background 0.2s;
    }
    .item:hover { background: rgba(14,165,255,0.04); }
    .item .label { font-weight: 600; }
    .item .muted { font-size: 13px; color: var(--muted); }
    .item svg { width: 18px; height: 18px; opacity: 0.95; }
    .secondary {
      background: linear-gradient(180deg, #fff, #fafafa); border-radius: 10px; padding: 10px; border: 1px solid rgba(9,30,66,0.03);
    }
    .modal-footer {
      display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid rgba(15,23,34,0.04); align-items: center;
    }
    .ghost {
      background: transparent; border: 0; color: var(--muted); padding: 8px 10px; border-radius: 8px; cursor: pointer;
    }
    .icon-wrap {
      width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(180deg, #fff, #fbfbfb); display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(15,23,34,0.03);
    }

    /* Footer */
    footer {
      background: var(--footer-bg); color: #fff; margin-top: 34px; padding: 28px 14px 40px; border-top: 1px solid rgba(255,255,255,0.03);
    }
    .footer-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start;
    }
    .footer-grid div { color: #fff; }
    .footer-grid .small { color: var(--footer-muted); font-size: 13px; line-height: 1.45; margin-top: 6px; }
    .footer-bottom {
      display: flex; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap;
    }
    .footer-bottom .small { color: var(--footer-muted); font-size: 13px; }

    @media (max-width: 800px) {
      .footer-grid { grid-template-columns: 1fr; gap: 12px; }
    }
    #userModal .label {
  color: #0b1220;
}