/* ==================== REPLY CARD (RSVP) ==================== */
.rsvp-form {
  max-width: 350px; margin: 34px auto 0;
  display: flex; flex-direction: column; gap: 22px; text-align: left;
}
.field label { display: block; margin-bottom: 6px; font-size: 15px; color: var(--text-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 2px; border: none; border-bottom: 1px solid var(--ink-muted); border-radius: 0;
  background: transparent; color: var(--text);
  font-size: 17px; /* 16px+ stops iOS zooming into the field */
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.field ::placeholder { color: var(--ink-muted); opacity: 0.75; font-style: italic; }

.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: block; padding: 12px 6px; text-align: center; font-size: 15.5px; line-height: 1.3;
  background: var(--paper-pure); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 3px;
}
.radio-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--parchment); font-weight: 600; box-shadow: -3px 3px 0 var(--shadow); }
.radio-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==================== GUESTBOOK ==================== */
.wishes-heading { margin: 44px 0 0; font-style: italic; font-size: 17.5px; color: var(--text-soft); }
.wishes-list {
  max-width: 350px; margin: 14px auto 0; max-height: 300px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.wish-card { padding: 14px 16px; background: var(--paper-pure); border-left: 3px solid var(--ochre); }
.wish-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.wish-author { font-weight: 600; font-size: 17px; color: var(--ink); }
.wish-tag { font-style: italic; font-size: 13.5px; color: var(--sage); text-align: right; }
.wish-text { font-size: 15.5px; line-height: 1.65; color: var(--ink-mid); }

/* ==================== GIFT: TWO RED ENVELOPES ==================== */
.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 360px; margin: 0 auto; }
.gift-box {
  position: relative; overflow: hidden; padding: 46px 10px 18px;
  background: var(--vermilion); color: var(--parchment);
  font-size: 15px; line-height: 1.6;
  box-shadow: -6px 6px 0 var(--shadow);
}
/* Envelope flap */
.gift-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: var(--vermilion-deep);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.gift-box h3 { font-weight: 600; font-size: 18px; color: var(--gold); margin-bottom: 6px; }
.gift-account { display: block; margin: 2px 0; font-weight: 600; font-size: 17px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.gift-copy {
  margin-top: 12px; padding: 7px 14px; border: 1px solid var(--gold); border-radius: 3px;
  background: none; color: var(--gold); font-size: 14.5px; cursor: pointer;
}
.gift-copy:active { background: var(--gold); color: var(--vermilion-deep); }

/* ==================== FOOTER ==================== */
.heritage-footer { padding: 64px 26px 62px; }
.footer-cranes { display: block; width: 190px; height: auto; margin: 0 auto 6px; }
.footer-names { font-family: var(--font-script); font-size: 60px; line-height: 1; }
.footer-note { text-wrap: balance; max-width: 30ch; margin: 14px auto 28px; font-style: italic; font-size: 16px; line-height: 1.6; color: var(--text-soft); }
.heritage-footer .button-row { margin-top: 0; flex-direction: column; align-items: center; gap: 12px; }

/* ==================== LIGHTBOX, MODAL, TOAST ==================== */
.sheet-modal {
  position: fixed; inset: 0; z-index: 200; padding: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 8, 10, 0.86);
  opacity: 0; visibility: hidden;
}
.sheet-modal.is-open { opacity: 1; visibility: visible; }

.lightbox-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 94vw; }
.lightbox-img { max-width: 92vw; max-height: 82dvh; padding: 9px; background: var(--paper-pure); }
.lightbox-caption-bar { font-style: italic; font-size: 16.5px; text-align: center; color: var(--parchment); }
.lightbox-nav-btn {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 210;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(251, 243, 223, 0.5); background: rgba(46, 12, 14, 0.7); color: var(--parchment); cursor: pointer;
}
.lightbox-nav-btn.prev { left: 10px; }
.lightbox-nav-btn.next { right: 10px; }
.lightbox-nav-btn.close { top: 16px; right: 16px; transform: none; }
.lightbox-nav-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.modal-card {
  --text: var(--ink); --text-soft: var(--ink-mid); --accent: var(--vermilion); --line: rgba(169, 120, 31, 0.55);
  --btn-bg: var(--vermilion); --btn-text: var(--parchment); --shadow: rgba(0, 0, 0, 0.35);
  width: 100%; max-width: 370px; padding: 30px 24px; text-align: center;
  background: var(--parchment); color: var(--ink); box-shadow: -9px 9px 0 var(--shadow);
}
.modal-card h3 { font-weight: 600; font-size: 25px; color: var(--vermilion); margin-bottom: 10px; }
.modal-card p { font-size: 15.5px; line-height: 1.65; color: var(--ink-mid); margin-bottom: 18px; }
.modal-card input {
  width: 100%; margin-bottom: 22px; padding: 9px 4px; text-align: center;
  border: none; border-bottom: 1px solid var(--ink-muted); background: transparent; color: var(--ink);
  font-size: 17px; outline: none;
}
.modal-card input:focus { border-bottom: 2px solid var(--vermilion); }
.modal-card .button-row { margin-top: 0; align-items: center; }

.toast {
  position: fixed; top: 18px; left: 50%; z-index: 300; max-width: 92vw;
  transform: translateX(-50%) translateY(-16px);
  padding: 10px 18px; border-radius: 3px;
  background: var(--indigo-deep); color: var(--parchment); border: 1px solid var(--gold);
  font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
