:root { --navy:#17365d; --blue:#2f66f5; --ink:#1f2937; --muted:#64748b; --line:#d9e2ef; --panel:#ffffff; --wash:#f3f6fb; --amber:#fff3cd; }
* { box-sizing: border-box; }
body { margin:0; background:var(--wash); color:var(--ink); font-family:"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",Arial,sans-serif; }
button, select, input { font:inherit; }
button { cursor:pointer; }
.topbar { min-height:90px; padding:17px 28px; background:linear-gradient(105deg,#17365d,#204c7d); color:white; display:flex; align-items:center; justify-content:space-between; gap:20px; box-shadow:0 8px 24px rgba(23,54,93,.14); }
.topbar h1 { margin:3px 0 0; font-size:25px; letter-spacing:-.04em; }
.eyebrow { margin:0; font-size:12px; opacity:.76; letter-spacing:.03em; }
.status-pill { border:1px solid rgba(255,255,255,.35); border-radius:999px; padding:8px 12px; font-size:12px; white-space:nowrap; }
.workspace { padding:14px; display:grid; gap:11px; max-width:1680px; margin:auto; }
.scenario-tabs,.controls,.scenario-summary,.aux-strip,.comparison-card,.caveat,.method-strip { border:1px solid var(--line); background:var(--panel); border-radius:14px; }
.scenario-tabs { padding:10px 12px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.scenario-tabs > span { font-size:12px; color:var(--muted); margin-right:2px; }
.scenario-tabs button { border:1px solid #c8d4e3; background:white; color:#334155; padding:10px 15px; border-radius:10px; font-weight:700; }
.scenario-tabs button.active { border-color:var(--blue); background:var(--blue); color:white; box-shadow:0 6px 15px rgba(47,102,245,.22); }
.controls { padding:11px; display:grid; grid-template-columns:140px 160px 190px minmax(240px,1fr) 100px; gap:9px; align-items:end; }
.controls label { display:grid; gap:5px; font-size:11px; color:var(--muted); }
.controls select { border:1px solid #cbd5e1; background:white; border-radius:9px; padding:9px 10px; color:var(--ink); }
.time-control { grid-template-columns:auto auto; }
.time-control span { text-align:right; color:var(--navy); font-weight:800; }
.time-control input { grid-column:1 / -1; accent-color:var(--blue); }
.play-button { border:0; border-radius:9px; padding:10px; background:var(--navy); color:white; font-weight:800; }
.scenario-summary { padding:13px 16px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.scenario-summary p,.comparison-card header p { margin:0; color:var(--navy); font-size:13px; font-weight:800; }
.scenario-summary h2,.comparison-card header h2 { margin:3px 0; font-size:16px; letter-spacing:-.02em; }
.scenario-summary small { color:var(--muted); }
.scenario-summary > span,.comparison-card header > span { background:#eef3ff; color:#3158bd; border-radius:999px; padding:7px 11px; font-size:11px; font-weight:800; white-space:nowrap; }
.scope-label { margin:1px 2px -5px; color:var(--muted); font-size:11px; }
.metrics-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; }
.metric-card { background:white; border:1px solid var(--line); border-radius:14px; padding:13px; }
.metric-card p { margin:0 0 8px; font-size:12px; color:var(--muted); }
.metric-values { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.metric-values strong { font-size:20px; letter-spacing:-.04em; }
.metric-values span { color:#94a3b8; }
.metric-card small { display:block; margin-top:7px; font-weight:800; }.good{color:#16834b}.bad{color:#c2413a}.neutral{color:#64748b}
.aux-strip { display:grid; grid-template-columns:repeat(4,1fr); overflow:hidden; }
.aux-strip span { padding:10px 13px; color:var(--muted); font-size:11px; border-right:1px solid var(--line); }.aux-strip span:last-child{border:0}.aux-strip strong{float:right;color:var(--ink)}
.graphs-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.graph-card { min-width:0; background:white; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.graph-card header { padding:11px 13px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); }
.graph-card header div { display:flex; gap:8px; align-items:center; }.graph-card header strong{font-size:14px}.graph-card header span,.graph-card header small{font-size:11px;color:var(--muted)}
.graph-card svg { display:block; width:100%; height:auto; min-height:350px; background:linear-gradient(#fbfdff,#f7faff); }
.base-edge { stroke:#dbe3ee; stroke-width:1.05; opacity:.92; }.peak-density-edge{opacity:.88;stroke-linecap:round}.occupied-edge{stroke:#f59e0b;opacity:.55;stroke-linecap:round}.p95-edge{stroke:#b42318;opacity:.78;stroke-linecap:round}
.corridor-node{fill:#8fa0b7}.stair-node{fill:#f59e0b;stroke:white;stroke-width:1}.room-node{stroke:white;stroke-width:1.3}.room-label{font-size:8px;fill:#334155}.floor-label{font-size:10px;font-weight:800;fill:#64748b}
.class-agent circle{stroke:white;stroke-width:1.5;filter:drop-shadow(0 1px 2px rgba(15,23,42,.24))}.class-agent rect{fill:white;stroke:#cbd5e1;stroke-width:.75;opacity:.96}.class-agent text{font-size:8px;fill:#24364b;font-weight:800}.dimmed{opacity:.12}
.graph-live{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);background:#fbfcfe}.graph-live span{padding:8px 10px;font-size:10px;color:var(--muted);border-right:1px solid var(--line)}.graph-live span:last-child{border:0}.graph-live strong{display:block;margin-top:2px;color:var(--ink);font-size:12px}
.legend { display:flex; gap:11px; padding:9px 12px; border-top:1px solid var(--line); font-size:9.5px; color:var(--muted); flex-wrap:wrap; }.legend span{display:flex;align-items:center;gap:5px}.legend i{display:inline-block;width:11px;height:9px;border-radius:3px}.legend .special-key{background:#e8eef5;border:1px solid #bdc9d8}.legend .agent-key{width:10px;height:10px;border-radius:50%;background:var(--navy);border:2px solid white;box-shadow:0 0 0 1px #8fa1b6}.legend .occupied-key,.legend .hot-key{height:3px;width:17px;border-radius:999px}.legend .occupied-key{background:#f59e0b}.legend .hot-key{background:#b42318}.legend .density-legend-row{flex:1 0 100%;display:flex;align-items:center;gap:11px;flex-wrap:wrap;padding-top:2px}.legend .density-key{height:8px;width:16px;border:1px solid rgba(120,88,20,.16)}.legend .density-label{font-weight:800;color:#475569}
.comparison-card { overflow:hidden; }.comparison-card header { padding:13px 16px; display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid var(--line); }
.table-wrap { overflow:auto; } table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:10px 14px;border-bottom:1px solid #e7edf5;text-align:right}th:first-child,td:first-child{text-align:left}thead{background:#f7f9fc}th{color:#475569}.selected-column{background:#eef4ff;font-weight:800}
.decision-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:12px; background:#fbfcfe; }.decision-grid article{border-left:3px solid #9fb4d2;padding:4px 10px}.decision-grid strong{font-size:12px;color:var(--navy)}.decision-grid p{margin:5px 0 0;font-size:12px;line-height:1.65;color:#526175}
.caveat { padding:12px 14px; display:flex; gap:12px; background:var(--amber); border-color:#ebcd71; color:#765e12; font-size:11px; line-height:1.6; }.caveat strong{white-space:nowrap}
.method-strip{padding:10px 14px;display:flex;justify-content:space-between;gap:14px;font-size:11px;color:var(--muted)}.method-strip strong{color:var(--navy)}
.state-page{min-height:100vh;display:grid;place-content:center;text-align:center;gap:12px}.loader{width:34px;height:34px;border:3px solid #d9e2ef;border-top-color:#2f66f5;border-radius:50%;animation:spin .8s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}
@media (max-width:1050px){.controls{grid-template-columns:repeat(3,1fr)}.time-control{grid-column:1 / 3}.metrics-grid{grid-template-columns:1fr 1fr}.graphs-grid{grid-template-columns:1fr}.graph-card svg{min-height:300px}.aux-strip{grid-template-columns:1fr 1fr}.aux-strip span:nth-child(2){border-right:0}}
@media (max-width:640px){.topbar{padding:16px;align-items:flex-start}.topbar h1{font-size:20px}.status-pill{font-size:10px}.workspace{padding:8px}.scenario-tabs button{flex:1 1 100%;text-align:left}.controls{grid-template-columns:1fr 1fr}.controls label:nth-child(3){grid-column:1 / -1}.time-control{grid-column:1 / -1}.metrics-grid,.aux-strip,.graph-live{grid-template-columns:1fr 1fr}.aux-strip span,.graph-live span{border-right:0;border-bottom:1px solid var(--line)}.scenario-summary,.comparison-card header{align-items:flex-start;flex-direction:column}.metric-values strong{font-size:18px}.caveat,.method-strip{flex-direction:column}.graph-card svg{min-height:250px}}
