:root {
  --bg: #ffffff;
  --surface: #f6f6f7;
  --line: #e6e6e8;
  --text: #0b0b0c;
  --muted: #6b6b72;
  --good: #1a7f37;
  --warn: #9a6700;
  --bad: #c2271b;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.brand { display: flex; flex-direction: column; gap: 4px; }
.brand img { display: block; height: 26px; width: auto; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: 0.01em; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.button:disabled { opacity: 0.4; cursor: default; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg);
}
.card h2 { margin: 0 0 6px; font-size: 15px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card code { font-size: 12px; word-break: break-all; color: var(--muted); }
.notice { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #fff8e6; color: var(--warn); font-size: 13px; }
.notice.bad { background: #fdecea; color: var(--bad); }

/* Browser page */

.page { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; }
.page .topbar { padding: 18px 0; margin-bottom: 18px; }
.page.narrow { max-width: 440px; }
.code { font-size: 28px; font-weight: 600; letter-spacing: 0.08em; color: var(--text) !important; font-variant-numeric: tabular-nums; }
.settings { margin-top: 24px; }
.settings summary { cursor: pointer; font-weight: 600; }
.settings .rpv-list { margin-top: 12px; }
.settings .rpv-list li { align-items: center; }

/* Desktop window */

.desktop { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 69px); }
.desktop aside { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-right: 1px solid var(--line); background: #fbfbfc; }
.desktop main { padding: 20px 24px; min-width: 0; }
.qr { display: block; width: 160px; height: 160px; margin: 8px 0; image-rendering: pixelated; }

@media (max-width: 560px) {
  .topbar { padding: 14px 0; }
  .brand img { height: 22px; }
}
