/* Same look as the printed invitation card: violet on near black with pink accents. */
:root {
  --violet: #8250f6;
  --violet-light: #a07df7;
  --violet-deep: #5b34c9;
  --dark: #110a28;
  --raised: #1d1340;
  --line: #3b2b78;
  --ink: #ffffff;
  --muted: #cfc8ea;
  --pink: #ed77c1;
  --pink-light: #f59ad3;
  --sun: #f8d45d;
  --error: #ff9a9a;
  --display: 'Unbounded', 'Arial Black', 'Segoe UI', sans-serif;
  --body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--violet-deep);
  padding: 20px 14px 44px;
}
.wrap { max-width: 520px; margin: 0 auto; display: grid; gap: 18px; }
.card {
  min-width: 0;
  background: var(--dark);
  border-radius: 26px;
  padding: 28px 22px;
  box-shadow: 0 18px 40px rgba(17, 10, 40, .45);
}
.eyebrow {
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--pink);
  margin: 0 0 8px;
}
h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 10.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0;
  white-space: nowrap;
}
h2 { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.2; margin: 0 0 4px; }
a { color: var(--pink); font-weight: 700; }

/* The invitation ticket */
.ticket { position: relative; z-index: 0; padding: 0; overflow: hidden; }
.hero { position: relative; background: var(--violet); height: clamp(250px, 76vw, 340px); }
.girl {
  position: absolute; z-index: 2; left: 46%; bottom: -22px;
  height: 104%; width: auto; transform: translateX(-50%);
  filter: drop-shadow(0 6px 10px rgba(17, 10, 40, .25));
}
.five {
  position: absolute; z-index: 1; right: -4%;
  top: clamp(250px, 76vw, 340px);
  transform: translateY(-88%);
  font-family: var(--display); font-weight: 900;
  font-size: clamp(270px, 84vw, 380px); line-height: .8;
  color: var(--violet-light); pointer-events: none;
}
.st { position: absolute; z-index: 1; width: 34px; height: 34px; }
.s1 { left: 6%; top: 8%; width: 44px; height: 44px; transform: rotate(-14deg); }
.s2 { left: 17%; top: 33%; width: 24px; height: 24px; }
.s3 { left: 7%; top: 56%; transform: rotate(-10deg); }
.s4 { left: 8%; top: 78%; transform: rotate(8deg); }
.s5 { right: 6%; top: 8%; width: 38px; height: 38px; z-index: 2; transform: rotate(12deg); }
.s6 { right: 16%; top: 27%; width: 20px; height: 20px; z-index: 2; }
.tbody { position: relative; z-index: 3; padding: 34px 22px 24px; text-align: center; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 0; }
.count div { background: var(--violet); border-radius: 16px; padding: 12px 2px 9px; }
.count b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(20px, 6.4vw, 28px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.count span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tear { position: relative; margin: 22px -22px; border-top: 3px dashed var(--pink); opacity: .9; }
.tear::before, .tear::after {
  content: ''; position: absolute; top: -15px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--violet-deep);
}
.tear::before { left: -14px; }
.tear::after { right: -14px; }
.facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; text-align: left; }
.facts li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; }
.facts .ic { width: 44px; height: 44px; }
.facts b { display: block; font-size: 20px; line-height: 1.25; font-weight: 700; }
.facts small { display: block; font-size: 16px; color: var(--muted); }
.replyby { margin: 12px 0 0; font-weight: 700; color: var(--pink); }
.phones { margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.phones a { color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.phones a span { color: var(--pink); }

/* Forms and buttons */
form { display: grid; gap: 18px; margin-top: 14px; }
.field { display: grid; gap: 6px; }
label, legend { font-weight: 700; padding: 0; }
.hint { font-size: 14px; color: var(--muted); font-weight: 400; }
input[type=text], textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--raised);
}
input[type=text]:focus, textarea:focus { border-color: var(--violet-light); }
textarea { min-height: 84px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label {
  display: block; text-align: center; cursor: pointer;
  padding: 14px 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--raised);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { background: var(--violet); border-color: var(--violet); }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; border: 2px solid var(--violet); border-radius: 16px; overflow: hidden; background: var(--raised); }
.stepper button {
  height: 48px; border: 0; background: var(--violet); font: inherit; font-size: 24px; font-weight: 700;
  color: #fff; cursor: pointer;
}
.stepper output { text-align: center; font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.btn {
  font-family: var(--display); font-weight: 800; font-size: 18px;
  border: 0; border-radius: 18px; padding: 17px 20px; cursor: pointer;
  background: var(--pink); color: var(--dark); width: 100%;
}
.btn:hover { background: var(--pink-light); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.quiet { background: var(--raised); color: var(--ink); font-size: 15px; font-weight: 600; border: 2px solid var(--line); }
.btn.quiet:hover { border-color: var(--violet-light); }
.btn.danger { background: #e5484d; color: #fff; }
.btn.danger:hover { background: #c93a3f; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.choice label:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.error { color: var(--error); font-weight: 700; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { text-align: center; display: grid; gap: 12px; }
.thanks .wave { width: 150px; height: auto; margin: -4px auto 0; }
.foot { text-align: center; font-size: 14px; margin: 0; }
.wa { display: inline-block; background: #25d366; color: #0b3d22; padding: 10px 18px; border-radius: 99px; text-decoration: none; font-weight: 700; }

/* Step-by-step reply */
.progress { height: 10px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.progress div { height: 100%; width: 0; border-radius: 99px; background: var(--pink); transition: width .25s ease; }
.stepno { margin: 10px 0 18px; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
.step { display: grid; gap: 12px; }
.step h2 { font-size: clamp(22px, 6.6vw, 27px); text-wrap: balance; outline: none; }
.step h2 label { font-weight: inherit; }
.step .hint { margin: 0; font-size: 16px; }
.step input[type=text] { font-size: 22px; padding: 16px; }
.step textarea { min-height: 130px; font-size: 19px; }
.bigchoice { display: grid; gap: 12px; }
.pick { font: inherit; color: var(--ink); text-align: left; cursor: pointer; padding: 20px; border: 2px solid var(--line); border-radius: 20px; background: var(--raised); }
.pick b { display: block; font-size: 21px; font-weight: 700; }
.pick:hover { border-color: var(--violet-light); }
.pick.on { background: var(--violet); border-color: var(--violet); }
.stepper.big { grid-template-columns: 84px 1fr 84px; border-radius: 24px; margin-top: 6px; }
.stepper.big button { height: 96px; font-size: 44px; }
.stepper.big button:active { background: var(--violet-deep); }
.stepper.big output { font-size: 58px; line-height: 1; }
.totalline { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--sun); color: var(--dark); font-weight: 700; text-align: center; }
.nav { display: grid; gap: 10px; margin-top: 22px; }
#wizard .error { margin-top: 14px; }
.details { margin: 0; display: grid; gap: 12px; }
.details div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; }
.details dt { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); }
.details dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }

/* Host page */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.total { background: var(--raised); border-radius: 18px; padding: 14px 8px; text-align: center; }
.total.main { background: var(--violet); }
.total b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.total span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); }
td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 99px; font-weight: 700; font-size: 13px; }
.pill.yes { background: #d5f7ec; color: #0b6b50; }
.pill.no { background: #fde0e6; color: #9b1c3c; }
.acts { display: flex; gap: 6px; margin-top: 6px; }
.mini-btn { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border: 0; border-radius: 99px; padding: 5px 12px; background: var(--line); color: var(--ink); }
.mini-btn:hover { background: var(--violet); }
.mini-btn.del { background: #fde0e6; color: #9b1c3c; }
.mini-btn.del:hover { background: #f9c5d0; }
.sheet { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; border: 2px solid var(--line); border-radius: 26px; padding: 26px 22px; background: var(--dark); color: var(--ink); box-shadow: 0 18px 40px rgba(17, 10, 40, .5); }
.sheet::backdrop { background: rgba(17, 10, 40, .7); }
.sheet form { margin: 0; gap: 14px; }
.sheet p { margin: 0; }
.sheet .lbl { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .card { animation: pop .5s ease-out both; }
  @keyframes pop { from { transform: translateY(10px) scale(.98); } to { transform: none; } }
}
