.ff-prefs {
  --pref-bg:#252529; --pref-line:#414147; --pref-ink:#f6f5f2; --pref-hover:#39393e;
  display:inline-flex; align-items:center; flex:none; position:relative; padding:2px;
  background:var(--pref-bg); border:1px solid var(--pref-line); border-radius:999px; color:var(--pref-ink);
}
.ff-pref-trigger {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-height:36px; border:0; border-radius:999px; background:transparent; color:inherit;
  font:700 11px/1 Inter,system-ui,sans-serif; letter-spacing:.04em; cursor:pointer; padding:0 10px;
}
.ff-mode {width:36px; padding:0}
.ff-pref-icon {width:17px; height:17px; display:block; flex:none}
.ff-pref-trigger::-webkit-details-marker {display:none}
.ff-mode .sun,html[data-brightness=light] .ff-mode .moon {display:none}
html[data-brightness=light] .ff-mode .sun {display:block}
.ff-language {position:relative}
.ff-language summary {list-style:none}
.ff-language[open] summary,.ff-pref-trigger:hover,.ff-lang-list button:hover {background:var(--pref-hover)}
.ff-lang-list {
  position:absolute; z-index:20; top:calc(100% + 9px); right:-3px; width:145px; padding:5px;
  border:1px solid var(--pref-line); border-radius:13px; background:var(--pref-bg); box-shadow:0 10px 24px #14141a26;
}
.ff-lang-list button {display:flex; align-items:center; justify-content:space-between; min-height:38px; width:100%; padding:0 10px; border:0; border-radius:8px; background:transparent; color:inherit; font:600 14px/1.2 Inter,system-ui,sans-serif}
.ff-lang-list .check {visibility:hidden; width:15px}
.ff-lang-list button[aria-pressed=true] .check {visibility:visible}
.ff-prefs :is(button,summary):focus-visible {outline:2px solid currentColor; outline-offset:2px}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .ff-pref-trigger .ff-pref-icon {transition:transform .18s ease-out}
  .ff-pref-trigger:hover .ff-pref-icon {transform:translateY(-2px) rotate(-8deg)}
}
@media (max-width:640px) {
  .project-frostfire .account-tools {gap:3px; padding-inline:0}
  .project-frostfire .bar .steam-button {width:36px; height:36px; padding:0; justify-content:center}
  .project-frostfire .bar .steam-button span {display:none}
  .ff-pref-trigger {min-height:38px}
}

html[data-brightness=light] {color-scheme:light; background:#f4f3ef}
html[data-brightness=light] body.project-frostfire {
  --bg:#f4f3ef; --panel:#fff; --card:#eae9e5; --stroke:#cfcec9; --text:#232626; --muted:#565d5d;
  --ice:#365657; --accent:#315858; --tint:#dce7e2; --fire:#915924;
  --tool-accent:#254c44; --tool-accent-ink:#fff; --tool-focus:#326b64;
  background-color:var(--bg); color:var(--text);
  &::before {opacity:.15}
  .ff-prefs {--pref-bg:#fff; --pref-line:#cfcec9; --pref-ink:#283331; --pref-hover:#e7eeea}
  .head {background:var(--bg); color:var(--text)}
  .head .brand-mark {background:#242629; border-radius:9px}
  .frost-brand-name,.footer-name,.site-breadcrumbs :is(a,[aria-current]),.site-breadcrumbs li::before {color:var(--text)}
  .site-breadcrumbs a:is(:hover,:focus-visible) span {background:var(--card);box-shadow:0 0 0 3px var(--card)}
  .bar nav,.bar nav :is(a,summary),.bar .account-icon,.bar .steam-button,.bar .account-menu>summary {background:#e8e8e3;color:#303735}
  .bar nav :is(a,summary):hover,.bar nav details[open]>summary {background:#d7e3dc;color:#193e31}
  .bar nav a[aria-current=page] {background:#c9e8d2;color:#1b3d2c!important;box-shadow:none}
  :is(.frost-nav-dropdown,.account-menu>div,.notice-popover,.cookie-notice,.style-studio,.server-tool-dialog,.contents,.tool-panel,.mode-rule,.clan-card,.support-guest,.search) {background:var(--panel);color:var(--text);border-color:var(--stroke)}
  :is(.frost-nav-dropdown,.account-menu>div,.notice-popover,.style-studio,.cookie-notice) {box-shadow:0 6px 26px #252a3114}
  .frost-nav-dropdown a,.account-menu>div :is(a,button),.notice-popover :is(h2,p),.cookie-notice :is(h2,p),.style-studio :is(h2,legend),.mode-rule :is(summary,p) {color:var(--text)}
  .cookie-notice .secondary,.style-studio :is(.style-palette,.style-frames button,.close) {background:var(--card);border-color:var(--stroke);color:var(--text)}
  .style-studio button[aria-pressed=true] {outline:2px solid var(--accent)}
  .rocket-caption {color:#21282a;text-shadow:none}
  .rocket-caption :is(.rocket-hook,.rocket-scroll-hint) {color:#4b5553}
  .rocket-cta-secondary {background:#fff;color:#2f3c35;border-color:#aaa}
  .site-footer {background:var(--bg);color:var(--text);border-color:var(--stroke)}
  .site-footer :is(a,small,p,button,.skin-credit,.store-payment-note) {color:var(--muted)}
  .site-ticker {background:var(--card);color:#4f5956}
  .newsroom {--ink:#242824; --muted:#59605e; --surface:#fff}
  .newsroom :is(.newsroom-filters a,.newsroom-tag,.newsroom-return) {background:#e0e3de;color:#303931}
  .newsroom-filters a[aria-current] {background:#243c32;color:#fff}
  .newsroom :is(.newsroom-tile,.newsroom-hero):hover {background:#f9faf7;outline-color:var(--stroke)}
  .newsroom-content .news-copy :is(p,ul) {color:var(--muted)}
  .ff-scoreboard {--board-line:#d3d5ce; --board-ink:#26302c; --board-accent:#8b4b17; background:var(--bg)}
  .ff-scoreboard :is(.ff-board-main,.ff-board-grid>aside,.ff-clan-top>div>a,.ff-board-tools details>div,.leaderboard-table,.ff-board-tools .search) {background:var(--panel);color:var(--text)}
  .ff-scoreboard :is(nav a,.ff-board-tools>a,.ff-board-tools summary,.ff-board-tools details a,.ff-board-grid>aside a,.ff-clan-top a>span,.ff-clan-top a>small,.ff-board-grid>aside h2) {color:var(--text)}
  .ff-scoreboard :is(.ff-board-tools>a,.ff-board-tools summary,.ff-board-grid>aside a,th,.ff-board-main>nav) {background:var(--card)}
  .ff-scoreboard .ff-board-main>nav a[aria-current=page] {background:#e2d4bf;color:#402b13}
  .ff-scoreboard .leaderboard-table :is(td,th,td a) {color:var(--text)}
  .ff-scoreboard .leaderboard-table tr {background:var(--panel)}
  .ff-scoreboard .leaderboard-table tr:hover {background:var(--card)}
  .ff-scoreboard .leaderboard-table .selected-metric {color:var(--accent)}
  :is(input:not([type=checkbox],[type=radio],[type=color],[type=file]),select,textarea) {color:var(--text);background:var(--panel);border-color:var(--stroke)}
  :is(input,textarea)::placeholder {color:#65706c}
}

html[data-brightness=light] body.project-frostfire {
  .notice-popover header,.score-chip,.frost-missing,.graffiti-empty {background:var(--card);color:var(--text)}
  .notice-popover header :is(label,b),.graffiti-empty .board-empty,.frost-missing :is(h1,p) {color:var(--text)}
  .newsroom .newsroom-filters a[aria-current] {color:white!important}
  .ff-scoreboard .ff-board-grid>aside a[aria-current=page] {color:var(--text)!important}
  .ff-scoreboard .leaderboard-table .rank-badge,.ff-scoreboard th[aria-sort] a :is(span,b) {color:#62421b}
  .page-heading p,.faq-list p,.site-related a,.frost-lane-title {color:var(--muted)}
  .faq-list p a {color:var(--ice)}
  .faq-list summary:is(:hover,:focus-visible) {background:var(--card)}
  .frost-server-banner-body {color:#f7f5ef}
  .monitor-heading p,.monitor-reading .monitor-updated,.monitor-online .monitor-count {color:var(--text)}
  .monitor-heading .monitor-kicker {color:#855121}
  .wipe-legend li[data-wipe-kind],.wipe-event-list li[data-wipe-kind] time {color:var(--text)}
  .wipe-grid time[data-wipe-kind] {background:#dce9df;color:#244a37}
  .wipe-grid time[data-wipe-kind~=tournament] {background:#f4dfbc;color:#5a3b18}
  .site-related :is(a,a:hover) {color:var(--ice)}
}
@media (max-width:650px) {
  .project-frostfire .rocket-ranking {left:50%;width:min(90%,395px)}
}
