:root {
  color-scheme: light;
  --bg: #f6f6f2;
  --card: #ffffff;
  --ink: #111111;
  --muted: #3d3d3d;
  --line: #111111;
  --btn: #111111;
  --btn-text: #ffffff;
  --ok: #0a7a32;
  --focus: #005bcc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: start center;
}

.shell {
  width: min(28rem, 100%);
  padding: 1.5rem 1.25rem 2.5rem;
}

.brand {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.amount {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.count {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.muted {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.pay { margin-top: 1.5rem; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.cta:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.cta[disabled] {
  cursor: default;
}

.steps {
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.2rem;
  color: var(--ink);
}

.steps li {
  margin: 0.35rem 0;
}

.steps li::marker {
  font-weight: 700;
}

.qr-box {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.qr-box svg {
  width: 216px;
  height: 216px;
  display: block;
}

.hint {
  margin: 0.75rem 0 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

details.scan {
  margin-top: 1.25rem;
}

details.scan summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details.scan summary::-webkit-details-marker { display: none; }

details.scan summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.desktop-only { display: none; }
.mobile-only { display: block; }

@media (min-width: 801px) {
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  .shell { padding-top: 2.5rem; }
}

.state {
  margin-top: 1.5rem;
}

.check {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #e7f7ec;
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.back:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 750;
}

.hidden { display: none !important; }
