:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --accent: #0071e3;
  --ok: #34c759;
  --err: #ff3b30;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { font-weight: 600; text-decoration: none; color: var(--ink); font-size: 17px; }
main { padding: 28px 0 60px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}
.card.center { text-align: center; }
h1 { font-size: 26px; font-weight: 600; margin: 8px 0 4px; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); }
.msg { padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.msg.ok { background: #e8f7ec; color: #1c7a2e; }
.msg.err { background: #fdeceb; color: #b3261e; }
form { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 18px auto 0; }
input {
  font-size: 16px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.15); }
button { font-size: 15px; cursor: pointer; border-radius: 10px; padding: 12px 18px; }
button.primary {
  background: var(--accent); color: #fff; border: none; font-weight: 500;
}
button.primary:disabled { opacity: .5; }
button.ghost { background: none; border: 1px solid var(--line); color: var(--ink); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.status-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: var(--muted);
}
.status-dot.ok { background: var(--ok); }
.status-dot.warn { background: #ffb340; }
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px;
}
.grid .ph {
  aspect-ratio: 1; background: #f0f0f2; border-radius: 8px;
}
#load-more { margin-top: 14px; width: 100%; }
