:root {
  color-scheme: light dark;
  font: 16px/1.5 system-ui, sans-serif;
  --page: #edf3f2;
  --panel: #fff;
  --text: #172c27;
  --muted: #4f655d;
  --line: #c8dad3;
  --action: #10614e;
}

@media (prefers-color-scheme: dark) {
  :root { --page: #132921; --panel: #1c342b; --text: #ecf5f0; --muted: #bcd2c9; --line: #416057; --action: #116650; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); }
main { max-width: 820px; margin: auto; padding: clamp(16px, 4vw, 34px); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: 1.2rem; }
p, a { color: var(--muted); }
p { margin-top: 8px; }
form, section { margin-top: 18px; padding: clamp(14px, 3vw, 22px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { font-weight: 650; min-width: 0; }
input, select, button { font: inherit; color: inherit; }
.fields :is(input, select), button { background: var(--page); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.fields :is(input, select) { display: block; margin-top: 4px; width: 100%; }
button { font-weight: 650; cursor: pointer; }
button[type=submit], #download { background: var(--action); border-color: transparent; color: white; }
button:disabled { opacity: .7; cursor: wait; }
.actions, .toolbar, .preferences, footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions, .preferences, footer { margin-top: 13px; }
.toolbar { justify-content: space-between; }
.muted, footer { font-size: .9rem; }
canvas { display: block; width: 100%; height: clamp(220px, 45vw, 370px); margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.start-dot, .finish-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: #2458ad; }
.finish-dot { margin-left: .65rem; background: #aa5322; }
:focus-visible { outline: 2px solid #36a787; outline-offset: 2px; }
