@font-face{font-family:Inter;src:url('/fonts/inter-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-500-normal.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-600-normal.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-700-normal.woff2') format('woff2');font-weight:700;font-display:swap}
/* Color-only enhancement: existing layout, item scrolling and business controls keep their contracts. */
html.theme-dark{
  --primary:#d8b77e;--primary-dark:#b89a63;--primary-light:#f0d6a9;--primary-rgb:216,183,126;
  --bg:#0d111b;--bg-2:#171d2a;--bg-3:#202838;--card-bg:#191f2c;--card-bg-2:#212938;
  --sidebar-bg:#141b28;--sidebar-hover:#242d3f;--sidebar-active:rgba(216,183,126,.12);--sidebar-text:#acb6c9;--sidebar-active-text:#f0d6a9;
  --text:#e6eaf2;--text-muted:#a7b2c6;--text-dim:#78869d;--text-primary:var(--text);--bg-card:var(--card-bg);
  --border:#30394b;--border-acc:#d8b77e55;--success:#65cba5;--warning:#efbe76;--danger:#ee8b8b;--info:#b7a6eb;
  --navbar-bg:#141b28e8;--navbar-border:#ffffff16;--accent-dim:#d8b77e12;--accent-border:#d8b77e40;--on-primary:#17151b;
  --modal-bg:#202838;--modal-section:#273246;--modal-input:#141c2b;--modal-border:#43516a;--modal-text:#edf0f6;--modal-muted:#b4bfd2;
  --shadow:0 3px 10px #04061025;--shadow-md:0 6px 22px #04061040;--shadow-lg:0 16px 48px #04061070;--glow:0 0 20px #d8b77e10;
  color-scheme:dark;
}
html.theme-dark body{background:radial-gradient(ellipse at 85% 4%,#54436518,transparent 55%),radial-gradient(ellipse at 5% 90%,#896c3920,transparent 55%),var(--bg);background-attachment:fixed}
html.theme-dark .navbar{background:var(--navbar-bg);border-bottom-color:var(--navbar-border);backdrop-filter:blur(22px)}
html.theme-dark .card{box-shadow:var(--shadow);border-color:var(--border)}
html.theme-dark .card-header{background:#ffffff02;font-weight:600}
html.theme-dark .page-title{font-weight:600;letter-spacing:-.3px}
html.theme-dark .btn-primary{color:var(--on-primary)}
html.theme-dark .sidebar{background:var(--sidebar-bg)}
html.theme-dark .builtin-channel-switch.channel-admin span{color:#e7ba73}
html.theme-dark .builtin-channel-switch.channel-world span{color:#b9bfd4}
.site-footer-bar a{pointer-events:auto;color:inherit;text-decoration:none}.site-footer-bar a:hover{text-decoration:underline;color:var(--primary)}
.footer-copyright{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px 14px;font-weight:400}.footer-copyright a{font-size:10px}.site-footer-bar{font-size:10px}
.register-card{backdrop-filter:blur(20px)}
@media(max-width:760px){.site-footer-bar{flex-wrap:wrap;gap:1px;padding:4px 12px;font-size:9px}.footer-copyright{font-size:9px;gap:8px}.footer-copyright a{font-size:9px}}
@media(prefers-reduced-motion:reduce){.btn,.card,.nav-item,.sidebar-item{transition:none!important}}

html:not(.theme-dark){
--primary:#a56c25;--primary-dark:#84521b;--primary-light:#dab16a;--primary-rgb:165,108,37;
--bg:#f7f1e5;--bg-2:#f1e8d8;--bg-3:#fcf8ef;--card-bg:#faf5e9;--card-bg-2:#efe4d1;
--text:#352e23;--text-muted:#71634f;--text-dim:#8a7961;--text-primary:var(--text);--bg-card:var(--card-bg);
--sidebar-bg:#eee5d5;--sidebar-hover:#e6d8c0;--sidebar-active:#a56c2517;--sidebar-text:#65563f;--sidebar-active-text:#7a4c18;
--border:#dccdb3;--border-acc:#b78c4655;--navbar-bg:#faf5eaf0;--navbar-border:#dacbad;--accent-dim:#af823516;--accent-border:#af823545;--on-primary:#fffaf1;
--modal-bg:#f1e7d5;--modal-section:#e9dcc5;--modal-input:#fbf6eb;--modal-border:#c7b492;--modal-text:#352e23;--modal-muted:#70604b;
--success:#25795c;--danger:#b63e43;--warning:#9a681e;--info:#8b6932;
--shadow:0 3px 14px #674b2310;--shadow-md:0 8px 24px #674b2318;--shadow-lg:0 18px 42px #674b2324;--glow:0 0 20px #d8b77e10;color-scheme:light;
}
html:not(.theme-dark) body{background:var(--bg);color:var(--text)}
html:not(.theme-dark) .navbar{background:var(--navbar-bg);border-bottom-color:var(--navbar-border)}
#langSelect{background:var(--card-bg)!important;color:var(--text)!important;border:1px solid var(--border)!important;min-height:32px;max-width:112px}
#langSelect option{background:var(--card-bg);color:var(--text)}
html[lang=en] .navbar{gap:8px}html[lang=en] .navbar-nav{gap:2px}html[lang=en] .nav-item{padding-left:9px;padding-right:9px;font-size:12px}
html[lang=en] #navServerNameCenter{flex-basis:150px;min-width:90px}
@media(max-width:1550px){html[lang=en] #navServerNameCenter{display:none!important}}

html{--bg2:var(--bg-2);--bg3:var(--bg-3);--card:var(--card-bg);--card2:var(--card-bg-2);--text2:var(--text-muted);--text3:var(--text-dim)}
/* Older controls use these aliases; an undefined primary-color leaves white text on cream. */
html{--primary-color:var(--primary);--bg-color:var(--bg);--text-color:var(--text);--border-color:var(--border);--bg-secondary:var(--bg-2)}
html.theme-light .scene-fx .scene-button{color:var(--text)!important}
html.theme-light .scene-fx :is(.scene-button.active,.tab-btn.active,.wr-tab.active,.log-filter-btn.active,.log-category-tab.active,.page-btn.active){background:var(--accent-dim)!important;color:var(--primary-dark)!important;border-color:var(--border-acc)!important}
html.theme-light .scene-fx :is(.text-white,.text-light){color:var(--text)!important}
html.theme-light .scene-fx :is(.form-label,.form-hint,.card-subtitle,.text-muted){color:var(--text-muted)}
html.theme-light .scene-fx input::placeholder,html.theme-light .scene-fx textarea::placeholder{color:#7a6b55;opacity:1}
