/* 아레나커넥트 — 공공 서비스형 화면 규칙 */
@font-face { font-family: "Pretendard Variable"; src: url("/static/vendor/pretendard/PretendardVariable.woff2") format("woff2-variations"); font-weight: 45 920; font-display: swap; }

:root {
  --ink: #18212d; --text: #333d4b; --muted: #5a6675; --faint: #6f7a88;
  --page: #f3f4f6; --panel: #ffffff; --subtle: #f6f7f9; --hover: #eff3f8;
  --line: #dcdfe5; --line-strong: #c5cad3;
  --blue: #17498a; --blue-dark: #0f3566; --blue-soft: #e8eff8; --blue-line: #b9cbe2;
  --green: #17704d; --green-soft: #e4f2ec; --amber: #8f5a07; --amber-soft: #fbf1df; --red: #ab3128; --red-soft: #fae9e7;
  --map-park: #4b3f9e; --map-busy: #1b8560; --map-some: #dc9a1e; --map-zero: #c4483c;
  --color-primary: #17498a;
  --side-w: 248px; --side-w-min: 68px; --top-h: 56px; --r: 4px;
  --sans: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.6 var(--sans); letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 25px; } h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 8px; } ul, ol { margin: 0; padding: 0; list-style: none; } dl, dd { margin: 0; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 3000; background: var(--blue); color: #fff; padding: 8px 14px; } .skip-link:focus { left: 8px; }

/* 앱 뼈대 */
.app-shell { display: flex; min-height: 100vh; }
.app-column { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; padding: 24px 28px 40px; }
.container { max-width: 1380px; margin: 0 auto; width: 100%; }
.container.narrow { max-width: 760px; }

.sidebar { position: sticky; top: 0; align-self: flex-start; width: var(--side-w); height: 100vh; flex: none; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); transition: width .16s ease; z-index: 1200; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--ink); flex: none; overflow: hidden; }
.sidebar-brand:hover { text-decoration: none; }
.brand-mark-svg { flex: none; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-copy strong { font-size: 16.500px; letter-spacing: -0.03em; }
.brand-copy small { font-size: 11.500px; color: var(--muted); }
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 12px; }
.nav-group { padding-top: 12px; }
.nav-group-title { font-size: 12px; font-weight: 600; color: var(--faint); padding: 0 10px 6px; white-space: nowrap; letter-spacing: 0; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; color: var(--text); border-radius: var(--r); font-size: 14.500px; font-weight: 500; white-space: nowrap; position: relative; }
.nav-item:hover { background: var(--hover); text-decoration: none; }
.nav-item.is-active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; }
.nav-item.is-active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; background: var(--blue); }
.nav-icon { flex: none; }
.sidebar-toggle { display: flex; align-items: center; gap: 11px; height: 46px; padding: 0 20px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font-size: 13.500px; cursor: pointer; white-space: nowrap; flex: none; }
.sidebar-toggle:hover { background: var(--hover); color: var(--ink); }
.toggle-icon { transition: transform .16s ease; }
.sidebar-scrim { display: none; }

html[data-sidebar="collapsed"] .sidebar { width: var(--side-w-min); }
html[data-sidebar="collapsed"] .brand-copy, html[data-sidebar="collapsed"] .nav-text, html[data-sidebar="collapsed"] .nav-group-title { display: none; }
html[data-sidebar="collapsed"] .sidebar-brand { padding: 0 18px; }
html[data-sidebar="collapsed"] .nav-group { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
html[data-sidebar="collapsed"] .nav-group:first-child { border-top: 0; margin-top: 0; }
html[data-sidebar="collapsed"] .nav-item { justify-content: center; padding: 0; }
html[data-sidebar="collapsed"] .sidebar-toggle { justify-content: center; padding: 0; }
html[data-sidebar="collapsed"] .toggle-icon { transform: scaleX(-1); }

.topbar { position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; gap: 12px; min-height: var(--top-h); padding: 0 28px; background: var(--panel); border-bottom: 1px solid var(--line); }
.icon-button { border: 0; background: none; color: var(--ink); padding: 6px; display: inline-flex; cursor: pointer; border-radius: var(--r); }
.icon-button:hover { background: var(--hover); }
.icon-button.topbar-menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.500px; color: var(--muted); min-width: 0; }
.crumbs li { white-space: nowrap; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--line-strong); }
.crumbs strong { color: var(--ink); }
.crumbs a { color: var(--muted); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.data-version { font-size: 12px; color: var(--faint); font-family: var(--mono); white-space: nowrap; }
.global-import { display: flex; align-items: center; gap: 12px; padding: 8px 28px; font-size: 13px; background: var(--blue-soft); border-bottom: 1px solid var(--blue-line); }
.global-import .progress { flex: 1; max-width: 320px; }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); padding: 20px 28px 24px; font-size: 13px; color: var(--muted); }
.footer-org { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
.footer-org strong { color: var(--ink); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--text); }

/* 화면 머리 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 2px solid var(--ink); }
.page-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-head > div > a.small { display: inline-block; margin-bottom: 4px; }
.section-title { font-size: 18px; margin: 28px 0 10px; }
.small-title { font-size: 16px; margin-top: 8px; }
.section-subtitle { color: var(--muted); font-size: 14px; margin: -4px 0 12px; }

/* 소개 영역 */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; }
.intro-main { padding: 28px 32px; border-left: 4px solid var(--blue); }
.intro-eyebrow { font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.intro-main h1 { font-size: 28px; line-height: 1.32; margin-bottom: 12px; }
.intro-main p { font-size: 15px; margin: 0 0 4px; }
.intro-main b { color: var(--ink); }
.intro-links { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.intro-links h2 { font-size: 13px; color: var(--muted); font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--subtle); letter-spacing: 0; }
.intro-links a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; color: var(--ink); font-weight: 600; font-size: 14.500px; border-bottom: 1px solid var(--line); }
.intro-links a:last-child { border-bottom: 0; }
.intro-links a:hover { background: var(--hover); text-decoration: none; color: var(--blue-dark); }
.intro-links a::after { content: "→"; color: var(--faint); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-bottom: 16px; align-items: start; }
.map-side { display: flex; flex-direction: column; gap: 16px; }

/* 패널 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
a.card:hover { border-color: var(--blue-line); text-decoration: none; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card > .card-pad.card-head { margin: 0; padding-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sim { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.small { font-size: 13px; } .muted { color: var(--muted); } .faint { color: var(--faint); } .grow { flex: 1 1 200px; min-width: 0; } .w-120 { width: 120px !important; } .no-print {}

/* 수치 띠 */
.grid-3:has(> .stat), .grid-4:has(> .stat) { gap: 0; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--blue); }
.stat { padding: 14px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .desc { font-size: 12.500px; color: var(--faint); }
.value-md { font-size: 21px !important; } .value-sm { font-size: 14.500px !important; font-weight: 600 !important; line-height: 1.5 !important; letter-spacing: -0.01em !important; }

/* 표 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--subtle); color: var(--ink); font-weight: 600; font-size: 13px; text-align: left; padding: 10px 12px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover td { background: #fafbfc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td .sub { display: block; font-size: 12.500px; color: var(--faint); margin-top: 1px; }
.row-current td { background: var(--blue-soft) !important; }
.task-table td { padding: 16px 12px; line-height: 1.55; }
.task-table td:first-child { width: 25%; }
.task-table b { color: var(--ink); display: block; font-size: 15px; }
.task-no { color: var(--blue); font-size: 12.500px; font-weight: 700; display: block; }
.table-action { white-space: nowrap; }
.empty-state { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 14px; }
.pager { justify-content: center; }

/* 입력 */
.field { margin-bottom: 12px; min-width: 0; }
.field label, .label-text { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; color: var(--ink); font-size: 14.500px; }
textarea.input { height: auto; padding: 9px 11px; line-height: 1.5; resize: vertical; }
.input:focus { outline: 0; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.input-sm { height: 34px; font-size: 13.500px; width: auto; padding: 0 8px; }
.field .hint { font-size: 12.500px; color: var(--muted); margin-top: 4px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.filter-row .field { margin: 0; min-width: 130px; } .filter-row .grow { flex: 1 1 220px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.500px; padding-bottom: 10px; cursor: pointer; color: var(--ink); }
.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--blue-dark); border-color: var(--blue); } .btn-secondary:hover { background: var(--blue-soft); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--line-strong); } .btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: #eef0f3; color: var(--text); } .btn-ghost:hover { background: #e3e6ea; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-icon { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.help-button { width: 19px; height: 19px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; vertical-align: 2px; margin-left: 2px; padding: 0; }
.help-button:hover { border-color: var(--blue); color: var(--blue); }
.slider { display: grid; grid-template-columns: 84px 1fr 34px; gap: 8px; align-items: center; margin: 8px 0; font-size: 13.500px; }
.slider input { accent-color: var(--blue); width: 100%; } #targets .slider { grid-template-columns: 84px 1fr; } #targets select { width: 100%; }

/* 표시 요소 */
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 12px; font-weight: 600; background: var(--blue-soft); color: var(--blue-dark); white-space: nowrap; }
.badge-ok { background: var(--green-soft); color: var(--green); } .badge-warn { background: var(--amber-soft); color: var(--amber); } .badge-danger { background: var(--red-soft); color: var(--red); } .badge-muted { background: #edeff2; color: var(--muted); }
.prov { display: inline-block; padding: 0 6px; font-size: 11.500px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); background: #fff; }
.prov-public { color: var(--blue-dark); border-color: var(--blue-line); } .prov-estimate { color: var(--amber); border-color: #e2c48f; border-style: dashed; } .prov-confirmed { color: #fff; background: var(--blue); border-color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .field label.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--blue); border-radius: var(--r); background: var(--blue); color: #fff; font-size: 13.500px; font-weight: 600; cursor: pointer; margin: 0; }
.chip.off, .field label.chip.off { background: #fff; color: var(--text); border-color: var(--line-strong); }
.chip input { display: none; }
.notice { padding: 10px 14px; border: 1px solid var(--blue-line); background: var(--blue-soft); font-size: 14px; border-radius: var(--r); color: var(--ink); }
.notice.warn { border-color: #e6cfa4; background: var(--amber-soft); }
.progress { height: 6px; background: #e4e7eb; overflow: hidden; } .progress-bar { height: 100%; background: var(--blue); transition: width .2s; } .progress-bar.done { background: var(--green); } .progress-bar.failed { background: var(--red); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 500; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tile .t { font-weight: 700; font-size: 15.500px; color: var(--ink); } .tile .m { font-size: 13.500px; color: var(--muted); }
.reasons { padding-left: 16px; font-size: 13.500px; list-style: disc; }
.gap-list { display: flex; flex-wrap: wrap; gap: 4px; }
.gap-chip { background: var(--subtle); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.checklist { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.map-box { height: 540px; border: 1px solid var(--line); position: relative; z-index: 0; }
.map-sm { height: 360px; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 13.500px; }
.legend span { display: flex; align-items: center; gap: 8px; } .legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.chart-box { position: relative; height: 280px; }
.hbar { display: grid; grid-template-columns: minmax(84px, 190px) 1fr 58px; gap: 10px; align-items: center; margin: 9px 0; font-size: 13.500px; }
.map-side .hbar { grid-template-columns: 1fr 52px; } .map-side .hbar-label { grid-column: 1 / -1; margin-bottom: -6px; } .map-side .hbar-track { grid-column: 1; }
.hbar-label { font-weight: 600; color: var(--ink); } .hbar-track { background: #eceef1; height: 14px; } .hbar-fill { height: 100%; min-width: 2px; }
.bar-hot { background: var(--blue-dark); } .bar-cool { background: #7f9fc6; }
.hbar-val { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-row { display: grid; grid-template-columns: 92px 1fr 62px; gap: 10px; align-items: center; margin: 11px 0; font-size: 13.500px; }
.score-label { font-weight: 600; color: var(--ink); } .score-track { background: #eceef1; height: 10px; } .score-fill { height: 100%; background: var(--blue); } .score-fill.neg { background: var(--red); } .score-val { text-align: right; font-variant-numeric: tabular-nums; }
.move { font-size: 11.500px; font-weight: 700; } .move.up { color: var(--green); } .move.down { color: var(--red); }
.rank-list { margin-top: 6px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* 대화 상자·알림·설명 */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(20, 28, 40, .45); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 1500; }
.dialog-backdrop.open { display: flex; }
.dialog { background: #fff; border-radius: var(--r); width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto; padding: 22px 24px; border-top: 3px solid var(--blue); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; } .dialog-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.help-body { white-space: pre-line; font-size: 14px; }
#snackbar-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 40px); max-width: 440px; pointer-events: none; }
.snackbar { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r); font-size: 14px; text-align: center; }
.snackbar.error { background: var(--red); } .snackbar.success { background: var(--green); }
.app-tooltip { position: fixed; z-index: 2100; max-width: 320px; padding: 7px 10px; background: var(--ink); color: #fff; font-size: 12.500px; line-height: 1.5; border-radius: 3px; pointer-events: none; }
details.expandable { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; } details.expandable summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); }
.trace { font-size: 13.500px; } .trace li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.step-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; font-size: 12.500px; }
.step-block li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line); }
.ver-detail td { background: none !important; }
.error-page { text-align: center; padding: 72px 20px; } .error-page h1 { font-size: 56px; color: var(--blue); }
.auth-page { max-width: 440px; } .auth-card h1 { font-size: 22px; }

/* AI 질문 */
.agent-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; align-items: start; }
.sample-qs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sample-qs button { border: 1px solid var(--line-strong); background: #fff; border-radius: var(--r); padding: 5px 10px; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.sample-qs button:hover { border-color: var(--blue); color: var(--blue-dark); }
.chat { display: flex; flex-direction: column; gap: 12px; min-height: 300px; }
.msg { max-width: 94%; padding: 11px 14px; border-radius: var(--r); line-height: 1.65; font-size: 14.500px; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--subtle); border: 1px solid var(--line); color: var(--text); }
.msg .appendix { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.500px; color: var(--muted); }
.msg p { margin: 5px 0; } .msg ul, .msg ol { padding-left: 20px; margin: 5px 0; } .msg ul { list-style: disc; } .msg ol { list-style: decimal; }
.msg .table-wrap { margin: 8px 0; background: #fff; } .msg .md-table th, .msg .md-table td { font-size: 13px; padding: 6px 9px; }
.msg code { background: #fff; border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; }
.msg a { text-decoration: underline; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; } .chat-form textarea { flex: 1; } .chat-form .btn { height: auto; }
.timeline { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.tl-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.500px; }
.tl-item:last-child { border-bottom: 0; } .tl-item .icon { color: var(--blue); } .tl-item .title { font-weight: 600; color: var(--ink); } .tl-item .text { color: var(--muted); font-size: 12.500px; }
.tl-item.error .icon { color: var(--red); } .tl-item.guard .icon { color: var(--amber); } .tl-item.result .icon { color: var(--green); }
.tl-item.pending .icon { animation: fade 1s infinite alternate; } @keyframes fade { to { opacity: .3; } }
.evidence-card { display: block; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); } .evidence-card:hover { border-color: var(--blue); text-decoration: none; } .evidence-card b { color: var(--blue-dark); }

/* 사용설명서 */
.layout-side { display: grid; gap: 20px; align-items: start; }
.guide-layout { grid-template-columns: minmax(0, 1fr) 232px; }
.guide-layout .side { order: 2; position: sticky; top: calc(var(--top-h) + 16px); }
.guide-toc { max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; }
.guide-toc h3 { font-size: 14px; } .guide-toc h4 { font-size: 12px; color: var(--faint); font-weight: 600; margin: 14px 0 4px; }
.guide-toc a { display: block; padding: 3px 0; font-size: 13.500px; color: var(--text); }
.guide-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guide-body section { scroll-margin-top: calc(var(--top-h) + 14px); }
.guide-body h2 { font-size: 19px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.guide-body h3 { font-size: 15px; margin: 14px 0 6px; }
.guide-list { list-style: disc; padding-left: 18px; } .guide-list li { padding: 3px 0; font-size: 14.500px; }
.guide-steps { list-style: decimal; padding-left: 20px; } .guide-steps li { margin: 5px 0; font-size: 14.500px; }
.guide-box { border: 1px solid var(--line); background: var(--subtle); padding: 14px 16px; } .guide-box h4 { margin-bottom: 6px; } .guide-box ul { list-style: disc; padding-left: 18px; } .guide-box li { font-size: 13.500px; padding: 2px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); }
.step-card { padding: 12px 14px; border-right: 1px solid var(--line); } .step-card:last-child { border-right: 0; } .step-card h3 { margin: 0 0 3px !important; font-size: 14.500px; } .step-card p { margin: 0; font-size: 13px; color: var(--muted); }
.step-number { color: var(--blue); font-weight: 700; font-size: 13px; }

/* 안내서 */
.letter-wrap { max-width: 820px; } .letter { padding: 36px 40px; }
.letter h1 { font-size: 24px; margin-bottom: 4px; } .letter h2 { font-size: 16px; margin: 24px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.letter h3 { font-size: 15px; margin-bottom: 4px; } .letter-intro { margin: 16px 0; line-height: 1.8; }
.letter-venue { border-bottom: 1px solid var(--line); padding: 12px 0; break-inside: avoid; }
.letter ul { padding-left: 18px; font-size: 14px; list-style: disc; }

/* 지도 팝업 */
.leaflet-container { font-family: var(--sans); } .leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: 0 1px 6px rgba(20, 28, 40, .25); } .leaflet-popup-content { font-size: 13.500px; line-height: 1.55; }

@media (max-width: 1180px) {
  .intro, .map-layout { grid-template-columns: minmax(0, 1fr); }
  .intro-links { border-left: 0; border-top: 1px solid var(--line); }
  .map-side { flex-direction: row; } .map-side > * { flex: 1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4:has(> .stat) .stat:nth-child(2) { border-right: 0; } .grid-4:has(> .stat) .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .guide-layout { grid-template-columns: minmax(0, 1fr); } .guide-layout .side { position: static; order: 0; }
  .guide-toc { max-height: 240px; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .18s ease; width: var(--side-w) !important; }
  html.drawer-open .sidebar { transform: none; }
  html.drawer-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 28, 40, .4); z-index: 1150; }
  html[data-sidebar="collapsed"] .brand-copy { display: flex; } html[data-sidebar="collapsed"] .nav-text, html[data-sidebar="collapsed"] .nav-group-title { display: block; }
  html[data-sidebar="collapsed"] .nav-item, html[data-sidebar="collapsed"] .sidebar-toggle { justify-content: flex-start; padding: 0 10px; }
  .sidebar-toggle { display: none; }
  .icon-button.topbar-menu { display: inline-flex; } .topbar { padding: 0 16px; }
  main { padding: 18px 16px 32px; } .site-footer, .global-import { padding-left: 16px; padding-right: 16px; }
  .grid-sim, .agent-layout { grid-template-columns: minmax(0, 1fr); }
  .data-version { display: none; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-3:has(> .stat) .stat { border-right: 0; border-bottom: 1px solid var(--line); } .grid-3:has(> .stat) .stat:last-child { border-bottom: 0; }
  .map-side { flex-direction: column; } .map-box { height: 380px; }
  .intro-main { padding: 20px; } .intro-main h1 { font-size: 22px; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step-card { border-bottom: 1px solid var(--line); }
  .tile-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-row .field { flex: 1 1 42%; min-width: 0; }
  .stat .value { font-size: 23px; } .stat { padding: 12px 14px; }
  .letter { padding: 20px; }
  .crumbs li:nth-child(2) { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive thead { display: none; }
  .table.responsive tr { border: 1px solid var(--line); border-top: 2px solid var(--ink); margin-bottom: 10px; padding: 8px 12px; background: #fff; }
  .table.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 14px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); font-size: 12.500px; color: var(--muted); font-weight: 600; flex: none; text-align: left; }
  .table.responsive td.name { flex-direction: column; gap: 1px; text-align: left; } .table.responsive td.name::before { display: none; }
  .task-table td { display: block !important; text-align: left !important; } .task-table td::before { display: block; margin-bottom: 2px; } .task-table td:first-child { width: 100%; } .task-table td:first-child::before { display: none; }
}
@media print {
  .sidebar, .sidebar-scrim, .topbar, .site-footer, .no-print, .global-import, #snackbar-root { display: none !important; }
  body { background: #fff; } main { padding: 0; } .letter { border: 0; padding: 0; } .letter-wrap { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
