/* Semantic colours shared by every page. Only the theme preference is stored. */
:root {
  color-scheme:dark;
  --bg:#111315; --panel:#191c1f; --surface:#23272b; --hover:#2a2e32;
  --text:#eceef0; --muted:#9a9fa6; --line:#30353a; --control-line:#484f57;
  --input:#171a1d; --action:#e8b878; --action-hover:#f0c58f; --on-action:#302414;
  --accent:#e8b878; --orange:#e8b878; --accent-soft:#322b22;
  --selected:#2b2a25; --selected-line:#8c795b; --focus:#e8b878;
  --blue:#a6bfd9; --blue-soft:#26323f; --amount-color:#eceef0;
  --success-color:#9bcbb3; --danger:#f1a1a5; --danger-soft:#362326; --danger-line:#6c3d44;
  --avatar-surface:#2a2e33; --transfer-surface:#191c1f;
}
:root[data-theme="light"] {
  color-scheme:light;
  --bg:#f8f9fa; --panel:#ffffff; --surface:#eef0f2; --hover:#f0f2f4;
  --text:#25282d; --muted:#69717c; --line:#e0e3e7; --control-line:#c7ccd3;
  --input:#ffffff; --action:#edbc7f; --action-hover:#e4aa64; --on-action:#332515;
  --accent:#8b5d24; --orange:#8b5d24; --accent-soft:#f8efdf;
  --selected:#fbf5ea; --selected-line:#c1a277; --focus:#906322;
  --blue:#45688b; --blue-soft:#eaf0f7; --amount-color:#25282d;
  --success-color:#387655; --danger:#b33d49; --danger-soft:#fff0f1; --danger-line:#e8b7bd;
  --avatar-surface:#e9edf1; --transfer-surface:#ffffff;
}
.theme-toggle { display:grid; place-items:center; width:36px; height:36px; padding:8px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:transparent; }
.theme-toggle:hover { color:var(--text); background:var(--hover); }
.theme-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.theme-moon { display:none; }
[data-theme="light"] .theme-sun { display:none; }
[data-theme="light"] .theme-moon { display:block; }
/* Legacy operator screens use the same surfaces and accessible text colours. */
.profile-editor,.character-choice,.login-panel,.create-party-dialog .dialog-actions,.portrait-footer { background:var(--panel); border-color:var(--line); }
.profile-editor>p,.login-panel p,.field-help,.character-server,.portrait-credit,.profile-eyebrow,.archive-item span,.archive-section p,.roster-columns,.account-profile>span { color:var(--muted); }
.party-title-link,.distribution strong,.page-tabs a,.account-row,.history-transfer strong { color:var(--text); }
.page-tabs a[aria-current="page"],.ratio-field output,.account-profile .account-status { color:var(--accent); }
.ratio-field,.assignment-row,.roster-intro,.room-request-account { background:var(--surface); color:var(--text); border-color:var(--line); }
.party-list,.hub-party-row,.roster-line,.roster-columns,.roster-lines.with-accounts,.split-settings,.profile-roster,.profile-character,.history-round,.history-sale,.account-row,.archive-item,.archive-section,.page-tabs { border-color:var(--line); }
.roster-account .account-add,.profile-button,.button-profile,.assigned-owner,.owner-access,.mode-badge.solo { color:var(--accent); background:var(--accent-soft); border-color:var(--selected-line); }
.history-complete,.history-round-count,#member-result,#admin-saved { color:var(--success-color); }
[data-theme="light"] :is(.color-0,.member-avatar,.a) { --member-color:#8b5d24; --member-bg:#f4e8d7; }
[data-theme="light"] :is(.color-1,.b) { --member-color:#45688b; --member-bg:#e5edf6; }
[data-theme="light"] .color-2 { --member-color:#387655; --member-bg:#e4f0e9; }
[data-theme="light"] .color-3 { --member-color:#795b9e; --member-bg:#eee7f5; }
[data-theme="light"] .color-4 { --member-color:#a44264; --member-bg:#f6e5ed; }
[data-theme="light"] .color-5 { --member-color:#2b7386; --member-bg:#e1f0f4; }
