:root {
  --ink: #111;
  --muted: #666;
  --border: #d9d9d9;
  --paper: #fff;
  --bg: #f6f6f6;
  --accent: #111;
}
/* ===== Sender dark theme (screenshot style) ===== */
.theme-dark {
  --ink: #d6dee6;
  --muted: #8aa0b6;
  --border: #1c2430;
  --paper: #0f141c;
  --bg: #0b0f14;
  --accent: #0b5fff; /* primary button */
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Dark buttons */
.theme-dark .btn {
  background: var(--accent);
  border-color: #0b3dcc;
  color: #fff;
}
.theme-dark .btn.ghost {
  background: #121821;
  color: var(--ink);
  border-color: var(--border);
}
.theme-dark .input {
  background: #0d131b;
  color: var(--ink);
}
.theme-dark .card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* “How it works” block inside the card */
.hw {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}
.hw h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.hw ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}
.hw li {
  margin: 4px 0;
}
.small {
  font-size: 12px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Layout */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}
.title {
  font-size: 24px;
  margin: 8px 0 4px;
}
.center {
  text-align: center;
}

/* Cards & text */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.row {
  margin: 10px 0;
}
.info {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin-top: 8px;
}

/* Inputs & buttons */
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  background: #fff; /* white background */
  color: #000; /* black text */
}
.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  text-align: center;
  font-weight: 700; /* bold */
  background: #f2f2f2; /* light gray so it’s visible on e-ink */
  color: #000; /* black text */
  border: 1px solid #000; /* solid black border */
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
}

/* Disabled state */
.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* Secondary/ghost button */
.btn.ghost {
  background: #fff; /* plain white */
  color: #000; /* black text */
  border: 1px solid #000;
}
.footer {
  margin-top: 24px;
  color: #333;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

/* Receiver lite bits */
.key {
  letter-spacing: 8px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 24px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
#qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
#status {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  min-height: 1em;
}

/* Helpers */
.hide {
  display: none;
}
