:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1d232b; --muted: #687280; --line: #dde1e6;
  --brand: #0b2a4a; --accent: #ffc000; --accent-ink: #1d1600; --red: #d92b2b; --ok: #1d8a4e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif; }
.hidden { display: none !important; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--brand); color: #fff; }
.brand { font-weight: 700; font-size: 18px; }
.logo { color: var(--accent); margin-right: 4px; }
.meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.meta input { font: inherit; padding: 4px 6px; border-radius: 6px; border: 0; }
.pill { padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.15); font-size: 13px; }
.pill.ok { background: #1d8a4e; } .pill.bad { background: var(--red); }
main { max-width: 1080px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
h2 { margin: 0 0 6px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
h3 { margin: 22px 0 8px; font-size: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
h3 small { color: var(--muted); font-weight: 400; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.muted { color: var(--muted); font-size: 14px; }
.err { color: var(--red); font-weight: 700; white-space: pre-wrap; }
textarea, input[type=text], input[type=password], select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
textarea { resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.row > input[type=text], .row > input[type=password], .row > select { flex: 1 1 200px; width: auto; }
button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
button:hover { border-color: #b9c0c8; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
button.primary:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; }
button.small { padding: 4px 10px; font-size: 13px; }
button.big { padding: 12px 22px; font-size: 17px; }
button.x { border: 0; color: var(--muted); padding: 2px 8px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fbfcfd; }
.item-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-head input, .item-head select { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.lbl { font-size: 13px; color: var(--muted); margin: 6px 0 2px; display: block; }
.hint { font-size: 13px; color: var(--red); margin-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 300px; gap: 12px; }
@media (max-width: 860px) { .seg { grid-template-columns: 1fr; } }
.seg canvas { width: 100%; border-radius: 6px; border: 1px solid var(--line); background: #000; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; background: #fff; cursor: pointer; user-select: none; }
.chip.on { background: #fff4cc; border-color: #e0b100; }
.chip.auto::after { content: "자동"; font-size: 11px; color: var(--muted); }
.warnbox { margin-top: 16px; border: 1px solid #f0c2c2; background: #fff5f5; border-radius: 10px; padding: 10px 14px; }
.progress .bar { height: 10px; background: #e7eaee; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }
#downloads a { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--ok); color: #fff; text-decoration: none; font-weight: 700; }
#report { margin-top: 12px; font-size: 14px; }
#report li.bad { color: var(--red); font-weight: 700; }
