/* Single-column phone layout: status card first, then history and devices. */
:root {
  --bg: #f3f4f7; --surface: #ffffff; --ink: #161b26; --muted: #5d6475; --line: #dfe2ea;
  --accent: #2f55d4; --accent-ink: #ffffff; --ok: #1e7a4c; --warn: #a86400; --err: #b42318;
  --ok-bg: #e3f3ea; --warn-bg: #fbf0dc; --err-bg: #fbe6e4; --info-bg: #e6ecfb;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131b; --surface: #181e2a; --ink: #eef0f5; --muted: #9aa2b4; --line: #2a3242;
    --accent: #7f9cff; --accent-ink: #0f131b; --ok: #6fd3a0; --warn: #f2b45c; --err: #ff8f84;
    --ok-bg: #16301f; --warn-bg: #352712; --err-bg: #3a1a17; --info-bg: #1d2742;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px))
           calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; max-width: 560px; margin: 0 auto; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
main { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
h2 { font-size: 1.1rem; margin: 0; }
p { margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fine { padding-inline: 4px; }
.label { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.value { font-weight: 600; font-size: 1.1rem; margin: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.steps { padding-left: 1.2em; margin: 12px 0; display: grid; gap: 6px; }
form { display: grid; gap: 8px; margin-top: 12px; }
label { font-weight: 600; font-size: .9rem; }
input {
  font: inherit; font-size: 1.1rem; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%; letter-spacing: .04em;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn {
  appearance: none; border: 0; border-radius: 12px; padding: 13px 18px; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; text-align: center;
  min-height: 48px; flex: 1 1 auto;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn[disabled] { opacity: .55; cursor: default; }
.link { appearance: none; background: none; border: 0; color: var(--accent); font: inherit; padding: 4px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pill { font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; background: var(--info-bg); color: var(--accent); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--err-bg); color: var(--err); }
.error { color: var(--err); font-weight: 500; }
.ok { color: var(--ok); font-weight: 500; }
.block { display: grid; gap: 8px; }
.block-head { display: flex; justify-content: space-between; align-items: center; padding-inline: 4px; }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; width: 100%; text-align: left;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.item .t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.item .b { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.item .m { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.dev { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.dev .n { font-weight: 600; }
.dev .m { color: var(--muted); font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
