/* wallet.css: the wallet in the website's colours. One quiet column: the
   balance, two buttons, what happened. Settings are plain lists that open
   onto more lists. Nothing is loaded from anywhere else. */

:root {
  --bg: #07070a;
  --panel: #0e0d14;
  --panel2: #15131d;
  --field: #0a090f;
  --text: #f4f3f7;
  --soft: #d6d2e2;
  --muted: #9c98aa;
  --faint: #6e6a7c;
  --line: rgba(167, 139, 250, .16);
  --hair: rgba(255, 255, 255, .06);
  --accent: #8b5cf6;
  --accent-hi: #9d74fa;
  --lilac: #b8a2fb;
  --green: #4ef07a;
  --amber: #f5c451;
  --red: #ff6b6b;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.5 var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 60rem 28rem at 50% -8rem, rgba(139, 92, 246, .16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(139, 92, 246, .45); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; }

/* ── the page ──────────────────────────────────────────────────────────── */

.app { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.content { max-width: 560px; margin: 0 auto; padding: 0 20px; }
.sidebar { display: none; }
.app.bare { min-height: 100vh; display: flex; align-items: center; padding: 32px 16px;justify-content: center; }
.app.bare .content { width: 100%; padding: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: calc(64px + env(safe-area-inset-top));
  /* Across the window, its contents lined up with the column below. */
  padding: env(safe-area-inset-top) max(20px, calc((100% - 520px) / 2)) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(7, 7, 10, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; border-radius: 50%; }
.brand b { font-weight: 600; font-size: 15px; letter-spacing: .01em; }
@media (max-width: 359px) { .brand b { display: none; } }
.top-actions { display: flex; align-items: center; gap: 4px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  margin-right: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.status-pill:hover { color: var(--text); border-color: rgba(167, 139, 250, .4); }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--faint); }
.dot.ok { background: var(--green); box-shadow: 0 0 10px rgba(78, 240, 122, .7); }
.dot.busy { background: var(--amber); box-shadow: 0 0 10px rgba(245, 196, 81, .5); }
.dot.bad { background: var(--red); box-shadow: 0 0 10px rgba(255, 107, 107, .5); }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--panel2); color: var(--text); }

/* Line icons. Only these: other drawings, the QR code above all, keep
   their own colours. */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.screen { padding-bottom: 8px; }
.page-head { margin: 10px 0 20px; }
.page-nav { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 10px; }
.page-nav .side { display: flex; align-items: center; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin-left: -4px; font-size: 14px; color: var(--lilac); }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; }
.page-head h1 { margin: 4px 0 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }

/* ── lists ─────────────────────────────────────────────────────────────── */

.group-title {
  margin: 28px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.group {
  margin: 10px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.group-title + .group { margin-top: 0; }
.group-note { margin: 8px 4px 20px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.group-note.bad { color: var(--red); }

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid var(--hair);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  color: var(--text);
}
.group > .row:first-child, .group > :first-child .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .sub { display: block; margin-top: 1px; font-size: 13px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.row .value { margin-left: auto; font-weight: 400; color: var(--muted); text-align: right; white-space: nowrap; }
.row .value.wrap { white-space: normal; overflow-wrap: anywhere; }
.row.link { padding-right: 38px; cursor: pointer; }
.row.link::after {
  content: '';
  position: absolute;
  right: 19px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--faint);
  border-top: 2px solid var(--faint);
  transform: rotate(45deg);
}
.row.link:hover, .row.check:hover, .row.action:hover { background: rgba(255, 255, 255, .03); }
.row.action { justify-content: center; color: var(--lilac); font-weight: 600; cursor: pointer; }
.row.action.bad { color: var(--red); }
.row.check { cursor: pointer; padding-right: 44px; }
.row.check.on::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 6px;
  height: 12px;
  margin-top: -8px;
  border-right: 2px solid var(--lilac);
  border-bottom: 2px solid var(--lilac);
  transform: rotate(40deg);
}
.row.disabled { color: var(--faint); pointer-events: none; }
.row.text { display: block; font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--soft); padding: 14px 16px; }

.row.field .label { flex: none; width: 104px; font-size: 14px; color: var(--muted); }
.row input, .row textarea {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}
.row textarea { resize: none; line-height: 1.45; overflow: hidden; }
.row input::placeholder, .row textarea::placeholder { color: var(--faint); }
.row input:focus-visible, .row textarea:focus-visible { outline: none; }
.row:focus-within { background: rgba(139, 92, 246, .05); }
.row.bad input, .row.bad textarea { color: var(--red); }
.row.stacked { display: block; padding: 12px 16px; }
.row.stacked .label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row.stacked textarea, .row.stacked input { width: 100%; }
.mono { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--soft); overflow-wrap: anywhere; }

/* Round icons beside list rows. */
.tile {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(167, 139, 250, .12);
  color: var(--lilac);
}
.tile svg { width: 17px; height: 17px; }
.tile.green { background: rgba(78, 240, 122, .1); color: var(--green); }
.tile.orange { background: rgba(245, 196, 81, .12); color: var(--amber); }
.tile.red { background: rgba(255, 107, 107, .12); color: var(--red); }

/* ── switches and segmented controls ───────────────────────────────────── */

.switch { position: relative; flex: none; width: 46px; height: 28px; margin-left: auto; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #2b2836; transition: background .18s; }
.switch .track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  transition: transform .18s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--lilac); outline-offset: 2px; }

.segmented {
  display: flex;
  gap: 2px;
  margin: 10px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
}
.segmented button {
  flex: 1;
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.segmented.in-row { display: inline-flex; flex: none; margin: 0 0 0 auto; }
.segmented.in-row button { min-height: 28px; padding: 0 10px; }

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn.secondary { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn.secondary:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.btn.danger { background: transparent; border-color: rgba(255, 107, 107, .45); color: var(--red); }
.btn.danger:hover:not(:disabled) { background: rgba(255, 107, 107, .08); }
.btn.plain { background: transparent; color: var(--muted); }
.btn.plain:hover:not(:disabled) { color: var(--text); }
.btn.small { width: auto; min-height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.stack-buttons { display: grid; gap: 10px; margin: 18px 0; }
.inline-buttons { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.row.stacked .inline-buttons { margin-top: 10px; }
.mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.mini:hover { background: rgba(255, 255, 255, .08); }
.mini svg { width: 14px; height: 14px; }

/* ── the balance ───────────────────────────────────────────────────────── */

.balance {
  margin: 12px 0 4px;
  padding: 34px 20px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(139, 92, 246, .16), transparent 70%),
    var(--panel);
  text-align: center;
}
.balance .caption { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.balance .amount {
  margin: 8px 0 4px;
  font-size: 52px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.balance .amount .unit { margin-left: 8px; font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.balance .extra { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.balance .extra b { font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }
.balance .status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--muted);
}
.balance .status.bad { color: var(--red); }
.balance .meter { max-width: 240px; height: 4px; margin: 12px auto 0; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.balance .meter span { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width .4s; }

.progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .3s; }
.keygen { margin: 16px 4px; }
.keygen .progress { margin-bottom: 8px; }
.keygen div:last-child { font-size: 13px; color: var(--muted); text-align: center; }

/* ── mining ────────────────────────────────────────────────────────────── */

.mine-hero {
  margin: 4px 0 14px;
  padding: 26px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(245, 196, 81, .10), transparent 70%),
    var(--panel);
  text-align: center;
}
.mine-hero .status-line { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mine-hero .rate { margin: 10px 0 2px; font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mine-hero .rate .unit { margin-left: 8px; font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.mine-hero .algo { min-height: 21px; font-size: 14px; color: var(--muted); }
.mine-hero .btn { max-width: 280px; margin-top: 18px; }
.walk-ahead {
  margin: 10px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 196, 81, .28);
  border-radius: 14px;
  background: rgba(245, 196, 81, .06);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--soft);
}
.walk-ahead b { color: var(--amber); font-weight: 600; }

/* The welcome card's way straight into mining. */
.mine-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 13px 14px;
  border: 1px solid rgba(245, 196, 81, .35);
  border-radius: 14px;
  background: rgba(245, 196, 81, .07);
  text-align: left;
  transition: background .15s, border-color .15s;
}
.mine-cta:hover { background: rgba(245, 196, 81, .12); border-color: rgba(245, 196, 81, .55); }
.mine-cta .grow { flex: 1; min-width: 0; }
.mine-cta b { display: block; font-size: 15px; font-weight: 600; }
.mine-cta small { display: block; font-size: 13px; color: var(--muted); }

.status-pill.mining { color: var(--amber); border-color: rgba(245, 196, 81, .35); }
.status-pill.mining .icon { width: 15px; height: 15px; animation: dig 1.6s ease-in-out infinite; transform-origin: 30% 70%; }
@keyframes dig { 0%, 60%, 100% { transform: rotate(0); } 30% { transform: rotate(-24deg); } }
@media (max-width: 420px) { .status-pill.mining .pill-label { display: none; } .status-pill.mining { padding: 0 10px; } }

.locked-mining { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.locked-mining .quiet { color: var(--lilac); }

/* ── activity, payments, receiving ─────────────────────────────────────── */

.amount-in { color: var(--green); }
.amount-out { color: var(--text); }
.row .amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, .08);
  color: var(--soft);
}
.badge.warn { background: rgba(245, 196, 81, .14); color: var(--amber); }
.badge.bad { background: rgba(255, 107, 107, .14); color: var(--red); }
.badge.ok { background: rgba(78, 240, 122, .12); color: var(--green); }

/* The balance with its two buttons, and the code beside the address: one
   above the other on a phone, side by side on a wide screen (below). */
.home-top .buttons { margin-bottom: 0; }
.actions { display: flex; gap: 10px; margin: 14px 0; }
.actions .btn { flex: 1; }

.detail-head { text-align: center; padding: 14px 0 10px; }
.detail-head .big { font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-head .what { font-size: 14px; color: var(--muted); }
.detail-head .logo { margin-bottom: 10px; }

.empty-note { padding: 28px 16px; text-align: center; color: var(--muted); }

.qr-card { width: min(260px, 100%); margin: 6px auto 14px; padding: 16px; border-radius: 18px; background: #fff; }
.qr-card svg { display: block; width: 100%; height: auto; }

.paper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  font: 14px/1.4 var(--mono);
  transition: filter .3s;
}
.paper span { padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, .035); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper span i { margin-right: 6px; font-style: normal; font-size: 11px; color: var(--faint); }
.paper.hidden-words { filter: blur(6px); user-select: none; }
@media (max-width: 400px) { .paper { grid-template-columns: repeat(2, 1fr); } }

.done-mark {
  width: 72px;
  height: 72px;
  margin: 26px auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(78, 240, 122, .4);
  background: rgba(78, 240, 122, .1);
  color: var(--green);
  animation: pop .3s ease-out;
}
.done-mark svg { width: 34px; height: 34px; stroke-width: 2.5; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }

/* ── dialogs and notices ───────────────────────────────────────────────── */

.dim-layer, .sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 8, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.alert, .sheet {
  width: min(400px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.alert h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.alert p { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.alert input, .center-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  font-size: 15px;
  color: var(--text);
}
.alert input { margin-bottom: 14px; }
.alert input:focus, .center-card input:focus { border-color: var(--accent); outline: none; }
.alert .err { margin: -6px 0 12px; font-size: 13px; color: var(--red); }
.alert .err:empty { display: none; }
.alert .choices { display: flex; gap: 10px; }
.alert .choices.stacked { flex-direction: column; }
.alert .choices button {
  flex: 1;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  font-size: 14px;
  font-weight: 600;
}
.alert .choices button:hover { background: rgba(255, 255, 255, .08); }
.alert .choices button.default { background: var(--accent); border-color: var(--accent); color: #fff; }
.alert .choices button.bad { background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .45); color: var(--red); }
.sheet { display: grid; gap: 10px; }
.sheet p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: var(--soft); }
.sheet p b { color: var(--text); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  font-size: 14px;
  font-weight: 500;
  transform: translateX(-50%);
  pointer-events: none;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast svg { color: var(--green); }
.toast.out { opacity: 0; transition: opacity .4s; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, .15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── first screens: a card in the middle ───────────────────────────────── */

.center-card {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 40px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
  text-align: center;
}
.center-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.center-card p { margin: 0 0 26px; color: var(--muted); }
.center-card .stack-buttons { margin: 0; }
.center-card .err { font-size: 13px; color: var(--red); }
.center-card .err:empty { display: none; }
.center-card > .spinner { width: 22px; height: 22px; color: var(--lilac); }
.logo { display: block; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 0 40px rgba(139, 92, 246, .35); }
.logo.small { width: 52px; height: 52px; }
.quiet-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; }
.quiet { padding: 0; border: 0; background: none; font-size: 13px; color: var(--muted); }
.quiet:hover { color: var(--text); }

/* ── the scanner, odds and ends ────────────────────────────────────────── */

.scanner-view { position: relative; margin: 0 0 6px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1; }
.scanner-view video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scanner-view::after { content: ''; position: absolute; inset: 18%; border: 2px solid rgba(255, 255, 255, .8); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scanner-view.found::after { border-color: var(--green); }

.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.fatal { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ── a wide screen: sections down the side, pages side by side ────────── */

@media (min-width: 960px) {
  .topbar { padding: 0 calc(max(0px, (100% - 1080px) / 2) + 32px); }
  .top-settings { display: none; }
  .app.with-side .shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
  }
  .app.with-side .content { max-width: 680px; margin: 0; padding: 0; }
  .app.with-side.wide .content { max-width: 800px; }
  .sidebar:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 76px;
    align-self: start;
    padding-top: 22px;
  }
  .side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 14px;
    border-radius: 11px;
    font-weight: 500;
    color: var(--muted);
  }
  .side-link:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
  .side-link[aria-current="page"] { color: var(--text); background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
  .side-link[aria-current="page"] .icon { color: var(--lilac); }
  .back.to-home { display: none; }
  .page-head { margin-top: 24px; }
  .page-head h1 { font-size: 32px; }

  .home-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: center;
    gap: 32px;
    margin: 28px 0 8px;
    padding: 36px 40px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
      radial-gradient(ellipse 70% 90% at 0% 0%, rgba(139, 92, 246, .18), transparent 70%),
      var(--panel);
  }
  .home-top .balance { margin: 0; padding: 0; border: 0; background: none; text-align: left; }
  .home-top .balance .amount { font-size: 56px; }
  .home-top .balance .extra, .home-top .balance .status { justify-content: flex-start; }
  .home-top .balance .meter { margin-left: 0; }
  .home-top .buttons { grid-template-columns: 1fr; margin: 0; }

  .receive-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
  .qr-col .qr-card { width: 100%; margin: 0 0 10px; }
  .qr-col .group-note { text-align: center; }
  .info-col > .group:first-child { margin-top: 0; }
  .info-col .actions .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
