:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
       background: #0f1115; color: #e6e8ee; line-height: 1.5; }
a { color: #9fb4ff; text-decoration: none; }
header.app { padding: 14px 22px; border-bottom: 1px solid #232733; display: flex; align-items: center;
       gap: 18px; flex-wrap: wrap; position: sticky; top: 0; background: #0f1115; z-index: 5; }
header.app h1 { font-size: 16px; margin: 0; white-space: nowrap; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: #98a0b3; }
nav.tabs a:hover { background: #1a1f2a; color: #cdd3e0; }
nav.tabs a.active { background: #1d2430; color: #fff; }
.spacer { flex: 1; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #98a0b3; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; }
.dot.on { background: #57d38c; } .dot.off { background: #ef6f6f; }
main { padding: 18px 22px 60px; max-width: 1150px; margin: 0 auto; }
h2 { font-size: 15px; margin: 0 0 10px; }
.sub { color: #98a0b3; font-size: 13px; }
select, input, button, textarea { background: #181b22; color: #e6e8ee; border: 1px solid #2c3140;
       border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
textarea { width: 100%; resize: vertical; }
button { cursor: pointer; background: #2d6cdf; border-color: #2d6cdf; color: #fff; font-weight: 600; }
button:hover { background: #245bc0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; color: #9fb4ff; border-color: #2c3140; font-weight: 500; }
button.ghost:hover { background: #1a1f2a; }
button.danger { background: #b3402f; border-color: #b3402f; }
button.danger:hover { background: #97331f; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: #161922; border: 1px solid #232733; border-radius: 12px; padding: 14px 16px; }
.card h3 { margin: 0 0 10px; font-size: 14px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed #232733; }
.kv:last-child { border-bottom: 0; }
.kv b { font-variant-numeric: tabular-nums; }
.pos { color: #57d38c; } .neg { color: #ef6f6f; } .muted { color: #98a0b3; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #1d2430; color: #9fb4ff; }
.pill.green { background: #16301f; color: #57d38c; } .pill.red { background: #341c1c; color: #ef6f6f; }
.pill.amber { background: #2f2713; color: #ffd9a8; }
.msg { padding: 10px 14px; border-radius: 10px; background: #2a2030; color: #ffd9a8; margin: 12px 0; font-size: 14px; display: none; }
.msg.show { display: block; }
.savemsg { font-size: 13px; color: #98a0b3; } .savemsg.ok { color: #57d38c; } .savemsg.err { color: #ef6f6f; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #232733; }
th { color: #98a0b3; font-weight: 600; } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.section { background: #141821; border: 1px solid #232733; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid label, .row label { display: flex; flex-direction: column; font-size: 12px; color: #98a0b3; gap: 4px; }
.grid label input, .grid label select { width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: #e6e8ee; font-size: 14px; }
label.check input { width: auto; }
.log { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.log .lvl { display: inline-block; width: 52px; font-weight: 700; }
.log .INFO { color: #7fb0ff; } .log .WARN { color: #ffd9a8; } .log .ERROR { color: #ef6f6f; }
.log .DEBUG { color: #98a0b3; }

/* --- combos (v2) --- */
.combos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.combo { background: #161922; border: 1px solid #232733; border-radius: 12px; padding: 12px 14px; }
.combo.selected { border-color: #2d6cdf; box-shadow: 0 0 0 1px #2d6cdf inset; }
.combo.off { opacity: 0.55; }
.combo h3 { margin: 0 0 2px; font-size: 14px; }
.combo .codes { color: #8a93a6; font-size: 12px; margin-bottom: 6px; }
.combo .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.combo .acts button { padding: 5px 9px; font-size: 12px; }
.clickable { cursor: pointer; }
.bar { height: 8px; border-radius: 999px; background: #232733; overflow: hidden; margin: 7px 0 4px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg,#2d6cdf,#57d38c); }
.fav { height: 8px; border-radius: 999px; background: #232733; overflow: hidden; margin: 7px 0 4px; }
.fav > span { display: block; height: 100%; background: #ffb454; }
.hint { color: #7a8295; font-size: 12px; margin: 2px 0 0; }
