    :root{
      --bg:#f6f7fb;
      --card:#ffffff;
      --text:#111827;
      --muted:#6b7280;
      --line:#e5e7eb;
      --radius:14px;
      --shadow: 0 6px 20px rgba(0,0,0,0.06);
      --accent:#2563eb;
    }
    /* ===== MoneySave Portal Header (Responsive) ===== */
:root{
  --h-bg:#ffffff;
  --h-fg:#111827;
  --h-muted:#6b7280;
  --h-border:#e5e7eb;
  --h-accent:#2563eb;
  --h-radius:14px;
  --h-shadow:0 8px 24px rgba(0,0,0,.06);
  --h-max:1200px;
  --h-height:64px;
  --h-font: system-ui,-apple-system,Segoe UI,Roboto,Noto Sans KR,Apple SD Gothic Neo,Malgun Gothic,Arial,sans-serif;
}

.portal-header{ position:sticky; top:0; z-index:1000; background:var(--h-bg); border-bottom:1px solid var(--h-border); font-family:var(--h-font); }
.portal-header .wrap{ max-width:var(--h-max); margin:0 auto; padding:0 16px; height:var(--h-height); display:flex; align-items:center; justify-content:space-between; gap:12px; }

/* ===== Brand ===== */
.brand{ display:flex; align-items:center; gap:10px; min-width:200px; }
.brand a{ text-decoration:none; color:var(--h-fg); display:flex; align-items:center; gap:10px; }

/* 로고 이미지 자리 */
.logo-img{
  width:180px; height:auto;
  object-fit:contain;
  border-radius:10px;
  background:#fff;
}

.brand-text .title{
  font-weight:900;
  letter-spacing:-.3px;
  font-size:18px;
  line-height:1.1;
}
.brand-text .sub{
  font-size:12px;
  color:var(--h-muted);
  margin-top:3px;
}

/* ===== Desktop Nav ===== */
.nav{ display:flex; align-items:center; gap:6px; flex:1; justify-content:center; }
.nav a{
  text-decoration:none; color:var(--h-fg);
  padding:10px 10px; border-radius:12px;
  font-size:14px; white-space:nowrap;
}
.nav a:hover{ background:#f3f4f6; }
.nav a.active{ color:var(--h-accent); background:rgba(37,99,235,.08); font-weight:700; }

/* ===== Right ===== */
.right{ display:flex; align-items:center; gap:10px; min-width:180px; justify-content:flex-end; }
.search{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border:1px solid var(--h-border);
  border-radius:999px; background:#fafafa; min-width:220px;
}
.search input{
  border:0; outline:0; background:transparent; width:100%;
  font-size:13px;
}
.search .icon{ font-size:14px; color:var(--h-muted); }

.hamburger{
  display:none;
  width:42px; height:42px;
  border-radius:14px;
  border:1px solid var(--h-border);
  background:#fff;
  cursor:pointer;
}
.hamburger:active{ transform:translateY(1px); }
.hamburger .bars{ width:18px; height:12px; margin:0 auto; position:relative; }
.hamburger .bars span{
  position:absolute; left:0; right:0; height:2px;
  background:var(--h-fg); border-radius:2px;
}
.hamburger .bars span:nth-child(1){ top:0; }
.hamburger .bars span:nth-child(2){ top:5px; opacity:.75; }
.hamburger .bars span:nth-child(3){ top:10px; }

/* ===== Mobile Drawer ===== */
.drawer-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  display:none; z-index:1100;
}
.drawer{
  position:fixed; top:0; right:-320px; width:320px; height:100%;
  background:var(--h-bg); border-left:1px solid var(--h-border);
  box-shadow:var(--h-shadow); z-index:1200;
  transition:right .22s ease;
  display:flex; flex-direction:column;
}
.drawer.open{ right:0; }
.drawer-backdrop.open{ display:block; }

.drawer-head{
  height:var(--h-height); display:flex; align-items:center; justify-content:space-between;
  padding:0 16px; border-bottom:1px solid var(--h-border);
}
.drawer-head .close{
  width:42px; height:42px; border-radius:14px; border:1px solid var(--h-border);
  background:#fff; cursor:pointer;
}
.drawer-body{ padding:14px; overflow:auto; }
.drawer-search{
  display:flex; gap:8px; align-items:center;
  padding:12px 12px; border:1px solid var(--h-border); border-radius:14px; background:#fafafa;
}
.drawer-search input{ border:0; outline:0; background:transparent; width:100%; font-size:14px; }
.drawer-nav{ margin-top:12px; display:flex; flex-direction:column; gap:6px; }
.drawer-nav a{
  text-decoration:none; color:var(--h-fg);
  padding:12px 12px; border-radius:14px; border:1px solid transparent;
  background:#fff;
}
.drawer-nav a:hover{ background:#f3f4f6; }
.drawer-nav a.active{ border-color:rgba(37,99,235,.25); background:rgba(37,99,235,.08); color:var(--h-accent); font-weight:800; }

/* ===== Responsive ===== */
@media (max-width: 980px){
  .nav{ display:none; }
  .search{ display:none; }
  .hamburger{ display:inline-flex; align-items:center; justify-content:center; }
  .brand{ min-width:auto; }
  .right{ min-width:auto; }
}
@media (max-width: 420px){
  .brand-text .title{display: none };

  .drawer{ width:86vw; }
  .brand-text .sub{ display:none; }
}


    body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", Arial, sans-serif; background:var(--bg); color:var(--text); }
    .wrap{ max-width:1100px; margin:0 auto; padding:14px; }

    .link{
        cursor: pointer;
    }

    /* ===== 배너 자리 ===== */
    .banner{
      background: linear-gradient(135deg, #ffffff, #f8fafc);
      border: 1px dashed #c7d2fe;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 14px;
      margin: 10px 0 14px;
      display:flex;
      align-items:center;
      justify-content:center;
      min-height: 110px;
      text-align:center;
    }
    .banner .txt1{ font-weight:900; font-size:16px; }
    .banner .txt2{ margin-top:6px; color:var(--muted); font-size:12px; }

    .header{
      display:flex; gap:12px; align-items:flex-end; justify-content:space-between;
      margin: 6px 0 12px; flex-wrap:wrap;
    }
    .title{ display:flex; flex-direction:column; gap:4px; }
    h1{ margin:0; font-size:20px; letter-spacing:-0.2px; }
    .sub{ color:var(--muted); font-size:12px; }

    .panel{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:12px;
    }

    .filters{
      display:grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      gap:10px;
      align-items:end;
    }

    .field label{ display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
    .field select, .field input{
      width:100%; box-sizing:border-box; padding:10px 10px;
      border:1px solid var(--line); border-radius:10px; background:#fff;
      outline:none; font-size:14px;
    }

    .actions{ display:flex; gap:8px; justify-content:flex-end; }
    .btn{
      border:1px solid var(--line);
      background:#fff; color:var(--text);
      padding:10px 12px; border-radius:10px; cursor:pointer;
      font-weight:700; font-size:14px;
    }
    .btn.primary{ background:var(--accent); border-color:var(--accent); color:#fff; }
    .btn:disabled{ opacity:.6; cursor:not-allowed; }

    .meta-row{
      display:flex; justify-content:space-between; align-items:center; gap:10px;
      margin-top:10px; flex-wrap:wrap; color:var(--muted); font-size:12px;
    }

    /* ===== 테이블(PC) ===== */
    .table-wrap{
      margin-top:12px; overflow:auto;
      border-radius:var(--radius);
      border:1px solid var(--line);
      background:var(--card);
      box-shadow:var(--shadow);
    }
    table{ width:100%; border-collapse:collapse; min-width:800px; }
    thead th{
      position:sticky; top:0; z-index:1;
      background:#f9fafb;
      text-align:center; font-size:12px; color:var(--muted);
      padding:12px 10px; border-bottom:1px solid var(--line); white-space:nowrap;
    }
    tbody td{
         text-align:center;
      padding:12px 10px; border-bottom:1px solid var(--line);
      vertical-align:top; font-size:14px;
    }
    tbody tr:hover{ background:#fafafa; }

    .rate{ font-weight:900; font-size:16px; letter-spacing:-0.2px; }
    .muted{ color:var(--muted); font-size:12px; }

    /* 은행 셀(로고+링크) */
    .bank-cell{
      display:flex;
      align-items:center;
      gap:10px;
      white-space:nowrap;
    }
    .bank-logo{
      width:26px;
      height:26px;
      border-radius:8px;
      border:1px solid var(--line);
      background:#fff;
      object-fit:contain;
      flex:0 0 26px;
    }
    .bank-link{
      color: var(--text);
      text-decoration:none;
      font-weight:900;
    }
    .bank-link:hover{ text-decoration:underline; }

    .pill{
      display:inline-block; padding:4px 8px; border-radius:999px;
      background:#eef2ff; color:#3730a3; font-size:12px; font-weight:800;
      white-space:nowrap;
    }

    .clickable{
      cursor:pointer;
    }
    .clickable:hover{
      text-decoration: underline;
    }

    /* ===== 카드(모바일) ===== */
    .cards{ display:none; margin-top:12px; gap:10px; flex-direction:column; }
    .card{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:12px;
    }
    .card-top{
      display:flex; justify-content:space-between; gap:10px; align-items:flex-start;
    }
    .card-title{ font-weight:900; font-size:15px; line-height:1.3; margin:0; cursor:pointer; }
    .card-title:hover{ text-decoration:underline; }
    .card-bank{ margin-top:6px; display:flex; align-items:center; gap:8px; }
    .card-right{ text-align:right; min-width:90px; }
    .card-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
    .kv{ border:1px dashed var(--line); border-radius:12px; padding:8px 10px; background:#fcfcfd; }
    .kv .k{ color:var(--muted); font-size:12px; }
    .kv .v{ font-weight:900; margin-top:2px; }

    .footer-actions{ display:flex; justify-content:center; margin:14px 0 6px; }

    @media (max-width: 860px){
      .filters{ grid-template-columns: 1fr 1fr; }
      .actions{ grid-column: 1 / -1; justify-content: stretch; }
      .actions .btn{ flex:1; }
      .table-wrap{ display:none; }
      .cards{ display:flex; }
      .banner{ min-height: 120px; }
    }

    /* ===== 모달 ===== */
    .modal-backdrop{
      position:fixed;
      inset:0;
      background: rgba(0,0,0,0.45);
      display:none;
      align-items:center;
      justify-content:center;
      padding: 18px;
      z-index: 9999;
    }
    .modal{
      width:min(920px, 100%);
      max-height: 86vh;
      overflow:auto;
      background: var(--card);
      border-radius: 18px;
      border: 1px solid var(--line);
      box-shadow: 0 18px 60px rgba(0,0,0,0.18);
    }
    .modal-head{
      display:flex;
      justify-content:space-between;
      gap:10px;
      align-items:flex-start;
      padding: 14px 14px 10px;
      border-bottom:1px solid var(--line);
      position: sticky;
      top: 0;
      background: var(--card);
      z-index: 1;
    }
    .modal-title{
      font-weight: 900;
      font-size: 16px;
      line-height: 1.35;
      margin:0;
    }
    .modal-sub{
      margin-top:6px;
      color: var(--muted);
      font-size: 12px;
      display:flex;
      align-items:center;
      gap:8px;
      flex-wrap:wrap;
    }
    .modal-close{
      border:1px solid var(--line);
      background:#fff;
      border-radius: 12px;
      padding: 8px 10px;
      cursor:pointer;
      font-weight: 900;
    }
    .modal-body{
      padding: 14px;
    }
    .section{
      border:1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background:#fff;
      margin-bottom: 12px;
    }
    .section h3{
      margin:0 0 8px;
      font-size: 13px;
      color: var(--muted);
      letter-spacing: -0.1px;
    }
    .pre{
      white-space: pre-wrap;
      line-height: 1.55;
      font-size: 13px;
    }
    .opt-table{
      width:100%;
      border-collapse: collapse;
      min-width: 520px;
    }
    .opt-table th, .opt-table td{
      border-bottom: 1px solid var(--line);
      padding: 10px 8px;
      text-align:left;
      font-size: 13px;
      vertical-align: top;
    }
    .opt-table th{
    color: var(--muted);
    font-size: 12px;
    background:#fafafa;
    position: static;   /* ✅ sticky 제거 */
    }
    @media (max-width: 860px){
    .opt-table{ min-width: 0; }
    }
    @media (max-width: 860px){
      .opt-table{ min-width: 0; }
      .opt-table th{ top: 64px; }
    }

    /* 연금저축용 모달 */
    .modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9999; }
    .modal-backdrop.show { display:flex; align-items:center; justify-content:center; }
    .modal { width:min(920px, calc(100vw - 24px)); max-height:85vh; overflow:auto; background:#fff; border-radius:16px; }
