@font-face { font-family: 'Great Vibes'; src: url('/fonts/greatvibes.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #262626;
  --panel: #2f2f2f;
  --panel-2: #383838;
  --line: #4a4536;
  --cream: #f6efd2;
  --muted: #bdb59a;
  --gold: #d6b04c;
  --gold-hi: #f3dd8e;
  --gold-lo: #a9822c;
  --gold-grad: linear-gradient(135deg, #a9822c 0%, #f3dd8e 45%, #c99a33 70%, #f3dd8e 100%);
  --red: #e07a6e;
  --ok: #9fd29a;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 16px/1.55 'Montserrat', system-ui, sans-serif;
  min-height: 100vh;
}
a { color: var(--gold-hi); }

.frame {
  max-width: 720px;
  margin: 24px auto;
  padding: 0 16px;
}
.card {
  position: relative;
  background: var(--panel);
  border-radius: 4px;
  padding: 36px 28px 40px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 7px #c9a240, 0 24px 60px rgba(0,0,0,.45);
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border: 2px solid transparent;
  border-image: var(--gold-grad) 1;
  pointer-events: none;
}

.garland { display: block; width: 100%; height: auto; margin: -20px 0 4px; }

.kicker {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 6px;
}
h1.script {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(54px, 13vw, 92px);
  line-height: 1.05;
  text-align: center;
  margin: 8px 0 0;
  color: var(--cream);
}
.date {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(32px, 8vw, 46px);
  text-align: center;
  margin: 0 0 18px;
}
.facts { text-align: center; color: var(--cream); margin: 0 0 8px; }
.facts strong { font-weight: 600; }
.pill {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #3a2e12;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
}
.deadline { text-align: center; color: var(--muted); font-size: 14px; margin: 6px 0 0; }

hr.gold { border: 0; height: 1px; background: var(--gold-grad); opacity: .6; margin: 30px 0; }

form { display: grid; gap: 22px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend, label.lbl {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gold-hi);
  font-size: 15px;
}
.hint { color: var(--muted); font-size: 13.5px; margin: -2px 0 10px; }

input[type=text], select, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
textarea { min-height: 76px; resize: vertical; }
input[type=text]:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }

.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choices.big { grid-template-columns: 1fr 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
.choices.big .choice span { min-height: 64px; font-size: 17px; font-weight: 600; }
.choice input:checked + span { border-color: var(--gold); background: #4a3f22; color: #fff6d8; box-shadow: inset 0 0 0 1px var(--gold); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--gold-lo); border-radius: 10px; background: #3a3424; font-size: 14px; cursor: pointer; }
.consent input { width: 20px; height: 20px; accent-color: var(--gold); flex: none; margin-top: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px;
  padding: 14px 26px;
  background: var(--gold-grad);
  color: #2e240c;
  font: 600 16px 'Montserrat', sans-serif;
  cursor: pointer;
  min-height: 50px;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--gold-hi); border: 1px solid var(--gold-lo); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #7a4740; }
.btn.small { padding: 8px 14px; min-height: 36px; font-size: 14px; }

.msg { border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.msg.err { background: #4a2a26; color: #ffd9d3; border: 1px solid #7a4740; }
.msg.ok { background: #2c3a28; color: #dff3d9; border: 1px solid #4c6b45; }
.hidden { display: none !important; }

.done { text-align: center; }
.done h2 { font-family: 'Great Vibes', cursive; font-weight: 400; font-size: 52px; margin: 0 0 4px; }
.summary { text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.summary dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.summary dt:first-child { margin-top: 0; }
.summary dd { margin: 0; }

footer { text-align: center; color: var(--muted); font-size: 12.5px; margin: 22px 0 36px; }

@media (max-width: 480px) {
  .card { padding: 28px 18px 32px; }
  .kicker { font-size: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .twinkle { animation: tw 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
  .twinkle.d2 { animation-delay: 1.1s; }
  .twinkle.d3 { animation-delay: 2.2s; }
  @keyframes tw { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
}
