:root {
  --bg: #f4f6f9; --panel: #ffffff; --ink: #1b2430; --muted: #66707d; --line: #dde2e8;
  --brand: #1f3a5f; --brand-ink: #ffffff; --accent: #2f6fd1; --ok: #1d8a4e; --warn: #b7791f; --bad: #c0392b;
  --code: #f1f3f6; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c; --panel: #1b2129; --ink: #e6eaf0; --muted: #9aa4b1; --line: #2c343f;
    --brand: #23466f; --accent: #6aa2ff; --ok: #4cc37f; --warn: #e0a84a; --bad: #ff6b5b; --code: #232a33;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.55 -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
a { color: var(--accent); }
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--brand); color: var(--brand-ink); flex-wrap: wrap; }
header .brand { color: var(--brand-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
header nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
header nav a { color: #cfdaea; text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
header nav a.on { background: rgba(255,255,255,.16); color: #fff; }
main { max-width: 1000px; margin: 0 auto; padding: 16px 16px 60px; }
h1 { font-size: 20px; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink);
  font: inherit; }
textarea { min-height: 90px; resize: vertical; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
header button.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.small, .btn.small { padding: 5px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--code);
  color: var(--muted); white-space: nowrap; }
.badge.ok, .badge.succeeded { background: rgba(29,138,78,.14); color: var(--ok); }
.badge.running, .badge.queued { background: rgba(47,111,209,.14); color: var(--accent); }
.badge.failed, .badge.bad { background: rgba(192,57,43,.14); color: var(--bad); }
.badge.cancelled, .badge.interrupted, .badge.warn { background: rgba(183,121,31,.15); color: var(--warn); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
.list a.item { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list a.item:hover { background: var(--code); }
.bar { height: 8px; background: var(--code); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); }
.md { line-height: 1.7; overflow-wrap: anywhere; }
.md table { display: block; overflow-x: auto; font-size: 13px; }
.md th, .md td { border: 1px solid var(--line); }
.md pre, pre { background: var(--code); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12.5px; white-space: pre-wrap; }
.md img { max-width: 100%; }
details { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; margin: 8px 0; background: var(--panel); }
details > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.timeline { font-size: 13px; max-height: 360px; overflow-y: auto; }
.timeline div { padding: 3px 0; border-bottom: 1px dotted var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px;
  margin: 3px; font-size: 13px; cursor: pointer; user-select: none; }
.chip input { margin: 0; }
.files li { margin: 4px 0; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); color: var(--accent); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; max-width: calc(100% - 32px); z-index: 20; }
.login { max-width: 360px; margin: 40px auto; }
.pattern { width: 270px; height: 270px; margin: 10px auto; position: relative; touch-action: none; user-select: none; }
.pattern canvas { position: absolute; inset: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.card b { display: block; font-size: 22px; }
.hbars div { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 2px 0; }
.hbars span:first-child { width: 72px; color: var(--muted); }
.hbars .b { height: 12px; background: var(--accent); border-radius: 3px; min-width: 1px; }
.seg { border-left: 3px solid var(--line); padding: 6px 10px; margin: 10px 0; }
.seg .kids { margin-top: 6px; font-size: 13px; color: var(--muted); }
.seg .kids div { border-top: 1px dotted var(--line); padding: 4px 0; white-space: pre-wrap; }
.seg pre { margin: 6px 0; }
mark { background: rgba(255, 200, 0, .35); color: inherit; }
@media (max-width: 600px) {
  main { padding: 12px 12px 60px; }
  header { padding: 8px 12px; }
  header nav { order: 3; flex-basis: 100%; }
  .hide-sm { display: none; }
  th, td { padding: 7px 4px; }
}
.paste { min-height: 140px; max-height: 420px; overflow: auto; border: 1px dashed var(--line); border-radius: 8px; padding: 10px;
  margin-top: 8px; background: var(--bg); font-size: 13px; }
.paste:focus { outline: 2px solid var(--accent); }
.paste table { border-collapse: collapse; }
.paste td, .paste th { border: 1px solid var(--line); padding: 3px 6px; }
.paste img { max-width: 100%; }
.paste img[data-lost] { display: inline-block; padding: 4px 8px; border: 1px dashed var(--warn); color: var(--warn); }
