/* Native top-layer dialog stays above the invitation, hearts and fixed controls. */
html.gift-dialog-open, html.gift-dialog-open body { overflow: hidden !important; }
#wedding-gift-dialog {
    box-sizing: border-box; width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px); margin: auto; padding: 32px 24px 24px;
    border: 1px solid #e4cfc1; border-radius: 24px;
    background: #fffaf7; color: #775b4a; box-shadow: 0 16px 64px #513a4933;
    font-family: 'Open Sans', sans-serif; font-size: 16px; line-height: 1.6;
    overflow: auto; overscroll-behavior: contain; text-align: center;
}
#wedding-gift-dialog::backdrop { background: rgba(58,40,36,.56); }
#wedding-gift-dialog * { box-sizing: border-box; }
#wedding-gift-dialog h2 { font-family: VVRNLUFuZHJvZluZSdGY, sans-serif; font-weight: 400; font-size: 28px; margin: 8px 24px 12px; color: #ac7134; }
#wedding-gift-dialog p { margin: 10px 0; }
#wedding-gift-dialog button { font: inherit; cursor: pointer; min-height: 44px; }
#wedding-gift-dialog .gift-close { position: absolute; top: 8px; right: 8px; width: 44px; border: 0; border-radius: 50%; background: transparent; color: #775b4a; font-size: 28px; }
.gift-tabs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; padding: 5px; margin: 22px 0; border-radius: 14px; background: #f1e4de; }
#wedding-gift-dialog [role=tab] { border: 0; border-radius: 10px; background: transparent; color: #775b4a; font-weight: 600; }
#wedding-gift-dialog [role=tab][aria-selected=true] { background: #ac7134; color: white; }
#wedding-gift-dialog #gift-tab-groom[aria-selected=true] { background: #bd4238; }
#wedding-gift-dialog button:focus-visible, #GROUP166:focus-visible { outline: 3px solid #b17b42; outline-offset: 3px; }
.gift-person { font-size: 20px; font-weight: 600; }
.gift-pending { padding: 28px 16px; border: 1px dashed #ddc7ba; border-radius: 16px; background: #fff; color: #8a776c; }
.gift-note { font-size: 14px; color: #8a776c; }
#GROUP166 { cursor: pointer; }
#wedding-gift-dialog .gift-qr { display: block; width: min(100%, 280px); max-height: 320px; object-fit: contain; margin: 12px auto; background: white; border-radius: 8px; }
#wedding-gift-dialog .gift-qr[hidden] { display: none; }
.gift-download { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: #94602d; text-underline-offset: 4px; }
.gift-details { text-align: left; margin: 16px 0; padding: 16px; border-radius: 12px; background: #f5ebe5; }
.gift-details dt { font-size: 13px; color: #8a776c; }
.gift-details dd { margin: 0 0 10px; font-weight: 600; overflow-wrap: anywhere; user-select: text !important; -webkit-user-select: text !important; }
.gift-details dd:last-child { margin-bottom: 0; }
/* Keep faces inside the original story frames when using the portrait photo. */
#SECTION28 #IMAGE161 .ladi-image-background, #SECTION28 #IMAGE162 .ladi-image-background { background-position: center top !important; }
