/* ─── 홈에서 여는 무료 문서 팝업 — 모양은 content.html 팝업과 같음 ─── */
.modal-overlay { --surface: #161616; --surface2: #1C1C1C; --accent: #D5FF40; --accent-dim: rgba(213,255,64,0.10); --text: #FFFFFF; --text-dim: #C0C2B8; --text-dimmer: #C0C2B8; --border: rgba(255,255,255,0.07); font-family: 'Space Grotesk', 'Noto Sans KR', sans-serif; line-height: 1.6; }
    .card-tag {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.06em;
      padding: 2px 8px;
      border-radius: 20px;
      text-transform: uppercase;
    }
    .tag-p1 { background: rgba(100,180,255,0.1); color: #7ec8ff; }
    .tag-p2 { background: rgba(180,130,255,0.1); color: #c49dff; }
    .tag-p3 { background: rgba(255,160,100,0.1); color: #ffb27a; }
    .tag-case { background: rgba(255,210,100,0.1); color: #ffd97a; }
    .tag-insight { background: rgba(100,220,180,0.1); color: #7adfc2; }
    .tag-free { background: rgba(213,255,64,0.12); color: var(--accent); }
    .tag-diag { background: rgba(255,120,140,0.10); color: #ff8fa3; }
    .tag-paid { background: rgba(255,255,255,0.05); color: var(--text-dimmer); }
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 200;
      background: rgba(0,0,0,0.82);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      overflow-y: auto;
      padding: 40px 20px;
    }
    .modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
    .modal {
      background: var(--surface);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 16px;
      width: 100%;
      max-width: 680px;
      padding: 40px 40px 48px;
      position: relative;
    }
    .modal-close {
      position: absolute;
      top: 20px; right: 20px;
      width: 32px; height: 32px;
      border-radius: 50%;
      background: rgba(255,255,255,0.07);
      border: none;
      cursor: pointer;
      color: var(--text-dim);
      font-size: 16px;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .modal-close:hover { background: rgba(255,255,255,0.12); }
    .modal-tag-row {
      display: flex; gap: 6px; margin-bottom: 16px;
    }
    .modal h1 {
      font-size: 24px;
      font-weight: 900;
      letter-spacing: -0.02em;
      line-height: 1.3;
      margin-bottom: 6px;
    }
    .modal-subtitle {
      font-size: 14px;
      color: var(--text-dim);
      margin-bottom: 32px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--border);
    }

    /* Modal doc styles */
    .modal-doc h2 {
      font-size: 16px;
      font-weight: 700;
      margin: 28px 0 10px;
      color: var(--text);
    }
    .modal-doc h3 {
      font-size: 14px;
      font-weight: 700;
      margin: 20px 0 8px;
      color: var(--accent);
    }
    .modal-doc p {
      font-size: 14px;
      color: var(--text-dim);
      line-height: 1.8;
      margin-bottom: 12px;
    }
    .modal-doc ul, .modal-doc ol {
      padding-left: 18px;
      margin-bottom: 12px;
    }
    .modal-doc li {
      font-size: 14px;
      color: var(--text-dim);
      line-height: 1.8;
      margin-bottom: 4px;
    }
    .modal-doc blockquote {
      border-left: 3px solid var(--accent);
      padding: 10px 16px;
      margin: 16px 0;
      background: var(--accent-dim);
      border-radius: 0 6px 6px 0;
    }
    .modal-doc blockquote p {
      color: var(--text);
      font-style: italic;
      margin: 0;
    }
    .modal-doc table {
      width: 100%;
      border-collapse: collapse;
      margin: 16px 0;
      font-size: 13px;
    }
    .modal-doc th {
      text-align: left;
      padding: 8px 12px;
      background: rgba(255,255,255,0.05);
      color: var(--text-dim);
      font-weight: 600;
      border-bottom: 1px solid var(--border);
    }
    .modal-doc td {
      padding: 8px 12px;
      color: var(--text-dim);
      border-bottom: 1px solid rgba(255,255,255,0.04);
      vertical-align: top;
    }
    .modal-doc pre {
      background: #111;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 16px;
      margin: 14px 0;
      font-size: 12px;
      color: #aaa;
      font-family: monospace;
      white-space: pre;
      overflow-x: auto;
      line-height: 1.7;
    }
    .modal-doc strong { color: var(--text); }
    .modal-doc .insight-box {
      background: rgba(213,255,64,0.06);
      border: 1px solid rgba(213,255,64,0.2);
      border-radius: 8px;
      padding: 14px 16px;
      margin: 16px 0;
    }
    .modal-doc .insight-box p { color: var(--text); margin: 0; font-size: 13px; }
    .modal-doc .insight-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 6px;
    }
    .modal-doc hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 24px 0;
    }
    .modal-doc .action-box {
      background: var(--surface2);
      border-left: 3px solid var(--accent);
      border-radius: 0 8px 8px 0;
      padding: 14px 16px;
      margin: 20px 0 0;
    }
    .modal-doc .action-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 8px;
    }
    .modal-doc .action-box p { color: var(--text-dim); font-size: 13px; margin: 0; }
    .modal-doc .related {
      margin-top: 32px;
      padding-top: 20px;
      border-top: 1px solid var(--border);
      font-size: 12px;
      color: var(--text-dimmer);
    }
.modal-overlay { z-index: 1100; }
.modal h1 { color: #fff; }
.modal-doc .doc-next { color: #D5FF40; text-decoration: none; border-bottom: 1px solid rgba(213,255,64,0.35); }
.modal-doc .doc-next strong { color: #D5FF40; }
.modal-doc .action-box .doc-cta { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: #0F0F0F; background: #D5FF40; padding: 10px 18px; border-radius: 999px; text-decoration: none; box-shadow: 0 0 22px rgba(213,255,64,0.38); }
.modal-doc pre { white-space: pre-wrap; word-break: keep-all; }
@media (max-width: 560px) { .modal { padding: 32px 20px 36px; } }
