:root {
  --lux-cream: #fef5f0;
  --lux-ivory: #fffaf7;
  --lux-charcoal: #3e3d45;
  --lux-charcoal-soft: #5c5a63;
  --lux-blush: #df84b8;
  --lux-blush-deep: #cf7bab;
  --lux-blush-light: #fce8f2;
  --lux-gold: #c9a96e;
  --lux-border: rgba(62, 61, 69, 0.12);
  --lux-shadow: 0 12px 40px rgba(62, 61, 69, 0.1);
  --lux-radius: 14px;
}

* { box-sizing: border-box; }

html[dir="rtl"] body,
html[dir="rtl"] .panel,
html[dir="rtl"] .status-group label,
html[dir="rtl"] .option-row,
html[dir="rtl"] .guest-heading,
html[dir="rtl"] .q-toggle,
html[dir="rtl"] .greeting,
html[dir="rtl"] #event-title,
html[dir="rtl"] .meta {
  text-align: right;
}

html[dir="rtl"] .status-group label,
html[dir="rtl"] .option-row,
html[dir="rtl"] .checkbox {
  direction: rtl;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(223, 132, 184, 0.14) 0%, transparent 50%),
    linear-gradient(165deg, #f5e6dc 0%, var(--lux-cream) 40%, #ede0d4 100%);
  color: var(--lux-charcoal);
  line-height: 1.55;
}

.panel {
  max-width: 480px;
  margin: 28px auto;
  padding: 28px 24px 32px;
  background: var(--lux-ivory);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: 20px;
  box-shadow: var(--lux-shadow);
  position: relative;
}

.panel::before {
  content: '';
  display: block;
  height: 3px;
  margin: -28px -24px 22px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--lux-gold), var(--lux-blush), var(--lux-gold));
}

.hidden { display: none !important; }

.cover-wrap {
  position: relative;
  margin-bottom: 20px;
  border-radius: var(--lux-radius);
  overflow: hidden;
  border: 1px solid var(--lux-border);
  background: linear-gradient(145deg, #f3ebe4, #ebe3dc);
}

.cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--lux-radius);
  margin-bottom: 0;
  object-fit: contain;
  background: transparent;
  border: none;
}

.cover-sparkles {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.sparkle-pop {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 10px rgba(255, 248, 220, 0.9);
  animation: sparkle-pop ease-out forwards;
  transform: translate(-50%, -50%);
}

.sparkle-pop::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--arm, 14px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  transform: translate(-50%, -50%);
}

.sparkle-pop::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: var(--arm, 14px);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  transform: translate(-50%, -50%);
}

@keyframes sparkle-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15) rotate(0deg); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(40deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(80deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle-pop { animation: none; opacity: 0; }
}

#event-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0 0 12px;
  color: var(--lux-charcoal);
  line-height: 1.2;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 169, 110, 0.4);
}

.meta {
  color: var(--lux-charcoal-soft);
  font-size: 0.92rem;
  text-align: center;
  letter-spacing: 0.03em;
}

.meta.host {
  font-weight: 600;
  font-size: 1rem;
  margin-top: -2px;
  color: var(--lux-blush-deep);
}

.event-notes {
  margin: 16px 0 6px;
  padding: 14px 16px;
  background: var(--lux-blush-light);
  border: 1px solid rgba(223, 132, 184, 0.25);
  border-radius: var(--lux-radius);
  font-size: 0.92rem;
  color: var(--lux-charcoal-soft);
  white-space: pre-wrap;
}

.event-directions {
  margin: 16px 0 6px;
  text-align: center;
  padding: 12px;
  border-top: 1px solid var(--lux-border);
  border-bottom: 1px solid var(--lux-border);
}

.directions-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--lux-charcoal);
}

.direction-link {
  display: inline-block;
  margin: 6px 10px;
  color: var(--lux-blush-deep);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(207, 123, 171, 0.35);
}

.direction-link:hover {
  color: var(--lux-charcoal);
}

.greeting {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  margin: 22px 0 18px;
  text-align: center;
  font-weight: 600;
  color: var(--lux-charcoal);
  line-height: 1.35;
}

.status-group {
  border: none;
  margin: 0;
  padding: 0;
}

.status-group legend {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--lux-charcoal-soft);
  margin-bottom: 8px;
  padding: 0;
}

.status-group label {
  display: block;
  padding: 13px 14px;
  margin: 9px 0;
  border: 1px solid var(--lux-border);
  border-radius: var(--lux-radius);
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.status-group label:hover {
  border-color: rgba(223, 132, 184, 0.45);
  background: #fffdfd;
}

.status-group label:has(input:checked) {
  border-color: var(--lux-blush);
  background: var(--lux-blush-light);
}

.status-group input { margin-right: 10px; accent-color: var(--lux-blush-deep); }

.details label {
  display: block;
  margin: 14px 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lux-charcoal-soft);
  letter-spacing: 0.02em;
}

.details input[type="number"],
.details textarea {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--lux-border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--lux-charcoal);
}

.details input[type="number"]:focus,
.details textarea:focus {
  outline: none;
  border-color: rgba(223, 132, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(223, 132, 184, 0.12);
}

.checkbox { display: flex !important; align-items: center; gap: 8px; }

.guest-forms { margin-top: 10px; }

.guest-block {
  margin: 18px 0;
  padding-top: 12px;
  border-top: 1px solid var(--lux-border);
}

.guest-heading {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lux-charcoal);
}

.question-picker { margin-bottom: 10px; }

.q-toggle {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border: 1px solid var(--lux-border);
  border-radius: var(--lux-radius);
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--lux-charcoal);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.q-toggle:hover {
  border-color: rgba(223, 132, 184, 0.4);
}

.q-toggle.answered {
  border-color: var(--lux-blush);
  background: var(--lux-blush-light);
  font-weight: 600;
}

.q-panel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--lux-border);
  border-radius: var(--lux-radius);
  background: #fff;
}

.option-row {
  display: block;
  padding: 9px 11px;
  margin: 7px 0;
  border: 1px solid rgba(62, 61, 69, 0.08);
  border-radius: 10px;
  cursor: pointer;
  background: #fffdfb;
}

.option-row:hover {
  border-color: rgba(223, 132, 184, 0.35);
}

.option-row input {
  margin-right: 8px;
  accent-color: var(--lux-blush-deep);
}

.other-text input {
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--lux-border);
  border-radius: 10px;
  font: inherit;
}

.q-panel textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--lux-border);
  border-radius: 10px;
  font: inherit;
}

#submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #fff;
  background: linear-gradient(90deg, #ffb0dd 0%, #f19ccc 50%, #df84b8 100%);
  border: none;
  border-radius: var(--lux-radius);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(223, 132, 184, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(90deg, #ffc2e5 0%, #f5aad6 50%, #e896c4 100%);
  box-shadow: 0 6px 18px rgba(223, 132, 184, 0.45);
}

#submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.success {
  color: var(--lux-blush-deep);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
}

.preview-banner {
  background: #fff8ee;
  border: 1px solid rgba(201, 169, 110, 0.45);
  border-radius: var(--lux-radius);
  padding: 11px 14px;
  font-size: 0.88rem;
  color: #7a6540;
  margin-bottom: 14px;
  text-align: center;
}

#loading {
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: var(--lux-charcoal-soft);
}

#error h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  text-align: center;
}
