#referral-overlay{position:fixed;inset:0;z-index:40;background:#20282060;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);justify-content:center;overflow:hidden}
#referral-overlay .referral-reader{width:min(100%,520px);height:min(90dvh,840px);max-height:90dvh;display:flex;flex-direction:column;overflow:hidden;padding:0;background:#fffdfa;border-radius:20px 20px 0 0;animation:referral-enter .25s ease-out}
.referral-reader-header{flex:none;padding:12px 22px 14px;background:#fffdfa;border-bottom:1px solid #e9e7e1}
.referral-reader-header .sheet-handle{margin:0 auto 12px;background:#d8ddd7}
#referral-overlay .sheet-title{position:static;align-items:center;gap:12px}
.reader-eyebrow{display:block;font-size:11px;color:var(--brand-accent,#46705c);line-height:1.5;letter-spacing:0;margin-bottom:5px}
#referral-overlay h2{font-size:20px;line-height:1.5;letter-spacing:0;overflow-wrap:anywhere}
#referral-overlay .close{display:grid;place-items:center;background:#f2f3ef;border-radius:50%;width:36px;height:36px;flex:0 0 36px}
#referral-overlay .close img{width:18px;height:18px}
.referral-reader-body{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:20px 22px 0}
#referral-overlay p{font-size:13px;color:#6a6f67;line-height:1.85;letter-spacing:0;margin:8px 0 0;white-space:pre-line;overflow-wrap:anywhere}
#referral-overlay .reader-lead{font-size:14px;color:#414c42;margin:0 0 22px}
.reader-section{padding:22px 0;border-top:1px solid #e9e7e1;min-width:0;overflow-wrap:anywhere}
#referral-overlay h3{font-size:16px;font-weight:650;line-height:1.55;color:#29352c;margin:0;letter-spacing:0}
.reader-section img.reader-image{display:block;width:100%;height:auto;max-height:340px;object-fit:contain;border-radius:8px;background:#f1f4f0}
.reader-section figure{margin:14px 0 0;min-width:0}
.reader-section figcaption{font-size:11px;line-height:1.65;color:#7c857b;margin-top:7px}
.reader-image-zoom{display:block;width:100%;padding:0;background:transparent;border-radius:8px;cursor:zoom-in}
.referral-image-viewer{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:28px;border:0;background:#17231de8;color:white;box-sizing:border-box}
.referral-image-viewer::backdrop{background:#17231de8}
.referral-image-viewer>img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 56px);margin:auto;object-fit:contain}
.referral-image-viewer>button{position:absolute;top:12px;right:12px;width:40px;height:40px;background:white;border:0;border-radius:50%;display:grid;place-items:center}
.referral-image-viewer>button img{width:20px;height:20px}
.reader-media-layout.side{display:grid;grid-template-columns:108px minmax(0,1fr);gap:16px;align-items:center}
.reader-media-layout.side figure{margin:0}
.reader-gallery{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;margin-top:14px}
.reader-gallery figure{flex:0 0 76%;scroll-snap-align:start;margin:0}
.reader-gallery img.reader-image{max-height:none;aspect-ratio:3/4;object-fit:contain}
.reader-gallery.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
.reader-steps{padding:0;margin:16px 0 0;list-style:none;display:grid;gap:15px;counter-reset:reader-step}
.reader-steps li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:11px;align-items:start;counter-increment:reader-step}
.reader-steps li:before{content:counter(reader-step);display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e9f0e9;color:var(--brand-accent);font-size:13px;font-weight:700}
.reader-steps strong{display:block;font-size:13px;color:#344239;line-height:1.6}
.reader-steps span{font-size:12px;color:#707a70;line-height:1.75}
.reader-video{display:block;width:100%;height:auto;aspect-ratio:3/4;max-height:350px;object-fit:contain;background:#e9efea;border-radius:8px;margin-top:14px}
.reader-faq{border-bottom:1px solid #e9e7e1}
.reader-faq summary{font-size:13px;font-weight:600;color:#3b493e;line-height:1.7;min-height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;gap:14px}
.reader-faq summary:after{content:'+';font-size:20px;font-weight:400;color:#788878}
.reader-faq[open] summary:after{content:'-'}
#referral-overlay .reader-faq p{margin:0;padding-bottom:14px}
.reader-contact{padding-bottom:24px}
.reader-contact-profile{display:flex;align-items:center;gap:12px;margin-top:22px;min-width:0}
.reader-contact:focus{outline:none}.reader-contact:focus-visible>h3{outline:2px solid #7b9a87;outline-offset:4px}
.reader-contact-profile>img{width:52px;height:52px;flex:0 0 52px;object-fit:contain;border-radius:8px;background:#ecf2ec;padding:4px}
.reader-contact-profile>div{min-width:0;display:grid;gap:5px}
.reader-contact-profile strong{font-size:16px;line-height:1.6;color:#2e4135;overflow-wrap:anywhere}
.reader-contact-profile span{font-size:11px;color:#5d7964;line-height:1.6}
.reader-contact-qr{margin-top:20px;text-align:center;display:grid;justify-items:center;gap:10px}
.reader-contact-qr figure{margin:0;display:grid;justify-items:center;gap:12px}
.reader-contact-qr figcaption{display:grid;gap:6px;max-width:100%;font-size:12px;line-height:1.7;color:#748075;margin:0}
.reader-contact-qr figcaption strong{color:#344f3c;font-size:14px;font-weight:600}
.contact-qr-image{display:block;width:220px;height:220px;max-width:100%;object-fit:contain;background:white;padding:10px;border:1px solid #e7ece7;border-radius:6px;box-sizing:border-box}
.reader-zoom-button{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:5px;background:#edf4ee;color:#406b4f;font-size:12px;min-height:36px}
.reader-zoom-button img{width:16px;height:16px}
.reader-contact-id{display:flex;align-items:center;gap:12px;border-top:1px solid #e5ece5;padding:18px 0 0;margin-top:20px}
.reader-contact-id>div{flex:1;min-width:0;display:grid;gap:5px}
.reader-contact-id small{color:#788276;font-size:11px;line-height:1.6}
.reader-contact-id strong{font-size:15px;line-height:1.6;color:#3b6048;overflow-wrap:anywhere;user-select:text}
.reader-contact-id button{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border:1px solid #dce6dd;border-radius:5px;background:white}
.reader-contact-id button img{width:18px;height:18px}
#referral-overlay .reader-copy-status{min-height:22px;color:#46705c;font-size:12px}
.referral-reader-footer{display:flex;flex:none;gap:12px;border-top:1px solid #e9e7e1;padding:12px 22px calc(12px + env(safe-area-inset-bottom));background:#fffdfa}
.referral-reader-footer button{min-height:46px;font-size:14px;border-radius:8px}
.reader-return{padding:0 10px;color:#697267;background:transparent;white-space:nowrap}
.referral-reader-footer:not(.has-contact) .reader-return{flex:1;background:#edf4ee;color:var(--brand-accent,#46705c);font-weight:600}
.reader-primary{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--brand-accent,#46705c);color:white;font-weight:600}
.reader-primary img{filter:brightness(0) invert(1);width:17px;height:17px}
#referral-contact-button[hidden],.reader-section[hidden],.reader-section figure[hidden],.reader-contact-profile img[hidden]{display:none}
@keyframes referral-enter{from{transform:translateY(25px);opacity:0}to{transform:none;opacity:1}}
@media(max-width:360px){.referral-reader-header,.referral-reader-body{padding-left:17px;padding-right:17px}.referral-reader-footer{padding-left:14px;padding-right:14px;gap:6px}.referral-reader-footer button{font-size:13px}.reader-media-layout.side{grid-template-columns:92px minmax(0,1fr)}.contact-qr-image{width:204px;height:204px}.reader-contact-profile strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){#referral-overlay .referral-reader{animation:none}}
