/* sonichost: one stylesheet for the whole site.
   Plain on purpose: paper-like surfaces, 1px rules, one red for the thing to press, and the
   numbers / addresses in mono. Light by default, dark when the system (or the toggle) says so. */
:root {
  --bg: #f3f2ee;
  --surface: #ffffff;
  --surface2: #ebe9e3;
  --line: #dedbd3;
  --line2: #c8c4b9;
  --text: #1c1b18;
  --muted: #66625a;
  --faint: #99948a;
  --red: #c8332b;
  --red-ink: #a8271f;
  --red-soft: #f6e3e1;
  --green: #1d7f47;
  --green-soft: #e1f1e7;
  --amber: #9a6512;
  --amber-soft: #f6ecd9;
  --blue: #285f9c;
  --blue-soft: #e1eaf5;
  --term: #15140f;
  --term-text: #d6d3c9;
  --focus: rgba(200, 51, 43, 0.28);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311; --surface: #1c1b18; --surface2: #262420; --line: #302e29; --line2: #44413a;
    --text: #ebe9e2; --muted: #a39f94; --faint: #74706666; --faint: #777267;
    --red: #e04a40; --red-ink: #ff7a70; --red-soft: #3a1d1a;
    --green: #4cbf7c; --green-soft: #183323; --amber: #d9a24a; --amber-soft: #3a2e17;
    --blue: #7aa9e0; --blue-soft: #1b2a3c; --term: #0d0c0a; --focus: rgba(224, 74, 64, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311; --surface: #1c1b18; --surface2: #262420; --line: #302e29; --line2: #44413a;
  --text: #ebe9e2; --muted: #a39f94; --faint: #777267;
  --red: #e04a40; --red-ink: #ff7a70; --red-soft: #3a1d1a;
  --green: #4cbf7c; --green-soft: #183323; --amber: #d9a24a; --amber-soft: #3a2e17;
  --blue: #7aa9e0; --blue-soft: #1b2a3c; --term: #0d0c0a; --focus: rgba(224, 74, 64, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
main { flex: 1; }
a { color: inherit; }
a:not(.btn):hover { color: var(--red-ink); }
img, svg { display: block; }
svg { width: 16px; height: 16px; flex: none; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); }

.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(440px, 100% - 32px); margin: 0 auto; }

/* ---------------------------------------------------------------- top bar */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 56px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 600 15px var(--mono); letter-spacing: -0.02em; flex: none; }
.logo .mark { width: 14px; height: 14px; background: var(--red); }
.logo b { color: var(--red); font-weight: 600; }
.nav-links { display: flex; gap: 22px; height: 100%; }
.nav-links a { white-space: nowrap; display: flex; align-items: center; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav-links a:hover { color: var(--text); }
.nav-links a.on { color: var(--text); border-color: var(--text); }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu { position: relative; }
.menu > button { background: none; border: 1px solid var(--line2); height: 32px; padding: 0 10px; border-radius: 4px; cursor: pointer;
  color: var(--text); font: 500 13.5px var(--sans); display: flex; align-items: center; gap: 6px; }
.menu > button:hover { border-color: var(--text); }
.menu > button svg { width: 12px; height: 12px; }
.menu-pop { position: absolute; right: 0; top: 38px; min-width: 200px; padding: 4px 0; display: none; background: var(--surface);
  border: 1px solid var(--line2); border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.menu.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 14px; color: var(--text); text-decoration: none;
  background: none; border: 0; font: 14px var(--sans); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface2); color: var(--text); }
.menu-pop .who { padding: 8px 14px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--muted); font-size: 12.5px; }
.menu-pop .who strong { color: var(--text); display: block; font-size: 14px; }

/* ---------------------------------------------------------------- buttons, inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 4px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); text-decoration: none;
  font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .switch input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 1px; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: transparent; background: var(--surface2); }
.btn-danger { color: var(--red); border-color: var(--line2); }
.btn-danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn-lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn[disabled], .btn.busy { opacity: 0.5; pointer-events: none; }

label.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 500; font-size: 13.5px; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.field .err { color: var(--red); font-size: 12.5px; margin-top: 5px; display: block; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--line2);
  background: var(--surface); color: var(--text); font: 15px var(--sans);
}
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--text); outline: none; }
textarea { height: auto; min-height: 96px; padding: 9px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2399948a' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

/* yes / no settings */
.switch-row { display: flex; align-items: flex-start; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.switch-row:first-of-type { border-top: 0; }
.switch-row .txt { flex: 1; }
.switch-row .txt strong { display: block; font-size: 14px; font-weight: 500; }
.switch-row .txt small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; margin-top: 1px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 3px; background: var(--surface2); border: 1px solid var(--line2); cursor: pointer; transition: background .12s; }
.switch i::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 2px;
  background: var(--faint); transition: transform .12s, background .12s; }
.switch input:checked + i { background: var(--red); border-color: var(--red); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }

/* ---------------------------------------------------------------- blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.card h2 { margin: 0 0 2px; font-size: 16px; }
.card .sub, .sub { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.alert { padding: 10px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: var(--red-soft); border-color: var(--red); color: var(--red-ink); }
.alert-ok { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* state: a small square and a word */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; background: currentColor; }
.pill.running { color: var(--green); }
.pill.starting, .pill.stopping { color: var(--amber); }
.pill.crashed, .pill.unreachable { color: var(--red); }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 3px; font-size: 11.5px; font-weight: 500;
  background: var(--surface2); color: var(--muted); white-space: nowrap; }
.tag.red { background: var(--red-soft); color: var(--red-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* an address with its copy button */
.addr { display: inline-flex; align-items: stretch; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; background: var(--surface); height: 32px; max-width: 100%; }
.addr code { font-size: 13.5px; padding: 0 10px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr button { border: 0; border-left: 1px solid var(--line2); background: var(--surface2); color: var(--muted); padding: 0 9px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; font: 500 12.5px var(--sans); }
.addr button:hover { color: var(--text); }
.addr button svg { width: 13px; height: 13px; }
.addr.big { height: 46px; }
.addr.big code { font-size: 19px; padding: 0 16px; }
.addr.big button { padding: 0 14px; font-size: 13.5px; }

/* ---------------------------------------------------------------- home */
.intro { padding: 44px 0 34px; border-bottom: 1px solid var(--line); background: var(--surface); }
.intro .wrap { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start; }
.intro h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; max-width: 560px; }
.intro p { color: var(--muted); font-size: 16px; margin: 0 0 22px; max-width: 560px; }
.intro .plat { margin-top: 22px; font-size: 13px; color: var(--muted); }
.intro .plat b { color: var(--text); font-weight: 500; }
.live { border: 1px solid var(--line); border-radius: 6px; }
.live .h { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.live .nums { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.live .nums div { padding: 14px; }
.live .nums div + div { border-left: 1px solid var(--line); }
.live .nums strong { display: block; font: 600 26px/1.1 var(--mono); }
.live .nums span { color: var(--muted); font-size: 12.5px; }
.live table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.live td { padding: 8px 14px; border-top: 1px solid var(--line); }
.live tr:first-child td { border-top: 0; }
.live td.n { text-align: right; font-family: var(--mono); color: var(--muted); }

.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head a { font-size: 14px; color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); counter-reset: how; }
.how div { padding: 18px 20px; counter-increment: how; }
.how div + div { border-left: 1px solid var(--line); }
.how div::before { content: counter(how); font: 600 13px var(--mono); color: var(--red); display: block; margin-bottom: 8px; }
.how h3 { margin: 0 0 4px; font-size: 15px; }
.how p { margin: 0; color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 500; }
.facts dd { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- server lists */
.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.list th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); white-space: nowrap; }
.list td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.list tr:first-child td { border-top: 0; }
.list .name { font-weight: 600; }
.list .name a { text-decoration: none; }
.list .desc { color: var(--muted); font-size: 13px; margin-top: 2px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.list .r { text-align: right; }
.list .tags { margin-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input { width: 240px; }
.filters select { width: auto; min-width: 150px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line2); border-radius: 6px; }
.empty h3 { color: var(--text); margin: 0 0 4px; font-size: 16px; }
.empty p { margin: 0 0 16px; }

.page-head { padding: 32px 0 20px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- forms on their own page */
.auth { padding: 48px 0 70px; }
.auth h1 { margin: 0 0 4px; font-size: 24px; }
.auth .sub { margin-bottom: 22px; }
.auth .foot { color: var(--muted); margin-top: 16px; font-size: 14px; }
.auth .foot a { color: var(--text); font-weight: 500; }
.regions { display: grid; gap: 8px; margin: 0 0 20px; border: 0; padding: 0; }
.regions legend { font-weight: 500; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.region { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line2); border-radius: 4px; cursor: pointer; background: var(--surface); }
.region:hover { border-color: var(--text); }
.region input { accent-color: var(--red); width: 16px; height: 16px; margin: 0; flex: none; }
.region .nm { font-weight: 500; flex: 1; }
.region .info { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.region:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.region.full { opacity: 0.55; cursor: not-allowed; }
.included { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; padding: 12px 14px; background: var(--surface2); border-radius: 4px; }
.included b { color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------------- a server */
.srv-head { padding: 26px 0 0; border-bottom: 1px solid var(--line); }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.srv-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.srv-title h1 { margin: 0; font-size: 26px; }
.srv-title form { margin: 0; }
.srv-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 16px 0 0; }
.srv-bar .hint { color: var(--muted); font-size: 13.5px; }
.tabs { display: flex; gap: 24px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 0; color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-color: var(--red); }
.srv-body { padding: 24px 0 64px; }
.two { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

.lobbies { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); border: 1px solid var(--line); border-radius: 6px;
  background: var(--line); gap: 1px; overflow: hidden; }
.lobbies .card { border: 0; border-radius: 0; }
.lobby { padding: 14px 16px; min-height: 120px; }
.lobby .lh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.lobby .lh strong { font-size: 14px; font-weight: 600; }
.lobby .lh .state { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.lobby .lh .state.game { color: var(--amber); }
.lobby ul { list-style: none; padding: 0; margin: 0; }
.lobby li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; border-top: 1px solid var(--line); }
.lobby li:first-child { border-top: 0; }
.lobby li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby li .role { font-size: 12px; color: var(--faint); }
.lobby li .acts { display: flex; gap: 4px; margin-left: auto; }
.lobby li .acts button { height: 24px; padding: 0 7px; font-size: 12px; border-radius: 3px; }
.lobby .none { color: var(--faint); font-size: 13px; }
.lobby .mapline { color: var(--muted); font-size: 12.5px; margin: -4px 0 8px; }
.chip-bot, .chip-op, .chip-exe { font: 600 10.5px var(--mono); padding: 1px 4px; border-radius: 2px; }
.chip-bot { background: var(--blue-soft); color: var(--blue); }
.chip-op { background: var(--amber-soft); color: var(--amber); }
.chip-exe { background: var(--red-soft); color: var(--red-ink); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 12px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.lobby-addrs { display: grid; gap: 4px; margin-top: 4px; font-size: 13px; }
.lobby-addrs div { display: flex; justify-content: space-between; color: var(--muted); }
.lobby-addrs code { color: var(--text); }

/* console: dark in both themes */
.console { background: var(--term); border-radius: 6px; overflow: hidden; border: 1px solid var(--term); }
.console .bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #2a2823; color: #8f8b80; font: 12.5px var(--mono); }
.console .bar label { color: #8f8b80; }
.console .bar input { accent-color: var(--red); }
.console pre { margin: 0; height: 500px; overflow: auto; padding: 12px 14px; font: 12.5px/1.6 var(--mono); color: var(--term-text); white-space: pre-wrap; word-break: break-word; }
.console pre .inf { color: #a9c9e6; }
.console pre .wrn { color: #e3b464; }
.console pre .err { color: #ff8379; }
.console pre .dbg { color: #6f6b62; }
.console pre .cmd { color: #fff; font-weight: 600; }
.console pre .sys { color: #7fd29d; }
.console form { display: flex; border-top: 1px solid #2a2823; }
.console form .prompt { padding: 0 4px 0 14px; display: flex; align-items: center; color: #ff8379; font: 600 14px var(--mono); }
.console form input { border: 0; border-radius: 0; background: transparent; color: #fff; height: 46px; font: 14px var(--mono); }
.console form input:focus { outline: none; }
.console form select { width: auto; border: 0; border-left: 1px solid #2a2823; border-radius: 0; background-color: transparent; color: #d6d3c9; height: 46px; font-size: 13px; }
.console form select option { background: var(--term); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* settings */
.settings-layout { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 76px; display: grid; }
.settings-nav a { padding: 7px 0 7px 12px; color: var(--muted); font-size: 14px; text-decoration: none; border-left: 2px solid var(--line); }
.settings-nav a:hover { color: var(--text); border-color: var(--text); }
.settings-group { scroll-margin-top: 76px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 0; margin-top: 4px;
  background: var(--bg); border-top: 1px solid var(--line2); }
.savebar .hint { color: var(--muted); font-size: 13.5px; }
.danger-zone { border-color: var(--red); }
.danger-zone h2 { color: var(--red); }
.node-edit { margin-top: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 0 14px; }
.node-edit summary { cursor: pointer; padding: 10px 0; font-weight: 500; font-size: 14px; color: var(--muted); }
.node-edit summary:hover { color: var(--text); }
.node-edit[open] { padding-bottom: 14px; }

/* plain tables (admin, bans) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 0 10px 8px; white-space: nowrap; }
.table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); margin-bottom: 20px; }
.admin-stats > div { padding: 14px 18px; }
.admin-stats > div + div { border-left: 1px solid var(--line); }
.admin-stats strong { display: block; font: 600 24px/1.2 var(--mono); }
.admin-stats span { color: var(--muted); font-size: 13px; }
.meter { height: 6px; background: var(--surface2); min-width: 90px; margin-bottom: 4px; }
.meter i { display: block; height: 100%; background: var(--text); }
.snippet { background: var(--term); color: var(--term-text); border-radius: 4px; padding: 12px 14px; font: 12.5px/1.6 var(--mono); overflow-x: auto; white-space: pre; }
.snippet .ph { color: #e3b464; }

/* toasts */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; }
.toast { padding: 10px 14px; border-radius: 4px; background: var(--text); color: var(--bg); font-size: 14px; max-width: 380px;
  border-left: 4px solid var(--green); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); animation: toast-in .2s ease-out; }
.toast.bad { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

footer.foot { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 13px; margin-top: 30px; }
footer.foot .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer.foot a { text-decoration: none; }
footer.foot button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
footer.foot button:hover { color: var(--text); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .intro .wrap, .two, .settings-layout { grid-template-columns: 1fr; }
  .intro .wrap { gap: 28px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 0; border-bottom: 1px solid var(--line); }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { white-space: nowrap; flex: none; border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats > div:nth-child(3) { border-left: 0; }
  .admin-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav .wrap { gap: 16px; }
  .nav-links.in { display: none; }      /* logged in: the account menu has the links */
  .nav-links { gap: 14px; }
  .srv-title h1 { flex-basis: 100%; font-size: 23px; }
  .srv-title .spacer { display: none; }
  .lobby { min-height: 0; }
  .intro { padding: 28px 0 24px; }
  .intro h1 { font-size: 27px; }
  .how, .facts { grid-template-columns: 1fr; }
  .how div + div { border-left: 0; border-top: 1px solid var(--line); }
  .filters, .filters input, .filters select { width: 100%; }
  /* server lists turn into stacked rows */
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list thead { display: none; }
  .list tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .list tr:first-child { border-top: 0; }
  .list td { padding: 0; border: 0; text-align: left !important; }
  .list td + td { margin-top: 6px; }
  .list td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font: 12.5px var(--sans); }
  .list .addr { width: 100%; }
  .list .addr code { flex: 1; }
  .addr.big { width: 100%; }
  .addr.big code { flex: 1; font-size: 16px; padding: 0 12px; }
  .console pre { font-size: 11px; height: 55vh; }
  .savebar .hint { display: none; }
  .savebar .btn { flex: 1; }
  .savebar .spacer { display: none; }
  .toasts { right: 16px; }
}
@media (max-width: 420px) {
  .nav-links { display: none; }
}
.menu-pop .only-small { display: none; }
@media (max-width: 700px) { .menu-pop .only-small { display: block; } }
