.site-account:has(>.theme-toggle){display:flex;align-items:center;gap:8px}
.site-account:has(>.theme-toggle)>.site-account-menu-wrap{min-width:0}
.site-account:has(>.theme-toggle) .site-account-trigger{max-width:100%;padding-inline:10px}
.theme-toggle{display:grid;place-items:center;flex:none;width:38px;height:38px;padding:0;border:1px solid var(--line-strong);border-radius:50%;background:var(--surface);color:var(--text);font:24px/1 system-ui}
.theme-toggle:hover{background:var(--surface-raised)}
@media(min-width:1360px){
 .site-header:has(.site-search):has(.theme-toggle){grid-template-columns:170px 290px minmax(100px,390px) 195px 178px minmax(220px,max-content)}
 .site-header:has(.site-search):has(>.project-sort-toggle):has(.theme-toggle){grid-template-columns:170px 290px minmax(100px,390px) 42px 195px 178px minmax(220px,max-content)}
 .site-header>.site-account:has(>.theme-toggle){max-width:none}
 .site-account:has(>.theme-toggle)>.site-account-menu-wrap{flex:0 0 auto}
 .site-account:has(>.theme-toggle) .site-account-trigger>[data-supporter-username]{overflow:visible;text-overflow:clip}
}
:root[data-theme=dark]{color-scheme:dark;--background:#11171c;--surface:#192229;--surface-raised:#222e37;--text:#cdd7de;--muted:#a3b2bd;--subtle:#8b9eac;--line:rgba(181,206,222,.16);--line-strong:rgba(181,206,222,.28);--accent:#d49b7c;--success:#72b68b;--warning:#c7a56c}
html[data-theme=dark] body{background:radial-gradient(circle at 80% 0%,#23313d,transparent 45%),var(--background)}
html[data-theme=dark] :is(.site-header,.site-account-trigger,.site-account-menu,.site-account-status-menu,.site-online-panel,.project-chat-panel,.dm-panel,.account-card,.site-support,.kreosus-account){background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme=dark] :is(.translation-poll,.poll-favorites,.poll-next,.poll-next-game,.project-tile,.feedback-thread,.feedback-entry,.feedback-card,.notice,.download-card,.project-supporters){background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme=dark] :is(.poll-game,.poll-favorites article,.project-chat-message,.dm-message,.feedback-comment,.dm-inbox button,dialog){background:var(--surface-raised);color:var(--text);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea,select){background:#121b22;color:var(--text);border-color:var(--line-strong)}
html[data-theme=dark] :is(.site-search,.site-search input,.site-account-login,.site-unread-comments,.project-sort-toggle,.mobile-header-toggle){background:var(--surface-raised);color:var(--text);border-color:var(--line-strong)}
html[data-theme=dark] :is(.poll-count,.poll-status,.poll-game small,.dm-privacy,.dm-history small,.admin-site-statistics,.feedback-entry small){color:var(--muted)}
html[data-theme=dark] :is(.project-chat-message.is-self,.dm-message.is-self){background:#34302d;border-color:#816249}
html[data-theme=dark] a{color:inherit}
html[data-theme=dark] :is(.project-type-navigation,.poll-ownership-badge.is-owned){background:#173b2a;color:#a5ebbd;border-color:#38724f}
html[data-theme=dark] .poll-ownership-badge.is-missing{background:#3d2d17;color:#ffd388;border-color:#806332}
html[data-theme=dark] .brand-logo{filter:invert(1);mix-blend-mode:screen}
html[data-theme=dark] ::placeholder{color:#8da0ae;opacity:1}
html[data-theme=dark] dialog::backdrop{background:rgba(0,0,0,.7)}
html[data-theme=dark] .project-tile-content{background:var(--surface);color:var(--text)}
html[data-theme=dark] .site-header .site-search input{background:var(--surface-raised);color:var(--text);box-shadow:none}
html[data-theme=dark] .site-account .site-account-trigger{background:var(--surface-raised);color:var(--text)}
html[data-theme=dark] :is(.dm-toast,.dm-history article,.dm-history .dm-message,.avatar-crop-panel){background:var(--surface-raised);color:var(--text);border-color:var(--line)}
/* Quiet controls and indicators, including controls inserted by chat scripts. */
html[data-theme=dark] body button,
html[data-theme=dark] .header-unread-comments{
 background:var(--surface-raised)!important;color:var(--text)!important;
 border-color:var(--line-strong)!important;box-shadow:none!important;text-shadow:none!important;
}
html[data-theme=dark] body button:hover{background:#2b3943!important}
html[data-theme=dark] body button:disabled{color:var(--subtle)!important}
html[data-theme=dark] .dm-chat-tabs button[aria-pressed=true]{background:#354650!important;border-color:#657b89!important}
html[data-theme=dark] .translation-poll :is(.poll-explanation,.poll-next-note){color:#c7a56c}
html[data-theme=dark] .site-support>div>.site-support-description{color:#8facbf}
html[data-theme=dark] .site-support-account-note{color:#c7a56c}
html[data-theme=dark] body button.dm-launch.has-unread{box-shadow:0 0 10px #e53c3c55!important}
html[data-theme=dark] .project-type-navigation{background:#20342a;color:#a0bda9}
html[data-theme=dark] :is(.feedback-stat-icon,.financial-support-badge,.deficiency-support-badge,.deficiency-support-count){background:#2a3740;color:#a6bac7;border-color:#485b68;box-shadow:none}
html[data-theme=dark] .feedback-author-thanks .feedback-stat-icon{color:#c4967f}
html[data-theme=dark] :is(.project-chat-person-avatar,.poll-voter-avatar,.feedback-avatar):not(:has(img)){background:#293740;color:#b1c1cc}
html[data-theme=dark] :is(.project-tile-media img,.supporter-badge){filter:brightness(.86) saturate(.85)}
html[data-theme=dark] .brand-logo{filter:invert(1) brightness(.9);mix-blend-mode:screen}
html[data-theme=dark] .supporter-badge.is-premium{filter:brightness(.86) saturate(.8)}
