/* Final overrides: a single backdrop, independent close controls, safe text formatting. */
#homeAnnouncementOverlay{display:none;position:fixed;inset:0;z-index:240;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;background:rgba(0,0,0,.42);padding:16px;padding-top:max(16px,env(safe-area-inset-top,0px));padding-bottom:max(16px,env(safe-area-inset-bottom,0px));-webkit-overflow-scrolling:touch}
#homeAnnouncementOverlay.show{display:block}
#homeAnnouncementOverlay .home-announcement-stack{width:100%;max-width:360px;min-height:calc(100vh - 32px);min-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(28px,8vh,80px)}
#homeAnnouncementOverlay #adPopup.ad-popup,#homeAnnouncementOverlay #noticeModal.notice-modal{position:relative!important;inset:auto!important;z-index:auto!important;display:none!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;flex:none!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important;background:none!important;overflow:visible!important}
#homeAnnouncementOverlay #adPopup.ad-popup.show,#homeAnnouncementOverlay #noticeModal.notice-modal.show{display:flex!important}
#homeAnnouncementOverlay #adPopup .ad-card{width:100%!important;max-width:360px!important;flex:none!important;max-height:calc(100vh - 112px)!important;max-height:calc(100dvh - 112px)!important;box-sizing:border-box!important;border-radius:14px!important;background:#fff!important;padding:20px 18px!important;overflow:auto!important;white-space:normal!important;overflow-wrap:anywhere;line-height:1.65!important}
#homeAnnouncementOverlay #adPopup .ad-title{margin:0 12px 14px!important;padding:0!important;color:#D72BC3!important;font-size:21px!important;line-height:1.35!important;font-weight:700!important;white-space:pre-wrap!important;overflow-wrap:anywhere}
#homeAnnouncementOverlay #adPopup .ad-content{color:var(--announcement-text-color,#747985)!important;font-size:15px!important;line-height:1.7!important;font-weight:400!important;white-space:pre-wrap!important;overflow-wrap:anywhere}
#homeAnnouncementOverlay #adPopup .ad-close{position:static!important;inset:auto!important;transform:none!important;flex:0 0 40px!important;width:40px!important;height:40px!important;margin:12px 0 0!important;cursor:pointer}
#homeAnnouncementOverlay #adPopup .ad-count{top:12px!important;right:12px!important;min-width:26px!important;width:auto!important;height:23px!important;padding:0 7px!important;font-size:12px!important}
#homeAnnouncementOverlay #adPopup .ad-count.is-empty{visibility:hidden!important}
#homeAnnouncementOverlay #noticeModal .notice-box{box-sizing:border-box;width:100%;max-width:360px;border-radius:14px;background:#fff;padding:20px 18px;box-shadow:0 8px 24px #0004}
#homeAnnouncementOverlay #noticeModal .notice-box h3{color:#ba188e;font-size:20px;line-height:1.4;margin:0 0 12px;overflow-wrap:anywhere}
#homeAnnouncementOverlay #noticeContent{color:var(--announcement-text-color,#747985);font-size:15px;line-height:1.7;font-weight:400;white-space:pre-wrap;overflow-wrap:anywhere;max-height:calc(100vh - 210px);max-height:calc(100dvh - 210px);overflow:auto;overscroll-behavior:contain}
#homeAnnouncementOverlay #noticeModal .notice-box button{margin-top:16px;width:100%;min-height:42px;border:0;border-radius:22px;background:linear-gradient(90deg,#9515d6,#df1aaf);color:#fff;font-size:17px;font-weight:700;cursor:pointer}
#homeAnnouncementOverlay .announcement-red{color:var(--announcement-highlight-color,#E53935)!important;font-weight:700!important}
#homeAnnouncementOverlay #adPopup .ad-content .announcement-red{font-size:18px!important;line-height:1.7!important}
#homeAnnouncementOverlay.has-two #adPopup .ad-card{max-height:34vh!important;max-height:34dvh!important}
#homeAnnouncementOverlay.has-two #noticeContent{max-height:24vh;max-height:24dvh}
#homeAnnouncementOverlay button:focus-visible{outline:3px solid #fdc845;outline-offset:4px}
@media(max-height:500px){#homeAnnouncementOverlay .home-announcement-stack{gap:22px}#homeAnnouncementOverlay.has-two #adPopup .ad-card{max-height:44vh!important}#homeAnnouncementOverlay.has-two #noticeContent{max-height:28vh}}
