:root {
  --bg: #f1f5f9; --card: #ffffff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #f97316; --brand-text: #ffffff; --ok: #16a34a; --bad: #dc2626; --warn-bg: #fff7ed; --warn-line: #fdba74;
  --btn: #e2e8f0; --btn-text: #0f172a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --card: #111a2e; --text: #e2e8f0; --muted: #94a3b8; --line: #1e293b;
    --warn-bg: #2a1a0b; --warn-line: #9a3412; --btn: #1e293b; --btn-text: #e2e8f0;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  max-width: 560px; margin-inline: auto;
}
.top { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.top img { border-radius: 8px; }
.brand { font-weight: 700; font-size: 18px; }
.sub { color: var(--muted); font-size: 13px; }
.pill { margin-left: auto; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--btn); }
.pill.on { background: var(--ok); color: #fff; }
.pill.off { background: var(--bad); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card.warn { background: var(--warn-bg); border-color: var(--warn-line); }
h2 { font-size: 18px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 15px; margin: 6px 0; }
label { display: block; font-size: 15px; color: var(--muted); margin: 10px 0; }
input, select {
  display: block; width: 100%; margin-top: 4px; min-height: 48px; padding: 10px 12px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 10px 0 0;
  border: 0; border-radius: 12px; font-size: 17px; font-weight: 600; background: var(--btn); color: var(--btn-text);
  cursor: pointer; text-align: center;
}
.btn.primary { background: var(--brand); color: var(--brand-text); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn:disabled { opacity: .45; }
.btn.file { position: relative; overflow: hidden; color: var(--brand-text); }
.btn.file input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; padding: 12px 0; min-height: 48px; }
.msg { font-size: 15px; min-height: 1em; margin: 8px 0 0; }
.msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); }

.status { text-align: center; }
.speed { font-size: 56px; font-weight: 800; line-height: 1; }
.speed small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.statline { color: var(--muted); margin: 6px 0 10px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; text-align: left; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; word-break: break-word; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .dot { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: var(--btn); }
.checks .ok .dot { background: var(--ok); color: #fff; }
.checks .t { font-weight: 600; }
.checks .n { color: var(--muted); font-size: 14px; }

.safety { position: sticky; top: 0; z-index: 5; background: var(--bad); color: #fff; font-weight: 700; text-align: center; padding: 14px; border-radius: 12px; margin-top: 8px; }
body.moving .card button, body.moving .card .btn.file, body.moving .card input, body.moving .card select { pointer-events: none; opacity: .35; }

.preview { display: block; width: 100%; border-radius: 10px; margin-top: 10px; }
.ico { display: inline-block; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; }
ol { padding-left: 20px; margin: 6px 0; }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 0; }
