:root{
  --bg:#ffffff;
  --fg:#0a0a0a;
  --ink:#111111;          /* 기본 글자/테두리 강조(블랙) */
  --brand:#3247e7;        /* 메인 색상(블루): 주요 버튼, 강조, 활성 메뉴 */
  --brand-hover:#2536c4;
  --brand-tint:#dee2ff;   /* 연한 블루: 배지 배경 등 */
  --ink-hover:#2b2b2b;
  --muted:#6b6b6b;
  --faint:#9a9a9a;
  --line:#e2e2e2;
  --line-strong:#bdbdbd;
  --surface:#f5f5f5;
  --surface-2:#fafafa;
  --danger:#b42318;       /* 실패 표시에만 사용 */
  --danger-tint:#fdf0ef;
  --ok:#0a0a0a;
  --warn:#8a6100;
  --warn-tint:#fbf5e6;
  --radius:999px;
  /* 전 영역 Pretendard(자체 호스팅, static/fonts). 일문 페이지는 Pretendard JP 를 앞에 둔다 */
  --font:"Pretendard Variable","Pretendard JP Variable",-apple-system,BlinkMacSystemFont,"Segoe UI",
         "Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  --mono:var(--font);
  --shadow:0 1px 2px rgba(0,0,0,.06);
  --ring:0 0 0 3px rgba(0,0,0,.08);
}
html:lang(ja){--font:"Pretendard JP Variable","Pretendard Variable",-apple-system,BlinkMacSystemFont,
  "Hiragino Sans","Yu Gothic","Meiryo",sans-serif;--mono:var(--font)}
*{box-sizing:border-box}
button,input,select,textarea{font-family:inherit}
/* 포커스: 브라우저 기본 링(브라우저마다 색/이중 링이 다름) 대신 검정 단일선. 키보드 이동 시에만 표시.
   글자 입력칸(textarea, input, select)은 자체 테두리+링으로 표시하므로 외곽선 없음(이중선 방지) */
:focus{outline:none}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* 브라우저 자동완성 시 입력칸 배경이 파랗게 따로 칠해지지 않게(흰 배경, 기본 글자색 유지) */
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,input:autofill{
  -webkit-box-shadow:0 0 0 1000px #fff inset !important;box-shadow:0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color:var(--fg);caret-color:var(--fg);transition:background-color 9999s ease-out 0s}
textarea:focus-visible,input:not([type=checkbox]):not([type=radio]):focus-visible,select:focus-visible{outline:none}
a:focus-visible{border-radius:4px}
html,body{margin:0;padding:0}
body{background:var(--bg);color:var(--fg);font-family:var(--font);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
/* 내용이 짧아도 푸터가 화면 맨 아래에 붙도록: 본문이 남는 높이를 채운다 */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body > main{flex:1 0 auto;width:100%}
/* 줄바꿈 시 어절을 쪼개지 않음. 국문은 띄어쓰기 단위, 일문은 문절 단위(지원 브라우저), 긴 URL 만 예외로 끊는다 */
html:lang(ko) body{word-break:keep-all;overflow-wrap:break-word}
html:lang(ja) body{word-break:auto-phrase;overflow-wrap:break-word}
h1,.hero-desc,.sub,.issued-sub{text-wrap:balance}
.legal-lead,.legal-sec p,.legal-short,.legal-banner{text-wrap:pretty}
a{color:inherit;text-decoration:none}
.hidden{display:none !important}

/* 버튼/배지 공통: 높이 고정 + 글자 정중앙(줄높이 차이로 위아래 여백이 달라지지 않게) */
.btn-primary,.btn-ghost,.btn-detail,.nav-btn,.tab,.pill-status,.badge,.kbd-hint,.tmethod,.tdet{display:inline-flex;align-items:center;justify-content:center;line-height:1;white-space:nowrap}

/* nav */
.nav{height:64px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(8px);position:sticky;top:0;z-index:10}
/* 전체 폭 헤더: 로고는 왼쪽 끝, 언어/로그인은 오른쪽 끝(가운데 메뉴 없음, API Docs/FAQ 는 푸터) */
.nav-inner{height:100%;padding:0 40px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.nav-inner .brand{justify-self:start}
.nav-right{justify-self:end;display:flex;align-items:center;gap:12px}
.brand{display:flex;align-items:center}
.brand-logo{display:block;height:38px;width:auto}
.nav-btn{border:1px solid var(--line-strong);color:var(--fg);font-weight:600;font-size:13px;height:34px;padding:0 16px;border-radius:var(--radius);white-space:nowrap}
.nav-btn:hover{border-color:var(--ink)}
/* 로그인 버튼: 902.run 로그인 버튼과 같은 모양(검정, 34px, 모서리 8px) */
.nav-btn-solid{background:#fff;border:1px solid var(--line-strong);color:var(--fg);height:34px;padding:0 20px;border-radius:8px;font-size:14.5px;font-weight:700;letter-spacing:-.005em}
.nav-right a.nav-btn-solid:hover{border-color:var(--ink);color:var(--fg)}
/* 언어 선택: 옆 로그인 버튼과 같은 테두리/높이/모서리/글자 */
/* 언어 선택: 테두리 없는 작은 버튼(로그인 버튼과 구분) + 둥근 드롭다운 */
.lang-menu{position:relative}
.lang-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 10px;border:0;border-radius:var(--radius);background:transparent;color:var(--muted);font-family:inherit;font-size:13px;font-weight:600;line-height:1;cursor:pointer;white-space:nowrap}
.lang-btn:hover,.lang-btn[aria-expanded="true"]{background:var(--surface);color:var(--fg)}
.lang-btn .chev{transition:transform .2s}
.lang-btn[aria-expanded="true"] .chev{transform:rotate(180deg)}
.lang-list{min-width:150px}
.lang-list button[aria-checked="true"]{color:var(--brand)}
.lang-list .check{margin-left:auto;color:var(--brand)}

/* 사용자 칩 + 메뉴(마이페이지, 로그아웃) */
.user-menu{position:relative}
/* 사용자 칩: 로그인 버튼과 같은 박스(흰 바탕, #bdbdbd 테두리, 34px, 모서리 8px, 14.5px 굵게) */
.user-chip{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 4px 0 14px;border:1px solid var(--line-strong);border-radius:8px;background:#fff;color:var(--fg);font-size:14.5px;font-weight:700;line-height:1;letter-spacing:-.005em;cursor:pointer}
.user-chip:hover,.user-chip[aria-expanded="true"]{border-color:var(--ink)}
.user-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.avatar{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--ink);color:#fff;font-size:11px;font-weight:700;letter-spacing:.02em;line-height:1;flex:none}
.avatar-lg{width:56px;height:56px;font-size:20px}
.menu{position:absolute;right:0;top:calc(100% + 8px);min-width:200px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 32px rgba(0,0,0,.10);padding:6px;z-index:50}
.menu a,.menu button{display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 12px;border:0;border-radius:12px;background:transparent;font-family:inherit;font-size:14px;font-weight:600;color:var(--fg);text-align:left;cursor:pointer}
.menu a:hover,.menu a:focus-visible,.menu button:hover,.menu button:focus-visible{background:var(--surface);outline:none}
.menu-sep{height:1px;background:var(--line);margin:6px 4px}
.menu a.menu-muted{color:var(--muted)}

/* 마이페이지 */
.page{max-width:880px;margin:0 auto;padding:56px 20px 64px}
.profile{display:flex;align-items:center;gap:16px;margin-top:24px;border:1px solid var(--line);border-radius:20px;padding:24px;background:#fff;box-shadow:var(--shadow)}
.profile-text{flex:1;min-width:0}
.profile-name{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:800;overflow-wrap:anywhere}
.profile-email{margin-top:4px;color:var(--muted);font-size:14px;overflow-wrap:anywhere}
.role-badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:var(--radius);background:var(--ink);color:#fff;font-size:11px;font-weight:700;line-height:1}
.profile-idp{font-size:13px;color:var(--muted);margin-top:4px}
.profile-actions{display:flex;gap:8px;flex:none}
.profile-actions .btn-ghost{height:34px;padding:0 14px}
.page-section{margin-top:40px}
/* 오류 안내 페이지(404/429/500) */
.error-page{min-height:calc(100vh - 64px - 160px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.error-actions{display:flex;gap:8px;justify-content:center;margin-top:24px}
.error-actions .btn-ghost{height:38px;padding:0 20px}
/* 마이페이지 구역(API 키 / 분석 기록) 사이 구분선 */
.page-section + .page-section{margin-top:48px;padding-top:40px;border-top:1px solid var(--line)}
.section-title{font-size:20px;font-weight:800;letter-spacing:-.01em;margin:0}
.page-section > .sub{margin:8px 0 0;font-size:15px}

/* API 키(마이페이지) */
.inline-link{color:var(--fg);font-weight:600;text-decoration:underline;text-underline-offset:2px;margin-left:4px}
.key-form{display:flex;gap:8px;margin-top:16px;max-width:560px}
.key-form input{flex:1;min-width:0;height:38px;border:1px solid var(--line-strong);border-radius:8px;padding:0 12px;font-size:14px;color:var(--fg);background:#fff}
.key-form input:focus{outline:none;border-color:var(--ink);box-shadow:var(--ring)}
.key-error{margin-top:8px}
.key-exists{margin:16px 0 0;font-size:14px;color:var(--muted)}
.key-new{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:16px;background:var(--surface)}
.key-new p{margin:0 0 12px;font-size:14px;font-weight:600}
.key-new .issued-id{justify-content:flex-start}
.key-prefix code{font-size:12px}
.btn-detail.btn-danger:hover{background:var(--danger);border-color:var(--danger);color:#fff}

/* API Docs, FAQ */
.doc{max-width:880px}
.doc-lead{margin:12px 0 0;font-size:17px;color:var(--fg);line-height:1.65}
.doc-sec{margin-top:40px}
.doc-sec h2{font-size:20px;font-weight:800;margin:0 0 12px}
.doc-sec p{margin:0 0 12px;font-size:15px;line-height:1.7;color:#333}
.doc-steps,.doc-list{margin:0 0 12px;padding-left:20px;font-size:15px;line-height:1.8;color:#333}
.doc-cta{height:34px;padding:0 16px}
.endpoint{display:flex;align-items:center;gap:10px}
.endpoint code{font-size:15px;font-weight:600}
.method{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:800;letter-spacing:.02em;line-height:1;color:#fff;background:var(--ink)}
.method.get{background:#5c5c5c}
.code{margin:0 0 12px;background:#111;color:#eee;border-radius:12px;padding:16px 18px;overflow-x:auto;font-size:13px;line-height:1.6}
.code code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}
.doc-table{width:100%;border-collapse:collapse;font-size:14px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.doc-table td{padding:10px 14px;border-bottom:1px solid #efefef;vertical-align:top;color:#333}
.doc-table tr:last-child td{border-bottom:0}
.doc-table td:first-child{width:34%;white-space:nowrap;background:var(--surface-2)}
.faq{margin-top:24px;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.faq-item{border-bottom:1px solid var(--line);background:#fff}
.faq-item:last-child{border-bottom:0}
.faq-item summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;font-size:16px;font-weight:700}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";font-size:20px;font-weight:400;color:var(--muted);flex:none}
.faq-item[open] summary::after{content:"−"}
.faq-item p{margin:0;padding:0 20px 18px;font-size:15px;line-height:1.7;color:#333}

/* hero */
.hero{max-width:1160px;margin:0 auto;padding:56px 20px 64px;text-align:center}
.hero-left{text-align:left}
.badge{background:var(--brand-tint);color:var(--brand);font-size:12px;font-weight:600;letter-spacing:.02em;height:28px;padding:0 14px;border-radius:var(--radius)}
h1{font-size:52px;font-weight:800;letter-spacing:-.03em;line-height:1.15;margin:20px 0 0}
h1 .lead{color:var(--ink)}
h1 .accent{color:var(--brand)}
.h1-sm{font-size:34px}
.sub{color:var(--muted);font-size:17px;margin:18px 0 0}
.hero-desc .line,.sub .line,.legal-short .line,.legal-banner .line{display:block;text-wrap:balance}
.hero-desc{max-width:720px;margin:16px auto 0;color:var(--fg);font-size:20px;line-height:1.6}
.col-tech{font-weight:600;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sub-left{text-align:left}

/* tabs */
/* 토글(902.run 방식): 회색 트랙 위로 흰색 알약이 선택 쪽으로 미끄러진다 */
.tabs{position:relative;display:inline-grid;grid-template-columns:1fr 1fr;isolation:isolate;background:#eee;border-radius:var(--radius);padding:4px;margin:32px auto 24px;box-shadow:inset 0 1px 2px rgba(0,0,0,.06)}
.tabs::before{content:"";position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);border-radius:var(--radius);background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.04);transition:transform .28s cubic-bezier(.4,0,.2,1);z-index:0}
.tabs:has(.tab[data-tab="lookup"].active)::before{transform:translateX(100%)}
.tab{position:relative;z-index:1;gap:6px;border:0;background:transparent;font-family:inherit;font-size:14.5px;font-weight:600;color:#707070;height:37px;padding:0 22px;border-radius:var(--radius);cursor:pointer;transition:color .2s}
.tab svg{flex:none}
.tab:hover{color:#3a3a3a}
.tab.active{color:var(--ink)}
@media (prefers-reduced-motion:reduce){.tabs::before,.tab{transition:none}}
.view{max-width:1100px;margin:0 auto;text-align:left}
.view-wide{max-width:1100px;margin:0}
#scan-form,#issued,#view-new .sub,#view-lookup .sub,#lookup-form,#view-new .notice{max-width:720px;margin-left:auto;margin-right:auto}
#view-new .sub,#view-lookup .sub,#view-history .sub{text-align:center}
.view > .sub{margin:0 auto 16px}

/* form */
#targets{display:block;width:100%;border:1px solid var(--line);border-radius:16px;padding:14px 16px;font-family:var(--mono);font-size:14px;line-height:1.7;resize:vertical;outline:0;box-shadow:var(--shadow);color:var(--fg);background:#fff}
#targets:focus{border-color:var(--line-strong);box-shadow:var(--ring)}
.form-row{display:flex;align-items:center;gap:14px;margin-top:12px;flex-wrap:wrap}
.form-row .hint{margin-right:auto}
.opt{display:flex;align-items:center;gap:8px;color:var(--muted);cursor:pointer;font-size:14px}
.opt input{accent-color:var(--ink);width:16px;height:16px}
.hint{color:var(--faint);font-size:13px;font-variant-numeric:tabular-nums}
.hint.over{color:var(--danger);font-weight:700}
.notice{margin:0 auto 16px;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:10px 14px;font-size:14px;color:var(--fg)}
.notice-link{font-weight:700;text-decoration:underline;margin-left:6px}

.btn-primary{border:0;cursor:pointer;background:var(--brand);color:#fff;font-weight:700;font-size:14.5px;height:38px;padding:0 20px;border-radius:8px;font-family:inherit;white-space:nowrap;transition:background .15s}
.btn-primary:hover{background:var(--brand-hover)}
.btn-primary:disabled{opacity:.45;cursor:default}
.btn-ghost{border:1px solid var(--line);background:#fff;color:var(--fg);font-family:inherit;font-size:13px;font-weight:600;height:32px;padding:0 14px;border-radius:8px;cursor:pointer}
.btn-ghost:hover{border-color:var(--ink)}

/* issued id */
.issued{margin-top:24px;border:1px solid var(--line);border-radius:18px;padding:22px;background:var(--surface);text-align:center}
.issued-label{font-size:13px;color:var(--fg);font-weight:700;margin-bottom:12px}
.issued-id{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.issued-id code{font-family:var(--mono);font-size:15px;font-weight:600;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 14px;word-break:break-all}
.issued-sub{font-size:13px;color:var(--muted);margin:14px 0 16px}

/* lookup */
.input-row{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:5px 5px 5px 16px;box-shadow:var(--shadow)}
/* 칸 테두리 링은 글자 입력칸에 포커스일 때만(안의 버튼 포커스 때 버튼 외곽선과 겹쳐 이중선이 되지 않게) */
.input-row:has(input:focus){border-color:var(--line-strong);box-shadow:var(--ring)}
#view-lookup .input-row{max-width:560px;margin:0 auto}
.input-row input{flex:1;border:0;outline:0;font-size:15px;font-family:var(--mono);background:transparent;color:var(--fg);min-width:0;padding:4px 6px}
.input-row input::placeholder{color:var(--faint);font-family:var(--font)}

/* result */
.result{margin:32px auto 0;max-width:1100px;text-align:left;border:1px solid var(--line);border-radius:20px;padding:22px;background:#fff;box-shadow:var(--shadow)}
.result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.result-target{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#rt-id{font-family:var(--mono);font-size:13px}
.rt-label{color:var(--muted);margin-right:8px}
.pill-status{font-size:12px;font-weight:600;height:26px;padding:0 12px;border-radius:var(--radius);background:var(--surface);color:var(--muted);white-space:nowrap}
.pill-status.running{background:var(--surface);color:var(--fg);border:1px solid var(--line)}
.pill-status.done{background:var(--brand-tint);color:var(--brand)}
.pill-status.failed{background:var(--danger-tint);color:var(--danger)}
.progress-wrap{height:6px;background:var(--surface);border-radius:var(--radius);overflow:hidden}
.progress-bar{height:100%;width:0;background:var(--brand);border-radius:var(--radius);transition:width .4s ease}
.progress-step{font-size:13px;color:var(--muted);margin:8px 2px 0}

/* table */
.rtable-wrap{margin-top:16px;border:1px solid var(--line);border-radius:14px;overflow:hidden;overflow-x:auto}
.rtable{width:100%;border-collapse:collapse;font-size:13px}
.rtable thead th{text-align:left;font-weight:600;color:var(--muted);font-size:12px;letter-spacing:.01em;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface-2);white-space:nowrap}
.rtable tbody td{padding:12px 14px;border-bottom:1px solid #efefef;vertical-align:middle}
.rtable tbody tr:last-child td{border-bottom:0}
.rtable tbody tr:hover{background:var(--surface-2)}
.col-no{width:44px;color:var(--muted);font-variant-numeric:tabular-nums}
.col-target{font-weight:600;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.col-target .tgt{display:flex;align-items:baseline;gap:6px;min-width:0}
.col-target .tgt-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.col-target .tgt-more{flex:none;color:var(--muted);font-weight:500;font-size:13px}
.col-dim{color:var(--muted);white-space:nowrap}
.col-act{width:110px;text-align:right}
/* 실패 사유는 한 줄로(칸이 글자만큼 넓어진다). 좁은 카드형 화면에서는 줄바꿈 허용 */
.col-err{color:var(--danger);font-size:12px;white-space:nowrap}
.btn-detail{border:1px solid var(--line);background:#fff;color:var(--fg);font-family:inherit;font-size:12px;font-weight:600;height:30px;padding:0 14px;border-radius:8px;cursor:pointer;white-space:nowrap}
.btn-detail:hover{background:var(--ink);border-color:var(--ink);color:#fff}

/* layers */
.layers{margin-top:18px;display:flex;flex-direction:column;gap:10px}
.layer{border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.layer-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.layer-no{width:22px;height:22px;border-radius:50%;background:var(--ink);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.layer-name{font-weight:700;font-size:14px}
.layer-empty{color:#b0b0b0;font-size:13px}
.empty-gap{margin-top:14px}
.tech-list{display:flex;flex-wrap:wrap;gap:6px}
.tech{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;max-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:16px;min-height:32px;padding:6px 12px;font-size:13px;line-height:1.35}
.tech .tname{overflow-wrap:anywhere}
.tech .tname{font-weight:600}
.tech .tver{color:var(--fg);font-family:var(--mono);font-size:12px}
/* 신뢰도(%)는 옆 배지(18px)와 같은 높이 상자로 두어 세로 중앙을 맞춘다 */
.tech .tconf{display:inline-flex;align-items:center;height:18px;line-height:1;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.tmethod{font-size:10px;color:#fff;background:#8a8a8a;border-radius:var(--radius);height:18px;padding:0 8px}
.tmethod.passive{background:var(--ink)}
.tmethod.heuristic{background:#5c5c5c}
.tmethod.probe{background:#9a9a9a}
.tmethod.active{background:#333}
.tdet{font-size:10px;border-radius:var(--radius);height:18px;padding:0 8px}
.tdet.sure{background:var(--ink);color:#fff}
.tdet.guess{background:#fff;color:var(--muted);border:1px solid var(--line-strong)}
.meta-row{font-size:12px;color:var(--muted);background:var(--surface);border-radius:10px;padding:8px 12px;margin-bottom:6px;word-break:break-all}
/* 범례: 확실도 줄과 근거 줄을 나눠 두 기준이 섞이지 않게 */
.legend{margin-top:14px;display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted)}
.legend-row{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
.legend-title{font-weight:700;color:var(--fg);min-width:56px}
.legend .lg{display:inline-flex;align-items:center;gap:6px}
.warn-flag{color:var(--warn);cursor:help;font-size:13px}
.warn-banner{background:var(--warn-tint);color:var(--warn);border:1px solid #ecdcb0;border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:10px}

/* kpi */
.kpi-row{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}
.kpi{flex:1;min-width:150px;border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:#fff;box-shadow:var(--shadow)}
.kpi-num{font-size:28px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.kpi-label{font-size:13px;color:var(--muted);margin-top:4px}
.pager{display:flex;justify-content:center;align-items:center;gap:4px;margin-top:20px;flex-wrap:wrap}
.pg-btn{min-width:36px;height:36px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:transparent;
  color:var(--fg);font:inherit;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;cursor:pointer}
.pg-btn:hover:not(:disabled){background:var(--brand-tint)}
.pg-btn[aria-current="page"]{background:var(--brand);color:#fff;cursor:default}
.pg-btn:disabled:not([aria-current]){color:var(--muted);opacity:.4;cursor:default}
.pg-gap{min-width:24px;text-align:center;color:var(--muted)}

/* modal */
.modal{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.modal-box{position:relative;background:#fff;border-radius:18px;max-width:840px;width:100%;max-height:85vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:1}
#modal-title,#legal-modal-title{font-weight:700;font-size:16px;word-break:break-all}
.modal-x{border:0;background:transparent;font-size:26px;line-height:1;color:var(--muted);cursor:pointer;padding:0 6px}
.modal-x:hover{color:var(--fg)}
.modal-body{padding:18px 22px}
body.modal-open{overflow:hidden}
.kbd-hint{margin-left:6px;font-size:12px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:6px;height:22px;padding:0 8px;vertical-align:middle}

/* legal */
.legal-short{font-size:12px;color:var(--muted);line-height:1.6;margin:16px 4px 0}
.legal-short a,.legal-banner a{color:var(--fg);font-weight:600;margin-left:4px;text-decoration:underline;text-underline-offset:2px}
.legal-banner{margin-top:14px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:9px 14px;font-size:12px;color:var(--muted)}
.legal-page h1{margin-top:20px}
.legal-page .sub{margin-top:12px}
.legal-doc{max-width:820px;margin-top:32px}
.legal-lead{font-size:15px;line-height:1.7;background:var(--surface);color:var(--fg);border-left:3px solid var(--ink);border-radius:4px 12px 12px 4px;padding:14px 16px}
.legal-sec{margin-top:18px}
.legal-sec h2,.legal-sec h3{font-size:15px;font-weight:700;margin:0 0 6px}
.legal-sec p{margin:0 0 8px;font-size:14px;line-height:1.7;color:#333}
.legal-modal-box{max-width:760px}
.legal-ver{font-size:12px;color:var(--muted);white-space:nowrap}
.legal-modal-body{max-height:48vh;overflow:auto}
.legal-modal-body .legal-lead{font-size:14px}
.legal-modal-foot{border-top:1px solid var(--line);padding:14px 22px 18px;position:sticky;bottom:0;background:#fff}
.legal-ack{align-items:flex-start;font-size:13px;color:var(--fg);margin-bottom:10px}
.legal-ack input{margin-top:3px;flex:none}
.legal-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:6px}
.legal-modal-actions .btn-ghost{height:38px;padding:0 18px;font-size:14px}

/* foot */
/* 푸터: 한 줄(왼쪽 저작권, 오른쪽 법적고지), 좌우 여백은 헤더와 같게 */
.foot{margin-top:64px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 40px;border-top:1px solid var(--line);background:var(--surface-2);color:var(--faint);font-size:13px}
.foot-links{display:flex;align-items:center;gap:20px}
.foot a{color:var(--muted);font-weight:500}
.foot a[aria-current="page"]{color:var(--brand)}
.foot a:hover{color:var(--fg)}

@media (max-width:760px){
  .nav-inner{padding:0 16px}
  .foot{padding:16px;flex-wrap:wrap}
  .user-name{display:none}
  .user-chip{padding:0 3px}
}
/* 휴대폰: 결과/기록 표를 대상별 카드로(가로 스크롤 없이, 행 높이 일정) */
@media (max-width:640px){
  .doc-table td:first-child{width:auto;white-space:normal}
  .key-form{flex-direction:column}
  .page{padding:40px 16px 48px}
  .profile{flex-wrap:wrap;padding:20px}
  .profile-actions{width:100%}
  .profile-actions .btn-ghost{flex:1;height:38px}
  .rtable-cards thead{display:none}
  .rtable-cards,.rtable-cards tbody{display:block}
  .rtable-cards tbody tr{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 12px;padding:14px 16px;border-bottom:1px solid #efefef}
  .rtable-cards tbody tr:last-child{border-bottom:0}
  .rtable-cards tbody td{display:block;padding:0;border:0;max-width:none}
  .rtable-cards .col-no{display:none}
  .rtable-cards .col-target{grid-column:1;min-width:0}
  .rtable-cards .col-st{grid-column:2;justify-self:end}
  .rtable-cards td[data-label]{grid-column:1 / -1;display:flex;justify-content:space-between;gap:12px;font-size:13px;white-space:normal}
  .rtable-cards td[data-label]::before{content:attr(data-label);color:var(--muted);font-weight:500}
  .rtable-cards .col-date{grid-column:1 / -1;font-size:12px}
  .rtable-cards .col-act{grid-column:1 / -1;width:auto;text-align:right}
  .rtable-cards .col-act:empty{display:none}
  .rtable-cards .col-err{display:block;text-align:right;white-space:normal}
}
@media (max-width:640px){
  h1{font-size:34px}
  .h1-sm{font-size:28px}
  .sub{font-size:15px}
  .hero-desc{font-size:17px}
  .hero{padding:40px 16px 30px}
  .input-row{flex-wrap:wrap;border-radius:20px;padding:12px}
  .input-row .btn-primary{width:100%}
  .form-row .btn-primary{width:100%}
  .tab{padding:8px 14px}
}

/* 키보드 단축키 안내(Ctrl+Enter)는 휴대폰/터치 기기에서 숨김 */
@media (max-width:640px),(hover:none) and (pointer:coarse){.kbd-hint{display:none !important}}
