:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #152238;
  background: #eef4ff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(42, 112, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #f7faff, #eaf1ff);
}

.card {
  width: min(100%, 560px);
  padding: 38px;
  border: 1px solid rgba(21, 94, 239, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(33, 65, 120, 0.16);
  text-align: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: #155eef;
  font-size: 28px;
  box-shadow: 0 12px 24px rgba(21, 94, 239, 0.25);
}

.eyebrow {
  margin: 0 0 8px;
  color: #155eef;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.08;
}

.intro {
  max-width: 430px;
  margin: 16px auto 28px;
  color: #60708a;
  line-height: 1.6;
}

form {
  text-align: left;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 10px;
}

input {
  min-width: 0;
  flex: 1;
  padding: 14px 15px;
  border: 1px solid #cbd6e7;
  border-radius: 12px;
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  background: #155eef;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover {
  background: #0f4fd1;
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.3);
  outline-offset: 2px;
}

.error {
  min-height: 22px;
  margin: 8px 0 0;
  color: #c43232;
  font-size: 0.9rem;
}

.qr-section {
  margin-top: 28px;
  animation: reveal 250ms ease-out;
}

.qr-box {
  width: fit-content;
  margin: 0 auto;
  padding: 16px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 30px rgba(24, 45, 84, 0.15);
}

.qr-box img,
.qr-box canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.saved-email {
  margin: 14px 0 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid #bfd2ff;
  border-radius: 14px;
  color: #23436e;
  background: #f0f5ff;
  line-height: 1.45;
}

.secondary-button {
  color: #155eef;
  background: transparent;
  border: 1px solid #a9c3ff;
}

.secondary-button:hover {
  color: white;
  background: #155eef;
}

.privacy-note {
  margin: 24px 0 0;
  color: #7a879b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.hidden {
  display: none;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 590px) {
  .card {
    padding: 28px 20px;
    border-radius: 22px;
  }

  .input-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
