:root{color-scheme:light;--nick-emerald:#087657;--nick-blue:#2459af;--nick-violet:#7440b0;--nick-rose:#b02e68;--nick-amber:#915b06;--nick-cyan:#08717e}
.nickname[data-nick=emerald]{color:var(--nick-emerald)}
.nickname[data-nick=blue]{color:var(--nick-blue)}
.nickname[data-nick=violet]{color:var(--nick-violet)}
.nickname[data-nick=rose]{color:var(--nick-rose)}
.nickname[data-nick=amber]{color:var(--nick-amber)}
.nickname[data-nick=cyan]{color:var(--nick-cyan)}
.infection-badge{display:inline-block;margin-left:7px;font-size:.9em;vertical-align:baseline}
.rating-tabs{gap:3px}
.rating-tabs button{min-width:0;padding:12px 5px;font-size:13px}
.theme-setting{display:flex;position:relative;align-items:center;justify-content:space-between;gap:16px;min-height:60px;cursor:pointer}
.theme-setting small{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.theme-setting input{position:absolute;right:0;width:52px;height:32px;margin:0;opacity:0;z-index:1;cursor:pointer}
.theme-track{flex:0 0 52px;height:32px;border-radius:18px;background:#798883;padding:4px;pointer-events:none}
.theme-track::before{content:"";display:block;width:24px;height:24px;border-radius:50%;background:#fff;transform:translateX(0);transition:transform .18s ease-out}
.theme-setting input:checked+.theme-track{background:#087b60}
.theme-setting input:checked+.theme-track::before{transform:translateX(20px)}
.theme-setting input:focus-visible+.theme-track{outline:3px solid #387ac0;outline-offset:4px}
.theme-setting input:disabled+.theme-track{opacity:.55}
.nickname-palette{border:0;padding:0;margin:20px 0 0;display:flex;flex-wrap:wrap;gap:9px}
.nickname-palette legend{padding:0;margin-bottom:12px;font-size:14px}
.nickname-swatch{display:grid;place-items:center;width:46px;height:46px;border:1px solid var(--line);border-radius:12px;font-size:18px;font-weight:650;background:transparent}
.nickname-swatch[aria-pressed=true]{outline:2px solid currentColor;outline-offset:2px}

/* Dark surfaces cover the game, dialogs, communities and creator tools. */
:root[data-theme=dark]{color-scheme:dark;color:#e5ece9;background:#0e1417;--green:#49d3ad;--ink:#93abae;--muted:#a7b8b1;--line:#2b373b;--nick-emerald:#58dbac;--nick-blue:#8cbaff;--nick-violet:#c2a0ff;--nick-rose:#ff9bc5;--nick-amber:#f4c16b;--nick-cyan:#6dd5e1}
[data-theme=dark] body{background:#0e1417}
[data-theme=dark] :is(.app,.bottom-nav,dialog){background:#141a1e;color:#e5ece9;border-color:var(--line)}
[data-theme=dark] dialog::backdrop{background:#0009}
[data-theme=dark] :is(.field input,.field select,.community-search-row input,.developer-secret input,.developer-link-row input){background:#202a2e;color:#e5ece9;border-color:#42534d}
[data-theme=dark] :is(input,select)::placeholder{color:#a7b8b1}
[data-theme=dark] :is(.icon-button,.score-block h1,.paper-hint,.game-tabs button,.bottom-nav button,.rank-score,.small-note,.dialog-copy,.achievements-row.locked){color:#a7b8b1}
[data-theme=dark] :is(.icon-button:hover,.rank-row:hover,.admin-player-row:hover){background:#202d2d}
[data-theme=dark] :is(.game-tabs [aria-selected=true],.bottom-nav [aria-current],.rank-name,.rank-number,.passive,.text-button,.item-gain,.positive,.gift,.paper-float){color:#49d3ad}
[data-theme=dark] .scroll-rate{color:#8bbce0}
[data-theme=dark] :is(.item-icon,.avatar,.health-box,.receipt,.login-panel,.daily-day,.community-mark,.community-secondary,.secondary-button,.admin-badge.is-active){background:#20362f;color:#8fddbf}
[data-theme=dark] :is(.buy-button,.rating-tabs){background:#243530;color:#8fddbf}
[data-theme=dark] :is(.rating-tabs [aria-selected=true],.community-secondary:hover,.secondary-button:hover){background:#345147;color:#d0f6e6}
[data-theme=dark] .rating-tabs button{color:#afc6bb}
[data-theme=dark] .buy-button:disabled{background:#273033;color:#9dada6}
[data-theme=dark] :is(.health-alert,.health-box.sick,.connection,.admin-notice){background:#382d21;color:#f2c28b}
[data-theme=dark] :is(.negative,.form-error,.community-leave){color:#ffaaa0}
[data-theme=dark] :is(.danger-button,.admin-badge){background:#412a29;color:#ffb1a5}
[data-theme=dark] .danger-button:hover{background:#54342f}
[data-theme=dark] .infected .score-line{color:#f2c28b}
[data-theme=dark] :is(.roll-back,.sheet,.paper-scrap){fill:#28383d}
[data-theme=dark] .roll-face{fill:#344b51}
[data-theme=dark] .roll-shadow{fill:#1c292e}
[data-theme=dark] .roll-hole{fill:#142024}
[data-theme=dark] .paper.rolling .sheet{fill:#30443f}
[data-theme=dark] .paper.rolling .roll-hole{fill:#1a3534}
[data-theme=dark] .paper.rolling .perforations{stroke:#49d3ad}
[data-theme=dark] :is(.game-guide h3,.community-empty h3,.developer-docs h3){color:#e5ece9}
[data-theme=dark] :is(.game-guide .small-note,.community-copy,.community-current small,.community-list-heading>span,.community-empty,.community-pagination,.community-footnote,.community-title p,.community-totals span,.community-personal,.community-member>small,.community-member div>span,.developer-balance,.developer-docs,.developer-log span,.developer-log small,.avatar-upload-note,.developer-section .small-note,#community-deposit-form .small-note,.login-panel span){color:#afc6bb}
[data-theme=dark] :is(.community-personal strong,.community-telegram,.community-cancel,.community-share,.developer-balance strong,.developer-docs summary){color:#8fddbf}
[data-theme=dark] :is(.community-current,.community-totals,.community-member,.developer-section,.developer-docs details,.developer-log,.admin-player-row,.admin-danger-zone,.admin-facts>div,.admin-details,.admin-history){border-color:var(--line)}
[data-theme=dark] .developer-docs pre{background:#202a2e;color:#d2e2d9}
[data-theme=dark] #admin-view{--muted:#a7b8b1;color:#e5ece9}
[data-theme=dark] :is(#admin-view .intro,#admin-view .small-note,.admin-count,.admin-player-info>span,.admin-chevron,.admin-pagination>span,.admin-history span,.admin-facts dt){color:#a7b8b1}
[data-theme=dark] :is(#admin-view input,#admin-action-form input,#developer-callback-form input,#community-deposit-form input)::placeholder{color:#a7b8b1}
[data-theme=dark] .primary{background:#087b60;color:#fff}
[data-theme=dark] .primary:disabled{background:#334c43;color:#b7c9bf}
[data-theme=dark] :is(.daily-day.done,.community-subtabs [aria-current=page]){background:#087b60;color:#fff}
[data-theme=dark] :is(.admin-danger-zone p,.admin-copy,.admin-identity p){color:#afc6bb}
[data-theme=dark] .orange{background:linear-gradient(125deg,#9a4210,#995e23)}
[data-theme=dark] .green{background:linear-gradient(125deg,#296348,#086f53)}
[data-theme=dark] .purple{background:linear-gradient(125deg,#63327b,#823699)}
[data-theme=dark] .blue{background:linear-gradient(125deg,#2a3e89,#4056a7)}
[data-theme=dark] .toast{background:#d2e7dd;color:#162b23}
[data-theme=dark] .update-countdown{color:#7ee0c4;text-shadow:none}
[data-theme=dark] .update-countdown span{color:#8fddbf}
[data-theme=dark] .update-countdown strong{text-shadow:0 1px 0 #0e1714}
[data-theme=dark] .hero-bag-meta strong{color:#e5ece9}
[data-theme=dark] .hero-cell{background:#20362f;border-color:#34473d;color:#dce8e1}
[data-theme=dark] .hero-cell.is-empty{background:#1a2428}
[data-theme=dark] .hero-cell.is-empty span{background:#2b373b}
[data-theme=dark] .hero-cell[aria-pressed=true]{background:#263f32;border-color:#49d3ad;outline-color:#49d3ad}
[data-theme=dark] .hero-cell strong{background:#141a1e;color:#8fddbf}
[data-theme=dark] .hero-detail{border-color:var(--line)}
[data-theme=dark] .hero-locked{background:#20362f;color:#8fddbf}
[data-theme=dark] .shop-tabs{border-color:var(--line)}
[data-theme=dark] .shop-tabs button{color:#a7b8b1}
[data-theme=dark] .shop-tabs button[aria-selected=true]{color:#49d3ad;border-color:#49d3ad}
[data-theme=dark] .market-row{border-color:var(--line)}
[data-theme=dark] .market-row .hero-cell-art{background:#302b40}
