:root { color-scheme: dark; --bg: #1c1f26; --bar: #262a33; --fg: #e8eaee; --muted: #9aa3b2; --accent: #f2b441; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 12px; background: var(--bar); }
#bar label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
select, button { font: inherit; color: var(--fg); background: #323846; border: 1px solid #4a5263; border-radius: 6px; padding: 4px 8px; }
button { cursor: pointer; }
button:hover, select:hover { border-color: var(--accent); }
#status { margin-left: auto; font-weight: 600; color: var(--accent); }
#progress { height: 3px; background: transparent; }
#progress-bar { height: 3px; width: 0; background: var(--accent); display: none; }
#applet { flex: 1; min-height: 0; position: relative; background: var(--bg); }
#rules[hidden] { display: none; }
#rules { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
#rules .panel { background: #fff; color: #111; max-width: 720px; width: 100%; max-height: 100%; overflow: auto; border-radius: 8px; padding: 16px 20px; }
#rules .panel button { float: right; color: #111; background: #eee; border-color: #bbb; }
#rules img { max-width: 100%; height: auto; }
