  :root {
    --bg: #F6F8FB;
    --surface: #FFFFFF;
    --sidebar: #071A33;
    --sidebar-hover: #14315a;
    --sidebar-active: #244E7F;
    --ink: #1E2937;
    --ink-soft: #5B677A;
    --ink-faint: #8a93a1;
    --line: #E1E6EF;
    --accent: #2F6DF6;
    --accent-soft: #eaf1ff;
    --gold: #b08a3e;
    --green: #2c8a5a;
    --amber: #c98a14;
    --red: #c0492f;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16,30,54,.04), 0 4px 16px rgba(16,30,54,.05);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --serif: "Iowan Old Style", "Apple Garamond", Georgia, "Noto Serif KR", serif;
    --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body { font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; display: flex; line-height: 1.5; }

  /* ============ SIDEBAR ============ */
  .sidebar { width: 264px; flex-shrink: 0; background: var(--sidebar); color: #cdd6e4; height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; overflow-y: auto; }
  .sidebar::-webkit-scrollbar { width: 8px; }
  .sidebar::-webkit-scrollbar-thumb { background: #2a3c5a; border-radius: 8px; }
  .brand { padding: 16px 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); display: block; cursor: pointer; position: relative; }
  .beta-badge { position: absolute; top: 9px; right: 11px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .09em; padding: 2px 7px; border-radius: 5px; box-shadow: 0 2px 7px rgba(47,109,246,.5); pointer-events: none; z-index: 2; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(155deg, #4f8eff, #2554b0); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 21px; color: #fff; flex-shrink: 0; box-shadow: 0 3px 10px rgba(40,90,180,.45); }
  .brand-mark svg { width: 24px; height: 24px; } .brand-name { font-family: var(--serif); font-size: 20px; font-weight: 700; color: #fff; letter-spacing: .3px; line-height: 1.1; }
  .brand-name .ai { color: #5fa0ff; }
  .brand-sub { font-size: 9px; color: #8593ab; letter-spacing: .7px; text-transform: uppercase; line-height: 1.45; margin-top: 4px; }
  .doc-body h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 16px 0 6px; }
  .doc-body h4:first-child { margin-top: 0; }
  .doc-body p { font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 8px; }
  .doc-body ul { margin: 0 0 10px; padding-left: 20px; }
  .doc-body li { font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 4px; }
  /* ===== 사용 설명서(도움말) ===== */
  .nav-help { margin: 0 12px 6px; }
  .nav-help-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 14px; border: none; border-radius: 8px; background: transparent; color: #B8C4D6; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
  .nav-help-btn:hover, .nav-help-btn:focus-visible { background: var(--sidebar-hover); color: #fff; outline: none; }
  .nav-help-btn svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
  .help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
  .help-toc a { font-size: 12.5px; color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; background: var(--surface); transition: background .12s, color .12s, border-color .12s; }
  .help-toc a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  .help-sec { margin-bottom: 16px; scroll-margin-top: 18px; }
  .help-sec .panel-head h3 { display: flex; align-items: center; gap: 9px; }
  .help-sec .panel-head .hnum { font-size: 12px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
  .help-steps { counter-reset: hs; list-style: none; padding: 0; margin: 0; }
  .help-steps li { position: relative; padding: 2px 0 14px 42px; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
  .help-steps li::before { counter-increment: hs; content: counter(hs); position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
  .help-steps li:last-child { padding-bottom: 2px; }
  .help-steps b { color: var(--ink); }
  .help-feat { width: 100%; border-collapse: collapse; }
  .help-feat th, .help-feat td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
  .help-feat th { color: var(--ink); font-weight: 700; width: 168px; white-space: nowrap; }
  .help-feat td { color: var(--ink-soft); line-height: 1.65; }
  .help-feat tr:last-child th, .help-feat tr:last-child td { border-bottom: none; }
  .help-note { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-top: 4px; }
  .help-note b { color: var(--ink); }
  .help-kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 12px; font-family: ui-monospace, Menlo, monospace; background: var(--surface); color: var(--ink); }
  #help .help-en { display: none; }
  #help.show-en .help-ko { display: none; }
  #help.show-en .help-en { display: block; }
  /* ===== 피드백 게시판 ===== */
  .fb-stars { display: flex; gap: 3px; }
  .fb-stars button { background: none; border: none; font-size: 24px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; transition: color .12s, transform .12s; }
  .fb-stars button:hover { transform: scale(1.12); }
  .fb-stars button.on { color: #f5a623; }
  .fb-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .fb-item:last-child { margin-bottom: 0; }
  .fb-item .fb-meta { font-size: 12px; color: var(--ink-faint); margin-bottom: 5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .fb-item .fb-cat { font-weight: 700; color: var(--accent); }
  .fb-item .fb-msg { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
  .fb-empty { font-size: 13px; color: var(--ink-faint); padding: 8px 0; }
  .nav { padding: 12px 12px 24px; flex: 1; }
  .nav-group { margin-bottom: 2px; }
  .nav-group-head { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 8px; cursor: pointer; color: #B8C4D6; font-size: 14.5px; font-weight: 600; line-height: 1.2; user-select: none; transition: background .15s, color .15s; }
  .nav-group-head:hover { background: var(--sidebar-hover); color: #fff; }
  .nav-group-head .ico { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
  .nav-group-head .num { font-size: 11px; color: #8FA2BD; font-variant-numeric: tabular-nums; width: 16px; flex-shrink: 0; }
  .nav-group-head .label { flex: 1; }
  .nav-group-head.active { background: var(--sidebar-active); color: #fff; }
  .nav-group-head.active .num { color: var(--accent); }
  .nav-sub { display: none; }
  .nav-sub a { display: block; padding: 8px 12px 8px 41px; color: #9aa6bb; font-size: 13px; text-decoration: none; border-radius: 7px; transition: background .12s, color .12s; position: relative; cursor: pointer; }
  .nav-sub a::before { content: ""; position: absolute; left: 22px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #3a4c6b; transition: background .12s; }
  .nav-sub a:hover { background: var(--sidebar-hover); color: #fff; }
  .nav-sub a.active { background: var(--sidebar-active); color: #fff; }
  .nav-sub a.active::before { background: var(--accent); }
  #nav .nav-group-head:focus, #nav .nav-sub a:focus, #nav .nav-group-head:focus-visible, #nav .nav-sub a:focus-visible { background: var(--sidebar-hover); color: #fff; outline: none; }
  .sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 11px; }
  .avatar { width: 32px; height: 32px; border-radius: 50%; background: #34507e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
  .sidebar-foot .u-name { font-size: 13px; color: #e3e9f2; font-weight: 500; }
  .sidebar-foot .u-plan { font-size: 11px; color: #7f8ca3; }

  /* ============ MAIN ============ */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow-y: auto; position: relative; }
  #introOverlay { position: absolute; inset: 0; z-index: 60; background: #fff; }
  #introOverlay iframe { width: 100%; height: 100%; border: 0; display: block; }
  .topbar { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); padding: 14px 34px; display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 10; }
  .search { flex: 1; max-width: 460px; position: relative; }
  .search input { width: 100%; padding: 9px 14px 9px 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 13.5px; font-family: var(--font); color: var(--ink); transition: border .15s, box-shadow .15s; }
  .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
  .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); }
  .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, color .12s; }
  .icon-btn:hover { background: var(--bg); color: var(--ink); }
  .btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: var(--font); display: inline-flex; align-items: center; gap: 7px; transition: background .15s, border-color .15s, color .15s; }
  /* 앱 전체 버튼 통일: 기본 흰색 → hover·선택 시 파란색 */
  .btn-primary { background: #fff; color: var(--ink); border-color: var(--line); }
  .btn:not(:disabled):hover, .btn:not(:disabled):focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
  .btn.active, .btn-primary.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .btn:disabled { opacity: .55; cursor: default; }
  /* 문헌 분석 액션 버튼: 기본 흰색 → hover·선택 시 파란색 */
  .ld-act { background: #fff; color: var(--ink); border-color: var(--line); transition: background .15s, border-color .15s, color .15s; }
  .ld-act:hover, .ld-act:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
  .ld-act.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  /* 문헌 근거 종합 결과 카드: 길어지면 스크롤(액션 버튼은 아래 고정) */
  #lit-summary .gen-paper, #lit-summary .cite-out { max-height: 480px; overflow-y: auto; }
  .btn-sm { padding: 6px 12px; font-size: 12.5px; }
  .content { padding: 28px 40px; max-width: none; width: 100%; }
  /* ===== 전면(전체화면) 기능 모드 — 서브메뉴 실행 시 사이드바·상단바를 숨기고 해당 기능만 표시 ===== */
  #focusBar { display: none; }
  body.focus-on .sidebar { display: none; }
  body.focus-on .topbar { display: none; }
  body.focus-on #introOverlay { display: none !important; }
  body.focus-on #focusBar { display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); padding: 12px 28px; }
  #focusBack { color: var(--ink-soft); transition: background .15s, border-color .15s, color .15s, transform .12s; }
  #focusBack svg { width: 17px; height: 17px; display: block; transition: transform .16s; }
  #focusBack:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  #focusBack:hover svg { transform: translateX(-2px); }
  #focusBack:active { transform: scale(.96); }
  /* 투고 패키지 버튼: 기본 흰색, 호버 시에만 파란색 */
  .pkg-btn { transition: background .14s, border-color .14s, color .14s; }
  .pkg-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

  /* ============ VIEWS ============ */
  .view { display: none; animation: fade .25s ease; }
  .view.active { display: block; }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .hero { margin-bottom: 26px; }
  .hero .crumb { font-size: 12px; color: var(--ink-faint); letter-spacing: .4px; margin-bottom: 12px; text-transform: uppercase; }
  .hero h1 { font-family: var(--font); font-size: 28px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 7px; }
  .home-banner { display: flex; align-items: center; gap: 16px; background: linear-gradient(100deg, #071A33, #244E7F); color: #fff; border-radius: 14px; padding: 17px 22px; margin-bottom: 22px; box-shadow: 0 6px 20px rgba(20,40,80,.18); }
  .home-banner .hb-ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .home-banner .hb-ico svg { width: 24px; height: 24px; }
  .home-banner .hb-title { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
  .home-banner .hb-sub { font-size: 12.5px; color: #cdd9ee; margin-top: 3px; letter-spacing: .2px; }
  .hero p { font-size: 14.5px; color: var(--ink-soft); max-width: 720px; }
  .hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
  .hero-row .hero-actions { display: flex; gap: 9px; flex-shrink: 0; padding-top: 6px; }
  .section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-faint); margin: 32px 0 16px; display: flex; align-items: center; gap: 10px; }
  .section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
  .stat .k { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
  .stat .k .dot { width: 7px; height: 7px; border-radius: 50%; }
  .stat .v { font-size: 30px; font-weight: 700; font-family: var(--serif); letter-spacing: -.5px; line-height: 1; }
  .stat .d { font-size: 12px; margin-top: 8px; color: var(--ink-faint); }

  .modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; }
  .module:hover, .module:focus, .module:focus-visible { transform: translateY(-2px); border-color: #cfd9ea; box-shadow: 0 6px 24px rgba(16,30,54,.09); outline: none; }
  #goCards, #goCards:focus, #goCards:focus-visible { outline: none; }
  .module .m-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
  .module .m-ico svg { width: 21px; height: 21px; }
  .module h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
  .module p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; flex: 1; text-align: justify; word-break: keep-all; }
  .module .m-links { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 7px; }
  .module .m-links span { font-size: 11.5px; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); padding: 3px 9px; border-radius: 20px; }

  .cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
  .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .crit-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .panel-head h3 { font-size: 15px; font-weight: 600; }
  .panel-head .a-link { font-size: 12.5px; color: var(--accent); text-decoration: none; font-weight: 500; cursor: pointer; }
  .panel-head .a-link:hover { text-decoration: underline; }
  .panel-body { padding: 20px; }
  .panel-body.flush { padding: 0; }

  .proj { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); transition: background .12s; cursor: pointer; }
  .proj:last-child { border-bottom: none; }
  .proj:hover { background: #fafbfd; }
  .proj .p-ico { width: 38px; height: 38px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--serif); color: var(--ink-soft); font-weight: 600; flex-shrink: 0; font-size: 12px; }
  .proj .p-body { flex: 1; min-width: 0; }
  .proj .p-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .proj .p-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
  .badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
  .badge.review { background: #fff4e0; color: var(--amber); }
  .badge.writing { background: var(--accent-soft); color: var(--accent); }
  .badge.submit { background: #e6f4ec; color: var(--green); }
  .badge.done { background: #eef0f3; color: var(--ink-soft); }
  .badge.red { background: #fbe9e6; color: var(--red); }
  .badge.gold { background: #f6efdf; color: var(--gold); }
  .prog { width: 84px; }
  .prog-bar { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; }
  .prog-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
  .prog-num { font-size: 11px; color: var(--ink-faint); margin-top: 4px; text-align: right; font-variant-numeric: tabular-nums; }

  .check { padding: 13px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
  .check:last-child { border-bottom: none; }
  .check .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #c5cdd9; flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .check.done .box { background: var(--green); border-color: var(--green); }
  .check.done .box svg { width: 11px; height: 11px; color: #fff; }
  .check.done .lbl { color: var(--ink-faint); text-decoration: line-through; }
  .check .lbl { flex: 1; }

  table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
  table.tbl th { text-align: left; padding: 12px 18px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); border-bottom: 1px solid var(--line); font-weight: 600; background: #fbfcfd; }
  table.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  table.tbl tr:last-child td { border-bottom: none; }
  table.tbl tbody tr { transition: background .1s; }
  table.tbl tbody tr.clickable { cursor: pointer; }
  table.tbl tbody tr:hover { background: #fafbfd; }
  table.tbl td.num, table.tbl th.num { font-variant-numeric: tabular-nums; }
  .mono { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

  .field { margin-bottom: 18px; }
  .field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
  .field .hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
  .field input[type=text], .field input[type=email], .field input[type=password], .field textarea, .field select { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; font-family: var(--font); color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s; }
  .field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
  .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

  .toggle { width: 40px; height: 23px; border-radius: 20px; background: #cdd4df; position: relative; cursor: pointer; transition: background .18s; flex-shrink: 0; }
  .toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
  .toggle.on { background: var(--accent); }
  .toggle.on::after { transform: translateX(17px); }
  .set-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
  .set-row:last-child { border-bottom: none; }
  .set-row .sr-body { flex: 1; }
  .set-row .sr-title { font-size: 14px; font-weight: 600; }
  .set-row .sr-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
  .set-sel { width: 200px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font); font-size: 13px; }

  .seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
  .seg button { border: none; background: transparent; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--ink-soft); border-radius: 6px; cursor: pointer; font-family: var(--font); }
  .seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }

  .editor-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
  .editor-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: fit-content; box-shadow: var(--shadow); }
  .editor-toc a { display: block; padding: 11px 16px; font-size: 13px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); cursor: pointer; }
  .editor-toc a:last-child { border-bottom: none; }
  .editor-toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-left: 3px solid var(--accent); }
  .editor-paper { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 44px; }
  .editor-paper h2 { font-family: var(--serif); font-size: 21px; margin-bottom: 4px; }
  .editor-paper .ep-meta { font-size: 12px; color: var(--ink-faint); margin-bottom: 24px; }
  .editor-paper p { font-size: 14px; color: #28323f; line-height: 1.85; font-family: var(--serif); margin-bottom: 12px; }
  .editor-paper .ph { color: var(--ink-faint); font-style: italic; }

  /* improve tool output */
  .improved { font-family: var(--serif); font-size: 14.5px; line-height: 1.85; color: #28323f; }

  /* empty state */
  .empty { text-align: center; padding: 52px 24px; }
  .empty .empty-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
  .empty .empty-ico svg { width: 26px; height: 26px; }
  .empty h3 { font-size: 16px; font-weight: 600; margin-bottom: 7px; }
  .empty p { font-size: 13.5px; color: var(--ink-soft); max-width: 440px; margin: 0 auto 18px; line-height: 1.6; }
  .empty .empty-actions { display: flex; gap: 9px; justify-content: center; }

  /* onboarding steps */
  .step { display: flex; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: none; }
  .step[data-go] { cursor: pointer; transition: background .12s; }
  .step[data-go]:hover { background: var(--bg); }
  .step .step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .step .step-t { font-size: 13.5px; font-weight: 600; }
  .step .step-d { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

  .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 11px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); }
  .empty-note { font-size: 13px; color: var(--ink-faint); padding: 6px 0; }

  /* literature search controls */
  .lf-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
  .lf-row > label { width: 130px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
  .lf-row input[type=text], .lf-row input[type=number], .lf-row input[type=password], .lf-row select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font); font-size: 13.5px; color: var(--ink); background: #fff; }
  .lf-row input[type=text], .lf-row input[type=password], .lf-row select { flex: 1; min-width: 0; }
  .lf-row input:focus, .lf-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .lf-note { font-size: 12px; color: var(--ink-faint); }
  .arttype { position: relative; }
  .arttype-btn { width: 100%; text-align: left; padding: 9px 30px 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-family: var(--font); font-size: 13.5px; color: var(--ink); cursor: pointer; position: relative; }
  .arttype-btn::after { content: "▾"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 11px; }
  .arttype-btn:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .arttype-menu { display: none; position: fixed; z-index: 200; width: 360px; max-width: 90vw; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(20,30,50,.16); padding: 6px; }
  .arttype-menu.open { display: block; }
  .at-opt { padding: 8px 11px; border-radius: 7px; cursor: pointer; }
  .at-opt:hover { background: var(--accent-soft); }
  .at-opt.sel { background: var(--accent-soft); }
  .at-opt .at-l { font-weight: 600; font-size: 13.5px; color: var(--ink); }
  .at-opt .at-d { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
  .modal-overlay { position: fixed; inset: 0; background: rgba(18,26,42,.55); display: flex; align-items: flex-start; justify-content: center; z-index: 500; padding: 40px 20px; overflow-y: auto; }
  .modal-card { background: #fff; width: 100%; max-width: 1000px; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.32); padding: 26px 30px 30px; }
  .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
  .modal-head h2 { font-family: var(--font); font-size: 22px; font-weight: 700; margin: 0; }
  .modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 2px 6px; border-radius: 7px; }
  .modal-x:hover { background: var(--bg-soft, #f0f2f6); color: var(--ink); }
  .plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
  @media (max-width: 820px) { .plan-grid { grid-template-columns: 1fr; } }
  .plan-col { border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px; display: flex; flex-direction: column; background: #fff; }
  /* 기본: 3개 카드 모두 동일(중립). 커서를 올리면 그 카드만 볼드 파란 윤곽으로 활성화 */
  .plan-col { transition: border-color .12s, box-shadow .12s, transform .12s; cursor: pointer; }
  .plan-col:hover, .plan-col:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 10px 26px rgba(37,99,235,.18); transform: translateY(-3px); }
  .plan-col:active { transform: translateY(-1px); }
  .plan-col h4 { font-size: 16px; margin: 0; display: flex; align-items: center; }
  .plan-pop-tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 20px; margin-left: 8px; }
  .plan-price { font-size: 28px; font-weight: 700; margin: 12px 0 2px; color: var(--ink); }
  .plan-price small { font-size: 13px; font-weight: 500; color: var(--ink-faint); }
  .plan-sub { font-size: 12px; color: var(--green); min-height: 16px; }
  .plan-feats { list-style: none; padding: 0; margin: 14px 0 18px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); flex: 1; }
  .plan-feats li { padding: 5px 0 5px 22px; position: relative; }
  .plan-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
  .bill-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
  .bill-toggle button { padding: 6px 16px; font-size: 13px; border: none; background: #fff; cursor: pointer; color: var(--ink-soft); }
  .bill-toggle button.on { background: var(--accent); color: #fff; }
  .auth-gate { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(13,20,38,.62); backdrop-filter: blur(3px); padding: 24px; }
  .auth-gate.show { display: flex; }
  .auth-card { position: relative; background: #fff; width: 100%; max-width: 420px; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.45); padding: 30px 28px; max-height: calc(100vh - 48px); overflow-y: auto; }
  .auth-x { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 2px 6px; border-radius: 7px; }
  .auth-x:hover { background: #f0f2f6; color: var(--ink); }
  .nav-flyout { display: none; position: fixed; z-index: 130; min-width: 196px; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(20,30,50,.20); padding: 6px; }
  .nav-flyout.show { display: block; }
  .nav-flyout .fly-title { font-size: 11px; font-weight: 700; color: var(--ink-faint); padding: 4px 12px 6px; letter-spacing: .02em; }
  .nav-flyout .fly-item { display: block; padding: 8px 12px; font-size: 13px; color: var(--ink-soft); border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-flyout .fly-item:hover { background: var(--accent-soft); color: var(--accent); }
  .nav-flyout .fly-lock { font-size: 11px; color: var(--ink-faint); padding: 6px 12px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
  .auth-card h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
  .auth-card .sub { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
  .auth-card .field { margin-bottom: 12px; }
  .auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
  .auth-brand .bm { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #7db4ff); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
  .auth-brand .bm svg { width: 21px; height: 21px; } .auth-brand .bn { font-family: var(--serif); font-weight: 700; font-size: 17px; }
  .auth-lang { position: absolute; top: 18px; right: 20px; display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; overflow: hidden; }
  .auth-lang button { padding: 5px 11px; border: none; background: transparent; color: #e6ecf7; font-size: 12px; font-weight: 700; cursor: pointer; }
  .auth-lang button.on { background: rgba(255,255,255,.92); color: #1b2a4a; }

  /* manuscript input bar */
  .ms-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
  .ms-bar textarea { width: 100%; min-height: 150px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink); resize: vertical; }
  .ms-bar textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .ms-actions { margin-top: 12px; display: flex; align-items: center; gap: 9px; }
  .ms-actions .ms-count { margin-left: auto; font-size: 12px; color: var(--ink-faint); }

  /* issue cards */
  .issue { display: flex; gap: 13px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 12px; background: #fff; }
  .issue .sev { width: 4px; border-radius: 4px; flex-shrink: 0; }
  .issue .i-body { flex: 1; }
  .issue .i-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; flex-wrap: wrap; }
  .issue .i-head h4 { font-size: 14px; font-weight: 600; }
  .issue .i-loc { font-size: 12px; color: var(--ink-faint); }
  .issue .i-text { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
  .issue .i-text em { background: #fdeede; color: #8a5a10; font-style: normal; padding: 0 3px; border-radius: 3px; }
  .issue .i-actions { margin-top: 11px; display: flex; gap: 8px; }
  .issue.removing { animation: toastOut .3s ease forwards; }

  /* diff */
  .diff { font-family: var(--serif); font-size: 14px; line-height: 1.8; }
  .diff .del { background: #fbe9e6; color: #9c3a26; text-decoration: line-through; padding: 1px 3px; border-radius: 3px; }
  .diff .ins { background: #e3f3e9; color: #1f6e44; padding: 1px 3px; border-radius: 3px; }
  .applied { opacity: .55; }
  button.done-state { background: var(--green) !important; border-color: var(--green) !important; color: #fff !important; cursor: pointer; }

  /* toast */
  #toasts { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
  .toast { background: #11213a; color: #fff; padding: 12px 16px 12px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 8px 28px rgba(16,30,54,.28); display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px; animation: toastIn .25s ease; }
  .toast.out { animation: toastOut .25s ease forwards; }
  .toast .t-ico { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .toast .t-ico svg { width: 12px; height: 12px; color: #fff; }
  .toast.ok .t-ico { background: var(--green); }
  .toast.info .t-ico { background: var(--accent); }
  @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

  /* start-method options */
  .start-opt { cursor: pointer; transition: background .12s; }
  .start-opt:hover { background: #fafbfd; }
  .start-opt .opt-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c5cdd9; flex-shrink: 0; position: relative; transition: border-color .15s; }
  .start-opt.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .start-opt.sel .opt-radio { border-color: var(--accent); }
  .start-opt.sel .opt-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
  .start-opt.sel .sr-title { color: var(--accent); }

  @media (max-width: 1080px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .modules { grid-template-columns: repeat(2, 1fr); }
    .cols, .cols-2 { grid-template-columns: 1fr; }
    .editor-wrap { grid-template-columns: 1fr; }
  }
  @media (max-width: 760px) {
    .modules, .stats, .crit-grid { grid-template-columns: 1fr; }
    .content { padding: 22px; }
    .row2, .hero-row { grid-template-columns: 1fr; flex-direction: column; }
  }
  /* 사이드바(메뉴)는 실제 모바일(<=560px)에서만 접힘 — 좁은 데스크톱/미리보기 패널에서도 메뉴 유지(랜딩이 메뉴 우측에 표시) */
  @media (max-width: 560px) {
    .sidebar { display: none; }
  }
/* ===== 투고 전 점검 — 결과 아코디언 ===== */
.acc-list{display:flex;flex-direction:column;gap:10px;margin-top:6px;}
.acc-item{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;transition:border-color .15s,box-shadow .15s;}
.acc-item.open{border-color:var(--accent);box-shadow:0 2px 12px rgba(47,109,246,.10);}
.acc-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;background:none;border:none;cursor:pointer;padding:15px 18px;font-size:15px;font-weight:700;color:var(--ink);text-align:left;font-family:inherit;}
.acc-head:hover{background:var(--accent-soft);}
.acc-head .acc-title{display:flex;align-items:center;gap:9px;}
.acc-head .acc-state{font-size:12px;font-weight:500;color:var(--faint);}
.acc-item.has-result .acc-state{color:var(--green);}
.acc-chev{flex:none;width:9px;height:9px;border-right:2px solid var(--faint);border-bottom:2px solid var(--faint);transform:rotate(45deg);transition:transform .18s;margin-left:auto;}
.acc-item.open .acc-chev{transform:rotate(-135deg);border-color:var(--accent);}
.acc-body{display:none;padding:2px 18px 18px;border-top:1px solid var(--line);}
.acc-item.open .acc-body{display:block;}
.acc-body .ms-results{margin-top:12px;}

