:root {
  color-scheme: dark;
  font: 14px/1.5 "Yu Gothic UI", system-ui, sans-serif;
  background: #121417;
  color: #eef2f5;
  --surface: #1a1e23;
  --muted: #a9b3bd;
  --accent: #85e7c7;
  --warning: #f7ca88;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { margin: 0 auto; padding: 16px 24px; max-width: 1920px; }
header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h1 { margin: 0; font-size: 26px; letter-spacing: .03em; }
.address, h2, #backup { color: var(--muted); }
.header-actions, .actions, .dialog-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
article { min-height: 88px; background: var(--surface); padding: 8px 16px; display: flex; flex-direction: column; justify-content: center; }
h2 { font-size: 13px; font-weight: 500; margin: 0 0 4px; }
strong { display: block; font-size: 18px; font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums; }
#backup { display: block; margin-top: 4px; font-size: 12px; }
#warn, .warning, #login-error { color: var(--warning); }
button, input, select { font: inherit; }
button { border: 1px solid #3b454e; border-radius: 4px; background: #22272d; color: inherit; cursor: pointer; padding: 6px 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { color: #b9c9d4; cursor: default; }
.actions button { justify-content: flex-start; height: 36px; min-width: 104px; }
.start:not(:disabled), .save { background: #18362f; color: #a2e8cf; }
.restart:not(:disabled) { background: #392b1b; color: #f7ca88; }
button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.5; }
.stop:not(:disabled) { background: #362023; color: #ffb2ac; }
.console-title { margin: 16px 0 8px; }
pre { height: clamp(220px, 52vh, 640px); overflow: auto; scrollbar-width: none; background: #0d0f12; color: #dbe2ea; margin: 0 0 8px; padding: 8px 16px; font: 12px/1.6 Consolas, monospace; }
pre::-webkit-scrollbar { display: none; }
#commands { display: flex; gap: 8px; }
input, select { color: inherit; background: #1a1e23; border: 1px solid #3b454e; border-radius: 4px; padding: 8px; min-width: 0; }
#command { flex: 1; }
dialog { width: min(360px, 90vw); padding: 24px; border: 1px solid #3b454e; border-radius: 6px; background: #1a1e23; }
dialog::backdrop { background: #000a; }
dialog h2 { font-size: 18px; color: inherit; margin-bottom: 16px; }
dialog label, dialog input, dialog select { display: block; width: 100%; }
dialog label:not(:first-of-type) { margin-top: 8px; }
#operator-name { align-self: center; color: var(--muted); }
.dialog-buttons { justify-content: end; margin-top: 16px; }
#login-error:empty, #message:empty { display: none; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { main { padding: 16px; } article { padding: 8px; } strong { font-size: 15px; } }

.header-brand { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.header-brand h1 { white-space: nowrap; }
.load-badge { background: var(--surface); padding: 4px 8px; min-width: 208px; }
.load-badge strong { font-size: 16px; }
.load-badge span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.load-badge .warning { color: var(--warning); }
.load-badge .high { color: #ff998f; }
@media (max-width: 650px) {
  header { flex-wrap: wrap; }
  .header-brand { gap: 8px 16px; }
}

.music-nav{color:inherit;text-decoration:none;border:1px solid #3f505a;padding:8px 12px;border-radius:4px}.music-nav:hover{background:#263844}

:root{background:#121417;--surface:#191c20;--muted:#a3adb7}
header{align-items:center}
.header-brand{gap:24px}
.load-badge{background:none;padding:0 8px}
.cards>article{justify-content:flex-start;min-height:88px;padding:16px}
.cards strong,.load-badge strong{color:#eef2f5}
.cards #server:not(.warning){color:var(--accent)}
.cards #server.warning,.load-badge .warning{color:var(--warning)}
.header-actions .music-nav,.header-actions button{min-height:36px;display:inline-flex;align-items:center;padding:8px 12px;background:#1c2025;border-color:#31373f}
.console-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:16px}
.console-layout>section{min-width:0}
.chat-panel #player-chat{height:clamp(220px,52vh,640px);overflow:auto;background:#0d0f12;padding:8px 16px;margin-bottom:8px;color:var(--muted);scrollbar-width:thin}
#player-chat article {
  display: grid;
  grid-template-columns: 3.25em minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid #25292f;
  color: #eef2f5;
  overflow-wrap: anywhere;
}
#player-chat article time { color: var(--muted); font-variant-numeric: tabular-nums; }
#player-chat .actor-with-face { min-width: 0; }
#player-chat article > div { grid-column: 2 / -1; }
#player-chat article.join, #player-chat article.leave { border-radius: 3px; }
#player-chat article.join { background: #1b302b; --arrival: #79ba9838; }
#player-chat article.leave { background: #312825; --arrival: #d8b19e38; }
#player-chat article.join > div, #player-chat article.leave > div {
  grid-column: 3;
  white-space: nowrap;
  font-size: 12px;
}
#player-chat article.join > div { color: #93c7a7; }
#player-chat article.leave > div { color: #d8b19e; }
#player-chat { overflow-anchor: none; scrollbar-width: none; }
#player-chat article.chat-arrival { animation: chat-arrival 270ms ease-out both; }
@keyframes chat-arrival {
  from { opacity: .45; transform: translateY(3px); box-shadow: inset 0 0 0 64px var(--arrival, #a8d4c326); }
  to { opacity: 1; transform: none; box-shadow: none; }
}
@media(max-width:680px){.console-layout{grid-template-columns:minmax(0,1fr)}.chat-panel #player-chat{height:240px}}
@media (prefers-reduced-motion: reduce) {
  #player-chat article.chat-arrival { animation: none; }
}
.cards > article {
  transition: background-color 260ms ease;
}
.cards > article[data-usage="active"] { background-color: #1e272e; }
.cards > article[data-usage="raised"] { background-color: #302b23; }
.cards > article[data-usage="high"] { background-color: #352728; }
button, .page-button { transition: background-color 150ms ease, border-color 150ms ease; }
@media (prefers-reduced-motion: reduce) {
  .cards > article, button, .page-button { transition: none; }
}
