html[data-theme] .header-actions .header-counter{display:inline-flex;align-items:center;justify-content:center;gap:3px;position:relative;border:0;border-radius:8px;padding:6px;background:transparent!important;box-shadow:none!important;color:inherit;cursor:pointer;font-size:18px;text-decoration:none;min-width:36px;height:34px;margin-left:0;flex:none}
.header-actions .header-counter:hover{background:#ffffff18!important}.header-actions .header-count,.header-actions .live-score-updates-toggle #live-score-updates-count{position:static;display:inline!important;padding:0;min-width:8px;background:transparent;color:#94a3b8;font-size:11px;font-weight:800;line-height:1.2}
.header-actions .header-count[data-active="true"]{color:#fbbf24!important}.header-status{color:#4ade80;font-size:8px;position:absolute;bottom:1px;left:8px}.header-status[data-enabled="false"]{color:#94a3b8}.header-actions .live-score-updates-icon{font-size:18px;transform:none!important}.score-switch{display:flex;gap:6px;align-items:center;width:100%}
.communication-panel{position:fixed;top:76px;right:12px;z-index:1300;width:min(380px,calc(100vw - 24px));max-height:70dvh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-raised);padding:14px}.communication-panel[hidden]{display:none}.communication-panel-heading,.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.communication-panel-heading h2,.chat-heading h2{font-size:17px;margin:0}.communication-panel-heading button,.message-popup-close{border:0;background:transparent;color:inherit;font-size:24px;cursor:pointer}.communication-setting{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:13px}.communication-log{margin:12px 0}.notification-entry{padding:10px 0;border-bottom:1px solid var(--line);font-size:13px}.notification-entry[data-unread="true"]{border-left:3px solid #f4a340;padding-left:8px}.notification-entry p{white-space:pre-wrap;margin:5px 0}.notification-entry a{color:var(--text)}
.home-league-chat{padding-top:14px}.chat-widget{margin:16px 0;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:12px}.chat-heading a{font-size:12px}.chat-log{height:230px;overflow-y:auto;overscroll-behavior:contain;margin:12px 0;padding:6px}.chat-message{padding:8px 10px;margin-bottom:7px;border-radius:8px;background:var(--heading-bg);font-size:13px}.chat-message[data-own="true"]{border-left:3px solid var(--focus)}.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0;line-height:1.5}.chat-message time{display:block;font-size:10px;color:var(--muted)}.chat-form{display:flex;gap:8px;align-items:flex-end}.chat-form textarea{resize:vertical;min-height:58px;max-height:180px;width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--panel);color:var(--text);font:inherit;font-size:13px}.chat-status{margin:8px 0 0;font-size:12px;color:var(--muted)}.messages-page select{max-width:100%;padding:8px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:6px}.messages-page .chat-log{height:45dvh}.message-preferences{padding:16px}.team-message-link{margin:6px 0}.message-popups{position:fixed;right:12px;bottom:20px;width:min(340px,calc(100vw - 24px));z-index:5200;display:flex;flex-direction:column;gap:8px;pointer-events:none}.message-popup{pointer-events:auto;background:var(--panel);color:var(--text);border:1px solid #f4a340;border-radius:12px;padding:12px;box-shadow:var(--shadow-raised)}.message-popup-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.message-popup p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:90px;overflow:auto;font-size:13px;margin:8px 0}.message-popup a{font-size:13px;font-weight:700}
@media(max-width:700px){.header-actions{gap:1px!important}html[data-theme] .header-actions .header-counter{padding:4px;min-width:32px}.header-actions .header-theme-toggle{margin-left:0}.brand-logo{width:36px!important;height:36px!important}.brand-copy{display:none!important}.message-popups{bottom:calc(84px + env(safe-area-inset-bottom,0px))}.communication-panel{top:64px}.chat-widget{padding:12px}}

/* Theme-aware messages shared by Home, Messages and Team widgets. */
html[data-theme] .chat-message{background:var(--panel-2);color:var(--text);border:1px solid var(--line)}
html[data-theme="light"] .chat-message[data-own="true"]{background:#eaf2ff;border-left:3px solid var(--focus)}
.chat-message time{font-size:11px;line-height:1.5}
.communication-panel{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:#f4a340;border-radius:14px;box-shadow:var(--shadow-raised)}
.communication-panel-heading{padding:8px 12px;background:#f4a340;color:#172033}
.communication-panel-heading h2{font-size:14px}
.communication-panel-heading button{width:28px;height:28px;line-height:1;border-radius:6px}
.notification-panel-body{padding:12px 14px;overflow:auto;max-height:calc(70dvh - 44px)}
.notification-panel-body .communication-setting{margin:0 0 10px}
#header-push-state{font-size:12px;color:var(--muted);line-height:1.5;margin:8px 0}
.notification-entry{background:var(--panel-2);border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin:8px 0}
.notification-entry a{font-weight:700;text-decoration:none}
.notification-panel-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid var(--line);font-size:12px}
.notification-panel-footer .button{font-size:12px;padding:8px 10px}
html[data-theme] .live-score-updates{box-shadow:var(--shadow-raised)}
html[data-theme] .live-score-updates-filters{display:flex;align-items:center;gap:8px;padding:12px 14px;flex-wrap:nowrap}
.live-score-updates-filters>label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
html[data-theme] .live-score-updates-filters select,.score-team-picker summary{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:7px;padding:7px 8px;font:inherit;font-size:12px}
.score-team-picker{min-width:0;flex:1;font-size:12px}
.score-team-picker summary{cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.score-team-options{max-height:170px;overflow:auto;padding:6px;background:var(--panel-2);border:1px solid var(--line);border-radius:8px;margin-top:6px}
.score-team-options label{display:flex;align-items:center;gap:7px;padding:6px;font-size:12px;overflow-wrap:anywhere}
.live-score-updates-filters:has(.score-team-picker[open]){align-items:flex-start}
.live-score-updates-heading button:hover,.communication-panel-heading button:hover{background:#17203315}

.chat-message-identity{display:flex;align-items:center;gap:9px}
.chat-message-identity img,.message-popup-heading img{object-fit:contain;flex:none}
.message-settings-link,.message-back{display:inline-block;font-size:13px;margin:8px 0}
html[data-theme] .live-score-updates-filters[hidden]{display:none}
.settings-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}
.settings-tabs button{border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--text);font:inherit;font-weight:700;padding:9px 16px;cursor:pointer}
.settings-tabs button[aria-selected="true"]{background:#f4a340;color:#172033;border-color:#f4a340}
.settings-tabs button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.notification-settings-panel .owner-settings-fieldset{display:block}
.notification-settings-panel [role="tabpanel"]>section{margin-bottom:16px}
.notification-settings-panel [role="tabpanel"][hidden]{display:none}
#scoring-settings-controls .live-score-updates-filters{padding:0}

/* Match the scoring panel's controls and drag interaction. */
.notification-panel-actions{display:flex;align-items:center;gap:2px}
.communication-panel-heading{cursor:grab;touch-action:none;user-select:none}
.communication-panel[data-dragging="true"] .communication-panel-heading{cursor:grabbing}
.communication-panel-heading .notification-settings,.communication-panel-heading button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;background:transparent;color:inherit;border-radius:6px;flex:none}
.communication-panel-heading .notification-settings:hover{background:#17203315}
.communication-panel-heading button:disabled{opacity:.35;cursor:default}
.notification-restore{display:block;width:100%;padding:10px 14px;border:0;background:var(--panel);color:var(--text);font:inherit;font-size:12px;text-align:left;cursor:pointer}
.notification-restore[hidden]{display:none}
.communication-panel[data-minimized="true"] .notification-panel-body{display:none}
.communication-panel-heading :focus-visible,.notification-restore:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
#notification-panel-status{font-size:12px;color:var(--text)}

.floating-chat{top:100px;right:24px;z-index:1400;width:min(420px,calc(100vw - 24px))}
.chat-panel-body{padding:12px 14px}
.floating-chat[data-minimized="true"] .chat-panel-body{display:none}
.floating-chat[data-dragging="true"] .communication-panel-heading{cursor:grabbing}
.chat-conversation-label{display:block;font-size:12px;font-weight:700;margin-bottom:6px}
#chat-panel-conversation{width:100%;padding:8px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:7px;font:inherit;font-size:13px}
.floating-chat .chat-log{height:min(280px,35dvh);margin:10px 0}
.floating-chat .chat-form textarea{min-width:0}
.floating-chat .chat-form button{flex:none}
@media(max-width:700px){.floating-chat{top:72px;right:12px}.floating-chat .chat-log{height:30dvh}}

/* Header counts sit over their icons and disappear when empty. */
html[data-theme] .header-actions .header-count,
html[data-theme] .header-actions .live-score-updates-toggle #live-score-updates-count{
 position:absolute;top:-3px;right:-4px;display:inline-flex!important;align-items:center;justify-content:center;
 min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border:2px solid var(--panel);
 border-radius:999px;background:#e92323;color:#fff!important;font-size:10px;font-weight:800;line-height:1;
 pointer-events:none;
}
html[data-theme] .header-actions .header-count[data-active="false"],
html[data-theme] .header-actions .header-count[hidden],
html[data-theme] .header-actions .live-score-updates-toggle #live-score-updates-count[data-active="false"]{display:none!important}
.chat-message-identity{justify-content:flex-end;text-align:right}
.chat-message time{text-align:right}

.live-score-updates-heading .scoring-settings-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;text-decoration:none}
.live-score-updates-heading .scoring-settings-icon:hover{background:#17203315}
.live-score-updates-heading .scoring-settings-icon:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* Minimized scoring retains the same header and count row as the other panels. */
html[data-theme] .live-score-updates[data-minimized="true"]{width:min(390px,calc(100vw - 24px));min-width:0}
html[data-theme] .live-score-updates[data-minimized="true"] .live-score-updates-heading{display:flex}
html[data-theme] .live-score-updates-restore{text-align:left;padding:10px 14px;font-size:12px}
[data-resizable-panel]{box-sizing:border-box;display:flex;flex-direction:column}
[data-resizable-panel][hidden]{display:none}
[data-resizable-panel][data-custom-size="true"]{max-height:calc(100dvh - 16px)}
[data-resizable-panel]>.communication-panel-heading{flex-shrink:0}
[data-resizable-panel]>.notification-panel-body{min-height:0;overflow:auto;flex:1;max-height:none}
[data-resizable-panel]>.chat-panel-body{min-height:0;display:flex;flex-direction:column;flex:1;overflow:auto}
[data-resizable-panel][data-minimized="true"]>.chat-panel-body{display:none}
[data-resizable-panel] .chat-log{min-height:60px;flex:1}
[data-resizable-panel] .chat-form,[data-resizable-panel] .chat-status{flex-shrink:0}
[data-resizable-panel] .live-score-updates-list{flex:1}
.panel-resize-handle{position:absolute;bottom:1px;right:1px;width:20px;height:20px;padding:0;border:0;background:transparent;color:var(--muted);cursor:nwse-resize;touch-action:none;z-index:2;border-radius:3px}
.panel-resize-handle::after{content:'';position:absolute;right:4px;bottom:4px;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor}
[data-minimized="true"]>.panel-resize-handle{cursor:ew-resize}
.panel-resize-handle:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
[data-resizing="true"]{user-select:none}

/* Message text leads from the top-left; team identity stays in the right column. */
.chat-message{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start;column-gap:0}
.chat-message>p{min-width:0;margin:0;padding-right:10px}
.chat-message-meta{min-width:0;text-align:right}
.chat-message-identity{min-width:0;gap:6px;align-items:center}
.chat-message-identity img{width:28px;height:28px}
.chat-message-identity strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-message-meta time{margin-top:3px;overflow-wrap:anywhere;font-size:10px;line-height:1.4}

html[data-theme] .site-footer .footer-inner.site-credit{display:block;white-space:nowrap;text-align:center;font-size:clamp(10px,2.8vw,14px);line-height:1.4;overflow-x:auto;padding-top:8px;padding-bottom:8px}

.live-score-updates-actions{display:flex;align-items:center;gap:2px;flex:none}
.live-score-updates-heading,.communication-panel-heading{gap:6px}
.live-score-updates-heading h2,.communication-panel-heading h2{min-width:0;white-space:nowrap;font-size:13px}
.communication-panel-heading button:disabled,.live-score-updates-heading button:disabled{opacity:.35;cursor:default}


html[data-theme] #chat-panel[data-maximized="true"]{left:8px!important;right:8px!important;top:var(--chat-max-top,80px)!important;width:calc(100vw - 16px)!important;max-width:none!important;height:var(--chat-max-height,80dvh)!important;max-height:none!important}
#chat-panel[data-maximized="true"]>.panel-resize-handle{display:none}
#chat-panel[data-maximized="true"]>.communication-panel-heading{cursor:default}

.chat-read-status{display:block;color:var(--muted);font-size:10px;margin-top:5px}.chat-view-status{display:inline-block;opacity:.35;cursor:help;font-size:14px;margin-top:5px}.chat-view-status[data-viewed="true"]{opacity:1;color:var(--focus)}.chat-view-status:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

.message-popup-reply{margin-left:10px;font-size:12px}.message-popup-reply-form{display:flex;flex-direction:column;gap:8px;margin-top:10px}.message-popup-reply-form[hidden]{display:none}.message-popup-reply-form textarea{box-sizing:border-box;resize:vertical;width:100%;min-height:58px;max-height:160px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--text);font:inherit;font-size:13px}.message-popup-reply-form button{align-self:flex-end}.message-popup .message-popup-reply-status{font-size:12px;margin:6px 0 0}.message-popup-reply-status:empty{display:none}

.team-message-link{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;font-size:26px;line-height:1;text-decoration:none;border-radius:10px}
.team-message-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.team-message-logo-stack{display:flex;flex-direction:column;align-items:center;gap:4px}
.team-message-count{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:#e92323;color:#fff;font-size:10px;font-weight:800;line-height:1;border:2px solid var(--panel)}
.team-message-count[hidden]{display:none}

/* Anchored update panels; chat retains its floating window controls. */
html[data-theme] :is(#notification-panel,#live-score-updates){position:fixed;top:var(--updates-top,80px);right:12px;left:auto;bottom:auto;width:min(420px,calc(100vw - 24px));max-height:min(70dvh,var(--updates-available-height,calc(100dvh - 100px)));display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-top:3px solid #f4a340;border-radius:18px;background:var(--panel);color:var(--text)}
html[data-theme] :is(#notification-panel,#live-score-updates)[hidden]{display:none}
html[data-theme] :is(#notification-panel,#live-score-updates) :is(.communication-panel-heading,.live-score-updates-heading){background:var(--panel);color:var(--text);cursor:default;touch-action:auto;padding:16px;border-bottom:1px solid var(--line);user-select:auto;flex-shrink:0}
html[data-theme] :is(#notification-panel,#live-score-updates) h2{font-size:17px}
html[data-theme] #notification-panel .notification-panel-body{min-height:0;overflow:auto;max-height:none;overscroll-behavior:contain}
html[data-theme] #live-score-updates .live-score-updates-list{min-height:0;overflow:auto;overscroll-behavior:contain}
.live-score-update-team-heading{justify-content:flex-start;flex-wrap:wrap;gap:6px}
.live-score-update-team-heading .live-score-update-points{margin-left:auto}
.scoring-team-highlight{color:#f4a340}
html[data-theme="light"] .scoring-team-highlight{color:#945000}
@media(max-width:850px){
 html[data-theme] :is(#notification-panel,#live-score-updates){top:var(--updates-top,80px);left:8px;right:8px;bottom:auto;width:auto;max-height:min(65dvh,var(--updates-available-height,calc(100dvh - 170px)));border-radius:12px 12px 22px 22px;box-shadow:0 12px 40px #00000040}
}

/* Consistent notification test controls across screen sizes. */
.notification-preferences-page .message-test-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.notification-preferences-page .message-test-actions .button{box-sizing:border-box;justify-self:stretch;width:100%;min-width:0;min-height:46px;padding:12px 14px;margin:0;background:var(--panel-2);color:var(--text);border:1px solid var(--line);font-family:inherit;font-size:14px;line-height:1.4;text-align:center;white-space:normal;cursor:pointer}
.notification-preferences-page .message-test-actions .button:hover:not(:disabled){border-color:var(--focus)}
.notification-preferences-page .message-test-actions .button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.notification-preferences-page .message-test-actions .button:disabled{opacity:.55;cursor:wait}
.notification-preferences-page #message-test-status:empty{display:none}
.notification-preferences-page #message-test-status:not(:empty){padding:10px 12px;margin:14px 0;border-left:3px solid var(--focus);background:var(--panel-2);border-radius:6px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:650px){.notification-preferences-page .message-test-actions{grid-template-columns:1fr}.notification-preferences-page{padding-bottom:28px}}

@keyframes updates-open{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference){html[data-theme] :is(#notification-panel,#live-score-updates):not([hidden]){animation:updates-open .18s ease-out}}

/* Timestamp spans the message width; receipts sit beneath it at the left. */
.chat-message>.chat-message-time{grid-column:1/-1;justify-self:stretch;text-align:right;white-space:nowrap;overflow-x:auto;overflow-wrap:normal;margin-top:5px;font-size:10px;line-height:1.4}
.chat-message>:is(.chat-read-status,.chat-view-status){grid-column:1/-1;justify-self:start;align-self:end;text-align:left;margin-top:5px;overflow-wrap:anywhere}

.settings-tabs{flex-wrap:wrap;gap:8px}.settings-profile-summary{margin-bottom:16px}.theme-preference-label{display:flex;align-items:center;justify-content:space-between;gap:16px}.theme-preference-label select{background:var(--panel-2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:10px 14px;font:inherit;min-width:130px}#theme-save-status{font-size:13px;line-height:1.5}#theme-save-retry[hidden]{display:none}

/* Slightly contrasting surfaces distinguish the two update dropdowns. */
html[data-theme="light"] :is(#notification-panel,#live-score-updates){--updates-surface:color-mix(in srgb,var(--panel) 90%,#172033)}
html[data-theme="dark"] :is(#notification-panel,#live-score-updates){--updates-surface:color-mix(in srgb,var(--panel) 90%,white)}
html[data-theme] :is(#notification-panel,#live-score-updates),html[data-theme] :is(#notification-panel,#live-score-updates) :is(.communication-panel-heading,.live-score-updates-heading){background:var(--updates-surface,var(--panel))}

/* Compact chat with a clear reading order and bottom composer. */
html[data-theme] #chat-panel{width:min(390px,calc(100vw - 24px));border:2px solid var(--focus);border-radius:16px;overflow:hidden;padding:0}
#chat-panel .communication-panel-heading{padding:10px 12px;background:var(--panel);border-bottom:1px solid var(--line)}
#chat-panel .communication-panel-heading h2{font-size:18px}
#chat-panel .chat-panel-body{padding:8px 10px;display:flex;flex-direction:column;min-height:0}
#chat-panel[data-minimized=true] .chat-panel-body{display:none}
#chat-panel .chat-conversation-label{font-size:10px;margin:0 0 3px}
#chat-panel-conversation{font-size:12px;padding:5px 7px}
#chat-panel .chat-log{height:min(300px,38dvh);padding:3px 0;margin:8px 0;flex:1;min-height:100px}
html[data-theme] #chat-panel .chat-message{padding:4px 2px;margin:0 0 5px;background:transparent!important;border:0;color:var(--text);font-size:12px}
#chat-panel .chat-message-meta{display:flex;align-items:center;gap:7px}
#chat-panel .chat-message-identity{justify-content:flex-start;text-align:left;gap:6px;min-width:0}
#chat-panel .chat-message-identity strong{font-size:12px}
#chat-panel .chat-message-time{font-size:9px;text-align:left;white-space:nowrap}
#chat-panel .chat-message-body{margin-left:30px}
#chat-panel .chat-message-body p{margin:2px 0;line-height:1.4}
.chat-message-body ul{padding-left:16px;margin:3px 0}
.chat-shared-image{display:block;max-width:100%;max-height:180px;border-radius:7px;object-fit:contain;margin:5px 0}
.chat-date-divider{display:table;margin:8px auto;padding:2px 8px;border:1px solid var(--line);border-radius:99px;color:var(--muted);font-size:9px}
.chat-message-actions{display:flex;gap:8px;align-items:center;margin:3px 0 0 30px}
.chat-reaction{border:1px solid var(--line);background:var(--panel-2);color:var(--text);border-radius:99px;padding:2px 6px;font-size:10px;cursor:pointer}
.chat-reaction[aria-pressed=true]{border-color:var(--focus);background:var(--accent-soft);color:var(--accent)}
#chat-panel .chat-composer{display:block;border:1px solid var(--line);border-radius:10px;overflow:hidden;flex:none}
#chat-panel .chat-composer[hidden]{display:none}
#chat-panel .chat-composer textarea{box-sizing:border-box;display:block;width:100%;min-height:46px;max-height:120px;border:0;border-radius:0;padding:8px;resize:vertical;font-size:12px}
.chat-composer-toolbar{display:flex;align-items:center;gap:2px;padding:4px 5px;background:var(--accent-soft);flex-wrap:wrap}
#chat-panel .chat-composer-toolbar button,.chat-emoji-picker button{width:27px;height:27px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--text);font-size:13px;cursor:pointer}
#chat-panel .chat-composer-toolbar button:hover,.chat-emoji-picker button:hover{background:var(--panel)}
#chat-panel .chat-composer-toolbar .chat-send{margin-left:auto;font-size:18px}
.chat-composer-toolbar [data-chat-format=gif]{font-size:9px!important;font-weight:800}
.chat-attachment-preview{display:flex;justify-content:space-between;align-items:center;padding:4px 8px;font-size:10px;background:var(--panel-2)}
.chat-attachment-preview[hidden],.chat-emoji-picker[hidden]{display:none}
.chat-emoji-picker{display:flex;flex-wrap:wrap;padding:3px}
#chat-panel .chat-status:empty{display:none}
#chat-panel .chat-status{font-size:11px;margin:4px 0}

html[data-theme] #chat-panel .chat-message{display:block}
html[data-theme] #chat-panel .communication-panel-heading,html[data-theme] #chat-panel .communication-panel-heading :is(h2,button,a){color:var(--text)}
#chat-panel .chat-message-identity img{width:24px;height:24px}

#chat-panel .chat-gif-picker{border:1px solid var(--accent,#57aaff);border-radius:12px;background:var(--surface,#122235);padding:10px;margin-top:8px;color:var(--text)}
#chat-panel .chat-gif-picker[hidden]{display:none}
#chat-panel .chat-gif-heading,#chat-panel .chat-gif-footer{display:flex;justify-content:space-between;align-items:center;gap:8px}
#chat-panel .chat-gif-picker button{color:var(--text);background:var(--surface);border:1px solid var(--border,#526781);border-radius:8px;cursor:pointer;padding:6px}
#chat-panel .chat-gif-picker input{width:100%;margin:8px 0;padding:8px;border-radius:8px}
#chat-panel .chat-gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:210px;overflow:auto}
#chat-panel .chat-gif-grid button{padding:0;overflow:hidden;font-size:11px}
#chat-panel .chat-gif-grid img{width:100%;height:75px;object-fit:cover;display:block}
#chat-panel .chat-gif-grid button:focus-visible{outline:2px solid var(--accent,#57aaff)}
#chat-panel .chat-gif-footer{margin:8px 0;font-size:11px}
#chat-panel .chat-attachment-preview img{width:64px;height:48px;object-fit:contain;border-radius:6px}

/* Shared scoring and notification window controls. */
html[data-theme] :is(#notification-panel,#live-score-updates)[data-minimized="true"] :is(.notification-panel-body,.live-score-updates-list,.live-score-updates-filters){display:none!important}
html[data-theme] :is(#notification-panel,#live-score-updates)[data-minimized="true"]{height:auto!important;min-height:0!important;max-height:none!important}
html[data-theme] :is(#notification-panel,#live-score-updates)[data-maximized="true"]{inset:var(--updates-top,80px) 8px 12px!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important}
html[data-theme] :is(#notification-panel,#live-score-updates)[data-maximized="true"] :is(.notification-panel-body,.live-score-updates-list){flex:1;min-height:0;max-height:none;overflow:auto}

/* Minimized panels must override fixed/fullscreen sizing, including resize dimensions. */
html[data-theme] :is(#notification-panel,#live-score-updates)[data-minimized="true"]{top:var(--updates-top,80px)!important;right:12px!important;bottom:auto!important;left:auto!important;inset:auto 12px auto auto!important;top:var(--updates-top,80px)!important;width:min(420px,calc(100vw - 24px))!important;height:auto!important;min-height:0!important;max-height:none!important}
html[data-theme] :is(#notification-panel,#live-score-updates)[data-minimized="true"] :is(.communication-panel-heading,.live-score-updates-heading){border-bottom:0}

/* Readable chat typography on mobile and desktop without widening the panel. */
html[data-theme] #chat-panel .chat-message{font-size:15px;line-height:1.5}
#chat-panel .chat-message-identity strong{font-size:15px;line-height:1.35}
#chat-panel .chat-message-time,#chat-panel .chat-message time{font-size:12px;line-height:1.4}
#chat-panel .chat-message-body p{font-size:15px;line-height:1.5}
#chat-panel .chat-conversation-label{font-size:13px}
#chat-panel-conversation{font-size:15px;padding:8px 10px}
#chat-panel .chat-composer textarea{font-size:15px;line-height:1.45}
#chat-panel .chat-composer-toolbar button{font-size:16px;min-width:30px;min-height:30px}
#chat-panel .chat-composer-toolbar .chat-send{font-size:21px}
#chat-panel .chat-status,#chat-panel .chat-message-actions{font-size:13px}
