:root {
  --bg: #071521;
  --bg-glow: #0d2b40;
  --card: #0f2233;
  --card-border: #1d3a52;
  --text: #e8f4fb;
  --muted: #8fa9bb;
  --accent: #46d6ff;
  --accent-soft: #8cebff;
  --accent-ink: #04202d;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-glow), var(--bg) 60%);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

.card {
  width: 100%;
  max-width: 460px;
  padding: 28px 28px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--accent-soft);
}

.brand-name b {
  color: var(--accent);
}

.brand-tag {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  text-wrap: balance;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(70, 214, 255, 0.12);
  color: var(--accent-soft);
  font: 0.92em/1.4 Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
}

/* A QR code must stay dark-on-white regardless of the page theme. */
.qr-frame {
  display: flex;
  justify-content: center;
  margin: 0 auto 20px;
  padding: 10px;
  width: fit-content;
  max-width: 100%;
  background: #ffffff;
  border-radius: 14px;
}

#qr {
  display: block;
  width: 264px;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.details {
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}

.details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.details > div + div {
  border-top: 1px solid var(--card-border);
}

.details dt {
  flex: none;
  font-size: 13px;
  color: var(--muted);
}

.details dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.details .secret-row {
  display: block;
}

.details .secret-row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  text-align: left;
}

#secret {
  padding: 6px 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
  user-select: all;
}

.keep-key {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 200, 87, 0.45);
  border-radius: 12px;
  background: rgba(255, 200, 87, 0.08);
  color: var(--text);
  font-size: 14.5px;
}

.keep-key strong {
  display: block;
  margin-bottom: 2px;
  color: #ffc857;
}

.steps {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--muted);
}

.steps li + li {
  margin-top: 6px;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.primary:hover {
  background: var(--accent-soft);
}

.ghost {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: 9px;
  background: transparent;
  color: var(--accent-soft);
  font-size: 14px;
}

.ghost:hover {
  border-color: var(--accent);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--accent-soft);
}

.privacy {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--muted);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #5a1f1f;
  color: #ffe1e1;
  text-align: center;
}

@media (max-width: 420px) {
  .card {
    padding: 22px 18px 18px;
  }

  h1 {
    font-size: 21px;
  }

  .brand-tag {
    display: none;
  }
}
