:root {
  --bg: #fafafa;
  --text: #1c1c22;
  --dim: #5f6068;
  --rule: #e4e4e8;
  --ok: #1a8a5a;
  --warn: #b26a00;
  --error: #c62828;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121218;
    --text: #e8e8ee;
    --dim: #9a9aa8;
    --rule: #2a2a36;
    --ok: #31e39d;
    --warn: #f2b84b;
    --error: #ff6b5e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121218;
  --text: #e8e8ee;
  --dim: #9a9aa8;
  --rule: #2a2a36;
  --ok: #31e39d;
  --warn: #f2b84b;
  --error: #ff6b5e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
}

body {
  font: 16px/1.5 var(--font);
}

[hidden] {
  display: none !important;
}

.kyc {
  position: fixed;
  inset: 0;
  height: 100dvh;
}

.screen {
  display: grid;
  height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.screen-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 360px;
  text-align: center;
}

.screen h1 {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  text-wrap: balance;
}

.screen p {
  margin: 0;
  color: var(--dim);
  text-wrap: pretty;
}

.screen .code {
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dim);
  opacity: 0.8;
}

.mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone, var(--dim)) 14%, transparent);
  color: var(--tone, var(--dim));
}

.mark:empty {
  display: none;
}

.mark svg {
  width: 26px;
  height: 26px;
}

.mark[data-tone="ok"] {
  --tone: var(--ok);
}

.mark[data-tone="warn"] {
  --tone: var(--warn);
}

.mark[data-tone="error"] {
  --tone: var(--error);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--rule);
  border-top-color: var(--dim);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}
