/* Referral A: the approved green-and-cream artwork, rendered as live UI. */
dialog.event-popup-shell{--ref-ink:#063d29;--ref-cream:#fffdf7;position:fixed;inset:0;margin:auto;width:min(460px,calc(100vw - 24px));max-width:460px;max-height:calc(100dvh - 24px);border:1px solid #fff9;border-radius:24px;background:var(--ref-cream);color:var(--ref-ink);overflow:hidden;box-shadow:0 24px 90px #13302540}
/* Scale the complete A layout equally on both axes, keeping it centered. */
dialog.event-popup-shell[open]{display:flex;flex-direction:column;transform:scale(.8);transform-origin:center}
dialog.event-popup-shell::backdrop{background:#23352b55;backdrop-filter:blur(4px)}
.event-popup-shell .modal-head{position:absolute;inset:10px 10px auto auto;min-height:0;padding:0;border:0;background:transparent;z-index:3}
.event-popup-shell .modal-head h2{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.event-popup-shell .modal-head .round-btn{width:40px;min-width:40px;height:40px;background:transparent;border-radius:50%;color:#59615b}
.event-popup-shell .modal-head .round-btn svg{width:26px;height:26px}
.event-popup-shell .modal-body{min-height:0;padding:26px 26px 8px;overflow-y:auto;overscroll-behavior:contain;text-align:center;scrollbar-width:thin}
.event-popup-shell .modal-foot{position:static;flex:none;display:block;padding:0 22px 9px;background:var(--ref-cream);border:0}
.ref-brand{display:flex;align-items:center;gap:5px;position:relative;z-index:1;font-size:24px;line-height:1.2;letter-spacing:-1.2px;font-weight:850;text-align:left;padding-right:40px}
.ref-brand svg{width:26px;height:30px;flex:none}
.ref-hero{position:relative;text-align:left;padding-top:24px;margin-bottom:21px;isolation:isolate}
.ref-gift{position:absolute;z-index:-1;pointer-events:none;right:-10px;top:-18px;width:53%;height:auto;object-fit:contain}
.ref-eyebrow{display:inline-flex;align-items:center;min-height:32px;background:#e6f2db;border-radius:999px;padding:5px 16px;font-size:16px;line-height:1.4;font-weight:750;letter-spacing:-.5px;color:var(--ref-ink)}
.ref-title{display:flex;flex-direction:column;gap:5px;position:relative;margin:24px 0 0!important;font-weight:900;letter-spacing:-1.8px;color:var(--ref-ink)}
.ref-title>span{font-size:36px;line-height:1.25;white-space:nowrap}
.ref-title>strong{position:relative;isolation:isolate;display:block;font-size:67px;line-height:1.15;font-weight:950;letter-spacing:-3px;white-space:nowrap}
.ref-title>strong::after{content:"";position:absolute;z-index:-1;left:3%;right:1%;bottom:-7px;height:15px;border-top:9px solid #c6e5b3;border-radius:50% 50% 0 0;transform:rotate(-2deg)}
.ref-intro{font-size:17px!important;line-height:1.55!important;margin:0 0 17px!important;letter-spacing:-.5px;color:#234b35}
.ref-intro strong{font-weight:800;color:var(--ref-ink)}
.ref-rewards{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:0 0 14px}
.ref-rewards>div{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;padding:13px 7px;border-radius:18px;background:#eef5e2}
.ref-person{flex:none;width:31px;height:46px}
.ref-rewards span{font-size:16px;line-height:1.4;letter-spacing:-.5px;text-align:left;font-weight:700;white-space:nowrap}
.ref-rewards strong{display:block;font-size:29px;line-height:1.1;letter-spacing:-1px;font-weight:850;color:var(--ref-ink)}
.ref-code{display:flex;align-items:center;gap:10px;min-height:52px;border:1.5px dashed #87b56c;border-radius:13px;padding:8px 14px;background:#fffef9}
.ref-code>span{font-size:15px;white-space:nowrap;color:#294533}
.ref-code>strong{font-size:25px;letter-spacing:1px;margin:auto;font-weight:850;line-height:1.2}
.ref-code>strong.ref-code-guest{font-size:16px;letter-spacing:-.5px;margin-left:auto;margin-right:0}
.ref-code button{flex:none;min-width:48px;min-height:32px;border:1px solid #b3beb0;background:transparent;color:#274732;font-size:14px;line-height:1.2;font-weight:700;padding:5px 10px;border-radius:999px}
.ref-share-hint{font-size:13px!important;line-height:1.5!important;color:#6f756d;margin:12px 0 7px!important;letter-spacing:-.3px}
.ref-share{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:57px;padding:12px 9px;border:0;border-radius:17px;background:#ffe522;color:#2a2114;font-size:21px;font-weight:850;letter-spacing:-.6px;line-height:1.3;box-shadow:inset 0 1px 0 #fff8}
.ref-share:hover{background:#ffdf05}.ref-talk{width:29px;height:29px;flex:none}
.ref-chat-link{display:flex;flex-direction:column;align-items:center;gap:1px;margin:13px 0 9px;text-decoration:none;line-height:1.5;color:var(--ref-ink)}
.ref-chat-tools{display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;color:#757a71}
.ref-chat-tools button,.ref-chat-tools a{border:0;background:transparent;color:#56734c;font:inherit;font-size:11px;padding:4px;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.ref-chat-link>a{color:inherit;text-decoration:none}
.ref-chat-link>a>strong{font-size:17px;letter-spacing:-.5px;font-weight:800}
.ref-chat-link b{font-size:26px;line-height:0;margin-left:8px;vertical-align:-1px;font-weight:400}
.ref-activity{display:flex;align-items:center;justify-content:center;gap:12px;color:#72806c;font-size:11px;line-height:1.5;margin:5px 0}
.ref-activity button{border:0;border-left:1px solid #d9dfd2;padding:3px 0 3px 12px;background:transparent;font-size:11px;text-decoration:underline;text-underline-offset:3px;color:#56734c}
.ref-terms{font-size:10px;line-height:1.6;color:#7a8174;margin:5px 0 0}
.ref-terms summary{cursor:pointer;list-style:none;min-height:20px}.ref-terms summary::-webkit-details-marker{display:none}.ref-terms summary::after{content:"⌄";margin-left:5px}.ref-terms[open] summary::after{content:"⌃"}
.ref-terms p{font-size:11px!important;line-height:1.65!important;margin:6px 0 0!important;word-break:keep-all}
.ref-message{font-size:12px!important;line-height:1.5!important;color:#965b24!important;margin:5px 0 0!important}.ref-message:empty{display:none}
.ref-page-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;font-size:12px;line-height:1.4;color:#7a8077;min-height:20px;padding:0 0 5px}
.ref-page-controls>button{display:grid;place-items:center;border:0;background:transparent;font-size:21px;color:#45664d;padding:0;width:30px;height:30px}.ref-page-controls>button:disabled{opacity:.3}
.ref-page-controls>div{display:flex;gap:7px;margin-right:auto}
.ref-page-controls [data-event-page]{position:relative;width:24px;height:24px;border:0;padding:0;background:transparent}.ref-page-controls [data-event-page]::after{content:"";position:absolute;left:8px;top:8px;width:7px;height:7px;border-radius:100px;background:#d3dccc}.ref-page-controls [data-event-page].active::after{width:18px;left:3px;background:#2c7350}
.ref-bottom{display:flex;justify-content:space-between;align-items:center;font-size:13px;border-top:1px solid #e7e8dc;margin:0 -22px;padding:7px 22px 0;color:#505b4e}
.ref-bottom label{display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer}
.ref-bottom input{width:17px;height:17px;min-height:17px;margin:0;accent-color:#296644}
.ref-bottom button{background:transparent;border:0;padding:5px 0 5px 14px;min-height:32px;color:#43513f;font-size:14px}
.event-custom{min-height:300px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:24px;padding-top:16px}.event-custom h3{font-size:28px}.event-custom p{white-space:pre-wrap;font-size:16px;line-height:1.7;overflow-wrap:anywhere}
@media(max-width:480px){
 .event-popup-shell .modal-body{padding:22px 20px 7px}.ref-brand{font-size:21px}.ref-brand svg{width:23px;height:27px}
 .ref-hero{padding-top:20px;margin-bottom:18px}.ref-gift{top:-12px;right:-6px;width:52%}
 .ref-eyebrow{min-height:29px;padding:4px 13px;font-size:14px}.ref-title{margin-top:21px!important;gap:5px}
 .ref-title>span{font-size:clamp(27px,7.4vw,34px)}.ref-title>strong{font-size:clamp(44px,12.8vw,61px);letter-spacing:-2px}
 .ref-intro{font-size:15px!important;margin-bottom:13px!important}.ref-rewards{gap:9px;margin-bottom:12px}.ref-rewards>div{gap:7px;padding:11px 6px;border-radius:16px}.ref-rewards span{font-size:14px}.ref-rewards strong{font-size:25px}.ref-person{width:25px;height:38px}
 .ref-code{padding:7px 10px;gap:7px;min-height:47px}.ref-code>span{font-size:13px}.ref-code>strong{font-size:23px}.ref-code button{min-width:43px;font-size:13px}
 .ref-share{min-height:51px;font-size:19px;border-radius:15px}.ref-talk{width:26px;height:26px}.ref-share-hint{font-size:12px!important;margin-top:10px!important}
 .ref-chat-link>a>strong{font-size:16px}.ref-chat-tools{font-size:12px}.ref-chat-link{margin-top:10px}
}
@media(max-height:740px){
 .event-popup-shell .modal-body{padding-top:17px}.ref-hero{padding-top:14px;margin-bottom:15px}.ref-title{margin-top:14px!important}.ref-gift{top:-17px;width:49%}.ref-title>strong{font-size:min(12.8vw,58px)}
 .ref-intro{margin-bottom:10px!important}.ref-rewards{margin-bottom:10px}.ref-rewards>div{padding-top:9px;padding-bottom:9px}.ref-share-hint{margin-top:8px!important}.ref-chat-link{margin-top:8px;margin-bottom:6px}.ref-activity{margin-top:2px;margin-bottom:2px}
}
@media(max-width:350px){.event-popup-shell .modal-body{padding-left:16px;padding-right:16px}.ref-rewards>div{gap:4px}.ref-rewards span{font-size:12px}.ref-rewards strong{font-size:23px}.ref-code>strong{font-size:21px}.ref-code>span{font-size:12px}.ref-code button{padding-left:7px;padding-right:7px}.ref-title>strong{letter-spacing:-2px}}
.event-config{padding:24px}.event-config .field{margin-top:14px}.event-config>h2{margin-bottom:12px}.event-config .checkline{margin-bottom:10px}.invite-text{white-space:pre-wrap;font-family:inherit;font-size:13px;line-height:1.6;padding:18px;background:#f4f6f0;border-radius:12px;margin-top:12px}.ledger-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.ledger-filter>input{flex:1;min-width:150px}.ledger-filter input,.ledger-filter select{border:1px solid #dce3dc;border-radius:8px;padding:10px;font-size:14px;min-width:0}.ledger-filter label{font-size:12px;display:flex;flex-direction:column;gap:5px}.ledger-summary{display:flex;gap:22px;flex-wrap:wrap;padding:18px 0;font-size:13px}.ledger-summary b{margin-left:5px}.ledger-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(180px,3fr) minmax(110px,1fr);gap:16px;padding:17px 0;border-top:1px solid #e8ece7;align-items:center}.ledger-row small{display:block;color:#7c837b;font-size:11px;line-height:1.7}.ledger-row strong{display:block;font-size:14px;margin:4px 0}.ledger-kind{display:inline-block;font-size:10px;background:#f0f3ec;color:#4f6852;padding:2px 7px;border-radius:6px}.ledger-delta{text-align:right}.ledger-delta b{font-size:18px}.ledger-pages{display:flex;align-items:center;justify-content:center;gap:18px;padding-top:22px;font-size:13px}.referral-checkout-note{font-size:11px;color:#47734c;line-height:1.5;margin:6px 0}.event-entry-link{margin:8px 0;width:100%}
@media(max-width:600px){.event-config{padding:17px}.ledger-row{grid-template-columns:1fr auto;gap:8px}.ledger-row>div:first-child{grid-column:1/-1;display:flex;gap:12px;align-items:center}.ledger-row>div:nth-child(2){min-width:0}.ledger-filter{gap:8px}.ledger-filter>input{flex-basis:100%}.ledger-filter select{width:100%}.ledger-filter label{width:calc(50% - 4px)}.ledger-filter label input{width:100%}.ledger-summary{gap:8px 14px;font-size:12px}}
