:root {
  --bg: #f5f5f7; --fg: #1d1d1f; --muted: #6e6e73; --card: #fff; --line: #e5e5ea;
  --err-bg: #fff1f0; --err: #c62828; --warn-bg: #fff8e1; --warn: #8a6100; --ok: #1a7f37;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --fg: #f5f5f7; --muted: #a1a1a6; --card: #1c1c1e; --line: #2c2c2e;
    --err-bg: #3a1414; --err: #ff8a80; --warn-bg: #332a10; --warn: #ffd54f; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.wrap { max-width: 480px; margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-direction: column; gap: 20px; min-height: 100dvh; }
.hero { text-align: center; margin-top: 8vh; }
.hero h1 { font-size: 1.6rem; margin: 12px 0 4px; word-break: break-word; }
.badge { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; display: grid; place-items: center; font-size: 30px; background: var(--card); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); }
.muted { color: var(--muted); margin: 0; }
.apple-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; border-radius: 12px; background: #000; color: #fff;
  font-size: 1.05rem; font-weight: 600; text-decoration: none; margin-top: auto;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) { .apple-btn { background: #fff; color: #000; } }
.apple-btn:active { transform: scale(.98); }
.apple-btn.disabled { opacity: .4; pointer-events: none; }
.alert { background: var(--err-bg); color: var(--err); border-radius: 12px; padding: 14px 16px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert h2 { font-size: 1rem; margin: 0 0 6px; }
.alert p, .alert ul { margin: 4px 0; word-break: break-word; }
.hint { font-size: .92rem; }
.code code { font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h2 { font-size: 1rem; margin: 0 0 10px; }
dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
dt { color: var(--muted); font-size: .8rem; margin-top: 8px; }
dd { margin: 0; word-break: break-all; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.pill { font-size: .72rem; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; color: var(--muted); }
.checks { margin: 0; padding-left: 0; list-style: none; font-size: .92rem; }
.checks li { padding: 3px 0; }
details { margin-top: 10px; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
pre { overflow-x: auto; font-size: .78rem; background: var(--bg); padding: 10px; border-radius: 8px; }
.btn-danger, .btn-secondary {
  width: 100%; min-height: 52px; border-radius: 12px; font: inherit; font-weight: 600;
  border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.btn-danger { background: var(--err); color: #fff; }
.btn-secondary { background: var(--card); color: var(--fg); border: 1px solid var(--line); }
.foot { text-align: center; font-size: .9rem; }
.foot a { color: var(--muted); }
