:root {
  --background: #fdfaf6;
  --surface: #ffffff;
  --surface-soft: #f4f8f7;
  --foreground: #152a2d;
  --muted: #627173;
  --primary: #216f68;
  --primary-dark: #17554f;
  --primary-soft: #dceeea;
  --sand: #f8ead2;
  --border: #dce4e3;
  --shadow: 0 24px 70px rgba(28, 66, 63, 0.13);
  --radius-large: 28px;
  --radius-medium: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(248, 234, 210, 0.85), transparent 30rem),
    radial-gradient(circle at 92% 82%, rgba(220, 238, 234, 0.9), transparent 34rem),
    var(--background);
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.site-header,
.site-footer {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0d2342;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px 13px 18px 13px;
  background: var(--primary);
  color: white;
  font-size: 1.15rem;
  box-shadow: 0 8px 22px rgba(33, 111, 104, 0.25);
}

.header-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-content {
  display: grid;
  flex: 1;
  place-items: center;
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  padding: 28px 0 64px;
}

.invitation-card,
.invalid-card {
  position: relative;
  width: min(100%, 620px);
  overflow: hidden;
  border: 1px solid rgba(220, 228, 227, 0.9);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 52px);
  text-align: center;
}

.invitation-card::before,
.invalid-card::before {
  position: absolute;
  top: -64px;
  right: -64px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--sand);
  content: "";
  opacity: 0.78;
}

.phone-mark,
.invalid-mark {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  place-items: center;
  border: 8px solid var(--primary-soft);
  border-radius: 22px;
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 28px rgba(33, 111, 104, 0.24);
}

.phone-mark::before {
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 9px;
  content: "";
}

.phone-speaker {
  position: absolute;
  top: 10px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: white;
}

.phone-heart {
  position: relative;
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  margin-top: 5px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.invalid-mark {
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--foreground);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 490px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.12rem);
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.store-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.copy-button:focus-visible,
.brand:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgba(33, 111, 104, 0.28);
  outline-offset: 3px;
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 28px rgba(33, 111, 104, 0.22);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  border-color: var(--border);
  background: white;
  color: var(--foreground);
}

.button-secondary:hover {
  border-color: #b8cbca;
  background: var(--surface-soft);
}

.button-arrow {
  font-size: 1.25rem;
  line-height: 1;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  padding: 15px 16px;
  color: var(--muted);
  text-align: left;
}

.notice p {
  margin: 0;
  font-size: 0.92rem;
}

.notice-icon {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.code-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  border: 1px dashed #b8cbca;
  border-radius: var(--radius-medium);
  padding: 15px 16px;
  background: white;
  text-align: left;
}

.code-label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

code {
  display: block;
  max-width: 390px;
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
  font-weight: 800;
}

.copy-button {
  min-height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  cursor: pointer;
  padding: 8px 13px;
  font-weight: 800;
}

.copy-button:hover {
  background: #cce6e0;
}

.copy-status {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.steps {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.step strong {
  color: var(--foreground);
}

.step-number {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--sand);
  color: #6f4b1d;
  font-size: 0.75rem;
  font-weight: 900;
}

.privacy-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.invalid-card .button {
  margin-top: 28px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
  border-top: 1px solid rgba(220, 228, 227, 0.75);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .site-header {
    min-height: 72px;
  }

  .header-label {
    display: none;
  }

  .main-content {
    width: min(100% - 20px, 1120px);
    align-items: start;
    padding-top: 10px;
  }

  .invitation-card,
  .invalid-card {
    border-radius: 22px;
    padding: 28px 20px;
  }

  .store-actions {
    grid-template-columns: 1fr;
  }

  .code-panel {
    align-items: flex-end;
  }

  code {
    font-size: 0.84rem;
  }

  .site-footer {
    min-height: 96px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    text-align: center;
  }

  .site-footer p {
    margin: 0;
  }
}

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