:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #111217; background: #f1f3f7; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; padding: 16px 12px; display: grid; place-items: center; }
.invitation { width: min(100%, 420px, max(300px, calc((100svh - 440px) * 1.35))); background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 48px #071b4a13; }
.artwork { background: #06173d; line-height: 0; }
.artwork img { display: block; width: 100%; height: auto; }
.rsvp { padding: 20px 20px 16px; }
.intro { text-align: center; margin-bottom: 20px; }
h1 { margin: 0 0 8px; font-size: clamp(24px, 3.2vw, 30px); line-height: 1.12; letter-spacing: -1px; font-weight: 750; }
.intro p { margin: 0; color: #30323b; font-size: 14px; line-height: 1.4; }
.rsvp-form { display: grid; gap: 13px; }
.field label, legend { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; height: 42px; border: 1px solid #a1a4af; border-radius: 8px; background: #f8f8fa; padding: 0 12px; font: inherit; font-size: 16px; color: #14151d; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #797d89; opacity: 1; }
.field input:focus { outline: none; border-color: #083aff; box-shadow: 0 0 0 3px #0638eb1c; }
.field input[aria-invalid=true] { border-color: #c62c28; background: #fff8f7; box-shadow: 0 0 0 1px #c62c28; }
fieldset { padding: 0; margin: 0 0 3px; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.guest-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.guest-option { position: relative; cursor: pointer; }
.guest-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.guest-option span { display: flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid #a1a4af; border-radius: 8px; font-size: 16px; font-weight: 700; }
.guest-option input:checked + span { border-color: #0737ff; background: #d9e4ff; color: #0635e0; box-shadow: inset 0 0 0 1px #0737ff; }
fieldset[aria-invalid=true] .guest-option span { border-color: #c62c28; background: #fff8f7; }
.guest-option input:focus-visible + span { outline: 3px solid #081a54; outline-offset: 3px; }
button { width: 100%; border: 0; border-radius: 9px; min-height: 46px; background: #0735d9; color: #fff; font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; transition: background .15s; }
button:hover { background: #0029b9; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible { outline: 3px solid #071a54; outline-offset: 4px; }
.privacy-note { margin: -2px 0 0; text-align: center; font-size: 11px; line-height: 1.4; color: #41444d; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notice { padding: 10px 12px; background: #fff2ef; border: 1px solid #f4b5aa; border-radius: 8px; color: #882118; font-size: 13px; line-height: 1.4; margin-bottom: 14px; }
.notice-success { color: #14613b; background: #effaf3; border-color: #a9d8b9; }
.notice:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.field-error { color: #b42318; line-height: 1.4; font-size: 12px; margin: 6px 0 0; }
@media (max-height: 850px) {
    body { padding: 8px 12px; }
    .invitation { width: min(100%, 360px, max(280px, calc((100svh - 455px) * 1.35))); }
    .rsvp { padding: 15px 17px 13px; }
    .intro { margin-bottom: 14px; }
    h1 { font-size: 25px; margin-bottom: 6px; }
    .intro p { font-size: 12px; }
    .rsvp-form { gap: 10px; }
    .field label, legend { font-size: 12px; margin-bottom: 5px; }
    .field input { height: 38px; }
    .guest-option span { min-height: 38px; font-size: 15px; }
    button { min-height: 42px; font-size: 18px; }
    .privacy-note { font-size: 10px; }
}
@media (max-height: 650px) {
    body { padding: 4px 12px; }
    .invitation { width: min(100%, 300px, max(260px, calc((100svh - 390px) * 1.35))); }
    .rsvp { padding: 10px 15px; }
    .intro { margin-bottom: 10px; }
    h1 { font-size: 22px; }
    .rsvp-form { gap: 5px; }
    .field label, legend { font-size: 11px; }
    .field input { height: 32px; }
    .guest-option span { min-height: 32px; }
    button { min-height: 36px; }
}
.success-panel { text-align: center; padding: 6px 0 2px; }
.success-panel:focus { outline: none; }
.success-panel h1 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 20px; letter-spacing: -1.2px; }
.success-copy { font-size: 16px; line-height: 1.5; margin: 0 0 25px; color: #24252b; }
.success-copy strong { font-weight: 750; }
.event-card { border-radius: 14px; background: linear-gradient(120deg, #edf1f8, #dfe7f5); padding: 20px 16px 17px; margin-bottom: 28px; }
.event-date { font-size: 20px; line-height: 1.3; font-weight: 750; margin: 0 0 7px; letter-spacing: -.5px; }
.event-venue { font-size: 16px; line-height: 1.4; margin: 0; }
.event-guests { border-top: 1px solid #bac5d8; padding-top: 15px; margin: 18px 8px 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.success-button { display: flex; align-items: center; justify-content: center; border: 1.5px solid #0735d9; min-height: 46px; border-radius: 10px; padding: 8px 4px; font-size: 15px; font-weight: 700; text-decoration: none; }
.calendar-button { color: #fff; background: #0735d9; }
.calendar-button:hover { background: #0029b9; }
.calendar-picker { position: relative; min-width: 0; }
.calendar-picker summary { cursor: pointer; list-style: none; height: 100%; }
.calendar-picker summary::-webkit-details-marker { display: none; }
.calendar-options { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 2; width: 220px; max-width: calc(100vw - 64px); padding: 5px; border: 1px solid #dce2ef; border-radius: 11px; background: #fff; box-shadow: 0 8px 32px #071b4a25; text-align: left; }
.calendar-options a { display: block; padding: 11px 12px; border-radius: 7px; color: #172136; font-size: 13px; font-weight: 700; line-height: 1.4; text-decoration: none; }
.calendar-options a:hover, .calendar-options a:focus-visible { background: #edf2ff; outline: none; color: #0735d9; }
.calendar-options a span { display: block; color: #737d90; font-size: 10px; font-weight: 400; margin-top: 3px; }
.directions-button { color: #0735d9; background: #fff; }
.directions-button:hover { background: #f0f4ff; }
.success-button:focus-visible { outline: 3px solid #071a54; outline-offset: 3px; }
.unavailable { opacity: .5; cursor: default; }
.success-signoff { color: #959595; font-size: 12px; font-weight: 700; letter-spacing: 5px; margin: 26px 0 6px; }
@media (max-height: 850px) {
    .success-panel h1 { font-size: 28px; margin-bottom: 17px; }
    .success-copy { font-size: 14px; margin-bottom: 20px; }
    .event-card { padding: 17px 12px 15px; margin-bottom: 23px; }
    .event-date { font-size: 17px; }
    .event-venue { font-size: 14px; }
    .event-guests { font-size: 15px; padding-top: 13px; margin-top: 14px; }
    .success-button { min-height: 42px; font-size: 13px; }
    .success-signoff { margin-top: 22px; font-size: 10px; }
}
@media (max-height: 650px) {
    .success-panel h1 { font-size: 24px; margin-bottom: 12px; }
    .success-copy { font-size: 12px; margin-bottom: 15px; }
    .event-card { padding: 13px 8px; margin-bottom: 17px; }
    .event-date { font-size: 15px; }
    .event-venue { font-size: 12px; }
    .event-guests { font-size: 14px; padding-top: 10px; margin-top: 12px; }
    .success-button { min-height: 38px; font-size: 12px; }
    .success-signoff { margin-top: 16px; }
}
