/* RF Module Editor - the game's dark glass + gold, for a PC and a phone */
:root {
  --bg: #0f1318; --panel: #161c24; --panel2: #1c2430; --line: #2a3442; --fg: #e6ebf1; --dim: #95a2b1;
  --gold: #d9b25f; --gold-hi: #f2cf7a; --ink: #1a1408; --ok: #4fc58a; --warn: #e3b341; --bad: #ef6b5e;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--dim); }
.small { font-size: 12.5px; }
.err { color: var(--bad); min-height: 1.2em; font-size: 13.5px; }

.brand { font-weight: 800; letter-spacing: .06em; color: var(--gold); white-space: nowrap; }
.brand span { color: var(--fg); font-weight: 600; letter-spacing: .02em; }
.brand.big { font-size: 24px; text-align: center; margin-bottom: 4px; }

/* buttons, inputs */
.primary { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--ink); border: 0; border-radius: 9px;
  padding: 10px 18px; font-weight: 800; letter-spacing: .02em; cursor: pointer; min-height: 42px; }
.primary:disabled { opacity: .4; cursor: default; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; cursor: pointer; min-height: 38px; }
.ghost:hover { border-color: var(--gold); }
.iconbtn { background: transparent; border: 0; font-size: 22px; padding: 4px 8px; cursor: pointer; display: none; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); outline-offset: 0; }
label { display: grid; gap: 4px; font-size: 13.5px; color: var(--dim); }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.row input, .row select { flex: 1; }

/* login */
.screen { min-height: 100%; }
#login { display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left)); }
.card { width: 100%; max-width: 380px; display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px 20px; }
.card.flat { max-width: 440px; margin: 16px 0; }
.card h2 { margin: 0; font-size: 15px; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }

/* the frame */
#app { display: flex; flex-direction: column; height: 100%; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: var(--panel); }
.spacer { flex: 1; }
.pill { font-size: 12px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.pill:empty { display: none; }
.pill.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.pill.off { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.body { flex: 1; display: flex; min-height: 0; }

/* module list */
#side { width: 300px; flex: none; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
#filter { margin: 10px; }
#tree { overflow: auto; padding: 0 6px 16px; flex: 1; }
.sidefoot { display: none; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sidefoot button { flex: 1; }
.group > summary { list-style: none; cursor: pointer; padding: 7px 8px; border-radius: 8px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::before { content: "\25B8"; color: var(--dim); font-size: 11px; width: 10px; }
.group[open] > summary::before { content: "\25BE"; }
.group > summary:hover { background: var(--panel2); }
.group .count { margin-left: auto; color: var(--dim); font-size: 12px; font-weight: 400; }
.fileBtn { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; background: transparent; border: 0;
  padding: 6px 8px 6px 26px; border-radius: 8px; cursor: pointer; min-height: 34px; }
.fileBtn:hover { background: var(--panel2); }
.fileBtn.sel { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.fileBtn .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileBtn .tag { margin-left: auto; font-size: 11px; border-radius: 6px; padding: 1px 6px; border: 1px solid var(--line); color: var(--dim); flex: none; }
.tag.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.off { color: var(--dim); }
.tag.big { color: var(--warn); }

/* the file */
#main { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.panel { padding: 20px max(18px, env(safe-area-inset-right)) 28px max(18px, env(safe-area-inset-left)); max-width: 820px; }
.panel h1 { font-size: 20px; margin: 0 0 10px; }
#file { display: flex; flex-direction: column; min-height: 100%; }
.filehead { display: flex; gap: 14px; align-items: center; padding: 14px 18px 8px; flex-wrap: wrap; }
.fileinfo { min-width: 0; flex: 1; }
.fname { font-weight: 750; font-size: 17px; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; color: var(--dim); white-space: nowrap; }
.tabs button.sel { color: var(--fg); border-bottom-color: var(--gold); }
.tab { padding: 14px 18px; flex: 1; min-height: 0; }

/* the open files (10-27): one tab each, kept while other files / pages are shown; the dot = not saved yet */
.opentabs { display: flex; gap: 4px; padding: 8px 14px 0; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 3; }
.otab { display: flex; align-items: center; flex: none; max-width: 240px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 9px 9px 0 0; background: var(--bg); }
.otab.sel { background: var(--panel2); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.otab .oname { background: transparent; border: 0; color: var(--dim); padding: 7px 2px 7px 11px; cursor: pointer; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 13px; min-width: 0; }
.otab.sel .oname { color: var(--fg); font-weight: 650; }
.otab.dirty .oname::after { content: ' \25CF'; color: var(--gold); }
.otab .ox { background: transparent; border: 0; color: var(--dim); cursor: pointer; padding: 4px 9px; font-size: 17px; line-height: 1;
  min-width: 32px; min-height: 32px; border-radius: 7px; }
.otab .ox:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, transparent); }
.fileBtn .udot { color: var(--gold); font-size: 11px; flex: none; margin-left: auto; }
.fileBtn .udot + .tag { margin-left: 0; }
.draftnote { margin: 0 18px 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px;
  background: var(--panel); font-size: 13.5px; }
.draftnote.warn { border-left-color: var(--warn); }
.draftnote .acts, .result .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.draftnote .ddiff, .result .cdiff { margin-top: 8px; max-height: 320px; overflow: auto; }

/* on / off switch */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--fg); font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: #3a4554; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { left: 23px; }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* settings */
#setFilter { width: 100%; margin-bottom: 12px; }
.sgroup { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setting .k { font-weight: 650; overflow-wrap: anywhere; }
.setting .h { grid-column: 1 / -1; color: var(--dim); font-size: 13px; }
.setting input[type=number] { width: 130px; text-align: right; }
.setting input[type=text] { width: min(260px, 50vw); }
.setting.changed .k::after { content: " \2022"; color: var(--gold); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; margin-right: 6px; }
.none { color: var(--dim); padding: 10px 0; }

/* text */
#cm .CodeMirror { height: calc(100vh - 250px); min-height: 320px; border: 1px solid var(--line); border-radius: 10px; font: 13.5px/1.5 var(--mono); }
.cm-s-rf.CodeMirror { background: #0b0f14; color: #d7dde4; }
.cm-s-rf .CodeMirror-gutters { background: #0b0f14; border-right: 1px solid var(--line); }
.cm-s-rf .CodeMirror-linenumber { color: #5c6878; }
.cm-s-rf .CodeMirror-cursor { border-left-color: var(--gold-hi); }
.cm-s-rf .cm-comment { color: #6f8094; font-style: italic; }
.cm-s-rf .cm-keyword { color: #e39b5f; }
.cm-s-rf .cm-string { color: #9fd18b; }
.cm-s-rf .cm-number { color: #c9a0f0; }
.cm-s-rf .cm-builtin, .cm-s-rf .cm-def { color: #7cc4e8; }
.cm-s-rf .cm-variable, .cm-s-rf .cm-variable-2 { color: #d7dde4; }
.cm-s-rf .cm-header { color: var(--gold); font-weight: 700; }
.cm-s-rf .cm-def, .cm-s-rf .cm-quote { color: #7cc4e8; }
.cm-s-rf .CodeMirror-selected, .cm-s-rf .CodeMirror-focused .CodeMirror-selected { background: #2a3a52; }

/* search (big files) */
.hit { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.hit .ln { font-size: 12px; color: var(--dim); padding: 6px 10px; background: var(--panel); display: flex; gap: 8px; align-items: center; }
.hit pre { margin: 0; padding: 8px 10px; white-space: pre-wrap; word-break: break-all; font: 12.5px/1.45 var(--mono); }
.hit textarea { width: 100%; min-height: 90px; border: 0; border-top: 1px solid var(--line); border-radius: 0; font: 12.5px/1.45 var(--mono); }
.hit .acts { display: flex; gap: 8px; padding: 8px 10px; justify-content: flex-end; }

/* history, diff, log, activity */
.ver { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ver .t { flex: 1; min-width: 160px; }
.diffbox { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 60vh; }
.diffbox pre { margin: 0; padding: 0 0 8px; font: 12.5px/1.5 var(--mono); }
.diffbox .d { display: block; padding: 0 10px; white-space: pre-wrap; word-break: break-all; }
.d.add { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.d.del { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.d.gap { color: var(--dim); background: var(--panel); }
.log { background: #0b0f14; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 12.5px/1.5 var(--mono);
  white-space: pre-wrap; word-break: break-word; max-height: calc(100vh - 260px); overflow: auto; margin: 0; }
.log .p { color: var(--bad); } .log .c { color: var(--warn); } .log .i { color: #c9d2dc; }
.act { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.act .t { color: var(--dim); font-size: 12.5px; }
.act .r { grid-column: 2; font-size: 12.5px; }

/* save bar */
.savebar { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; padding: 10px max(18px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--panel) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
/* (owner 2026-10-29: "minimize the save and apply cause I can't see the other settings below") - with no message the bar
   is only a small button floating at the bottom right (no band across the page); the text and settings scroll past it
   with room under their last line */
#saveBtn { min-height: 34px; padding: 6px 16px; font-size: 14px; }
.savebar:has(> .result:empty) { background: transparent; border-top: 0; backdrop-filter: none; justify-content: flex-end;
  pointer-events: none; padding-top: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.savebar:has(> .result:empty) #saveBtn { pointer-events: auto; box-shadow: 0 6px 18px #000b; }
.savebar:has(> .result:empty) #saveBtn:disabled { opacity: .55; }
.cm-s-rf .CodeMirror-lines { padding-bottom: 56px; }
#settings { padding-bottom: 56px; }
#file:has(#openTabs:not([hidden])) #cm .CodeMirror { height: calc(100vh - 300px); }
.result { flex: 1; min-width: 0; font-size: 13.5px; }
.result .msg { font-weight: 650; }
.result.live .msg { color: var(--ok); } .result.bad .msg { color: var(--bad); } .result.warn .msg { color: var(--warn); }
.result details { margin-top: 4px; } .result summary { cursor: pointer; color: var(--dim); font-size: 12.5px; }
.result pre { margin: 4px 0 0; max-height: 160px; overflow: auto; font: 12px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--dim); }

/* the three parts: modules / servers / players */
/* (owner 2026-11-21 row 909 ADMINNAV909) the pages in 5 groups: a dropdown each on a PC, one list on a phone */
.mainnav { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.mainnav button { font: inherit; }
.mainnav button:focus-visible, .navbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.ngroup { position: relative; }
.ngroup.nphone { display: none; }
.mainnav .ghead { display: flex; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: 8px; padding: 6px 12px;
  min-height: 34px; cursor: pointer; color: var(--dim); font-weight: 650; white-space: nowrap; }
.mainnav .ghead:hover, .ngroup.open > .ghead { color: var(--fg); background: var(--panel2); }
.ngroup.cur > .ghead { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-hi); }
.ghead .gcur { font-weight: 500; color: var(--fg); }
.ghead .gcur::before { content: "\00B7\00A0"; color: var(--gold); }
.ghead .gcur:empty { display: none; }
.caret { font-size: 10px; opacity: .7; transition: transform .15s; }
.ngroup.open > .ghead .caret { transform: rotate(180deg); }
.gmenu { display: none; position: absolute; top: calc(100% + 6px); left: -2px; min-width: 250px; z-index: 40; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 14px 34px #000b; }
.ngroup.open > .gmenu { display: grid; gap: 2px; }
.gmenu button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; text-align: left; background: transparent;
  border: 0; border-radius: 8px; padding: 7px 10px; min-height: 42px; cursor: pointer; color: var(--fg); font-weight: 650; white-space: nowrap; }
.gmenu button[hidden] { display: none; }
.gmenu button small { grid-column: 1 / -1; font-weight: 400; color: var(--dim); font-size: 12px; white-space: normal; }
.gmenu button:hover, .gmenu button:focus-visible { background: var(--panel2); }
.gmenu button.sel { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold-hi); box-shadow: inset 3px 0 0 var(--gold); }
.nbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px;
  font-weight: 800; line-height: 18px; text-align: center; }
.navbtn { display: none; }
@media (max-width: 1100px) and (min-width: 761px) { .ghead .gcur { display: none; } .mainnav .ghead { padding: 6px 10px; } }
body.nomods #side, body.nomods #menuBtn, body.nomods #scrim { display: none !important; }
.panel.wide { max-width: 1120px; width: 100%; }
.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.phead .pill { white-space: normal; }
.qrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.qrow > span { min-width: 0; overflow-wrap: anywhere; }
.phead h1 { margin: 0; }
.h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 26px 0 6px; }
.row.wrap { flex-wrap: wrap; }
.row.tools button { flex: none; }
.warnbox { border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; font-size: 14px; }
.okbox { border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent);
  border-radius: 10px; padding: 9px 12px; margin: 10px 0; font-size: 14px; }
.badge { display: inline-block; font-size: 11px; font-weight: 650; border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px;
  border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.badge.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.setting .where { font: 11.5px/1.4 var(--mono); color: #6f7d8d; overflow-wrap: anywhere; }
.setting .warn, .pend { color: var(--warn); }
.setting .ro { font: 13px var(--mono); color: var(--dim); overflow-wrap: anywhere; text-align: right; }
#srvFilter { width: 100%; margin: 12px 0 4px; }
.danger.primary { background: linear-gradient(180deg, #f08a7f, var(--bad)); color: #1b0806; }

/* players online per race */
.onlinebar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.onlinebar:empty { display: none; }
.otile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); border-top: 3px solid var(--tc, var(--line)); min-width: 0; }
.otile .l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.otile .n { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--tc, var(--fg)); line-height: 1.15; }
.otile.all { --tc: var(--fg); } .otile.bel { --tc: #e8b84e; } .otile.cor { --tc: #a68bff; } .otile.acc { --tc: #f07a6c; }
.osrc { grid-column: 1 / -1; margin-top: -2px; }
@media (max-width: 560px) { .onlinebar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .otile .n { font-size: 22px; } }

/* connections */
.ctiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ctile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); border-left: 4px solid var(--line); min-width: 0; }
.ctile.ok { border-left-color: var(--ok); } .ctile.warn { border-left-color: var(--warn); } .ctile.bad { border-left-color: var(--bad); }
.ctile .l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ctile .n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ctile .s { font-size: 12px; color: var(--dim); }
.ctile.bad .n { color: var(--bad); } .ctile.warn .n { color: var(--warn); }
.notebox { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; font-size: 14px; }
#conn .phead select { width: auto; }
.switch.small { font-size: 13px; gap: 6px; }
a.cnOpen, a.sib { color: var(--gold-hi); }

/* services */
.svcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: grid; gap: 6px; align-content: start; }
.svchead { display: flex; align-items: center; gap: 8px; }
.svc .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.svc.on .dot { background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 70%, transparent); }
.svc.off .dot { background: var(--bad); }
.svc .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.allrow { display: flex; gap: 14px; align-items: center; margin: 14px 0 4px; flex-wrap: wrap; }
.allrow p { flex: 1; min-width: 220px; margin: 0; }
.jobbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 12px; display: grid; gap: 4px; font-size: 14px; }
.jobbox.done { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.jobbox.failed { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.step.done span:first-child { color: var(--ok); } .step.failed { color: var(--bad); } .step.running { color: var(--gold-hi); }
.allfile { margin-top: 18px; } .allfile > summary { cursor: pointer; color: var(--dim); padding: 6px 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); font: 13px/1.4 var(--mono); }
.kv span { overflow-wrap: anywhere; }

/* players */
.plist { display: grid; gap: 6px; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); cursor: pointer; text-align: left; width: 100%; }
.prow:hover { border-color: var(--gold); }
.prow .n { font-weight: 700; overflow-wrap: anywhere; }
.prow .m { color: var(--dim); font-size: 12.5px; grid-column: 1; }
.prow .s { grid-row: 1 / span 2; grid-column: 2; }
.on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; margin: 12px 0; display: grid; gap: 10px; }
.pcard h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.pcard > * { min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fact { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; min-width: 0; }
.fact .l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.fact .v { font-weight: 700; overflow-wrap: anywhere; }
.itable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.itable th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.itable td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.itable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.itable .code { font: 12px var(--mono); color: var(--dim); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.iacts { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 560px) { .iacts { flex-direction: column; align-items: stretch; } .itable td, .itable th { padding: 6px 5px; } }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.pick { position: relative; }
.picklist { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px;
  max-height: 260px; overflow: auto; box-shadow: 0 8px 24px #0008; }
.picklist button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 7px 10px; cursor: pointer; }
.picklist button:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.mini { min-height: 30px; padding: 4px 9px; font-size: 13px; }
.bar { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin: 6px 0; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transition: width .3s; }
#bkList { width: 100%; font: 13px/1.4 var(--mono); }

/* the Server page (machine.py, owner 11-01): a bar per number, green / yellow / red at its thresholds */
.plancard { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; background: var(--panel); padding: 10px 14px; margin-bottom: 8px; overflow-wrap: anywhere; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 10px; }
.mrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); min-width: 0; border-left: 4px solid var(--line); }
.mrow.ok { border-left-color: var(--ok); } .mrow.warn { border-left-color: var(--warn); } .mrow.bad { border-left-color: var(--bad); }
/* (name over the value on the left, the % - or a badge - big on the right: a long name never squeezes the value) */
.mtop { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-width: 0; }
.mtop .ml { grid-column: 1; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); overflow-wrap: anywhere; }
.mtop .mv { grid-column: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; font-size: 14px; }
.mtop .mv:empty { display: none; }
.mtop .mp, .mtop > .badge { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.mtop .mp { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.mrow.ok .mp { color: var(--ok); } .mrow.warn .mp { color: var(--warn); } .mrow.bad .mp { color: var(--bad); } .mrow.none .mp { color: var(--dim); }
.mrow .s { font-size: 12px; color: var(--dim); }
.mbar { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin: 7px 0 5px; overflow: hidden; }
.mbar span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.mbar.warn span { background: var(--warn); } .mbar.bad span { background: var(--bad); } .mbar.none span { background: var(--dim); }
.itable td .mbar { margin: 2px 0; min-width: 70px; }
.itable tr.muted td { color: var(--dim); }
.notebox.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
#mcSetForm { padding: 6px 0 4px; }
#mcSetForm label.wide { grid-column: 1 / -1; }
#mcSetForm input, #mcSetForm select { width: 100%; }
#mcLic .pcard .mrow { background: var(--bg); }
#machine .facts .v { font-weight: 650; font-size: 14px; }

/* (list 10 row 40 / list 13 item 5) the rates table, the premium preset and the premium accounts */
#srvRates, #srvPremium { overflow-x: auto; margin-bottom: 12px; }
table.rates { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 4px 0 6px; }
table.rates th { text-align: left; color: var(--dim); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
table.rates td { border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); padding: 6px 8px; white-space: nowrap; }
table.rates tr.flat td:first-child { border-left: 3px solid var(--warn); }
table.rates .warn, .rk.warn { color: var(--warn); }
.newv { color: var(--gold-hi); }
.rk { font-weight: 600; color: var(--ok); }
.premacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.premlist h3 { margin: 18px 0 4px; font-size: 15px; }

/* phone */
@media (max-width: 760px) {
  /* (row 909) the page button (the shown page's name) opens every group as one list under the top bar */
  .navbtn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 56vw; min-height: 38px; padding: 6px 10px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--gold-hi); font-weight: 700; cursor: pointer; }
  #navBtnText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.navopen .navbtn { border-color: var(--gold); }
  body.navopen .navbtn .caret { transform: rotate(180deg); }
  .mainnav { display: none; }
  body.navopen .mainnav { display: block; position: fixed; left: 0; right: 0; bottom: 0; top: 56px; z-index: 25; overflow: auto;
    border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel);
    padding: 4px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .ngroup.nphone { display: block; }
  .mainnav .ghead, .ngroup.cur > .ghead, .mainnav .ghead:hover { background: transparent; padding: 14px 2px 6px; min-height: 0; pointer-events: none;
    color: var(--gold); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .ghead .caret, .ghead .gcur, .ghead .nbadge { display: none !important; }
  .gmenu, .ngroup.open > .gmenu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; position: static; min-width: 0;
    background: transparent; border: 0; padding: 0; box-shadow: none; }
  .gmenu button { min-height: 46px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); white-space: normal; }
  .gmenu button small { display: none; }
  .gmenu button.sel { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
  .top #zone { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iconbtn { display: inline-block; }
  #activityBtn, #accountBtn { display: none; }
  .sidefoot { display: flex; }
  .top { gap: 8px; }
  .top .brand span { display: none; }
  #side { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); transform: translateX(-102%);
    transition: transform .18s; padding-top: env(safe-area-inset-top); box-shadow: 0 0 30px #0009; }
  #side.open { transform: none; }
  #scrim { position: fixed; inset: 0; background: #0008; z-index: 15; }
  .setting { grid-template-columns: minmax(0, 1fr) auto; }
  .setting input[type=text] { width: 44vw; }
  .setting input[type=number] { width: 104px; }
  #cm .CodeMirror { height: calc(100vh - 230px); font-size: 13px; }
  .act { grid-template-columns: 1fr; } .act .r { grid-column: 1; }
  .tab { padding: 12px 14px; }
}

/* the Cheats page (cheatfix.py / cheats.py, owner 11-03) */
.chcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 12px; }
.chcards .pcard { margin: 0; align-content: start; }
.chtext p { margin: 0 0 6px; font-size: 14px; }
.chtext p b { color: var(--gold); font-weight: 650; }
.chacts { margin: 0; }
a.btnlink { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); }
.chtable th { cursor: pointer; white-space: nowrap; user-select: none; }
.chtable th:hover { color: var(--gold); }
#chFind { width: 100%; }
.chgroup { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; background: var(--bg); }
.chgroup.off { opacity: .55; }
.chghead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.chghead .code { font: 12px var(--mono); color: var(--dim); }
.chghead .mini { margin-left: auto; }
label.chk { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; color: var(--fg); font-size: 14px; }
label.inl { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; }
.chgroup tr.keep td { background: color-mix(in srgb, var(--ok) 7%, transparent); }
.chgroup tr.delete td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.chgroup input[type=radio] { width: 18px; height: 18px; accent-color: var(--gold); }
.chbar { margin: 0 -14px -14px; border-radius: 0 0 12px 12px; }
.chbar .result { font-size: 14px; }
#chHolesOut { margin-top: 8px; }
@media (max-width: 560px) { .chghead .mini { margin-left: 0; } .chcards { grid-template-columns: 1fr; } }
.chgroup td:last-child { min-width: 220px; }
/* cheat alerts (11-04): the list on the Cheats page + its tile on the Connections page */
#cheats .row label.chk input { flex: none; width: 18px; height: 18px; }
#cheats .row #caDays, #cheats .row #caKind { flex: none; width: auto; }
#cheats .row #caFind { min-width: 160px; }
.ctile.go { cursor: pointer; }
.ctile.go:hover { border-color: var(--gold); }
.catable td.what { min-width: 220px; }
.catable td.when { white-space: nowrap; }
.cascan .row { margin: 8px 0 0; }

.catable .camobile { display: none; }
@media (max-width: 560px) { .catable .cawide { display: none; } .catable .camobile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; } .catable .camobile .badge { margin-left: 0; } .catable td.what { min-width: 0; } }

/* (owner 2026-11-19 row 841) Map walls page - mapwalls.js */
.mwwrap { position: relative; width: 100%; height: min(70vh, 720px); min-height: 320px; border: 1px solid #333; border-radius: 8px; overflow: hidden; background: #0d1117; touch-action: none; }
.mwwrap canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.mwwrap canvas.draw { cursor: crosshair; }
.mwtools .mwtool.on { background: #2b4a7a; border-color: #6ea0ff; color: #fff; }
.mwlayers label { margin-right: 10px; white-space: nowrap; }
/* (row 843) the 3D view */
.mwview { display: inline-flex; margin-right: 8px; }
.mwview button { border-radius: 0; }
.mwview button:first-child { border-radius: 6px 0 0 6px; }
.mwview button:last-child { border-radius: 0 6px 6px 0; }
.mwview button.on { background: #2b4a7a; border-color: #6ea0ff; color: #fff; }
.mw3d canvas { width: 100%; height: 100%; display: block; }
.mw3d.draw canvas { cursor: crosshair; }
.mw3dnote { position: absolute; left: 10px; top: 8px; color: #c9d1d9; font-size: 13px; text-shadow: 0 1px 2px #000; pointer-events: none; }
#mwList table td, #mwList table th { padding: 2px 8px; }
/* (AUTOWALL853) the suggestions: pink dashed on the map, a list beside it (below it on a phone) */
.mwmain { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mwmain.withsug { grid-template-columns: minmax(0, 1fr) 340px; }
.mwviews { min-width: 0; }
.mwsug { min-width: 0; border: 1px solid #333; border-radius: 8px; padding: 8px; background: #11161d; max-height: min(70vh, 720px); overflow: auto; }
.mwsughead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mwsugtoggle b { color: #ff7cc4; }
.mwsg { border: 1px solid #30363d; border-left: 4px solid #ff3ea5; border-radius: 6px; padding: 6px 8px; margin: 6px 0; cursor: pointer; }
.mwsg.sel { border-color: #ff3ea5; background: #2a1422; }
.mwsg.rej { opacity: .65; border-left-color: #8b949e; }
.mwsg .mwbadge { display: inline-block; padding: 0 7px; border-radius: 10px; font-size: 12px; background: #3a1530; color: #ffb3dc; }
.mwsg .reason { overflow-wrap: anywhere; }
.mwsg .caution { color: #ffb86b; }
.mwsg .mwsgbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mwsg .mwsgbtns button { min-height: 36px; padding: 4px 14px; }
.mwsugother a { cursor: pointer; margin-right: 6px; }
@media (max-width: 960px) { .mwmain.withsug { grid-template-columns: minmax(0, 1fr); } .mwsug { max-height: none; } }
/* (owner 2026-11-20 WALLREMOVE863) the Remove tab: saved walls / areas in a bad place */
.mwsugtabs { display: flex; gap: 0; margin-bottom: 6px; }
.mwsugtabs button { flex: 1; border-radius: 0; min-height: 38px; }
.mwsugtabs button:first-child { border-radius: 6px 0 0 6px; }
.mwsugtabs button:last-child { border-radius: 0 6px 6px 0; }
.mwsugtabs button.on { background: #2b4a7a; border-color: #6ea0ff; color: #fff; }
.mwsugtabs #mwTabRem.on { background: #5a1a1a; border-color: #ff6b6b; }
.mwtabn { font-size: 12px; opacity: .85; }
.mwsg.mwrm { border-left-color: #ff2d2d; }
.mwsg.mwrm.sel { border-color: #ff2d2d; background: #2a1416; }
.mwsg.mwrm .mwbadge { background: #3a1515; color: #ffb3b3; }
.mwsev { display: inline-block; padding: 0 7px; border-radius: 10px; font-size: 12px; text-transform: uppercase; }
.mwsev.high { background: #ff2d2d; color: #1b0806; }
.mwsev.medium { background: #ffa94d; color: #1b0d00; }
.mwsev.low { background: #3a3f47; color: #d0d7de; }
.mwhits { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.mwhit { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 2px; border: 1px solid #30363d; border-radius: 10px; overflow-wrap: anywhere; }
.mwhit i { display: inline-block; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; text-align: center; font-style: normal; font-weight: bold; font-size: 11px; color: #111; flex: none; }
.mwhit i.spawn { background: #ffa94d; } .mwhit i.npc { background: #ffe066; } .mwhit i.portal { background: #66d9ff; } .mwhit i.safe { background: #69db7c; }
.mwremskip { margin: 4px 0 0 16px; padding: 0; }
/* (owner 2026-11-22 row 914 DMGWATCH914) the Damage watch page (damagewatch.js) */
.dmwseg { display: inline-flex; }
.dmwseg button { border-radius: 0; min-height: 34px; padding: 6px 12px; }
.dmwseg button:first-child { border-radius: 9px 0 0 9px; }
.dmwseg button:last-child { border-radius: 0 9px 9px 0; margin-left: -1px; }
.dmwseg button[aria-pressed="true"] { background: color-mix(in srgb, var(--gold) 18%, transparent); border-color: var(--gold); color: var(--gold-hi); font-weight: 700; }
.dmwhelp p { font-size: 13.5px; color: var(--dim); margin: 6px 0; }
.dmwhelp b { color: var(--fg); }
.dmwtiles .ctile.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.dmwtiles .ctile:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.dmwname { background: none; border: 0; padding: 0; color: var(--gold-hi); font-weight: 650; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.dmwname:hover, .dmwname:focus-visible { text-decoration: underline; }
.dmwrace.r0 { color: #e8b84e; } .dmwrace.r1 { color: #a68bff; } .dmwrace.r2 { color: #f07a6c; }
.dmwv.bad { color: var(--bad); font-weight: 700; } .dmwv.warn { color: var(--warn); }
.dmwrule { font-weight: 650; }
.dmwrule.r-ratio, .dmwrule.r-factor { color: var(--bad); } .dmwrule.r-fast, .dmwrule.r-refused { color: var(--warn); }
.dmwtable td { white-space: nowrap; }
.dmwtable td .muted.small { white-space: normal; }
.dmwflags td:nth-child(5) { white-space: normal; min-width: 200px; }
.dmwitems td { white-space: normal; min-width: 70px; } .dmwitems td:nth-child(2) { min-width: 150px; }
.dmwsort { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap; }
.dmwsort.on, .dmwsort:hover { color: var(--gold-hi); }
.itable tr.dmwstaff td { background: color-mix(in srgb, var(--warn) 6%, transparent); }
.dmwfind input { max-width: 360px; }
.dmwcard { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); scroll-margin-top: 10px; }
.dmwcard h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 10px 0 2px; }
.dmwcard h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin: 10px 0 4px; }
.dmwchead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dmwchead h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
.dmwbadges { display: flex; flex-wrap: wrap; gap: 6px; } .dmwbadges .badge { margin-left: 0; }
.dmwbuild { margin-top: 6px; }
#dmwDrill { scroll-margin-top: 10px; }
@media (max-width: 560px) { .dmwfind input { max-width: none; } .dmwflags td:nth-child(5) { min-width: 160px; } .dmwcard { padding: 10px; } }
.dmwtable td .dmwnw { white-space: nowrap; }
@media (max-width: 560px) { .dmwtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .dmwtiles .ctile { padding: 7px 8px; } .dmwtiles .ctile .n { font-size: 20px; } .dmwtiles .ctile .l { font-size: 10px; letter-spacing: .03em; } .dmwtiles .ctile .s { display: none; } }
