:root {
  --bg: #12141a;
  --surface: #1c1f27;
  --text: #e8eaf0;
  --muted: #9aa0ae;
  --accent: #6c8cff;
  --warn: #e0b04a;
  --border: #2c303b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.container { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { margin: 0; font-size: 2rem; }
h2 { margin: 24px 0 8px; font-size: 1.2rem; }
.lead { color: var(--muted); margin-top: 4px; }
.notice, .disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
}
.disclaimer { color: var(--muted); font-size: .9rem; }
.small { font-size: .8rem; margin-bottom: 0; }
.upload { text-align: center; margin: 24px 0; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.visually-hidden:focus + .hint { outline: 2px solid var(--accent); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.hint { color: var(--muted); font-size: .9rem; }
.status { min-height: 1.5em; }
.canvas-wrap { text-align: center; }
canvas { max-width: 100%; height: auto; border-radius: 10px; background: #000; }
.total { text-align: center; margin: 16px 0; }
.total-label { color: var(--muted); }
.total-value { font-size: 3rem; font-weight: 700; }
.total-value small { font-size: 1.2rem; color: var(--muted); }
.warnings p {
  border-left: 3px solid var(--warn);
  background: var(--surface);
  padding: 8px 12px;
  margin: 8px 0;
}
.metrics { list-style: none; padding: 0; margin: 0; }
.metrics li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.metric-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.metric-value { color: var(--accent); }
.metric-desc { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }
.bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); }
.gate-form { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 24px 0; }
.gate-form input {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.gate-form .btn { border: 0; font: inherit; font-weight: 600; text-align: center; }
.gate-error { color: var(--warn); min-height: 1.5em; margin: 0; }
