/* News and forum share the player's HUD palette; ratings keep their own layout. */
body.interface-shell[data-animated-theme] :is(.community-dialog,.stp-dialog) {
  --gold:var(--animated-theme-accent);--gold-b:var(--animated-theme-light);
  --gold-d:color-mix(in srgb,var(--animated-theme-accent) 60%,transparent);
  --gold-g:color-mix(in srgb,var(--animated-theme-accent) 18%,transparent);
}
/* Use the same density and blur sliders as the other floating game windows. */
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) {
  --community-fill:var(--interface-glass-fill,color-mix(in srgb,var(--bg-base) calc(var(--interface-glass-opacity,.55) * 100%),transparent));
  --glass-bg:var(--community-fill);--glass-bg-s:var(--community-fill);
  --glass-bg-h:color-mix(in srgb,var(--gold) calc(var(--interface-glass-opacity,.55) * 12%),transparent);
  background:rgb(1 2 4 / calc(var(--interface-glass-opacity,.55) * .35));backdrop-filter:none;
}
body.interface-shell .community-section-tabs {display:flex;gap:6px;align-items:center;margin-left:auto}
body.interface-shell .community-section-tabs[hidden] {display:none}
body.interface-shell .community-section-tabs button {min-height:44px;padding:9px 20px;border:1px solid var(--glass-border);border-radius:6px;background:var(--glass-bg);color:var(--text-2);font:600 13px var(--font-ui);cursor:pointer}
body.interface-shell .community-section-tabs [aria-pressed="true"] {border-color:var(--gold-d);background:var(--gold-g);color:var(--gold-b)}
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog {width:min(1220px,calc(100vw - 40px));height:min(850px,calc(100dvh - 48px));min-height:0;border-color:var(--glass-border-b);border-radius:10px;background:var(--community-fill);backdrop-filter:blur(var(--interface-glass-blur,12px));color:var(--text-1)}
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-header {padding:18px 22px;min-height:0;gap:20px;border-color:var(--glass-border);background:var(--glass-bg-h)}
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-header h2 {font:600 30px/1.1 'Cormorant Garamond',Georgia,serif;color:var(--gold-b)}
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-kicker {font:600 10px/1.4 var(--font-ui);color:var(--text-3);letter-spacing:.07em;margin-bottom:6px}
body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-close {width:44px;height:44px;flex-basis:44px;border-color:var(--glass-border-b);background:var(--glass-bg);color:var(--text-2)}
body.interface-shell #communityModal :is(button,input,textarea):focus-visible {outline:2px solid var(--gold);outline-offset:3px}
body.interface-shell #communityModal[data-mode="news"] .community-news-layout {height:100%;min-height:0;display:grid;grid-template-columns:300px minmax(0,1fr)}
.community-news-sidebar {display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--glass-border);background:var(--glass-bg)}
.community-news-tools {padding:18px 16px 10px;display:grid;gap:12px;border-bottom:1px solid var(--glass-border)}
.community-news-tools label {display:grid;gap:7px;font:600 12px var(--font-ui);color:var(--text-2)}
.community-news-search {width:100%;box-sizing:border-box;min-height:42px;padding:9px 11px;border:1px solid var(--glass-border);border-radius:5px;background:var(--glass-bg-s);color:var(--text-1);font:13px var(--font-ui)}
.community-news-filters {display:flex;gap:4px}
.community-news-filters button {flex:1;min-height:38px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--text-3);font:600 12px var(--font-ui);cursor:pointer}
.community-news-filters [aria-pressed="true"] {color:var(--gold-b);border-color:var(--glass-border-b);background:var(--gold-g)}
.community-news-list-count {font:11px var(--font-ui);color:var(--text-3)}
body.interface-shell #communityModal .community-news-list {min-height:0;flex:1;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain;border:0;background:none;padding:8px}
body.interface-shell #communityModal .community-news-row {min-height:0;gap:9px;padding:14px 12px;margin-bottom:5px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--text-2)}
body.interface-shell #communityModal .community-news-row.active {border-color:var(--glass-border-b);background:var(--gold-g)}
body.interface-shell #communityModal .community-news-row::before {display:none}
body.interface-shell #communityModal .community-news-row:hover {background:var(--glass-bg-h)}
body.interface-shell #communityModal .community-news-row b {font:600 14px/1.4 var(--font-ui);color:var(--text-1)}
body.interface-shell #communityModal .community-news-row.unread b {color:var(--gold-b)}
body.interface-shell #communityModal .community-news-row time {font:10px/1.4 var(--font-ui);color:var(--text-3)}
.community-news-row-top {align-items:flex-start}
.community-news-row-top i {flex-shrink:0}
body.interface-shell #communityModal .community-news-row-summary {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font:12px/1.5 var(--font-ui);color:var(--text-3)}
.community-news-row-meta {font:10px/1.4 var(--font-ui);color:var(--text-3)}
.community-news-list-empty {padding:20px 10px;display:grid;gap:15px;color:var(--text-3);font:13px/1.6 var(--font-ui)}
.community-news-list-empty button,.community-news-retry {min-height:44px;border:1px solid var(--glass-border-b);border-radius:5px;background:var(--gold-g);color:var(--gold-b);cursor:pointer}
body.interface-shell #communityModal .community-news-article {min-width:0;padding:24px 30px 32px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.interface-shell #communityModal .community-news-cover {height:auto;min-height:0;display:flex;justify-content:center;margin:0 0 22px;border:0;border-radius:7px;background:transparent}
body.interface-shell #communityModal .community-news-cover::after {display:none}
body.interface-shell #communityModal .community-news-cover img {position:static;display:block;width:auto;height:auto;max-width:100%;max-height:min(35dvh,340px);object-fit:contain;border:1px solid var(--glass-border);border-radius:7px;box-sizing:border-box}
body.interface-shell #communityModal .community-news-article-heading {margin:0;padding:0;border:0}
.community-news-official {display:inline-block;margin-right:10px;color:var(--gold-b);font:600 11px/1.5 var(--font-ui)}
body.interface-shell #communityModal .community-news-article time {font:11px/1.5 var(--font-ui);color:var(--text-3)}
body.interface-shell #communityModal .community-news-article h3 {font:600 31px/1.12 'Cormorant Garamond',Georgia,serif;margin:10px 0 0;color:var(--text-1);overflow-wrap:anywhere}
body.interface-shell #communityModal .community-news-summary {font:14px/1.65 var(--font-ui);color:var(--text-2);margin:12px 0 0}
body.interface-shell #communityModal .community-news-body {font:14px/1.8 var(--font-ui);color:var(--text-2);max-width:76ch;overflow-wrap:anywhere}
body.interface-shell #communityModal .community-news-body strong {color:var(--gold-b)}
body.interface-shell #communityModal .community-news-engagement {margin:20px 0 24px;padding:12px 0;border-color:var(--glass-border);gap:12px;flex-wrap:wrap;justify-content:flex-start}
body.interface-shell #communityModal .community-news-reaction {min-height:44px;height:auto;min-width:68px;justify-content:center;gap:8px;padding:8px 12px;border-color:var(--glass-border);background:var(--glass-bg);color:var(--text-2);border-radius:6px}
body.interface-shell #communityModal .community-news-reaction.active {border-color:var(--gold);background:var(--gold-g);color:var(--text-1)}
.community-news-reaction-icon {width:23px;height:23px;object-fit:contain}
body.interface-shell #communityModal .community-news-reaction b {font:600 12px var(--font-ui)}
.community-news-discussion-link,.community-news-comment-refresh {min-height:44px;padding:8px 12px;border:1px solid var(--glass-border);border-radius:6px;background:var(--glass-bg);color:var(--gold-b);font:600 12px var(--font-ui);cursor:pointer}
body.interface-shell #communityModal .community-news-views {margin-left:auto;font:12px var(--font-ui);color:var(--text-3)}
body.interface-shell #communityModal .community-news-inline-error {flex-basis:100%;font:12px/1.5 var(--font-ui);text-align:left}
body.interface-shell #communityModal .community-news-comments {border-top:1px solid var(--glass-border);padding-top:24px;margin-top:24px}
body.interface-shell #communityModal .community-news-comments-head {justify-content:flex-start;gap:8px}
body.interface-shell #communityModal .community-news-comments-head h4 {font:600 17px var(--font-ui);text-transform:none;color:var(--text-1)}
body.interface-shell #communityModal .community-news-comments-head>span {border:0;background:var(--gold-g);font:600 12px var(--font-ui);color:var(--gold-b)}
.community-news-comment-refresh {margin-left:auto;min-height:36px}
body.interface-shell #communityModal .community-news-comment b {color:var(--gold-b);font:600 13px var(--font-ui)}
body.interface-shell #communityModal .community-news-comment p {font:13px/1.7 var(--font-ui);color:var(--text-2);margin-top:10px}
body.interface-shell #communityModal .community-news-comment time {font:12px/1.5 var(--font-ui);color:var(--text-2)}
body.interface-shell #communityModal :is(.community-news-comments-empty,.community-news-comments-status) {border-color:var(--glass-border);font:13px/1.6 var(--font-ui);color:var(--text-3)}
body.interface-shell #communityModal .community-news-comment-composer {margin-top:16px}
body.interface-shell #communityModal .community-news-comment-composer textarea {box-sizing:border-box;min-height:100px;max-height:260px;padding:12px;background:var(--glass-bg-s);border-color:var(--glass-border-b);font:14px/1.6 var(--font-ui);color:var(--text-1)}
body.interface-shell #communityModal .community-news-composer-actions button {min-height:44px;padding:8px 18px;background:var(--gold-g);border-color:var(--gold-d);color:var(--gold-b);font:600 12px var(--font-ui);text-transform:none}
body.interface-shell #communityModal .community-news-composer-actions {display:flex;justify-content:flex-end}
body.interface-shell #communityModal .community-news-comment-composer {display:grid;gap:12px}
body.interface-shell #communityModal .community-news-comment .community-message {margin-top:12px}
.community-news-back {display:none}
@media (max-width:700px) {
  body.interface-shell #communityModal {padding:8px}
  body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog {width:100%;height:calc(100dvh - 16px);max-width:100%;border-radius:7px}
  body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-header {display:grid;grid-template-columns:minmax(0,1fr) 44px;padding:14px;gap:12px}
  body.interface-shell #communityModal:is([data-mode="news"],[data-mode="forum"]) .community-dialog-header h2 {font-size:27px}
  body.interface-shell .community-section-tabs {grid-column:1/-1;grid-row:2;margin:0}
  body.interface-shell .community-section-tabs button {flex:1}
  body.interface-shell #communityModal .community-dialog-close {grid-row:1;grid-column:2}
  body.interface-shell #communityModal[data-mode="news"] .community-news-layout {display:block;position:relative}
  .community-news-sidebar {height:100%;border:0}
  body.interface-shell #communityModal .community-news-article {display:none;height:100%;box-sizing:border-box;padding:14px 16px 24px}
  body.interface-shell #communityModal .show-article .community-news-article {display:block}
  body.interface-shell #communityModal .show-article .community-news-sidebar {display:none}
  .community-news-back {display:block;min-height:44px;padding:8px 12px;margin:0 0 14px;border:1px solid var(--glass-border-b);border-radius:5px;background:var(--glass-bg);color:var(--gold-b);font:600 13px var(--font-ui);cursor:pointer}
  body.interface-shell #communityModal .community-news-cover img {max-height:min(30dvh,240px)}
  body.interface-shell #communityModal .community-news-article h3 {font-size:28px}
  .community-news-tools {padding:14px}
  .community-news-search,body.interface-shell #communityModal .community-news-comment-composer textarea {font-size:16px}
  .community-news-filters button {min-height:44px}
  body.interface-shell #communityModal .community-news-engagement {gap:8px}
  body.interface-shell #communityModal .community-news-views {font-size:11px}
}
