:root {
  --ink: #19152b;
  --muted: #716c80;
  --line: #e9e5ef;
  --paper: #ffffff;
  --canvas: #f7f5fa;
  --primary: #6d3ae8;
  --primary-dark: #5424c8;
  --primary-soft: #eee8ff;
  --accent: #ff5d75;
  --success: #17875e;
  --success-soft: #eaf8f2;
  --danger: #c63d52;
  --danger-soft: #fff0f2;
  --warning: #9a6512;
  --warning-soft: #fff7df;
  --shadow: 0 20px 60px rgba(43, 29, 73, .10);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(109, 58, 232, .10), transparent 28rem),
    radial-gradient(circle at 100% 8%, rgba(255, 93, 117, .08), transparent 24rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.site-header {
  width: 100%;
  padding: 18px 20px 0;
}

.nav {
  width: min(1120px, 100%);
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -.04em;
  font-size: 1.16rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), #956bff);
  box-shadow: 0 8px 22px rgba(109, 58, 232, .25);
}

.brand-mark svg { width: 21px; height: 21px; }

.nav-link {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  font-size: .88rem;
  font-weight: 750;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 30px 20px 56px;
}

.page-narrow { width: min(660px, 100%); }
.page-panel { width: min(980px, 100%); }

.hero {
  min-height: calc(100vh - 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  gap: 64px;
  padding-top: 24px;
  padding-bottom: 70px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 20px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

.display {
  max-width: 660px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6.6vw, 5.7rem);
  line-height: .94;
  letter-spacing: -.075em;
  font-weight: 900;
}

.display span { color: var(--primary); }

.lead {
  max-width: 590px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 50px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
  transform: none;
}
.btn:focus-visible, .field:focus-visible {
  outline: 3px solid rgba(109, 58, 232, .20);
  outline-offset: 2px;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(109, 58, 232, .25);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn-success { color: #fff; background: var(--success); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-block { width: 100%; }
.btn svg { width: 19px; height: 19px; }

.hero-visual {
  position: relative;
  min-height: 475px;
  display: grid;
  place-items: center;
}

.orb {
  position: absolute;
  width: min(430px, 88vw);
  aspect-ratio: 1;
  border-radius: 42% 58% 60% 40% / 45% 38% 62% 55%;
  background: linear-gradient(145deg, #ede5ff, #fff0f3);
  transform: rotate(-8deg);
}

.gift {
  position: relative;
  width: 240px;
  height: 225px;
  filter: drop-shadow(0 24px 30px rgba(45, 24, 88, .18));
}

.gift-box, .gift-lid {
  position: absolute;
  left: 15px;
  width: 210px;
  background: linear-gradient(145deg, var(--primary), #8c61f3);
}
.gift-box { bottom: 0; height: 155px; border-radius: 18px 18px 27px 27px; }
.gift-lid { top: 49px; left: 0; width: 240px; height: 51px; border-radius: 16px; }
.gift-ribbon { position: absolute; z-index: 2; top: 49px; bottom: 0; left: 99px; width: 42px; background: var(--accent); }
.gift-bow::before, .gift-bow::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 77px;
  height: 62px;
  border: 17px solid var(--accent);
}
.gift-bow::before { left: 39px; border-radius: 55px 55px 8px 55px; transform: rotate(14deg); }
.gift-bow::after { right: 39px; border-radius: 55px 55px 55px 8px; transform: rotate(-14deg); }

.float-card {
  position: absolute;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 16px;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: .83rem;
  font-weight: 800;
}
.float-card strong {
  width: 31px; height: 31px; display: grid; place-items: center;
  border-radius: 10px; color: var(--primary); background: var(--primary-soft);
}
.float-one { top: 56px; right: 0; }
.float-two { bottom: 58px; left: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 38px;
}
.step { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.step b { display: block; margin-bottom: 3px; color: var(--ink); font-size: .88rem; }
.step-number {
  width: 28px; height: 28px; margin-bottom: 9px; display: grid; place-items: center;
  border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-weight: 900;
}

.card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(229, 224, 237, .92);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}

.card-head { margin-bottom: 28px; }
.card-title { margin-bottom: 8px; font-size: clamp(1.65rem, 5vw, 2.3rem); line-height: 1.08; letter-spacing: -.045em; }
.card-subtitle { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 19px; }
.form-group:last-child { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }

.label {
  display: block;
  margin-bottom: 8px;
  color: #3f394d;
  font-size: .84rem;
  font-weight: 800;
}
.label-note { color: var(--muted); font-weight: 600; }

.field {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #dcd7e5;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  transition: border .18s ease, box-shadow .18s ease;
}
.field:hover { border-color: #c9c1d7; }
.field:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109,58,232,.09); outline: 0; }
textarea.field { min-height: 125px; resize: vertical; line-height: 1.5; }

.section-label {
  margin: 8px 0 18px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.alert {
  margin-bottom: 20px;
  padding: 14px 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 15px;
  font-size: .9rem;
  line-height: 1.5;
}
.alert svg { width: 20px; min-width: 20px; margin-top: 1px; }
.alert-error { color: var(--danger); background: var(--danger-soft); }
.alert-success { color: var(--success); background: var(--success-soft); }
.alert-warning { color: var(--warning); background: var(--warning-soft); }

.result-block {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfafd;
}
.result-label { margin-bottom: 8px; color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.copy-line { display: flex; align-items: stretch; gap: 8px; }
.copy-value {
  min-width: 0; flex: 1; padding: 12px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 13px; background: #fff;
  color: #4b4558; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis;
}
.copy-btn { min-width: 46px; padding: 0; }
.copy-status { min-height: 18px; margin: 7px 0 0; color: var(--success); font-size: .75rem; font-weight: 700; }

.invite-text { min-height: 205px !important; font-family: inherit; font-size: .88rem; }

.event-banner {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--primary), #8b5ef1);
  color: #fff;
}
.event-banner .eyebrow { margin-bottom: 12px; color: #fff; background: rgba(255,255,255,.16); }
.event-banner h1 { margin-bottom: 8px; font-size: clamp(1.7rem, 7vw, 2.5rem); letter-spacing: -.045em; }
.event-banner p { margin-bottom: 0; color: rgba(255,255,255,.82); line-height: 1.55; }

.success-state, .empty-state { padding: 14px 0 5px; text-align: center; }
.success-icon, .state-icon {
  width: 70px; height: 70px; margin: 0 auto 20px; display: grid; place-items: center;
  border-radius: 23px; color: var(--success); background: var(--success-soft);
}
.success-icon svg, .state-icon svg { width: 34px; height: 34px; }
.success-state h1, .empty-state h1 { margin-bottom: 10px; font-size: 2rem; letter-spacing: -.045em; }
.success-state p, .empty-state p { color: var(--muted); line-height: 1.6; }

.panel-header {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.panel-header h1 { margin-bottom: 6px; font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -.055em; }
.panel-header p { margin-bottom: 0; color: var(--muted); }

.status-pill {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: .74rem;
  font-weight: 850;
  text-transform: capitalize;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.stat-label { margin-bottom: 8px; color: var(--muted); font-size: .75rem; font-weight: 750; }
.stat-value { margin: 0; font-size: 1.55rem; font-weight: 900; letter-spacing: -.045em; }

.progress { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #ece8f2; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #9c78ff); }

.panel-actions {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.panel-actions form, .panel-actions button { width: 100%; }

.section-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-head h2 { margin: 0; font-size: 1.03rem; }
.count { color: var(--muted); font-size: .79rem; font-weight: 750; }

.participant-list { display: grid; gap: 9px; }
.participant {
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(100px, .7fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.avatar {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; color: var(--primary-dark); background: var(--primary-soft); font-weight: 900;
}
.participant-info { min-width: 0; }
.participant-name { margin: 0 0 3px; font-size: .9rem; font-weight: 850; }
.participant-email { margin: 0; overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.draw-result { text-align: right; }
.draw-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: .66rem; text-transform: uppercase; font-weight: 750; }
.draw-name { font-size: .8rem; font-weight: 800; }

.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; text-align: center; }
.footer { padding: 0 20px 28px; color: var(--muted); font-size: .74rem; text-align: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 14px; padding-top: 62px; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow, .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-copy .button-row { justify-content: center; }
  .hero-visual { min-height: 390px; }
  .float-one { right: 5%; }
  .float-two { left: 4%; }
}

@media (max-width: 620px) {
  .site-header { padding: 12px 16px 0; }
  .nav { min-height: 48px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand { font-size: 1.05rem; }
  .nav-link { min-height: 39px; padding: 0 12px; font-size: .79rem; }
  .page { padding: 24px 14px 40px; }
  .page-narrow { padding-top: 28px; }
  .hero { min-height: auto; padding-top: 55px; padding-bottom: 44px; }
  .display { font-size: clamp(2.75rem, 14vw, 4.1rem); }
  .lead { margin-bottom: 24px; font-size: 1rem; }
  .hero-copy .btn { width: 100%; }
  .steps { gap: 9px; margin-top: 28px; text-align: left; }
  .step { font-size: .7rem; }
  .step b { font-size: .75rem; }
  .hero-visual { min-height: 335px; }
  .orb { width: 310px; }
  .gift { transform: scale(.74); }
  .float-card { padding: 9px 11px; font-size: .7rem; }
  .float-card strong { width: 27px; height: 27px; }
  .float-one { top: 32px; }
  .float-two { bottom: 31px; }
  .card { padding: 21px 17px; border-radius: 23px; }
  .card-head { margin-bottom: 22px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-group.full { grid-column: auto; }
  .btn { min-height: 52px; }
  .copy-line { flex-wrap: wrap; }
  .copy-value { width: calc(100% - 54px); }
  .panel-header { display: block; }
  .panel-header .status-pill { display: inline-block; margin-top: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:first-child { grid-column: 1 / -1; }
  .panel-actions { grid-template-columns: 1fr; }
  .participant { grid-template-columns: 40px minmax(0, 1fr); }
  .draw-result { grid-column: 2; padding-top: 8px; border-top: 1px solid var(--line); text-align: left; }
}

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