:root {
  color-scheme: light;
  --bg: #f4f8fc;
  --panel: #ffffff;
  --ink: #1d2a36;
  --muted: #5b6b7a;
  --accent: #2f6fa8;
  --pass: #1f9d55;
  --fail: #d64545;
  font-family: -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: env(safe-area-inset-top) 12px calc(env(safe-area-inset-bottom) + 24px);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
}
header { padding: 12px 4px; }
h1 { margin: 0; font-size: 28px; }
h2 { margin: 0 0 10px; font-size: 21px; }
.sub, .hint { color: var(--muted); font-size: 14px; }
.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-word; font-weight: 600; }
button, .button {
  font: inherit;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:active, .button:active { opacity: 0.7; }
.big { display: block; width: 100%; font-size: 19px; padding: 16px; margin: 8px 0; }
.buttons { display: flex; gap: 8px; }
.buttons button { flex: 1; }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; font-size: 14px; }
.field { display: block; font-size: 14px; color: var(--muted); margin: 8px 0; }
.field input { display: block; width: 100%; font-size: 17px; padding: 10px; margin-top: 4px; border: 1px solid #c8d3dd; border-radius: 10px; }
.options label { display: block; margin: 6px 0; font-size: 15px; }
.log {
  background: #eef3f8;
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
  margin: 8px 0;
}
.log:empty { display: none; }
.timer { font-size: 44px; font-weight: 700; text-align: center; margin: 8px 0; font-variant-numeric: tabular-nums; }
.steps { padding-left: 20px; font-size: 15px; }
.steps li { margin: 4px 0; }
.warn { background: #fff4d6; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.checks { border-top: 1px solid #e3e9ef; margin-top: 12px; padding-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 15px; }
.check .label { flex: 1; }
.check button { font-size: 30px; padding: 6px 12px; background: #e9eef3; border-radius: 12px; line-height: 1; }
.check[data-result="pass"] button.pass { background: var(--pass); }
.check[data-result="fail"] button.fail { background: var(--fail); }
.check[data-result="pass"] .label { color: var(--pass); font-weight: 600; }
.check[data-result="fail"] .label { color: var(--fail); font-weight: 600; }
code { font-size: 13px; word-break: break-all; }
#flash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  animation: flash 0.4s steps(1) infinite;
}
#flash[hidden] { display: none; }
@keyframes flash {
  0% { background: #d64545; }
  50% { background: #f2b705; }
}
