#chatWidgetDialog .chat-widget-main-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#chatWidgetDialog .chat-widget-main-tabs button{font-size:11px!important;position:relative}
#chatWidgetDialog [data-chat-panel="events"]{min-height:0;overflow:auto;padding:12px;background:#080f19;color:#d9e1ed}
#chatWidgetDialog [data-chat-panel="events"][hidden]{display:none!important}
#chatWidgetDialog [data-chat-panel="events"]:not([hidden]){display:block!important}
.ev-has-gift:after{content:'';position:absolute;right:5px;top:5px;width:7px;height:7px;border-radius:50%;background:#f17443}
.ev-list-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;color:#ffe5a0}
.ev-event{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:16px 12px;margin:0 0 10px;border:1px solid #745c2f;border-radius:12px;background:linear-gradient(145deg,#172333,#0b131f);color:#e7ebf2;cursor:pointer;font:inherit;min-height:82px}
.ev-event>span:nth-child(2){flex:1;min-width:0}.ev-event strong{display:block;font-size:14px}.ev-event small{display:block;font-size:12px;line-height:1.5;color:#a6b8cd;margin-top:6px}.ev-event-icon{font-size:26px;color:#f4d478;width:38px;text-align:center}.ev-chevron{color:#ecc569}.ev-muted{opacity:.55;border-color:#394559}
.ev-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 24px));max-width:none;max-height:92vh;max-height:92dvh;padding:0;border:1px solid #b18a42;border-radius:18px;background:#0b1420;color:#dfe7f2;box-shadow:0 24px 90px #000a;font:14px/1.5 Arial,sans-serif;overflow:hidden}.ev-dialog *{box-sizing:border-box}.ev-dialog::backdrop{background:#02060cc9;backdrop-filter:blur(4px)}.ev-dialog[open]{display:block}
.ev-detail{display:flex;flex-direction:column;max-height:90vh;max-height:90dvh;overflow:hidden}.ev-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:18px 22px;border-bottom:1px solid #6e583344}.ev-detail-head small{font-size:10px;letter-spacing:1.5px;color:#bca370}.ev-detail-head h2{font-size:24px;line-height:1.25;color:#ffe5a0;margin:5px 0 0}.ev-close{background:transparent;border:0;color:#b8c9de;min-width:40px;min-height:40px;font:30px Arial;cursor:pointer}.ev-detail-body{overflow:auto;min-height:0;padding:16px 22px;overscroll-behavior:contain}.ev-hero{font-size:52px;text-align:center;color:#e8bd57;line-height:1.3}.ev-detail h3{text-align:center;color:#f6d985;margin:8px 0 14px;font-size:17px}.ev-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;color:#bbcce0}.ev-detail h4{font-size:16px;color:#f6d985;margin:18px 0 12px}.ev-rewards{display:flex;flex-wrap:wrap;gap:10px}.ev-reward{flex:1 1 110px;min-width:0;padding:12px;border:1px solid #a7813d;border-radius:11px;background:#0c1b2a;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px}.ev-reward img{width:80px;height:80px;object-fit:contain}.ev-reward strong{font-size:12px;overflow-wrap:anywhere}.ev-reward small{color:#9daec0;font-size:11px}.ev-stone>span{font-size:50px}.ev-rule{font-size:12px;color:#9eafc3;line-height:1.7;margin:14px 0 0}
.ev-detail-foot{padding:12px 22px max(12px,env(safe-area-inset-bottom));border-top:1px solid #6e583355;background:#0c1520;flex-shrink:0;text-align:center}.ev-detail-foot>strong{color:#ffe29a;font-size:15px}.ev-status{font-size:12px;color:#b7c7d9;margin:6px 0 9px;white-space:pre-wrap}.ev-primary{border:1px solid #f9d56d;border-radius:10px;background:linear-gradient(#f9d976,#d69d2c);color:#241a08;font-size:16px;font-weight:800;padding:12px 20px;min-height:46px;width:100%;cursor:pointer}.ev-primary:disabled{background:#25303f;border-color:#485267;color:#97a3b4;cursor:default}.ev-secondary{background:#1b293b;border:1px solid #46546a;border-radius:8px;color:#dde6f2;padding:8px 12px;cursor:pointer;min-height:36px}.ev-text-btn{font:12px Arial;background:none;border:0;color:#aabbd0;padding:6px;cursor:pointer}.ev-daily-info{display:flex;gap:6px;justify-content:space-between;color:#a9bdd3;font-size:11px;margin:14px 0 10px}.ev-daily-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.ev-day{min-width:0;border:1px solid #3d526a;background:#101d2b;border-radius:8px;padding:8px 4px;text-align:center}.ev-day>strong{font-size:12px;color:#dce8f7}.ev-day>small{display:block;min-height:14px;font-size:10px;color:#d6bd79}.ev-day-current{border-color:#f5c954;box-shadow:inset 0 0 14px #c1911733}.ev-day-done{opacity:.5}.ev-compact{gap:2px;justify-content:center}.ev-compact .ev-reward{border:0;background:none;border-radius:0;flex:1 1 20px;padding:3px 0;gap:2px}.ev-compact .ev-reward img{width:38px;height:38px}.ev-compact .ev-stone>span{font-size:26px;line-height:38px}.ev-compact .ev-reward strong{font-size:10px}.ev-compact .ev-reward:not(.ev-stone) strong{display:none}.ev-compact .ev-reward small{font-size:8px}.ev-error{color:#ffb5a0}
.ev-admin{width:min(1000px,calc(100vw - 24px))}.ea-tabs{display:flex;gap:6px;overflow:auto;padding:10px 16px;flex-shrink:0;border-bottom:1px solid #384256}.ea-tabs button{white-space:nowrap;background:#172335;border:1px solid #455368;border-radius:8px;color:#bac8dc;padding:9px 12px;cursor:pointer}.ea-tabs button.active{border-color:#d6b45f;color:#ffe29a;background:#4c391b}.ea-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#c5d3e5;margin-bottom:12px}.ea-form input:not([type=checkbox]),.ea-form select,.ea-form textarea{width:100%;min-width:0;background:#101c2c;border:1px solid #40516c;border-radius:7px;color:#e8edf5;padding:9px;font:13px Arial}.ea-form textarea{resize:vertical}.ea-form .ea-toggle{flex-direction:row;align-items:center;flex-wrap:wrap;padding:12px;border:1px solid #b2954a;border-radius:10px;color:#ffe29a;font-size:15px}.ea-toggle small{flex-basis:100%;color:#a4b5cb}.ea-form input[type=checkbox]{width:20px;height:20px}.ea-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ea-reward{border:1px solid #3e526a;border-radius:10px;padding:12px;margin:0 0 14px}.ea-reward legend{color:#ebcd82}.ea-reward>label{max-width:200px}.ea-item{display:grid;grid-template-columns:minmax(150px,2fr) 65px 80px 115px 38px;gap:8px;align-items:center}.ea-item label{min-width:0}.ea-item>button{padding:5px}.ea-actions{display:flex;gap:10px;align-items:center}.ea-actions .ev-primary{flex:1}.ea-actions .ev-secondary{flex:0 0 auto}.ea-form p{color:#a8b9cd;font-size:12px}.ev-admin button:disabled{opacity:.5;cursor:wait}
@media(max-width:600px){.ev-dialog{width:calc(100vw - 16px);max-height:96vh;max-height:96dvh;border-radius:13px}.ev-detail{max-height:94vh;max-height:94dvh}.ev-detail-head{padding:12px 14px}.ev-detail-head h2{font-size:21px}.ev-detail-body{padding:12px}.ev-detail-foot{padding:10px 12px max(10px,env(safe-area-inset-bottom))}.ev-daily-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.ev-day{padding:5px 2px}.ev-day>strong{font-size:10px}.ev-compact .ev-reward img{width:25px;height:30px}.ev-compact .ev-stone>span{font-size:20px;line-height:30px}.ev-compact .ev-reward strong{font-size:9px}.ev-compact .ev-reward small{font-size:7px}.ev-daily-info{font-size:10px}.ev-hero{font-size:40px}.ev-event{padding:13px 10px}.ea-tabs{padding:8px}.ea-tabs button{font-size:11px;padding:8px}.ea-two{grid-template-columns:1fr;gap:0}.ea-item{grid-template-columns:minmax(0,1fr) 55px 65px 36px;gap:5px;border-top:1px solid #33435a;padding-top:8px}.ea-item label:first-child{grid-column:1/4}.ea-item>button{grid-column:4;grid-row:1}.ea-item label:nth-child(4){grid-column:3/5}.ea-item label:nth-child(2){grid-column:1}.ea-item label:nth-child(3){grid-column:2}.ev-content{font-size:13px}.ev-reward img{width:64px;height:64px}}
#siteEventDialog{width:min(680px,calc(100vw - 16px));max-height:calc(100dvh - 16px);border-radius:14px}
#siteEventDialog .ev-detail{max-height:calc(100dvh - 18px)}
#siteEventDialog .ev-detail-head{padding:10px 16px;align-items:center;flex-shrink:0}
#siteEventDialog .ev-detail-head small{display:none}
#siteEventDialog .ev-detail-head h2{font-size:20px;margin:0}
#siteEventDialog .ev-close{min-width:36px;min-height:36px;font-size:26px}
#siteEventDialog .ev-detail-body{padding:10px 16px}
#siteEventDialog h3{font-size:15px;margin:2px 0 10px}
#siteEventDialog .ev-content{font-size:13px;line-height:1.5;margin:8px 0 12px}
#siteEventDialog h4{font-size:14px;margin:10px 0 8px}
#siteEventDialog .ev-reward{padding:9px;gap:4px}
#siteEventDialog .ev-reward img{width:52px;height:52px}
#siteEventDialog .ev-stone>span{font-size:36px;line-height:52px}
#siteEventDialog .ev-rule{font-size:11px;line-height:1.45;margin:9px 0 0}
#siteEventDialog .ev-detail-foot{padding:8px 16px max(8px,env(safe-area-inset-bottom))}
#siteEventDialog .ev-status{margin:2px 0 6px;font-size:11px;line-height:1.35}
#siteEventDialog .ev-primary{min-height:42px;font-size:15px;padding:9px 14px}
#siteEventDialog .ev-detail-foot>strong{font-size:13px}
#siteEventDialog .ev-detail-foot>.ev-text-btn{font-size:10px;padding:3px 6px}
#siteEventDialog.ev-attendance{width:min(840px,calc(100vw - 16px))}
#siteEventDialog.ev-attendance .ev-detail{height:min(680px,calc(100dvh - 18px))}
#siteEventDialog.ev-attendance .ev-detail-body{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr);flex:1;overflow:hidden;gap:6px;padding:8px 12px}
.ev-attendance-summary{margin:0;text-align:center;font-size:12px;line-height:1.4;color:#b7c8dc}
.ev-attendance-summary .ev-text-btn{padding:2px 4px;color:#f1d28b;font-size:11px}
#siteEventDialog .ev-daily-info{margin:0;font-size:10px;line-height:1.4}
#siteEventDialog .ev-daily-grid{min-height:0;grid-template-rows:repeat(5,minmax(0,1fr));gap:5px}
#siteEventDialog .ev-day{position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:0;padding:4px 3px}
#siteEventDialog .ev-day>strong{font-size:11px;line-height:1.2}
#siteEventDialog .ev-day>small{display:none}
#siteEventDialog .ev-day-current:after{content:'●';position:absolute;right:3px;top:0;color:#ffcf59;font-size:9px}
#siteEventDialog .ev-day-done:after{content:'✓';position:absolute;right:3px;top:0;color:#7ddcb2;font-size:10px}
#siteEventDialog .ev-compact{flex-wrap:nowrap;gap:1px}
#siteEventDialog .ev-compact .ev-reward{padding:0;gap:0;flex:1;min-width:0}
#siteEventDialog .ev-compact .ev-reward img{width:26px;height:26px}
#siteEventDialog .ev-compact .ev-stone>span{font-size:20px;line-height:26px}
#siteEventDialog .ev-compact .ev-reward strong{font-size:10px;line-height:1.2}
#siteEventDialog .ev-compact .ev-reward small{display:none}
.ev-rules-card{position:absolute;z-index:5;inset:8px;background:#142235;border:1px solid #a88948;border-radius:10px;padding:18px;color:#dce6f3;box-shadow:0 8px 25px #0009;overflow:auto;font-size:14px;line-height:1.6}
.ev-rules-card[hidden]{display:none}.ev-rules-card strong{color:#ffe09a}
@media(max-width:600px){
 #siteEventDialog .ev-detail-head{padding:8px 12px}#siteEventDialog .ev-detail-head h2{font-size:18px}
 #siteEventDialog .ev-detail-body{padding:8px 12px}#siteEventDialog .ev-detail-foot{padding-left:12px;padding-right:12px}
 #siteEventDialog .ev-daily-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));gap:4px}
 #siteEventDialog.ev-attendance .ev-detail{height:min(700px,calc(100dvh - 18px))}
 #siteEventDialog .ev-day>strong{font-size:10px}.ev-attendance-summary{font-size:11px}
}
@media(max-height:620px){
 #siteEventDialog .ev-detail-head{padding-top:5px;padding-bottom:5px}
 #siteEventDialog .ev-content{font-size:12px;margin:6px 0;line-height:1.4}
 #siteEventDialog .ev-detail-foot{padding-top:5px;padding-bottom:5px}
 #siteEventDialog .ev-detail-foot>.ev-text-btn{position:absolute;top:14px;right:52px;padding:3px;font-size:0;width:26px;height:26px}
 #siteEventDialog .ev-detail-foot>.ev-text-btn:after{content:'↻';font-size:18px}
 #siteEventDialog.ev-attendance .ev-detail-body{gap:4px;padding:5px 9px}
 #siteEventDialog .ev-compact .ev-reward img{width:21px;height:21px}
 #siteEventDialog .ev-compact .ev-stone>span{font-size:17px;line-height:21px}
 #siteEventDialog .ev-day{padding:2px;gap:1px}
}
@media(orientation:landscape) and (max-height:540px) and (min-width:601px){
 #siteEventDialog.ev-attendance{width:min(1000px,calc(100vw - 16px))}
 #siteEventDialog .ev-daily-grid{grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 #siteEventDialog:not(.ev-attendance) .ev-detail-body{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:6px 18px;align-items:start}
 #siteEventDialog:not(.ev-attendance) h3,#siteEventDialog:not(.ev-attendance) .ev-content{grid-column:1}
 #siteEventDialog:not(.ev-attendance) h4{grid-column:2;grid-row:1;margin:0}
 #siteEventDialog:not(.ev-attendance) .ev-rewards{grid-column:2;grid-row:2/4}
 #siteEventDialog:not(.ev-attendance) .ev-rule{grid-column:1}
}

/* New information: top-level tab, both sections, and individual unread entries. */
.ev-section-tabs button,.ev-event,.up-card{position:relative}
.ev-new-info:after{content:'';position:absolute;top:6px;right:7px;width:8px;height:8px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px #111b2b;pointer-events:none}
.ev-event.ev-new-info:after{top:8px;right:8px}.up-card.ev-new-info{padding-right:22px}
.ev-event.ev-muted.ev-new-info{opacity:1}.ev-event.ev-muted.ev-new-info>span{opacity:.6}
.ev-has-gift:after{background:#ef4444!important}
