/* SCGI·SCGV 소상공인 영업권 평가 — FIRI 시리즈 공통 UI
   (IAI와 같은 레이아웃·카드·타이포그래피·여백, 시리즈 구분만 딥 에메랄드)
   주색 #14532d · 에메랄드 #34d399 · 라임 강조 #4d7c0f */

:root {
  --navy: #14532d;
  --navy-900: #0b3b21;
  --navy-700: #166534;
  --mint: #34d399;
  --mint-dark: #15803d;
  --mint-soft: #ecfdf5;
  --orange: #4d7c0f;
  --orange-soft: #f7fee7;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e2e8f0;
  --line-strong: #cfd8e3;
  --bg: #f3f7f4;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(11, 59, 33, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- 상단 바 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 38px; width: auto; display: block; }
.brand .divider { width: 1px; height: 26px; background: var(--line-strong); }
.brand .product { font-weight: 800; color: var(--navy); letter-spacing: -.01em; font-size: 17px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.linklike {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-700);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav button.linklike:hover { background: var(--mint-soft); text-decoration: none; }
.nav a.active { background: var(--navy); color: #fff; }

/* ---------- 공통 요소 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge.demo { background: var(--orange-soft); color: #3f6212; border: 1px solid #d9f99d; }
.badge.live { background: var(--mint-soft); color: var(--mint-dark); border: 1px solid #a7f3d0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--navy-700); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20, 83, 45, .18); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--navy), #24507f); }
.btn.accent { background: var(--orange); }
.btn.accent:hover { background: #3f6212; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--mint-soft); border-color: var(--mint); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.mint { background: var(--mint-dark); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.3; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }

/* ---------- 홈 히어로 ---------- */
.hero {
  background:
    radial-gradient(1100px 380px at 85% -30%, rgba(52, 211, 153, .28), transparent 60%),
    radial-gradient(700px 320px at 8% 120%, rgba(101, 163, 13, .16), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy) 55%, #20456f);
  color: #fff;
  padding: 58px 0 46px;
  margin-bottom: 34px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--mint);
  border: 1px solid rgba(52, 211, 153, .5);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); margin: 0 0 12px; font-weight: 800; }
.hero h1 .thin { font-weight: 400; color: #c7d2e0; }
.hero p.lead { max-width: 720px; margin: 0; color: #d7e0ec; font-size: 17px; }
.hero .hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- 홈 본문 ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 26px; align-items: start; }

.panel { padding: 26px 26px 30px; }
.panel h2 { font-size: 21px; margin: 0 0 4px; }
.panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; color: var(--navy); }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.type-option:hover { border-color: var(--mint); }
.type-option input { margin-top: 4px; accent-color: var(--mint-dark); }
.type-option strong { display: block; font-size: 14.5px; color: var(--navy); }
.type-option span { font-size: 12.5px; color: var(--muted); }
.type-option:has(input:checked) { border-color: var(--mint-dark); background: var(--mint-soft); }
.type-option input { margin-top: 3px; width: 18px; height: 18px; }
.type-option .type-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.type-option .type-price { font-size: 13px; font-weight: 700; color: var(--navy-700); }

/* 유료·무료 금액 배지 */
.price-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  vertical-align: middle;
  letter-spacing: .01em;
}
.price-badge.free { background: var(--mint-soft); color: var(--mint-dark); border: 1px solid #a7f3d0; }
.price-badge.paid { background: var(--orange-soft); color: #3f6212; border: 1px solid #d9f99d; }

/* 선택 유형·예상 합계 상자 */
.price-summary {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--mint-dark);
  border-radius: 10px;
  background: #fbfdff;
}
.price-summary .ps-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-summary .ps-head strong { color: var(--navy); font-size: 15px; }
.price-summary .ps-total { margin-left: auto; font-size: 14px; color: var(--muted); }
.price-summary .ps-total b { font-size: 18px; color: var(--orange); font-variant-numeric: tabular-nums; }
.price-summary .ps-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.price-summary .ps-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink); }
.price-summary .ps-list .amt { color: var(--muted); font-variant-numeric: tabular-nums; }
.price-summary .ps-list .amt.paid { color: var(--orange); font-weight: 700; }
.price-summary .ps-notice {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px;
  color: var(--navy-700);
}
.price-summary .ps-empty { margin: 8px 0 0; }

.pricing-table td { vertical-align: top; }
.pricing-table input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--mint-dark); }

/* 보고서: 여러 유형을 함께 분석했을 때 */
.rpt-body h2.sec-title.type-head { margin-top: 30px; }
.rpt-body h2.sec-title.type-head::before { height: 22px; }
.rpt-body h3.sub-head {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--navy-700);
  font-weight: 700;
}

.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.form-actions .btn.primary { min-width: 220px; font-size: 17px; padding: 15px 26px; }

/* ---------- 상품 사진 첨부 ---------- */
.image-field .dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 22px 18px;
  margin: 0;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: #fafbfd;
  text-align: center;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.image-field .dropzone:hover,
.image-field .dropzone.drag {
  border-color: var(--mint-dark);
  background: var(--mint-soft);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .14);
}
.image-field .dropzone .dz-icon { font-size: 26px; line-height: 1; }
.image-field .dropzone .dz-title { font-weight: 700; font-size: 15px; color: var(--navy); }
.image-field .dropzone .dz-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.image-field .dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.image-preview {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.image-preview[hidden] { display: none; }
.image-preview img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  flex: none;
}
.image-preview .preview-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.image-preview .preview-meta strong { font-size: 14px; color: var(--navy); word-break: break-all; }
.image-preview .preview-meta .err { color: #b91c1c; font-weight: 600; }
.image-preview .preview-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.image-preview .preview-actions .btn[hidden] { display: none; }
.image-preview .preview-summary {
  flex-basis: 100%;
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}
.image-preview .preview-summary[hidden] { display: none; }

.notice-box {
  border-left: 4px solid var(--mint);
  background: var(--mint-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: #14532d;
}
.error-box {
  border-left: 4px solid var(--orange);
  background: var(--orange-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  color: #3f6212;
  font-weight: 600;
  margin-bottom: 18px;
}

.side-card { padding: 22px 22px 24px; }
.side-card + .side-card { margin-top: 20px; }
.side-card h3 { font-size: 16.5px; margin: 0 0 14px; }
.area-list { list-style: none; padding: 0; margin: 0; }
.area-list li { margin-bottom: 13px; }
.area-list .row { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 5px; }
.area-list .row b { color: var(--navy); }
.area-list .bar { height: 7px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.area-list .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--mint-dark)); border-radius: 99px; }

.grade-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.grade-mini span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  background: #eef2f7;
  border-radius: 6px;
  padding: 3px 8px;
}
.grade-mini span.hi { background: var(--navy); color: #fff; }

.recent { margin-top: 34px; }
.recent h2 { font-size: 20px; margin-bottom: 14px; }
.report-list { display: grid; gap: 12px; }
.report-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, transform .15s;
}
.report-item:hover { border-color: var(--mint); transform: translateY(-1px); text-decoration: none; }
.report-item .info { min-width: 0; }
.report-item .title { font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-item .meta { font-size: 13px; color: var(--muted); }
.report-item .score { margin-left: auto; text-align: right; flex: 0 0 auto; }
.report-item .score b { font-size: 22px; color: var(--orange); }
.report-item .score span { display: block; font-size: 12px; color: var(--muted); }

/* ---------- 보고서 ---------- */
.report-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0 10px;
}
.report-toolbar .spacer { flex: 1; }

.sheet {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(11, 59, 33, .10);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 40px;
}
.sheet-inner { padding: 0 0 40px; }

.rpt-header {
  background: linear-gradient(135deg, var(--navy-900), var(--navy));
  color: #fff;
  padding: 26px 34px 24px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}
.rpt-header .logo-card {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpt-header .logo-card img { width: 100%; height: auto; display: block; }
.rpt-header .titles { min-width: 0; }
.rpt-header .kicker { font-size: 12px; letter-spacing: .16em; color: var(--mint); font-weight: 700; }
.rpt-header h1 { color: #fff; font-size: 27px; margin: 6px 0 8px; font-weight: 800; }
.rpt-header .rule { height: 3px; width: 100%; background: linear-gradient(90deg, var(--mint), rgba(52,211,153,0)); border-radius: 99px; margin: 8px 0 10px; }
.rpt-header .product { font-size: 16px; color: #e4ebf4; }
.rpt-header .date { font-size: 13px; color: #aebccd; margin-top: 4px; }

.rpt-body { padding: 30px 34px 0; }

.sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.sec-title::before { content: ""; width: 5px; height: 20px; background: var(--mint); border-radius: 2px; }
.sec-title .aside { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.overview-list { list-style: none; padding: 0; margin: 0; }
.overview-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.overview-list li b { color: var(--navy); }
.overview-list li:last-child { border-bottom: 0; }

table.rpt {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.rpt th, table.rpt td { border: 1px solid var(--line); padding: 11px 12px; }
table.rpt thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; text-align: center; }
table.rpt tbody tr:nth-child(even) td { background: #f7f9fc; }
table.rpt td.center, table.rpt th.center { text-align: center; }
table.rpt td.num { text-align: center; font-variant-numeric: tabular-nums; }
table.rpt tr.total td { background: var(--mint-soft) !important; font-weight: 800; color: var(--navy); border-top: 2px solid var(--mint); }
table.rpt tr.total td.big { color: var(--orange); font-size: 18px; }
table.rpt tr.current td { background: var(--mint-soft) !important; font-weight: 800; color: var(--navy); }
table.rpt tr.current td:first-child { color: var(--orange); }
table.rpt.compact { font-size: 13px; }
table.rpt.compact th, table.rpt.compact td { padding: 7px 8px; }

.table-note { font-size: 12.5px; color: var(--muted); margin-top: 7px; }

.conclusion {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
}
.conclusion .big-score { text-align: center; border-right: 1px solid var(--line); }
.conclusion .big-score .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.conclusion .big-score .value { font-size: 54px; font-weight: 800; color: var(--orange); line-height: 1.05; letter-spacing: -.02em; }
.conclusion .big-score .value small { font-size: 18px; color: var(--navy); font-weight: 700; margin-left: 4px; }
.conclusion .big-score .grade { margin-top: 6px; font-size: 15px; font-weight: 800; color: var(--navy); }

.gradebar { margin: 6px 0 10px; }
.gradebar .labels, .gradebar .segs, .gradebar .marks { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.gradebar .labels span { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.gradebar .labels span.current { color: var(--orange); }
.gradebar .segs span { height: 16px; border-radius: 3px; background: #e6f4ea; }
.gradebar .segs span.filled { background: linear-gradient(90deg, #6ee7b7, var(--mint)); }
.gradebar .segs span.current { background: var(--orange); }
.gradebar .marks span { text-align: center; font-size: 12px; color: transparent; }
.gradebar .marks span.current { color: var(--orange); }
.gradebar .caption { text-align: center; font-size: 12px; color: var(--orange); font-weight: 700; margin-top: -2px; }

.summary-quote {
  border-left: 4px solid var(--mint);
  background: #f7fafc;
  padding: 13px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14.5px;
  color: #334155;
  margin-top: 16px;
}

.area-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: 0 10px 10px 0;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #fcfdff;
}
.area-box h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 17px; }
.area-box h3 .score { font-size: 14px; color: var(--orange); font-weight: 800; }
.area-box ul { margin: 0; padding-left: 18px; }
.area-box li { margin-bottom: 5px; font-size: 14.5px; }
.area-box .finding { margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14.5px; color: #374151; }
.area-box .finding b { color: var(--navy); }

.impl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.impl-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; }
.impl-card h4 { margin: 0 0 10px; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.impl-card.strengths h4 { color: var(--mint-dark); }
.impl-card.improvements h4 { color: #3f6212; }
.impl-card.recommend h4 { color: var(--navy); }
.impl-card ul { margin: 0; padding-left: 17px; }
.impl-card li { font-size: 14px; margin-bottom: 6px; }

.legal { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 6px; }
.legal h2 { font-size: 16px; margin: 18px 0 10px; }
.legal h3 { font-size: 14px; color: var(--navy); margin: 16px 0 6px; }
.legal p { font-size: 13px; color: #374151; margin: 0 0 7px; }
.legal ul { margin: 0 0 8px; padding-left: 18px; }
.legal li { font-size: 13px; color: #374151; margin-bottom: 2px; }

.institution { text-align: center; margin: 34px 0 8px; padding-top: 22px; border-top: 3px solid var(--mint); }
.institution img { width: 200px; max-width: 55%; height: auto; margin-bottom: 10px; }
.institution .line { font-weight: 800; color: var(--navy); font-size: 15px; }
.institution .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.demo-ribbon {
  background: var(--orange-soft);
  border-bottom: 1px solid #d9f99d;
  color: #3f6212;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 34px;
}

/* ---------- 별지 ---------- */
.appendix { border-top: 2px solid var(--navy); margin-top: 42px; padding-top: 26px; }
.appendix .ap-head { text-align: center; margin-bottom: 18px; }
.appendix .ap-head .kicker { letter-spacing: .3em; font-size: 12px; color: var(--mint-dark); font-weight: 700; }
.appendix .ap-head h2 { font-size: 21px; margin: 4px 0 8px; }
.appendix .meta { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 20px; }
.appendix h3 { font-size: 15.5px; margin: 26px 0 10px; padding: 7px 0 7px 12px; border-left: 4px solid var(--mint); background: #f7fafc; }
.appendix .url { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.appendix .pill { display: inline-block; background: #eef2f7; border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--navy); font-weight: 700; margin: 0 4px 4px 0; }

/* ---------- 안내/메시지 페이지 ---------- */
.center-card { max-width: 620px; margin: 70px auto; padding: 40px; text-align: center; }
.center-card h1 { font-size: 24px; margin-bottom: 10px; }

/* ---------- 관리자 ---------- */
.admin-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 26px 0 18px; }
.admin-head h1 { font-size: 24px; margin: 0; }
.admin-head .spacer { flex: 1; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.tabs button.active { color: var(--navy); border-bottom-color: var(--mint); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.editor-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.editor-toolbar .spacer { flex: 1; }
textarea.policy-editor {
  width: 100%;
  min-height: 560px;
  font-family: "D2Coding", "Consolas", "Menlo", monospace;
  font-size: 14px;
  line-height: 1.7;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fbfcfe;
  tab-size: 2;
}
.guide { font-size: 14px; }
.guide code, code {
  background: #eef2f7;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 13px;
  font-family: "D2Coding", Consolas, monospace;
}
.guide ul { padding-left: 20px; }
.guide li { margin-bottom: 5px; }
pre.md {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  max-height: 720px;
  overflow: auto;
}
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th, .kv td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.kv th { color: var(--navy); background: #f7f9fc; font-weight: 700; }
.kv td.num { text-align: right; font-variant-numeric: tabular-nums; }
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14.5px; }
.alert.ok { background: var(--mint-soft); color: #166534; border: 1px solid #a7f3d0; }
.alert.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- 분석 중 오버레이 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 59, 33, .55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.overlay.show { display: flex; }
.overlay .box { background: #fff; border-radius: 16px; padding: 32px 34px; width: min(520px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.overlay h3 { margin: 0 0 6px; font-size: 20px; }
.overlay .steps { list-style: none; padding: 0; margin: 18px 0 0; }
.overlay .steps li { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: var(--muted); font-size: 15px; }
.overlay .steps li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; flex: 0 0 auto; }
.overlay .steps li.active { color: var(--navy); font-weight: 700; }
.overlay .steps li.active .dot { border-color: var(--orange); border-top-color: transparent; animation: spin 1s linear infinite; }
.overlay .steps li.done { color: var(--mint-dark); }
.overlay .steps li.done .dot { background: var(--mint); border-color: var(--mint); color: #fff; }
.overlay .progress { height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin-top: 18px; }
.overlay .progress span { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--mint), var(--orange)); border-radius: 99px; transition: width .5s ease; }
.overlay .error { display: none; margin-top: 16px; }
.overlay .error.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 26px 0 34px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; justify-content: space-between; }
.site-footer .foot-main { flex: 1 1 520px; min-width: 0; display: grid; gap: 9px; }
.site-footer .foot-brand { margin: 0; }
.site-footer .foot-brand strong { color: var(--navy); font-size: 14px; letter-spacing: -.01em; }
.site-footer .foot-info { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 3px 20px; line-height: 1.65; }
.site-footer .foot-info li { display: flex; gap: 8px; word-break: keep-all; }
.site-footer .foot-k { flex: 0 0 auto; color: #94a3b8; font-weight: 600; }
.site-footer .foot-v { min-width: 0; }
.site-footer .foot-info a { color: var(--navy-700); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-footer .foot-info a:hover { text-decoration: underline; }
.site-footer .right { margin-left: auto; display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.site-footer .right .admin-link { font-weight: 600; color: var(--navy-700); }

/* ---------- 인쇄 ---------- */
@media print {
  /* 인쇄는 항상 A4 세로형(portrait)으로 고정한다 — 브라우저 인쇄 대화상자에서 '가로'를 골라도 세로로 나온다. */
  @page { size: A4 portrait; margin: 14mm 12mm; }
  body { background: #fff; font-size: 10.5pt; }
  .site-header, .site-footer, .report-toolbar, .overlay { display: none !important; }
  .wrap { width: 100%; }
  .sheet { border: 0; box-shadow: none; margin: 0; border-radius: 0; }
  .rpt-body, .rpt-header { padding-left: 0; padding-right: 0; }
  .rpt-header { padding: 16px 18px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .area-box, .impl-card, .conclusion { break-inside: avoid; }
  .appendix { break-before: page; }
  .legal { break-before: page; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .rpt-header { grid-template-columns: 1fr; }
  .rpt-header .logo-card { max-width: 240px; }
  .conclusion { grid-template-columns: 1fr; }
  .conclusion .big-score { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .impl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { width: calc(100% - 24px); }
  .panel, .rpt-body { padding-left: 16px; padding-right: 16px; }
  .rpt-header { padding: 18px; }
  .grid-2, .type-grid { grid-template-columns: 1fr; }
  .overview-list li { grid-template-columns: 88px 1fr; }
  .site-header .wrap { gap: 10px; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
  .nav { width: 100%; overflow-x: auto; }
  table.rpt { font-size: 13px; }
  table.rpt th, table.rpt td { padding: 7px 6px; }
  .report-item { flex-wrap: wrap; }
  .report-item .score { margin-left: 0; }
  /* 모바일에서도 '관리자'는 우측 하단에 남긴다. */
  .site-footer { padding: 20px 0 26px; }
  .site-footer .wrap { flex-direction: column; align-items: stretch; gap: 12px; }
  .site-footer .foot-main { flex: none; }
  .site-footer .foot-info { flex-direction: column; gap: 6px; }
  .site-footer .foot-info li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; }
  .site-footer .right { margin-left: 0; width: 100%; justify-content: flex-end; text-align: right; gap: 12px; flex-wrap: wrap; padding-top: 2px; }
  .price-summary .ps-total { margin-left: 0; }
}

/* ---------- 신청자 정보 (메인 화면) ---------- */
.applicant-box {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin: 4px 0 18px;
  background: #fbfcfe;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.applicant-box.required {
  border: 1px solid var(--orange);
  border-left: 4px solid var(--orange);
  background: #fffaf4;
  box-shadow: 0 6px 18px rgba(101, 163, 13, .08);
}
.applicant-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.applicant-head strong { color: var(--navy); font-size: 15.5px; }
.applicant-flag {
  font-size: 12.5px;
  color: var(--muted);
  background: #eef2f7;
  border-radius: 99px;
  padding: 3px 10px;
}
.applicant-flag.on { background: var(--orange-soft); color: #3f6212; font-weight: 700; border: 1px solid #d9f99d; }
.applicant-note { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.req-mark { color: var(--orange); font-weight: 800; }
.applicant-box.required #applicant_name + .hint,
.applicant-box.required .field label { color: var(--navy); }

/* ---------- 상태 배지 ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  background: #eef2f7;
  color: var(--navy);
  white-space: nowrap;
}
.status-pill.sm { padding: 4px 10px; font-size: 12.5px; }
.status-pill.pending { background: var(--orange-soft); color: #3f6212; border-color: #d9f99d; }
.status-pill.analyzing { background: #ecfdf5; color: #166534; border-color: #a7f3d0; }
.status-pill.done { background: var(--mint-soft); color: #166534; border-color: #a7f3d0; }
.status-pill.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.status-pill.canceled { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }

/* ---------- 의뢰 확인 페이지 ---------- */
.req-page { padding: 26px 0 10px; display: grid; gap: 18px; }
.req-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  flex-wrap: wrap;
}
.req-head h1 { margin: 2px 0 0; font-size: 25px; letter-spacing: -.02em; }
.req-eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--orange);
}
.req-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.req-grid aside { display: grid; gap: 16px; }
.req-table th { background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.req-table tr.req-total td { background: var(--mint-soft); font-weight: 800; color: var(--navy); border-top: 2px solid var(--mint); }
.req-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.bank-card { border-left: 4px solid var(--orange); }
.bank-line { margin: 0; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.bank-line strong { color: var(--orange); }
.req-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.req-steps li { padding-left: 22px; position: relative; }
.req-steps li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}
.req-steps li.done { color: var(--mint-dark); }
.req-steps li.done::before { background: var(--mint); border-color: var(--mint); }
.req-steps li.active { color: var(--navy); font-weight: 700; }
.req-steps li.active::before { border-color: var(--orange); border-top-color: transparent; animation: spin 1s linear infinite; }
.progress span.indeterminate { width: 40% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: 0; } 50% { margin-left: 55%; } 100% { margin-left: 0; } }
.req-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 20px; }

/* ---------- 관리자: 의뢰·입금 관리 ---------- */
.tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  margin-left: 4px;
}
.req-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.req-stats .stat {
  font-size: 13px;
  color: var(--muted);
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
}
.req-stats .stat b { color: var(--navy); font-size: 14.5px; margin-right: 2px; }
.req-stats .stat.pending b { color: #3f6212; }
.req-stats .stat.analyzing b { color: #166534; }
.req-stats .stat.done b { color: var(--mint-dark); }
.req-section-title {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--navy-700);
  letter-spacing: -.01em;
}
.req-section-title .tiny { font-weight: 400; }

/* 기간·상태 필터 */
.req-filter-bar { margin: 0 0 14px; }
.req-filter { display: grid; gap: 10px; }
.req-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.req-periods .chip {
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  color: var(--navy-700);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.req-periods .chip:hover { background: var(--mint-soft); border-color: var(--mint); }
.req-periods .chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 700;
}
.req-range-row { gap: 8px 10px; font-size: 13px; color: var(--muted); }
.req-range-row .req-date,
.req-range-row .req-status { display: inline-flex; align-items: center; gap: 6px; }
/* 라벨('시작일'·'종료일'·'상태')이 좁은 폭에서 두 줄로 갈라지지 않게 */
.req-range-row .req-date > span,
.req-range-row .req-status > span { white-space: nowrap; flex: 0 0 auto; }
.req-range-row input[type="date"],
.req-range-row select {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 9px;
  max-width: 100%;
  flex: 0 1 auto;
  min-width: 0;
}
.req-tilde { color: var(--muted); }
/* 조회·초기화 버튼 글자가 좁은 폭에서 갈라지지 않게 */
.req-filter-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* 선택 기간 요약 */
.req-scope {
  display: grid;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.req-scope-main { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.req-scope-main strong { color: var(--navy); }
.req-scope-count b { color: var(--navy); font-size: 16px; }
.req-scope-total b { color: var(--navy); }
.req-scope-statuses { display: flex; flex-wrap: wrap; gap: 6px; }

/* 접수일별 구분 행 */
table.kv.req-admin-table tr.req-day-head td {
  background: #eef2f7;
  border-top: 2px solid var(--line-strong);
  padding: 8px 12px;
}
.req-day-label { font-weight: 800; color: var(--navy); font-size: 13.5px; }
.req-day-meta { margin-left: 10px; font-size: 12.5px; color: var(--muted); }

.req-admin-wrap { overflow-x: auto; }
table.kv.req-admin-table { min-width: 900px; font-size: 13.5px; }
table.kv.req-admin-table td { vertical-align: top; }
.req-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.req-admin-actions form { margin: 0; }
table.kv.req-admin-table tr.req-notice-row td { background: #f8fafc; border-top: 0; padding-top: 0; }
table.kv.req-admin-table tr.req-notice-row + tr td { border-top: 2px solid var(--line); }
.copy-details { width: 100%; }
.copy-details summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--navy-700);
  padding: 2px 0;
  list-style: none;
}
.copy-details summary::before { content: "▸ "; color: var(--muted); }
.copy-details[open] summary::before { content: "▾ "; }
textarea.copy-box {
  width: 100%;
  min-height: 170px;
  margin-top: 6px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  resize: vertical;
}

@media (max-width: 980px) {
  .req-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* 기간 필터: 좁은 화면에서도 버튼·날짜 입력이 넘치지 않게 */
  .req-periods { gap: 6px; }
  .req-periods .chip { flex: 1 1 auto; padding: 8px 10px; text-align: center; }
  .req-range-row { gap: 8px; }
  .req-range-row .req-date,
  .req-range-row .req-status { flex: 1 1 140px; }
  .req-range-row input[type="date"],
  .req-range-row select { flex: 1 1 auto; min-width: 0; width: 100%; }
  .req-range-row .req-tilde { flex: 0 0 auto; }
  .req-scope-main { gap: 4px 12px; }
  /* 접수내역 표: 좁은 화면에서는 한 줄로 눌러 보지 않고 가로 스크롤 안내 */
  .req-admin-wrap { -webkit-overflow-scrolling: touch; }
  table.kv.req-admin-table { min-width: 820px; }
}


/* =====================================================================
   SCGI 전용 컴포넌트 — IAI와 같은 토큰·톤을 그대로 쓰고, 이 화면에만
   필요한 입력 경로 선택·확인표·필드 그룹만 최소로 더한다.
   ===================================================================== */
.path-pane { display: none; }
.path-pane.active { display: block; }
.path-intro { margin: 0 0 14px; }

details.field-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 18px;
  margin-bottom: 14px;
}
details.field-group > summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  list-style: none;
}
details.field-group > summary::-webkit-details-marker { display: none; }
details.field-group > summary::before { content: "▸ "; color: var(--mint-dark); }
details.field-group[open] > summary::before { content: "▾ "; }
details.field-group[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
details.field-group .group-body { padding-bottom: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .field { margin-bottom: 16px; }

.conf-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  background: #f7f9fc;
  color: var(--navy);
}
.conf-pill.high { background: var(--mint-soft); color: var(--mint-dark); border-color: #a7f3d0; }
.conf-pill.mid { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.conf-pill.low { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.scan-table { margin-top: 4px; }
.scan-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.scan-list li { margin-bottom: 3px; }

.field-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.summary-hero {
  border: 1px solid #d9f99d;
  background: linear-gradient(135deg, #f7fee7, #ffffff);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 18px;
}
.summary-hero .k { font-size: 13px; font-weight: 800; color: #3f6212; letter-spacing: .02em; }
.summary-hero .v { font-size: 34px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 6px; }
.summary-hero .meta { font-size: 13px; color: var(--muted); }

.mini-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 6px; }
.mini-card { border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 0 10px 10px 0; padding: 14px 16px; background: #fcfdff; }
.mini-card b { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.mini-card span { font-size: 14px; color: var(--ink); }

.scroll-x { overflow-x: auto; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .mini-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .summary-hero .v { font-size: 26px; }
}
