:root {
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
  color: #1a2630;
  background: #f4f0e8;
  font-synthesis: none;
  --ink: #1a2630;
  --muted: #68747a;
  --paper: #fffdf8;
  --line: #ded8cc;
  --teal: #176b68;
  --teal-soft: #d9efea;
  --gold: #c48727;
  --red: #a63b32;
  --shadow: 0 16px 42px rgba(35, 45, 48, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0%, #fff9ea 0, transparent 34%), #f4f0e8; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 9px; padding: .72rem 1rem; background: var(--teal); color: white; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(.95); }
button:disabled { cursor: not-allowed; background: #9ca5a7; }
button.secondary { background: #e9e5dd; color: var(--ink); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.45rem clamp(1rem, 4vw, 4rem); background: #17272d; color: #fff; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2.35rem); letter-spacing: -.04em; }
h2 { margin-bottom: .8rem; letter-spacing: -.025em; }
.eyebrow { margin-bottom: .35rem; color: #9fd4cb; font-size: .74rem; font-weight: 800; letter-spacing: .14em; }
.status-cluster { display: flex; max-width: 100%; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-flex; padding: .38rem .62rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.badge.safe { background: #194e4a; color: #bdeae1; }
.badge.danger { background: #65322e; color: #ffd6d0; }
.tabs { position: sticky; top: 0; z-index: 3; display: flex; gap: .35rem; overflow-x: auto; padding: .6rem clamp(1rem, 4vw, 4rem); background: rgba(255, 253, 248, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.tab { white-space: nowrap; background: transparent; color: var(--muted); }
.tab.active { background: var(--teal-soft); color: #0b5754; }
main { width: min(1260px, calc(100% - 2rem)); margin: 1.5rem auto 4rem; }
.view { display: none; }
.view.active { display: block; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { margin-bottom: 1rem; padding: clamp(1rem, 2.4vw, 1.6rem); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: grid; gap: .4rem; margin: .8rem 0; color: #35434a; font-weight: 700; }
input[type="text"], input[type="number"], select, textarea { width: 100%; border: 1px solid #cfc8bb; border-radius: 9px; padding: .72rem .8rem; background: white; color: var(--ink); }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23, 107, 104, .14); border-color: var(--teal); }
.action-row, .prompt-controls { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; margin: .9rem 0; }
.prompt-controls label { min-width: 220px; margin: 0; }
.file-label { padding: 1rem; border: 1px dashed #aaa193; border-radius: 10px; background: #fbf8f1; }
.facts { display: grid; gap: .5rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #eee8dc; padding-bottom: .45rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 800; text-align: right; }
.character-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.character-item { display: grid; gap: .3rem; padding: .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf6; }
.character-item strong { font-size: 1.05rem; }
.segmented { display: inline-flex; padding: .25rem; border-radius: 10px; background: #e9e5dd; }
.segmented button { background: transparent; color: var(--ink); padding: .5rem .7rem; }
.segmented button.active { background: white; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.question-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.question { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfaf5; }
.question legend { font-weight: 800; padding: 0 .25rem; }
.choice { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .55rem; margin: .45rem 0; font-weight: 500; }
.issue-list { display: grid; gap: .6rem; }
.issue { padding: .9rem 1rem; border-left: 5px solid var(--gold); border-radius: 8px; background: #fffaf0; }
.issue.error { border-left-color: var(--red); background: #fff2ef; }
.metric-card { min-height: 145px; align-items: center; justify-content: center; text-align: center; display: flex; flex-direction: column; }
.metric { font-size: 4rem; font-weight: 900; line-height: 1; color: var(--teal); }
.metric.small { font-size: 1.5rem; }
.notice { min-height: 1.4em; white-space: pre-wrap; }
.warning-box { padding: .9rem; border-left: 4px solid var(--gold); background: #fff4d9; }
.qa-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qa-checks label { display: flex; gap: .5rem; font-weight: 600; }
pre { overflow: auto; padding: 1rem; border-radius: 10px; background: #17272d; color: #d9efea; line-height: 1.5; }
footer { padding: 1.6rem; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .grid.two, .grid.three { grid-template-columns: 1fr; } .topbar { align-items: flex-start; flex-direction: column; } .status-cluster { justify-content: flex-start; } .card-head { flex-direction: column; } }
