:root {
  color-scheme: dark;
  --background: #16131c;
  --surface: #221d2e;
  --field: #211c2b;
  --hairline: #39324a;
  --text: #ece8f1;
  --muted: #948ca6;
  --accent: #e6a579;
  --cream: #f5ead1;
  --action: #ffffff;
  --action-text: #080808;
  --error: #ffb4ab;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(230, 165, 121, 0.12), transparent 34rem),
    var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 24px;
}

.hero {
  width: min(100%, 620px);
  text-align: center;
}

.wordmark {
  margin: 0 0 44px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.family-mark {
  position: relative;
  display: flex;
  width: 144px;
  height: 144px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 34px;
  border-radius: 50%;
  background: var(--cream);
}

.family-mark span {
  position: relative;
  width: 25px;
  height: 48px;
  border-radius: 14px 14px 10px 10px;
  background: var(--accent);
}

.family-mark span::before {
  position: absolute;
  top: -13px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.family-mark span:nth-child(2) {
  height: 58px;
  background: #5a75c2;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 570px;
  margin: 0 auto;
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.lede {
  max-width: 500px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 3vw, 21px);
  font-weight: 520;
  line-height: 1.55;
}

.availability {
  margin: 38px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.invite-shell {
  align-items: center;
  padding-block: 28px;
}

.invite-card {
  width: min(100%, 520px);
}

.invite-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 800;
}

.mini-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
}

.mini-mark::after {
  width: 15px;
  height: 18px;
  border-radius: 8px 8px 6px 6px;
  background: var(--accent);
  content: "";
}

.card {
  padding: clamp(25px, 7vw, 40px);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: rgba(34, 29, 46, 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.card h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 44px);
  line-height: 1.02;
  text-align: left;
}

.card-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 520;
  line-height: 1.55;
}

.invite-form {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-label,
.choice-legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.text-field {
  width: 100%;
  height: 58px;
  padding: 0 17px;
  border: 1px solid var(--hairline);
  border-radius: 17px;
  outline: none;
  background: var(--field);
  color: var(--text);
  font-size: 18px;
  font-weight: 560;
}

.text-field::placeholder {
  color: var(--muted);
  opacity: 1;
}

.text-field:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 165, 121, 0.16);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ghost-editor {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 22px;
}

.ghost-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--cream);
}

.ghost-body {
  position: absolute;
  top: 24px;
  left: 25px;
  width: 46px;
  height: 55px;
  border-radius: 16px 16px 13px 13px;
  background: #5975c2;
}

.ghost-eyes {
  position: absolute;
  top: 48px;
  left: 37px;
  display: flex;
  gap: 14px;
}

.ghost-eyes::before,
.ghost-eyes::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--background);
  content: "";
}

.ghost-glasses {
  position: absolute;
  top: 41px;
  left: 31px;
  display: none;
  width: 34px;
  height: 15px;
  border-top: 3px solid var(--background);
}

.ghost-glasses::before,
.ghost-glasses::after {
  position: absolute;
  top: -5px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--background);
  border-radius: 50%;
  content: "";
}

.ghost-glasses::before {
  left: -1px;
}

.ghost-glasses::after {
  right: -1px;
}

.ghost-preview.has-glasses .ghost-glasses {
  display: block;
}

.appearance-controls {
  display: grid;
  gap: 18px;
}

.color-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.color-choice {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}

.color-choice[data-color="blue"] { --swatch: #5975c2; }
.color-choice[data-color="orange"] { --swatch: #c76e47; }
.color-choice[data-color="green"] { --swatch: #78a364; }
.color-choice[data-color="lavender"] { --swatch: #9487c2; }
.color-choice[data-color="yellow"] { --swatch: #c7a14a; }
.color-choice[data-color="teal"] { --swatch: #599c9e; }

.color-choice[aria-checked="true"] {
  border-color: var(--action);
  box-shadow: 0 0 0 2px var(--surface);
}

.color-choice:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
  font-weight: 750;
}

.toggle {
  position: relative;
  width: 52px;
  height: 32px;
  flex: none;
}

.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--field);
  cursor: pointer;
  transition: background 160ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle input:checked + .toggle-track::after {
  background: var(--background);
  transform: translateX(20px);
}

.toggle input:focus-visible + .toggle-track {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: var(--action-text);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
}

.primary-button:hover {
  background: #eeeaf2;
}

.primary-button:active {
  transform: scale(0.985);
}

.primary-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.privacy-note {
  display: flex;
  gap: 10px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.privacy-note::before {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 6px;
  border-radius: 50%;
  background: #77a36a;
  content: "";
}

.status-message {
  min-height: 20px;
  margin: -7px 0 0;
  color: var(--error);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.status-message:empty {
  display: none;
}

.success-mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--cream);
  color: #527047;
  font-size: 34px;
  font-weight: 900;
}

.secondary-link {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.secondary-link:hover {
  color: var(--text);
}

.primary-button.secondary-link {
  color: var(--action-text);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .page-shell {
    padding-inline: 18px;
  }

  .invite-shell {
    align-items: start;
  }

  .ghost-editor {
    grid-template-columns: 78px 1fr;
    gap: 16px;
  }

  .ghost-preview {
    width: 78px;
    height: 78px;
    transform: scale(0.81);
    transform-origin: left center;
  }
}

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