:root {
  --pink: #f5578c;
  --pink-dark: #d93f72;
  --ink: #14243a;
  --muted: #647083;
  --paper: rgba(255,255,255,.96);
  --line: rgba(20,36,58,.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #0e1e2c; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(245,87,140,.24), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(43,195,211,.24), transparent 26rem),
    #0e1e2c;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
}

.invite-card {
  overflow: hidden;
  background: #f9fbfd;
  min-height: 100vh;
  box-shadow: 0 28px 90px rgba(0,0,0,.35);
}
.invite-art {
  display: block;
  width: 100%;
  height: auto;
  background: #e8eef3;
}
.action-panel {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: -1px;
  padding: 16px max(16px, env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(20,36,58,.08);
}
.personal-greeting {
  margin: 0 0 10px;
  text-align: center;
  font-weight: 750;
  color: var(--ink);
}
.primary-action, .submit-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 22px;
  background: linear-gradient(135deg, #f5578c, #ef6e9c);
  color: white;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 28px rgba(245,87,140,.32);
  cursor: pointer;
}
.primary-action:active, .submit-button:active { transform: translateY(1px); }
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.quick-action {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}

.rsvp-dialog, .success-dialog {
  width: min(92vw, 520px);
  max-height: 90vh;
  border: 0;
  border-radius: 26px;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}
.rsvp-dialog::backdrop, .success-dialog::backdrop {
  background: rgba(4,15,24,.72);
  backdrop-filter: blur(8px);
}
.rsvp-form { position: relative; padding: 28px 22px 24px; }
.close-button {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.form-heading { padding-right: 38px; margin-bottom: 20px; }
.eyebrow {
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
}
h1, h2 { margin: 6px 0 8px; letter-spacing: -.03em; }
.form-heading h1 { font-size: clamp(26px, 7vw, 38px); }
.form-heading p, .success-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 7px; margin: 14px 0; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,87,140,.12); }
textarea { resize: vertical; }
.attendance-fieldset { border: 0; padding: 0; margin: 16px 0 8px; }
.attendance-fieldset legend { font-weight: 800; margin-bottom: 8px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  padding: 13px 12px;
  font-weight: 750;
  cursor: pointer;
}
.choice-card:has(input:checked) { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(245,87,140,.10); }
.choice-card input { width: auto; margin-right: 5px; }
.form-error { color: #9b1c31; background: #fff1f3; border-radius: 12px; padding: 10px 12px; }
.submit-button[disabled] { opacity: .62; cursor: wait; }
.success-card { padding: 30px 24px 24px; text-align: center; }
.success-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eaf9f0;
  color: #198754;
  font-size: 34px;
  font-weight: 900;
}
.success-card .submit-button { margin-top: 22px; }

@media (min-width: 760px) {
  .page-shell { padding-top: 28px; padding-bottom: 28px; }
  .invite-card { min-height: auto; border-radius: 28px; }
  .action-panel { position: static; }
}

/* La ventana muestra el arte hasta los datos del evento; excluye los controles dibujados. */
[hidden] { display: none !important; }
.invite-art-window { aspect-ratio: 1024 / 1238; overflow: hidden; }
.invite-art { height: auto; }
.action-panel { position: static; padding: 20px 24px 26px; background: #fff8f8; border: 0; }
.primary-action { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 56px; box-shadow: none; background: #d92e70; font-size: 16px; }
.primary-action span { font-size: 24px; font-weight: 500; }
.quick-actions { display: flex; gap: 8px; margin-top: 18px; }
.quick-action { flex: 1; min-width: 0; min-height: 82px; align-content: center; gap: 8px; background: transparent; border: 0; border-radius: 12px; color: #663c50; font-weight: 650; }
.quick-action svg { width: 25px; height: 25px; }
.quick-action:hover { background: #fbe7ee; }
button:focus-visible, a:focus-visible { outline: 3px solid #0a6b79; outline-offset: 3px; }
.action-status { margin: 12px 0 0; text-align: center; color: #663c50; font-size: 13px; }
@media (max-width: 420px) { .action-panel { padding: 16px 12px 22px; } .quick-action { font-size: 11px; padding: 8px 2px; } }

.personal-greeting { margin:0; padding:18px 24px; background:#fff8f8; color:#783851; font-size:16px; line-height:1.5; }

.primary-action:disabled { background:#e8d6de; color:#693d50; cursor:default; }
