:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --bg: #04111e;
  --surface: rgba(10, 27, 44, .92);
  --line: rgba(214, 238, 255, .15);
  --text: #f4faff;
  --muted: #9bb1c1;
  --primary: #a9e8ff;
  --primary-strong: #6cc9f2;
  --coral: #ff8b73;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 5%, rgba(255, 139, 115, .14), transparent 24%),
    radial-gradient(circle at 15% 0%, rgba(108, 201, 242, .16), transparent 30%),
    linear-gradient(160deg, #0a2338 0%, #061624 52%, var(--bg) 100%);
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body::before {
  right: -180px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  border: 2px solid rgba(169, 232, 255, .1);
  border-radius: 50%;
}

body::after {
  right: 72px;
  bottom: 72px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 28px rgba(255, 139, 115, .6);
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid rgba(169, 232, 255, .5);
  outline-offset: 4px;
}

.qr-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.qr-card {
  width: min(100%, 520px);
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 100% 0, rgba(169, 232, 255, .08), transparent 34%),
    var(--surface);
  box-shadow: 0 30px 100px rgba(0, 4, 12, .52), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(20px);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { border-radius: 15px; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.qr-heading { margin-top: 28px; }

.eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 9vw, 48px);
  line-height: .98;
  letter-spacing: -.05em;
}

.qr-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.qr-frame {
  position: relative;
  width: min(100%, 350px);
  margin: 28px auto 22px;
  padding: 17px;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 5, 14, .38), 0 0 0 1px rgba(255, 255, 255, .12);
}

.qr-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  image-rendering: pixelated;
}

.scan-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: var(--coral);
  pointer-events: none;
}

.scan-corner-one {
  top: -7px;
  left: -7px;
  border-top: 3px solid var(--coral);
  border-left: 3px solid var(--coral);
  border-radius: 12px 0 0;
}

.scan-corner-two {
  right: -7px;
  bottom: -7px;
  border-right: 3px solid var(--coral);
  border-bottom: 3px solid var(--coral);
  border-radius: 0 0 12px;
}

.destination {
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(169, 232, 255, .045);
}

.destination > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(169, 232, 255, .12);
  color: var(--primary);
  font-weight: 900;
}

.destination div { min-width: 0; }
.destination small { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.destination strong { display: block; margin-top: 4px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.actions { margin-top: 16px; display: grid; gap: 9px; }

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #071725;
  box-shadow: 0 12px 30px rgba(108, 201, 242, .18);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
}

.secondary-action:disabled {
  cursor: default;
  opacity: .65;
}

.primary-action:hover,
.secondary-action:hover { filter: brightness(1.06); transform: translateY(-1px); }

.privacy-note {
  margin: 15px 8px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.install-help {
  position: fixed;
  z-index: 10;
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(1, 8, 15, .78);
  backdrop-filter: blur(12px);
}

.install-help[hidden] { display: none; }

.install-sheet {
  position: relative;
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #0a1b2c;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .55);
}

.install-sheet h2 {
  margin: 8px 34px 10px 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.install-sheet p,
.install-sheet li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.install-sheet ol {
  margin: 18px 0 24px;
  padding-left: 22px;
}

.install-sheet li + li { margin-top: 8px; }

.install-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 420px) {
  .qr-page { padding-inline: 12px; }
  .qr-card { border-radius: 26px; }
  .qr-frame { width: min(100%, 310px); }
}

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