:root{
  --bg:#eef0ec;
  --surface:#ffffff;
  --surface-2:#e2e6df;
  --text:#1b1e1c;
  --muted:#5b625c;
  --border:#d2d7cd;
  --rust:#b5502e;
  --rust-soft:#e7cabb;
  --steel:#3d5a68;
  --steel-soft:#cddce1;
  --ok:#4f7a4a;
  --warn:#a8791f;
  --crit:#ab3b32;
  --series-1:#b5502e;  /* chart series, validated for CVD/contrast on --surface-2 */
  --series-2:#2b6cb0;
  --chip-bg:#f5f3ec;
  --shadow: 0 1px 2px rgba(27,30,28,0.06), 0 6px 20px rgba(27,30,28,0.06);
  --font-display:'Big Shoulders', 'Arial Narrow', sans-serif;
  --font-body:'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono:'IBM Plex Mono', 'Consolas', monospace;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#14181a; --surface:#1b2124; --surface-2:#212a2d; --text:#e7e9e4; --muted:#9aa39c;
    --border:#2c3538; --rust:#d97a52; --rust-soft:#4a3226; --steel:#7fa4b3; --steel-soft:#233238;
    --ok:#7fb377; --warn:#d9ac4f; --crit:#d9695c; --chip-bg:#20272a;
    --series-1:#c4653b; --series-2:#4a89bb;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  }
}
:root[data-theme="dark"]{
  --bg:#14181a; --surface:#1b2124; --surface-2:#212a2d; --text:#e7e9e4; --muted:#9aa39c;
  --border:#2c3538; --rust:#d97a52; --rust-soft:#4a3226; --steel:#7fa4b3; --steel-soft:#233238;
  --ok:#7fb377; --warn:#d9ac4f; --crit:#d9695c; --chip-bg:#20272a;
  --series-1:#c4653b; --series-2:#4a89bb;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
}

*{box-sizing:border-box;}
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font-body); line-height:1.5;
  display:flex; flex-direction:column;
}
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:800; text-transform:uppercase; letter-spacing:0.01em; margin:0; }
.btn{
  font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:0.04em;
  padding:9px 16px; border-radius:5px; cursor:pointer; border:1px solid var(--border); background:var(--surface); color:var(--text);
}
.btn.primary{ background:var(--rust); border-color:var(--rust); color:#fff; }
.btn.crit{ border-color:var(--crit); color:var(--crit); }
.btn:disabled{ opacity:0.5; cursor:not-allowed; }

/* app shell */
.app-frame{ flex:1; display:flex; flex-direction:column; background:var(--surface); }
.app-header{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px;
  padding:10px 16px; background:var(--surface-2); border-bottom:1px solid var(--border);
}
.brand{ font-size:17px; letter-spacing:0.04em; line-height:1.1; }
.brand small{ display:block; font-family:var(--font-mono); font-size:9.5px; letter-spacing:0.12em; color:var(--muted); font-weight:400; text-transform:uppercase; margin-top:2px; }
.switcher{ display:flex; align-items:center; gap:10px; }
.switcher label{ font-family:var(--font-mono); font-size:10px; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted); }
.switcher select{
  font-family:var(--font-body); font-size:13px; font-weight:500; padding:7px 34px 7px 12px; border-radius:6px;
  border:1px solid var(--border); background-color:var(--surface); color:var(--text); min-width:260px; cursor:pointer;
  appearance:none; -webkit-appearance:none;
  background-image:linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size:5px 5px; background-repeat:no-repeat;
}
.ctx-chips{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.ctx-chip{
  font-family:var(--font-mono); font-size:11px; padding:4px 10px; border-radius:99px;
  border:1px solid var(--border); background:var(--surface); color:var(--muted);
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.ctx-chip strong{ color:var(--text); font-weight:500; }
.ctx-chip.state-online{ border-color:var(--ok); }
.ctx-chip.state-warn{ border-color:var(--warn); }
.ctx-chip.state-off{ border-color:var(--crit); }

.app-shell{ flex:1; display:grid; grid-template-columns:196px 1fr; min-height:0; }
.app-tabs{ display:flex; }
.app-tabs.sidebar{
  flex-direction:column; gap:1px; padding:10px 8px 12px; border-right:1px solid var(--border);
  background:var(--surface-2); align-items:stretch;
}
.app-tabs.sidebar .nav-section{ font-family:var(--font-mono); font-size:9.5px; letter-spacing:0.12em; text-transform:uppercase; color:var(--muted); padding:12px 10px 4px; }
.app-tabs.sidebar button{
  text-align:left; font-family:var(--font-body); font-size:13px; padding:8px 10px; border-radius:5px;
  border:none; border-left:2px solid transparent; background:transparent; color:var(--muted); cursor:pointer;
}
.app-tabs.sidebar button:hover{ color:var(--text); }
.app-tabs.sidebar button.active{ background:var(--surface); border-left-color:var(--rust); color:var(--text); }
.app-tabs.sidebar .nav-foot{ margin-top:auto; padding:12px 10px 0; font-family:var(--font-mono); font-size:10.5px; color:var(--muted); border-top:1px solid var(--border); line-height:1.6; }
.app-tabs.sidebar .nav-foot strong{ color:var(--text); font-weight:500; }
.tab-new{ font-family:var(--font-mono); font-size:8.5px; letter-spacing:0.06em; background:var(--rust); color:#fff; padding:1px 5px; border-radius:99px; margin-left:3px; }

.app-tabs.sub-tabs{ border-bottom:1px solid var(--border); margin-bottom:16px; gap:2px; }
.app-tabs.sub-tabs button{
  font-family:var(--font-mono); font-size:11px; text-transform:uppercase; padding:8px 12px;
  border:none; border-bottom:2px solid transparent; background:transparent; color:var(--muted); cursor:pointer;
}
.app-tabs.sub-tabs button:hover{ color:var(--text); }
.app-tabs.sub-tabs button.active{ color:var(--rust); border-bottom-color:var(--rust); }

.app-body{ padding:20px; overflow-y:auto; }
.panel{ display:none; }
.panel.active{ display:block; }
.notice{
  font-family:var(--font-mono); font-size:12px; color:var(--muted); background:var(--chip-bg);
  border:1px solid var(--border); border-radius:6px; padding:10px 14px; margin-bottom:16px;
}
.notice.warn{ border-color:var(--warn); color:var(--warn); }

/* overview */
.ctx-strip{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.ctx-strip h3{ font-family:var(--font-body); text-transform:none; font-size:16px; font-weight:600; }
.ctx-strip .sub{ font-family:var(--font-mono); font-size:11.5px; color:var(--muted); margin-top:3px; }
.ctx-strip .sync{ font-family:var(--font-mono); font-size:10.5px; color:var(--muted); display:flex; align-items:center; gap:6px; padding-top:4px; }
.pulse{ width:7px; height:7px; border-radius:50%; background:var(--ok); }
.pulse.off{ background:var(--crit); animation:none; }
@media (prefers-reduced-motion:no-preference){ .pulse:not(.off){ animation:pulse 2s infinite; } }
@keyframes pulse{ 0%,100%{ opacity:1 } 50%{ opacity:0.35 } }

.stat-grid{ display:grid; grid-template-columns:repeat(6, 1fr); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-bottom:20px; }
.stat-tile{ background:var(--surface); padding:14px 14px 12px; }
.stat-tile .stat-label{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.stat-tile .stat-value{ font-family:var(--font-mono); font-size:20px; font-variant-numeric:tabular-nums; margin-top:4px; }
.stat-tile .stat-value.small{ font-size:14px; }
@media (max-width:860px){ .stat-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:560px){ .stat-grid{ grid-template-columns:repeat(2,1fr); } }

.control-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }

/* console */
.console-log{
  background:color-mix(in srgb, var(--text) 6%, var(--surface));
  border:1px solid var(--border); border-radius:6px; padding:14px 16px;
  font-family:var(--font-mono); font-size:12.5px; line-height:1.7; height:360px; overflow-y:auto; color:var(--text);
}
.console-log .t{ color:var(--muted); }
.console-log .ok{ color:var(--ok); }
.console-log .warn{ color:var(--warn); }
.console-log .crit{ color:var(--crit); }
.console-cmd{ display:flex; gap:8px; margin-top:12px; }
.console-cmd input{ flex:1; font-family:var(--font-mono); font-size:12.5px; padding:9px 12px; background:var(--surface-2); border:1px solid var(--border); border-radius:5px; color:var(--text); }
.console-cmd button{ font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:0.04em; padding:0 16px; background:var(--rust); color:#fff; border:none; border-radius:5px; cursor:pointer; }
.console-paste:not([hidden]){ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; padding:8px 12px; background:var(--surface-2); border:1px solid var(--border); border-radius:5px; font-size:12.5px; }
.console-paste span{ flex:1; min-width:200px; }
.quick-cmds{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.quick-cmds span{ font-family:var(--font-mono); font-size:11.5px; padding:5px 10px; background:var(--chip-bg); border:1px solid var(--border); border-radius:99px; color:var(--muted); cursor:pointer; }

/* players */
.players-note{ font-size:12px; color:var(--muted); margin:0 0 12px; font-style:italic; }
table.data-table{ width:100%; border-collapse:collapse; font-size:13px; }
table.data-table th{ text-align:left; font-family:var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); padding:0 12px 8px; border-bottom:1px solid var(--border); }
table.data-table td{ padding:10px 12px; border-bottom:1px solid var(--border); font-variant-numeric:tabular-nums; vertical-align:middle; }
table.data-table tr:last-child td{ border-bottom:none; }
table.data-table tr.selected{ background:var(--rust-soft); }
table.data-table .btn{ padding:5px 10px; font-size:10.5px; }
.steamid{ font-family:var(--font-mono); font-size:12px; color:var(--muted); }
.dot{ width:9px; height:9px; border-radius:50%; display:inline-block; background:var(--ok); }
.dot.ok{ background:var(--ok); }
.dot.warn{ background:var(--warn); }
.dot.crit{ background:var(--crit); }
.player-mgmt-layout{ display:grid; grid-template-columns:1fr 200px; gap:18px; align-items:start; }
.player-actions:not([hidden]){ background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:14px; display:flex; flex-direction:column; gap:6px; }
.player-actions h4{ font-family:var(--font-body); font-size:13.5px; font-weight:600; margin:0 0 8px; text-transform:none; }
.player-actions .btn{ width:100%; text-align:left; text-transform:none; font-family:var(--font-body); font-size:12px; padding:8px 10px; }
.player-actions .pa-form:not([hidden]){ display:flex; flex-direction:column; gap:6px; margin:-2px 0 4px; padding:8px; background:var(--surface); border:1px solid var(--border); border-radius:6px; }
.pa-gift-row{ display:grid; grid-template-columns:minmax(0,1fr) 64px 70px auto; gap:4px; margin-bottom:4px; }
.pa-gift-row .btn{ padding:2px 8px; }
.player-actions .pa-form input{ font-family:var(--font-body); font-size:12px; padding:6px 8px; border:1px solid var(--border); border-radius:4px; background:var(--surface-2); color:var(--text); }
.pl-lists{ min-width:0; }
.pa-base{ padding:7px 0; border-top:1px solid var(--border); font-size:11.5px; line-height:1.45; }
.pa-base:first-child{ border-top:0; }
.pa-base.decaying{ background:color-mix(in srgb, var(--crit) 8%, transparent); }
.pa-base-head{ display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.pa-base-grid{ font-family:var(--font-mono, monospace); font-weight:600; }
.pa-base-role{ color:var(--muted); flex:1; }
.pa-follow{ display:block; width:100%; text-align:left; background:none; border:0; border-top:1px solid var(--border); padding:7px 4px; font:inherit; font-size:11.5px; line-height:1.5; color:var(--text); cursor:pointer; }
.pa-follow:first-child{ border-top:0; }
.pa-follow:hover, .pa-follow.active{ background:var(--surface-2); }
.pa-follow .steamid{ display:block; overflow-wrap:anywhere; }
#pa-follow-detail .np-facts{ font-size:11.5px; }
#pa-follow-detail .np-map{ max-height:260px; margin:8px 0; }
.pa-follow-timeline{ font-size:11.5px; max-height:360px; overflow-y:auto; padding-right:4px; }
.np-ev.before{ color:var(--muted); }
.player-actions .btn.pa-base-map{ width:auto; padding:2px 8px; font-size:11px; }
.player-actions #pa-bases-scan{ margin-top:6px; }
.pl-offline{ margin-top:22px; }
#players-head th[data-sort], #offline-head th[data-sort]{ cursor:pointer; user-select:none; white-space:nowrap; }
#players-head th[data-sort]:hover, #offline-head th[data-sort]:hover{ color:var(--text); }
#players-head th.sorted, #offline-head th.sorted{ color:var(--text); }
#players-head th[data-sort]::after, #offline-head th[data-sort]::after{ content:attr(data-arrow); margin-left:4px; font-size:9px; }
.pl-offline h4{ margin:0 0 8px; }
.pa-offline:not([hidden]){ display:block; font-size:11.5px; color:var(--warn); margin:-2px 0 6px; }
@media (min-width:821px){ .player-actions:not([hidden]){ position:sticky; top:12px; max-height:calc(100vh - 24px); overflow:auto; } }
@media (max-width:820px){ .player-mgmt-layout{ grid-template-columns:1fr; } }

/* forms */
.form-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px 24px; }
.field:not([hidden]){ display:flex; flex-direction:column; gap:5px; }
.field label{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.field input{ padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:13px; font-family:var(--font-body); }
.field input[readonly]{ color:var(--muted); background:var(--surface-2); font-family:var(--font-mono); font-size:12px; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }

.check-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px 20px; }
.check-grid label{ display:flex; gap:8px; align-items:center; font-size:13px; }
@media (max-width:640px){ .check-grid{ grid-template-columns:1fr 1fr; } }

/* cards */
.wipe-grid{ display:grid; grid-template-columns:1.1fr 1fr; gap:20px; }
.wipe-card{ background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:18px 20px; }
.act-search{ flex:1; min-width:180px; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:13px; font-family:var(--font-body); }
.act-list{ padding:4px 20px; }
.act-row{ border-top:1px solid var(--border); padding:10px 0; }
.act-row:first-child{ border-top:none; }
.act-head{ display:grid; grid-template-columns:150px 1fr auto; gap:12px; align-items:baseline; cursor:pointer; }
.act-head .act-action{ font-size:13px; }
.act-head .act-who{ text-align:right; }
.act-row.failed .act-action{ color:var(--crit); }
.act-tag{ display:inline-block; font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; padding:1px 6px; border:1px solid var(--border); border-radius:4px; color:var(--muted); margin-right:6px; }
.act-tag.panel{ border-color:var(--steel); color:var(--steel); }
.act-detail{ margin:10px 0 2px 162px; display:flex; flex-direction:column; gap:8px; }
.act-change{ font-size:12.5px; }
.act-change .act-field{ font-family:var(--font-mono); font-size:11px; color:var(--muted); margin-bottom:4px; }
.act-change .act-vals{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.act-change pre{ margin:0; white-space:pre-wrap; word-break:break-word; font-family:var(--font-body); font-size:12.5px; padding:6px 8px; border-radius:5px; border:1px solid var(--border); background:var(--surface); max-height:240px; overflow:auto; }
.act-change pre.from{ text-decoration:line-through; text-decoration-color:var(--crit); color:var(--muted); }
.act-change pre.to{ border-color:var(--ok); }
@media (max-width:640px){
  .act-head{ grid-template-columns:1fr; gap:2px; }
  .act-head .act-who{ text-align:left; }
  .act-detail{ margin-left:0; }
  .act-change .act-vals{ grid-template-columns:1fr; }
}
.vip-summary:not([hidden]){ display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-top:12px; }
.vip-summary .stat-tile{ cursor:pointer; }
.vip-summary .stat-tile.active{ box-shadow:inset 0 -2px 0 var(--rust); }
.vip-summary .stat-tile.missing .stat-value{ color:var(--muted); font-size:13px; }
.vip-row{ display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.2fr) minmax(0,0.8fr) auto; gap:12px; align-items:center; padding:9px 0; border-top:1px solid var(--border); font-size:13px; }
.vip-row:first-child{ border-top:none; }
.vip-row.head{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.vip-row .btn{ padding:4px 8px; font-size:10px; margin-left:4px; }
.vip-row .soon{ color:var(--warn); }
.vip-row .gone{ color:var(--crit); }
.flag{ display:inline-block; width:20px; height:15px; margin-right:6px; vertical-align:-2px; border-radius:2px; box-shadow:0 0 0 1px var(--border); object-fit:cover; }
.flag-gap{ display:inline-block; width:26px; }
.board-list .cc{ min-width:0; width:20px; padding:1px 0; font-size:8px; }
.cc{ display:inline-block; min-width:2.6em; margin-right:6px; padding:1px 4px; border:1px solid var(--border); border-radius:3px; font-family:var(--font-mono); font-size:10px; text-align:center; color:var(--muted); }
.wl-row{ display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,0.8fr) auto; gap:12px; align-items:center; padding:9px 0; border-top:1px solid var(--border); font-size:13px; }
.wl-row:first-child{ border-top:none; }
.wl-row.head{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.wl-row .btn{ padding:4px 8px; font-size:10px; }
.vip-dot{ display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--ok); margin-right:6px; vertical-align:middle; }
@media (max-width:760px){
  .vip-row{ grid-template-columns:1fr 1fr; }
  .vip-row.head{ display:none; }
  .vip-row > :last-child{ grid-column:1 / -1; }
  .wl-row{ grid-template-columns:1fr auto; }
  .wl-row.head{ display:none; }
  .wl-row{ row-gap:2px; }
  .wl-row > :not(:last-child){ grid-column:1; }
  .wl-row > :last-child{ grid-column:2; grid-row:1 / span 3; align-self:center; }
}
.ent-row{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,0.6fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.1fr); gap:12px; align-items:center; padding:8px 0; border-top:1px solid var(--border); font-size:13px; }
.ent-row:first-child{ border-top:none; }
.ent-row.head{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.ent-row .num{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
.ent-row .bad{ color:var(--crit); }
.ent-row .warn{ color:var(--warn); }
.ent-row.flagged{ box-shadow:inset 3px 0 0 var(--warn); padding-left:8px; }
.ent-bar{ height:4px; border-radius:2px; background:var(--rust); margin-top:4px; }
.ent-row.ab-row{ grid-template-columns:minmax(0,0.45fr) minmax(0,0.9fr) minmax(0,2.4fr) minmax(0,0.7fr); align-items:start; }
.ab-owner{ line-height:1.5; }
.ab-owner b{ font-weight:600; }
@media (max-width:760px){ .ent-row.ab-row{ grid-template-columns:minmax(0,0.6fr) minmax(0,1fr); } .ent-row.ab-row > :nth-child(3){ grid-column:1 / -1; } }
.ent-prefabs:not([hidden]){ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.ent-prefabs ol{ margin:6px 0 0; padding-left:22px; font-size:12.5px; }
.ent-prefabs li span{ font-family:var(--font-mono); color:var(--muted); float:right; }
@media (max-width:760px){
  .ent-row{ grid-template-columns:1fr 1fr; }
  .ent-row.head{ display:none; }
  .ent-prefabs:not([hidden]){ grid-template-columns:1fr; }
}
.fb-replies{ margin-top:10px; }
.fb-reply{ border-left:3px solid var(--steel); padding:4px 0 4px 10px; margin-top:8px; font-size:13px; }
.fb-reply .warn{ color:var(--warn); }
.fb-reply-form{ margin-top:10px; }
.fb-reply-form summary{ cursor:pointer; font-size:13px; }
.fb-reply-form textarea{ width:100%; box-sizing:border-box; margin-top:8px; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-body); font-size:13px; resize:vertical; }
.ret-tiles{ grid-template-columns:repeat(4,1fr); margin:12px 0 16px; }
@media (max-width:760px){ .ret-tiles{ grid-template-columns:repeat(2,1fr); } }
.ret-tiles .stat-sub{ font-family:var(--font-mono); font-size:10.5px; color:var(--muted); margin-top:2px; }
.ret-figure{ margin:0 0 18px; position:relative; }
.ret-figure figcaption{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); margin-bottom:6px; display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.ret-key{ display:inline-flex; align-items:center; gap:6px; text-transform:none; letter-spacing:0; font-family:var(--font-body); font-size:12px; color:var(--text); }
.ret-key i{ width:14px; height:2px; border-radius:1px; display:inline-block; }
.ret-figure svg{ width:100%; height:auto; display:block; overflow:visible; }
.ret-figure .grid line{ stroke:var(--border); stroke-width:1; }
.ret-figure .axis text, .ret-figure .lbl{ font-family:var(--font-mono); font-size:10px; fill:var(--muted); }
.ret-figure .wipe line{ stroke:var(--muted); stroke-width:1; stroke-dasharray:3 3; }
.ret-figure .direct{ font-family:var(--font-body); font-size:11px; fill:var(--text); }
.ret-figure .ret-bar.hover{ stroke:var(--text); stroke-width:1.5; }
.ret-figure .hair{ stroke:var(--muted); stroke-width:1; }
.ret-tip{ position:absolute; pointer-events:none; background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:8px 10px; font-size:12px; box-shadow:var(--shadow); min-width:190px; z-index:2; }
.ret-tip:not([hidden]){ display:block; }
.ret-tip .row{ display:flex; justify-content:space-between; gap:12px; }
.ret-tip .sw{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.ret-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
.ret-table th, .ret-table td{ text-align:right; padding:5px 8px; border-top:1px solid var(--border); font-variant-numeric:tabular-nums; }
.ret-table th:first-child, .ret-table td:first-child{ text-align:left; }
.ret-table th{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; color:var(--muted); font-weight:400; }
.ret-table .prov{ color:var(--muted); font-style:italic; }
.ret-recent{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,0.8fr) minmax(0,0.8fr); gap:4px 12px; font-size:12.5px; }
.ret-recent .head{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; color:var(--muted); }

/* new players page */
.np-funnel{ display:grid; grid-template-columns:minmax(0,230px) minmax(60px,1fr) auto; gap:6px 12px; align-items:center; margin-bottom:20px; font-size:13px; max-width:820px; }
.np-funnel .bar{ height:10px; background:var(--surface-2); border-radius:3px; overflow:hidden; }
.np-funnel .bar i{ display:block; height:100%; background:var(--series-1); }
.np-funnel .num{ font-family:var(--font-mono); font-size:12px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.np-layout{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:16px; align-items:start; }
@media (max-width:900px){ .np-layout{ grid-template-columns:1fr; } }
.np-list{ display:flex; flex-direction:column; gap:1px; background:var(--border); border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.np-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; padding:9px 12px; background:var(--surface); border:0; text-align:left; cursor:pointer; color:var(--text); font:inherit; font-size:13px; }
.np-row:hover{ background:var(--chip-bg); }
.np-row.active{ background:var(--steel-soft); }
.np-row .who{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.np-row .when, .np-row .did{ font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.np-row .did{ grid-column:1 / -1; }
.np-chip{ font-family:var(--font-mono); font-size:10.5px; padding:1px 7px; border-radius:10px; border:1px solid var(--border); color:var(--muted); white-space:nowrap; justify-self:end; align-self:center; font-weight:400; }
.np-chip.ok{ color:var(--ok); border-color:var(--ok); }
.np-chip.warn{ color:var(--warn); border-color:var(--warn); }
.np-chip.crit{ color:var(--crit); border-color:var(--crit); }
.np-detail h3{ font-family:var(--font-body); text-transform:none; font-size:16px; font-weight:600; }
.np-facts{ font-family:var(--font-mono); font-size:11.5px; color:var(--muted); margin:4px 0 0; }
.np-map{ width:100%; aspect-ratio:1; max-height:380px; background:var(--surface); border:1px solid var(--border); border-radius:6px; display:block; margin:12px 0 14px; }
.np-timeline{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:2px 12px; font-size:13px; }
.np-timeline .t{ font-family:var(--font-mono); font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums; text-align:right; }
.np-timeline .visit{ grid-column:1 / -1; font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); border-top:1px solid var(--border); padding-top:8px; margin-top:6px; }
.np-timeline .visit:first-child{ border-top:0; margin-top:0; padding-top:0; }
.np-ev{ overflow-wrap:anywhere; }
.np-ev.death{ color:var(--crit); }
.np-ev.probe{ color:var(--crit); font-weight:600; }
.np-ev.chat, .np-ev.cmd{ color:var(--steel); }
.np-ev.build, .np-ev.place{ color:var(--ok); }
.np-ev.ui, .np-ev.left, .np-ev.note{ color:var(--muted); }
.np-ev[data-x]{ cursor:default; }
.np-ev.hl{ background:var(--chip-bg); }
.inv-box, .pa-bases{ margin-top:14px; border-top:1px solid var(--border); padding-top:10px; }
.inv-box summary, .pa-bases summary{ cursor:pointer; font-size:13px; }
.guide-plugin{ border-top:1px solid var(--border); padding:8px 0; }
.guide-plugin summary{ cursor:pointer; font-size:13px; }
.guide-title{ font-weight:600; }
.guide-tag{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--rust); border:1px solid var(--rust); border-radius:3px; padding:0 4px; }
.guide-body{ padding:6px 0 4px 16px; font-size:13px; }
.guide-body h5{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); margin:10px 0 4px; }
.guide-body ul{ margin:0 0 6px; padding-left:18px; }
.guide-body p{ margin:4px 0; }
.guide-who{ color:var(--muted); font-size:12px; }
.inv-sec{ margin-top:10px; }
.inv-sec h5{ margin:0 0 6px; font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); font-weight:400; display:flex; justify-content:space-between; gap:8px; }
.inv-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr)); gap:4px; }
.inv-slot{ position:relative; min-height:58px; border:1px solid var(--border); border-radius:5px; background:var(--surface); padding:4px 5px 6px; font-size:10.5px; line-height:1.2; overflow:hidden; }
.inv-slot.empty{ background:transparent; border-style:dashed; }
.inv-slot.has-contents{ cursor:pointer; border-color:var(--steel); }
.inv-slot .nm{ display:block; word-break:break-word; }
.inv-slot .cn{ display:block; color:var(--muted); font-size:9.5px; font-style:italic; }
.inv-slot .amt{ position:absolute; right:4px; bottom:6px; font-family:var(--font-mono); font-size:10px; color:var(--muted); }
.inv-slot .cond{ position:absolute; left:0; bottom:0; height:3px; background:var(--ok); }
.inv-slot .cond.low{ background:var(--crit); }
.inv-slot .tag{ font-family:var(--font-mono); font-size:9px; color:var(--steel); }
.inv-nested{ margin:6px 0 0; padding:8px; border:1px solid var(--steel); border-radius:6px; }
.inv-search{ width:100%; box-sizing:border-box; margin-bottom:6px; padding:5px 8px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:12px; }
.ann-when:not([hidden]){ display:block; margin-top:8px; }
.ann-row{ border-top:1px solid var(--border); padding:10px 0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; align-items:start; }
.ann-row:first-child{ border-top:none; }
.ann-row .ann-t{ font-size:13.5px; }
.ann-row .ann-actions .btn{ padding:4px 8px; font-size:10px; margin-left:4px; }
.ann-row.paused .ann-t{ color:var(--muted); }
.ann-before-row{ display:flex; gap:6px; align-items:center; margin-top:4px; }
.ann-before-row input{ width:70px; }
@media (max-width:640px){ .ann-row{ grid-template-columns:1fr; } }
.pq-row{ border-top:1px solid var(--border); padding:10px 0; }
.pq-row:first-child{ border-top:none; }
.pq-row .pq-q{ font-size:13.5px; }
.pq-row .pq-meta{ margin-top:3px; }
.pq-tag{ display:inline-block; font-family:var(--font-mono); font-size:9.5px; text-transform:uppercase; letter-spacing:0.05em; padding:1px 6px; border:1px solid var(--border); border-radius:4px; color:var(--muted); margin-right:4px; }
.pq-tag.gap{ border-color:var(--warn); color:var(--warn); }
.pq-tag.ok{ border-color:var(--ok); color:var(--ok); }
.pq-actions .btn{ padding:4px 8px; font-size:10px; margin:6px 6px 0 0; }
.pq-draft{ margin-top:8px; }
.pq-answer textarea{ width:100%; box-sizing:border-box; margin-top:6px; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-body); font-size:13px; }
.tip-editor{ margin-top:14px; border-top:1px solid var(--border); padding-top:12px; }
.tip-editor summary{ cursor:pointer; font-size:13px; }
.tip-row{ display:grid; grid-template-columns:180px 1fr; gap:6px 16px; padding:10px 0; border-top:1px solid var(--border); }
.tip-row:first-child{ border-top:none; }
.tip-row .tip-name{ font-size:13px; }
.tip-row textarea{ width:100%; box-sizing:border-box; min-height:40px; resize:vertical; padding:7px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:13px; font-family:var(--font-body); }
.tip-row.dirty textarea{ border-color:var(--rust); }
.tip-row .tip-meta{ grid-column:2; display:flex; justify-content:space-between; gap:12px; }
.tip-row .tip-count{ white-space:nowrap; }
.tip-row .tip-meta .over{ color:var(--crit); }
@media (max-width:640px){ .tip-row{ grid-template-columns:1fr; } .tip-row .tip-meta{ grid-column:1; } }
.wipe-card h4{ font-family:var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); margin:0 0 10px; }
.countdown{ font-family:var(--font-mono); font-size:30px; font-variant-numeric:tabular-nums; }
.wipe-toggle-row{ display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-top:1px solid var(--border); font-size:13px; }
.wipe-toggle-row:first-of-type{ border-top:none; }
.switch{ width:34px; height:19px; border-radius:99px; background:var(--border); position:relative; flex-shrink:0; }
.switch.on{ background:var(--rust); }
.switch::after{ content:""; position:absolute; width:15px; height:15px; border-radius:50%; background:#fff; top:2px; left:2px; }
.switch.on::after{ left:17px; }
.restart-list{ display:flex; flex-direction:column; gap:2px; margin:10px 0 12px; }
.restart-row{ display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-top:1px solid var(--border); font-family:var(--font-mono); font-size:13px; }
.restart-row:first-child{ border-top:none; }
@media (max-width:720px){ .wipe-grid{ grid-template-columns:1fr; } }

/* fleet */
.fleet-list{ display:flex; flex-direction:column; gap:2px; }
.fleet-row{ display:grid; grid-template-columns:12px 1fr auto auto auto; align-items:center; gap:16px; padding:13px 6px; border-bottom:1px solid var(--border); font-size:13px; border-radius:6px; }
.fleet-row:last-child{ border-bottom:none; }
.fleet-row.selected{ background:var(--rust-soft); }
.fleet-name{ font-weight:500; }
.fleet-stat{ font-family:var(--font-mono); font-size:12px; color:var(--muted); white-space:nowrap; }

@media (max-width:820px){
  .app-header{ grid-template-columns:1fr; gap:10px; }
  .ctx-chips{ justify-content:flex-start; }
  .switcher select{ min-width:0; width:100%; }
  .app-shell{ grid-template-columns:1fr; }
  .app-tabs.sidebar{ flex-direction:row; overflow-x:auto; border-right:none; border-bottom:1px solid var(--border); padding:6px 8px; }
  .app-tabs.sidebar .nav-section, .app-tabs.sidebar .nav-foot{ display:none; }
  .app-tabs.sidebar button{ white-space:nowrap; border-left:none; border-bottom:2px solid transparent; border-radius:0; }
  .app-tabs.sidebar button.active{ background:transparent; border-bottom-color:var(--rust); }
  .fleet-row{ grid-template-columns:12px 1fr; row-gap:4px; }
}

/* v0.2: process card, discord table, inline fields */
.proc-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px 20px; }
.proc-grid > div{ display:flex; flex-direction:column; gap:2px; }
.proc-grid strong{ font-family:var(--font-mono); font-size:13px; font-weight:500; word-break:break-all; }
.proc-grid .stat-label{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.inline-field{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:11.5px; color:var(--muted); }
.inline-field input[type=number], #proc-reason{ padding:7px 9px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-mono); font-size:12px; }
.select{ padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-body); font-size:13px; }
.tab-badge{ font-family:var(--font-mono); font-size:9px; background:var(--warn); color:#fff; padding:1px 6px; border-radius:99px; margin-left:4px; }
.map-actions:not([hidden]){ display:flex; gap:10px; align-items:center; margin-top:14px; flex-wrap:wrap; }
#discord-table input[type=text]{ width:100%; padding:6px 8px; border:1px solid var(--border); border-radius:4px; background:var(--surface); color:var(--text); font-size:12px; font-family:var(--font-body); }
#discord-table td:nth-child(3){ width:18%; }
#discord-table td:nth-child(4){ width:40%; }
.ctx-chip.busy{ border-color:var(--warn); color:var(--warn); }
@media (max-width:720px){ .proc-grid{ grid-template-columns:1fr 1fr; } }

/* plugins tab */
.plugins-layout{ display:grid; grid-template-columns:1fr; gap:18px; align-items:start; }
.plugins-layout.with-config{ grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); }
.cfg-editor{ width:100%; box-sizing:border-box; min-height:460px; resize:vertical; padding:10px 12px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-mono); font-size:12px; line-height:1.5; tab-size:2; white-space:pre; overflow:auto; }
.cfg-editor.invalid{ border-color:var(--crit); }
.cfg-editor.dirty:not(.invalid){ border-color:var(--rust); }
.cfg-valid{ margin-top:6px; }
.cfg-valid.bad{ color:var(--crit); }
.cfg-review{ margin-top:10px; border:1px solid var(--rust); border-radius:6px; padding:10px 12px; }
.cfg-review .act-change{ margin-top:8px; }
.cfg-outcome{ margin-top:12px; }
.cfg-outcome pre{ margin:6px 0 0; white-space:pre-wrap; word-break:break-word; font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.cfg-backups:not([hidden]){ display:flex; gap:8px; align-items:center; margin-top:14px; padding-top:12px; border-top:1px solid var(--border); flex-wrap:wrap; }
.cfg-backups select{ flex:1; min-width:200px; }
#plg-table td{ padding:7px 10px; font-size:12.5px; }
#plg-table .btn{ padding:4px 8px; font-size:10px; margin-right:4px; }
#plg-table tr.plg-disabled td{ color:var(--muted); }
#plg-table tr.plg-error td:nth-child(2){ color:var(--crit); }
.plg-sub{ display:block; font-family:var(--font-mono); font-size:10.5px; color:var(--muted); }
.plg-sub.crit{ color:var(--crit); }
.plg-sub.warn{ color:var(--warn); }
/* Narrow: the wide plugin table must not stretch the column the editor sits in, and the
   editor goes above the ~140-row table so it is not a long scroll away. */
@media (max-width:900px){
  .plugins-layout.with-config{ grid-template-columns:minmax(0,1fr); }
  .plugins-layout.with-config #plg-config{ order:-1; }
}
#plg-table tr.plg-outdated{ background:color-mix(in srgb, var(--warn) 9%, var(--surface)); }
#plg-table tr.plg-outdated td:first-child{ box-shadow: inset 3px 0 0 var(--warn); }
.plg-update-chip{ font-family:var(--font-mono); font-size:11.5px; color:var(--warn); font-weight:500; white-space:nowrap; }
.plg-src-badge{ font-family:var(--font-mono); font-size:11px; padding:1px 6px; border:1px solid var(--border); border-radius:4px; white-space:nowrap; }
.plg-src-btn{ padding:1px 6px; font-size:11px; }
.plg-src-edit{ display:inline-flex; flex-wrap:wrap; gap:4px; align-items:center; }
.plg-src-edit input{ min-width:180px; padding:4px 6px; border:1px solid var(--border); border-radius:4px; background:var(--surface); color:var(--text); font-size:12px; }
.plg-src-edit select{ padding:4px; font-size:12px; }
.plg-sub .btn{ padding:0 6px; font-size:10.5px; margin-left:4px; }
th.sortable{ cursor:pointer; user-select:none; }
th.sortable:hover{ color:var(--text); }
th.sortable.asc::after{ content:" ▲"; font-size:9px; }
th.sortable.desc::after{ content:" ▼"; font-size:9px; }

/* ---- live map ---- */
.map-toolbar{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.map-layout{ display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:14px; height:calc(100vh - 190px); min-height:420px; }
.map-viewport{ position:relative; overflow:hidden; background:#0b1a24; border:1px solid var(--border); border-radius:8px; cursor:grab; user-select:none; }
.map-viewport.dragging{ cursor:grabbing; }
.map-world{ position:absolute; left:0; top:0; transform-origin:0 0; --inv:1; }
.map-world img{ display:block; width:100%; height:100%; }
.map-grid{ position:absolute; pointer-events:none; background-image:linear-gradient(to right, rgba(255,255,255,0.35) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.35) 1px, transparent 1px); }
.map-marker{ position:absolute; transform:translate(-50%,-50%) scale(var(--inv)); display:flex; flex-direction:column; align-items:center; pointer-events:none; }
.map-marker .map-dot{ width:10px; height:10px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,0.6); }
.map-marker .map-label{ font-family:var(--font-mono); font-size:10px; line-height:1.2; color:#fff; text-shadow:0 0 3px #000, 0 0 3px #000; white-space:nowrap; margin-top:2px; }
.map-marker.mon .map-dot{ display:none; }
.map-marker.mon .map-label{ color:#d8dfe3; font-size:9.5px; opacity:0.85; }
.map-marker .map-label .flag{ width:14px; height:10.5px; margin-right:3px; vertical-align:-1px; border-radius:1px; box-shadow:0 0 0 1px rgba(0,0,0,0.6); }
.map-marker .map-label .cc{ min-width:0; margin-right:3px; padding:0 2px; font-size:8px; color:#fff; border-color:rgba(255,255,255,0.6); }
.map-marker.player{ pointer-events:auto; cursor:pointer; z-index:3; }
.map-marker.player .map-dot{ background:#2ee6a6; width:12px; height:12px; position:relative; }
.map-marker.player .map-dot::after{ content:""; position:absolute; left:50%; top:-8px; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-bottom:7px solid #2ee6a6; transform-origin:50% 12px; transform:translateX(-50%) rotate(var(--heading,0deg)); }
.map-marker.player.selected .map-dot{ background:var(--rust); box-shadow:0 0 0 3px rgba(217,122,82,0.5); }
.map-marker.event{ z-index:2; }
.map-marker.event .map-dot{ width:14px; height:14px; border-radius:3px; }
.map-marker.heli .map-dot{ background:#e04b4b; }
.map-marker.cargo .map-dot{ background:#3f8ee0; }
.map-marker.bradley .map-dot{ background:#d9ac4f; }
.map-marker.ch47 .map-dot{ background:#b26ee0; }
.map-side{ overflow:auto; border:1px solid var(--border); border-radius:8px; padding:10px 12px; background:var(--surface); }
.map-side h3{ margin:4px 0 6px; font-family:var(--font-display); font-size:15px; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); }
.map-list{ list-style:none; margin:0 0 12px; padding:0; }
.map-list li{ display:flex; justify-content:space-between; gap:8px; padding:4px 0; border-bottom:1px solid var(--border); font-size:12.5px; cursor:pointer; }
.map-list li.steamid{ cursor:default; }
@media (max-width:900px){ .map-layout{ grid-template-columns:1fr; height:auto; } .map-viewport{ height:70vw; } }
.map-marker.sleeper, .map-marker.tc{ pointer-events:auto; }
.map-marker.sleeper .map-dot{ width:7px; height:7px; background:#9aa39c; border-width:1px; }
.map-marker.tc .map-dot{ width:7px; height:7px; border-radius:1px; background:#f0a030; border-width:1px; }
.map-marker.sleeper .map-label, .map-marker.tc .map-label{ display:none; }
/* live map: vehicles, raids, trails, grid labels, card, history */
.map-toolbar select{ padding:3px 5px; font-family:var(--font-mono); font-size:11px; }
#map-search{ padding:6px 9px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-mono); font-size:12px; width:150px; }
.map-marker.vehicle{ pointer-events:auto; z-index:1; }
.map-marker.vehicle .map-dot{ width:9px; height:9px; border-radius:2px; transform:rotate(45deg); background:#c9d3d8; border-width:1px; }
.map-marker.mini .map-dot, .map-marker.scrapheli .map-dot{ background:#ffe08a; }
.map-marker.boat .map-dot, .map-marker.rhib .map-dot, .map-marker.tug .map-dot, .map-marker.sub .map-dot{ background:#7cc8ff; }
.map-marker.horse .map-dot{ background:#c49a6c; }
.map-marker.car .map-dot, .map-marker.bike .map-dot, .map-marker.snowmobile .map-dot{ background:#e0e0e0; }
.map-marker.vehicle .map-label{ display:none; }
.map-world.zoomed .map-marker.vehicle .map-label{ display:block; font-size:9px; opacity:0.9; }
.map-marker.raid{ pointer-events:auto; }
.map-marker.raid .map-dot{ width:16px; height:16px; border-radius:50%; background:rgba(224,75,75,0.25); border:2px dashed #e04b4b; }
.map-marker.raid .map-label{ display:none; }
.map-marker.event.hacking .map-dot{ animation:map-pulse 1s infinite alternate; }
@keyframes map-pulse{ from{ box-shadow:0 0 0 1px rgba(0,0,0,0.6); } to{ box-shadow:0 0 0 6px rgba(255,159,67,0.5); } }
.map-trails{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:2; }
.map-trail{ fill:none; stroke:rgba(46,230,166,0.55); stroke-width:1.5; vector-effect:non-scaling-stroke; stroke-linejoin:round; stroke-linecap:round; }
.map-trail.selected{ stroke:var(--rust); stroke-width:2.5; }
.map-grid-label{ position:absolute; font-family:var(--font-mono); font-size:10px; color:#fff; text-shadow:0 0 3px #000,0 0 3px #000; transform:translate(-50%,-50%) scale(var(--inv)); }
.map-grid-label.top{ top:-8px; }
.map-grid-label.left{ left:-9px; }
.map-history{ position:absolute; left:10px; right:10px; bottom:8px; display:flex; gap:10px; align-items:center; background:rgba(11,26,36,0.75); border:1px solid rgba(255,255,255,0.15); border-radius:6px; padding:5px 10px; cursor:default; }
.map-history input[type=range]{ flex:1; }
.map-history .steamid{ color:#d8dfe3; white-space:nowrap; }
.map-card{ border:1px solid var(--rust); border-radius:6px; padding:8px 10px; margin-bottom:10px; background:var(--chip-bg); }
.map-card-name{ font-weight:600; font-size:14px; }
.map-card-grid{ display:grid; grid-template-columns:auto 1fr; gap:2px 10px; font-size:12px; margin:6px 0; }
.map-card-actions{ display:flex; gap:6px; }
.map-list li.selected{ color:var(--rust); }
.map-list li em{ font-style:normal; color:#ff9f43; font-size:11px; }
#map-layout:fullscreen{ background:var(--bg); padding:12px; height:100vh; }
/* raid bases: dashed ring + always-on label, coloured by RB difficulty; other plugins' radius markers stay subtle */
.map-marker.raid{ z-index:2; }
.map-marker.raid .map-dot{ width:22px; height:22px; border-radius:50%; background:rgba(224,75,75,0.2); border:3px dashed #e04b4b; box-shadow:0 0 0 2px rgba(0,0,0,0.5); }
.map-marker.raid .map-label{ display:block; font-weight:600; color:#ffd7d7; }
.map-marker.raid.easy .map-dot{ border-color:#2ecc71; background:rgba(46,204,113,0.2); }
.map-marker.raid.med .map-dot{ border-color:#ffeb04; background:rgba(255,235,4,0.2); }
.map-marker.raid.hard .map-dot{ border-color:#ff3b3b; background:rgba(255,59,59,0.2); }
.map-marker.raid.expert .map-dot{ border-color:#4d7cff; background:rgba(77,124,255,0.25); }
.map-marker.raid.nightmare .map-dot{ border-color:#111; background:rgba(0,0,0,0.35); }
.map-marker.marker .map-dot{ width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,0.12); border:2px dashed rgba(255,255,255,0.6); }
.map-marker.marker .map-label{ display:none; }
.map-world.zoomed .map-marker.marker .map-label{ display:block; opacity:0.8; }
/* process tuning (affinity / priority) */
.proc-tuning{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
.core-grid{ display:flex; flex-wrap:wrap; gap:4px; }
.core-grid .core{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:26px; border:1px solid var(--border); border-radius:4px; font-family:var(--font-mono); font-size:11px; cursor:pointer; color:var(--muted); user-select:none; }
.core-grid .core.on{ background:var(--steel-soft); border-color:var(--steel); color:var(--text); }
.core-grid .core input{ display:none; }
#proc-priority{ padding:5px 7px; font-family:var(--font-mono); font-size:11.5px; }
/* overview charts */
.chart-range{ display:inline-flex; gap:4px; margin-left:auto; }
.chart-range .btn.active{ background:var(--steel-soft); border-color:var(--steel); }
.chart-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; margin:14px 0 4px; }
.chart{ background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:10px 12px 6px; }
.chart-head{ display:flex; justify-content:space-between; align-items:baseline; }
.chart-last{ font-family:var(--font-mono); font-size:16px; font-variant-numeric:tabular-nums; }
.chart svg{ display:block; width:100%; height:110px; margin-top:4px; }
.chart-line{ fill:none; stroke:var(--steel); stroke-width:1.6; vector-effect:non-scaling-stroke; }
.chart[data-metric="fps"] .chart-line{ stroke:var(--ok); }
.chart[data-metric="players"] .chart-line{ stroke:var(--rust); }
.chart[data-metric="memory"] .chart-line{ stroke:var(--warn); }
.chart svg{ cursor:crosshair; touch-action:pan-y; }
.chart-gridline{ stroke:var(--border); stroke-width:1; vector-effect:non-scaling-stroke; }
.chart-cross{ stroke:var(--muted); stroke-width:1; stroke-dasharray:3 3; vector-effect:non-scaling-stroke; }
.chart-cross[hidden]{ display:none; }
.chart-times{ position:relative; height:14px; font-family:var(--font-mono); font-size:10px; color:var(--muted); }
.chart-times span{ position:absolute; top:1px; transform:translateX(-50%); white-space:nowrap; }
.chart-last.hovering{ display:inline-flex; align-items:baseline; gap:6px; }
.chart-last .chart-when{ font-size:11px; color:var(--muted); }
.chart-axis{ display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:10px; color:var(--muted); }
.chart-axis .chart-min::before{ content:"min "; } .chart-axis .chart-max::before{ content:"max "; }
@media (max-width:900px){ .chart-grid{ grid-template-columns:1fr; } }

/* add server form */
.add-server{ margin-top:22px; padding-top:18px; border-top:1px solid var(--border); }
.add-server [hidden]{ display:none !important; }
.add-server .field .select{ width:100%; }
#ns-form{ margin-top:14px; }
.ns-install{ margin-top:16px; padding:12px; border:1px dashed var(--border); border-radius:6px; }
.ns-install-log{ margin:10px 0 0; max-height:220px; overflow:auto; white-space:pre-wrap; background:var(--surface-2); padding:8px 10px; border-radius:5px; font-size:11px; }
.map-switch [hidden]{ display:none !important; }
.backup-sched{ margin:12px 0 16px; }
.bk-presets{ display:flex; flex-wrap:wrap; gap:6px; }
.bk-presets .btn{ padding:5px 9px; font-size:11px; }

/* chat page */
.chat-filter{ flex:1; min-width:160px; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:13px; }
.chat-cols{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.chat-col{ display:flex; flex-direction:column; min-width:0; }
.chat-col h4{ margin:0 0 8px; }
.chat-list{ height:calc(100vh - 290px); min-height:260px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:6px 0; }
.chat-msg{ padding:4px 12px; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.chat-msg:hover{ background:var(--surface-2); }
.chat-time{ font-family:var(--font-mono); font-size:11px; color:var(--muted); margin-right:8px; }
.chat-chan{ font-family:var(--font-mono); font-size:10px; text-transform:uppercase; color:var(--warn); border:1px solid currentColor; border-radius:3px; padding:0 4px; margin-right:6px; }
.chat-tags{ font-family:var(--font-mono); font-size:11px; color:var(--muted); margin-right:6px; }
.chat-name{ font:inherit; font-weight:600; color:var(--rust); background:none; border:0; padding:0; cursor:pointer; margin-right:6px; }
.chat-name::after{ content:':'; color:var(--muted); }
button.chat-name:hover{ text-decoration:underline; }
.chat-name.server{ color:var(--warn); cursor:default; }
.chat-server .chat-text{ color:var(--warn); }
.chat-empty{ padding:10px 12px; }
.chat-send{ display:flex; gap:8px; margin-top:10px; }
.chat-send input{ flex:1; min-width:0; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-size:13px; }
@media (max-width:760px){ .chat-cols{ grid-template-columns:1fr; } .chat-list{ height:320px; } }
.chat-col h4 .steamid{ margin-left:8px; font-weight:400; }
.chat-discord .chat-chan{ color:#7289DA; }
.chat-name.discord{ color:#7289DA; cursor:default; }
.chat-send input.chat-as{ flex:0 0 110px; }

/* stats page */
.stats-layout{ display:grid; grid-template-columns:1fr 300px; gap:16px; align-items:start; }
.board-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.board{ background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:12px 14px; }
.board h4{ margin:0 0 8px; }
.board-list{ margin:0; padding-left:20px; }
.board-list li{ display:flex; justify-content:space-between; gap:10px; padding:3px 0; font-size:13px; }
.board-val{ font-family:var(--font-mono); font-size:12px; color:var(--muted); white-space:nowrap; }
/* Narrow boards: the name stays on one line (ellipsis, full name on hover) and a long value wraps at its spaces. */
/* (li is flex, so the ol's number markers never showed; its 20px indent was empty space.) */
.board-list{ padding-left:0; }
.board-list li{ align-items:baseline; }
.board-list .chat-name{ flex:1 1 auto; min-width:min(9em, 55%); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; }
.board-list .board-val{ flex:0 4 auto; white-space:normal; text-align:right; }
.board-list .flag, .board-list .cc{ vertical-align:-3px; }
@media (max-width:900px){ .stats-layout{ grid-template-columns:1fr; } }
.stats-avatar{ width:56px; height:56px; border-radius:6px; float:right; margin-left:10px; border:1px solid var(--border); }

/* rules page */
.rules-block{ margin-bottom:18px; }
.rules-block h4{ margin:0 0 8px; }
.rules-cols{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.rules-text{ min-height:260px; padding:10px 12px; border:1px solid var(--border); border-radius:6px; background:var(--surface); color:var(--text); font-family:var(--font-mono); font-size:12px; line-height:1.5; resize:vertical; }
.rules-preview{ padding:10px 14px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); font-size:13px; line-height:1.5; overflow:auto; }
@media (max-width:900px){ .rules-cols{ grid-template-columns:1fr; } }

/* staff notes */
.notes-box{ margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.notes-box h4{ margin:0 0 8px; }
.notes-list{ list-style:none; margin:0 0 10px; padding:0; max-height:260px; overflow-y:auto; }
.notes-list li{ display:grid; grid-template-columns:auto 1fr auto; gap:2px 8px; padding:6px 8px; border:1px solid var(--border); border-radius:5px; margin-bottom:6px; font-size:12px; }
.notes-list .note-when{ font-family:var(--font-mono); font-size:10.5px; color:var(--muted); }
.notes-list .note-kind{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; color:var(--muted); }
.notes-list .note-text{ grid-column:1/-1; line-height:1.45; overflow-wrap:anywhere; }
.notes-list li.note-warning{ border-color:var(--warn); }
.notes-list li.note-warning .note-kind{ color:var(--warn); }
.notes-list li.note-action{ border-style:dashed; }
.notes-list .note-del{ padding:0 6px; font-size:11px; line-height:1.6; }
.notes-add textarea{ width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:5px; background:var(--surface); color:var(--text); font-family:var(--font-body); font-size:12px; resize:vertical; }

.asst-sent{ color:var(--ok); }
.asst-err{ color:var(--warn); }
#asst-recent td{ vertical-align:top; }
#asst-recent td:nth-child(3),#asst-recent td:nth-child(4){ white-space:normal; max-width:320px; }

/* ---- Map Studio ---- */
.ms-form{ margin-top:14px; }
.ms-form .field .select{ width:100%; }
.ms-mon-tools{ display:flex; gap:12px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.ms-monuments{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap:16px 28px; }
.ms-group{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.ms-group-name{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); padding-bottom:4px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.ms-mon{ display:flex; align-items:center; gap:10px; padding:3px 0; min-width:0; }
.ms-mon-name{ flex:1; min-width:0; font-size:13px; }
.ms-seen{ font-family:var(--font-mono); font-size:10.5px; color:var(--muted); white-space:nowrap; }
.ms-seg{ display:inline-flex; border:1px solid var(--border); border-radius:5px; overflow:hidden; flex-shrink:0; }
.ms-seg button{ font:500 11px var(--font-body); padding:4px 9px; border:0; background:var(--surface); color:var(--muted); cursor:pointer; }
.ms-seg button + button{ border-left:1px solid var(--border); }
.ms-seg button:focus-visible{ outline:2px solid var(--steel); outline-offset:-2px; }
.ms-seg button.on.must{ background:var(--ok); color:#fff; }
.ms-seg button.on.allowed{ background:var(--steel-soft); color:var(--text); }
.ms-seg button.on.off{ background:var(--crit); color:#fff; }
.ms-job-line{ display:flex; align-items:center; gap:14px; justify-content:space-between; flex-wrap:wrap; }
.ms-phase{ font-size:13.5px; }
.ms-phase.done{ color:var(--ok); }
.ms-phase.failed{ color:var(--crit); }
.ms-phase.cancelled{ color:var(--muted); }
.ms-tries{ margin-top:12px; overflow-x:auto; }
.ms-res{ font-family:var(--font-mono); font-size:11px; }
.ms-res.ok{ color:var(--ok); }
.ms-res.missing{ color:var(--warn); }
.ms-res.failed{ color:var(--crit); }
.ms-maps{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap:16px; }
.ms-map{ background:var(--surface); border:1px solid var(--border); border-radius:8px; overflow:hidden; display:flex; flex-direction:column; min-width:0; }
.ms-map.testing{ border-color:var(--steel); box-shadow:0 0 0 1px var(--steel); }
.ms-map-img{ display:block; aspect-ratio:1; background:#2b4a5a; }
.ms-map-img img{ display:block; width:100%; height:100%; object-fit:cover; }
.ms-map-info{ padding:12px 14px 14px; display:flex; flex-direction:column; gap:8px; min-width:0; }
.ms-map-name{ font-family:var(--font-mono); font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.ms-chips{ display:flex; flex-wrap:wrap; gap:5px; }
.ms-chip{ font-family:var(--font-mono); font-size:10.5px; padding:2px 7px; border-radius:3px; background:var(--chip-bg); border:1px solid var(--border); color:var(--muted); }
.ms-chip.ok{ color:var(--ok); }
.ms-chip.warn{ color:var(--warn); }
.ms-chip.crit{ color:var(--crit); }
.ms-file{ font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ms-test{ font-size:12.5px; padding:8px 10px; border:1px solid var(--steel); border-radius:5px; background:var(--steel-soft); }
.ms-test code{ font-family:var(--font-mono); }
.ms-test-log{ margin-top:6px; font-family:var(--font-mono); font-size:10.5px; color:var(--muted); white-space:pre-wrap; max-height:120px; overflow:auto; }
.ms-map-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.ms-closest td{ background:color-mix(in srgb, var(--warn) 8%, transparent); }
.ms-closest .btn{ padding:4px 10px; font-size:11px; white-space:nowrap; }
.ms-odds{ margin:14px 0 4px; padding:10px 12px; border:1px solid var(--border); border-left-width:3px; border-radius:6px; font-size:13px; line-height:1.55; }
.ms-odds .steamid{ display:block; }
.ms-odds.ok{ border-left-color:var(--ok); }
.ms-odds.warn{ border-left-color:var(--warn); }
.ms-odds.crit{ border-left-color:var(--crit); }
.ms-thumb-cell{ width:64px; padding-top:4px !important; padding-bottom:4px !important; }
.ms-thumb img{ display:block; width:56px; height:56px; border-radius:4px; object-fit:cover; image-rendering:auto; }
.ms-thumb:hover img{ outline:2px solid var(--rust); }
.ms-wipe{ margin-top:10px; padding-top:10px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:6px; }
.ms-wipe-head{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.ms-link-row{ display:flex; gap:8px; }
.ms-link-row .ms-link{ flex:1; min-width:0; }
.ms-linked{ color:var(--ok); }
/* Map Studio: land rules, at-least counts, card meta, viewer */
.ms-check{ display:inline-flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; white-space:nowrap; }
.ms-build-cell{ display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.ms-pick-bar{ margin:0 0 8px; }
.ms-atleast{ display:inline-flex; align-items:center; gap:4px; font-family:var(--font-mono); font-size:10.5px; color:var(--muted); white-space:nowrap; }
.ms-atleast input{ width:44px; padding:2px 4px; font:inherit; color:var(--text); }
.ms-map-img{ border:0; padding:0; width:100%; cursor:zoom-in; }
.ms-map-img:focus-visible{ outline:2px solid var(--steel); outline-offset:-2px; }
.ms-map.used{ opacity:.72; }
.ms-map-head{ display:flex; align-items:center; gap:8px; min-width:0; }
.ms-map-head .ms-map-name{ flex:1; min-width:0; }
.ms-star{ border:0; background:none; padding:0 2px; font-size:18px; line-height:1; color:var(--muted); cursor:pointer; }
.ms-star.on{ color:var(--warn); }
.ms-star:focus-visible{ outline:2px solid var(--steel); border-radius:3px; }
.ms-note{ width:100%; box-sizing:border-box; resize:vertical; min-height:30px; font:13px var(--font-body); padding:5px 8px; border:1px solid var(--border); border-radius:5px; background:var(--bg); color:var(--text); }
.ms-compare-bar:not([hidden]){ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; padding:8px 12px; border:1px solid var(--border); border-left:3px solid var(--steel); border-radius:6px; font-size:13px; }
body.ms-viewing{ overflow:hidden; }
.ms-viewer{ position:fixed; inset:0; z-index:1000; background:var(--bg); display:flex; flex-direction:column; }
.ms-viewer[hidden]{ display:none; }
.ms-viewer-bar{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:10px 16px; border-bottom:1px solid var(--border); background:var(--surface); }
.ms-viewer-title{ flex:1; min-width:0; font-family:var(--font-mono); font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.ms-panes{ flex:1; min-height:0; display:grid; grid-template-columns:1fr; gap:1px; background:var(--border); }
.ms-panes.two{ grid-template-columns:1fr 1fr; }
@media (max-width:760px){ .ms-panes.two{ grid-template-columns:1fr; grid-template-rows:1fr 1fr; } }
.ms-pane{ display:flex; flex-direction:column; min-width:0; min-height:0; background:#2b4a5a; }
.ms-pane-head{ padding:6px 12px; font-family:var(--font-mono); font-size:12px; background:var(--surface); color:var(--text); border-bottom:1px solid var(--border); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ms-vp{ position:relative; flex:1; min-height:0; overflow:hidden; cursor:grab; touch-action:none; user-select:none; }
.ms-vp.dragging{ cursor:grabbing; }
.ms-vp-msg{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:16px; text-align:center; color:#e7e9e4; font-size:13px; }
.ms-stage{ position:absolute; left:0; top:0; transform-origin:0 0; --inv:1; }
.ms-stage img{ display:block; width:100%; height:100%; }
.ms-lbl{ position:absolute; transform:translate(-50%, -50%) scale(var(--inv)); display:flex; flex-direction:column; align-items:center; gap:1px; pointer-events:none; }
.ms-lbl i{ width:7px; height:7px; border-radius:50%; background:#fff; border:2px solid #1b1e1c; }
.ms-lbl b{ font:600 11px var(--font-body); color:#fff; white-space:nowrap; text-shadow:0 0 2px #000, 0 0 3px #000, 0 1px 2px #000; }
.ms-lbl.rig i{ background:var(--rust); }
.ms-vp.nolabels .ms-lbl b{ display:none; }
/* Map Studio: bought maps */
.ms-import:not([hidden]){ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; padding:10px 12px; border:1px solid var(--border); border-radius:6px; }
.ms-noimg{ display:flex; align-items:center; justify-content:center; padding:16px; text-align:center; font-size:12.5px; color:#e7e9e4; cursor:default; }
.ms-ready{ display:flex; flex-direction:column; gap:6px; }
/* Map Studio: map vote */
.mv-head{ font-size:13.5px; margin-bottom:4px; }
.mv-rows{ display:flex; flex-direction:column; gap:6px; margin:10px 0 4px; }
.mv-row{ display:grid; grid-template-columns:minmax(0, 1.4fr) minmax(80px, 2fr) auto; gap:10px; align-items:center; font-size:13px; }
.mv-row.won .mv-name{ font-weight:600; }
.mv-name{ min-width:0; overflow-wrap:anywhere; }
.mv-bar{ height:10px; border-radius:5px; background:var(--chip-bg); border:1px solid var(--border); overflow:hidden; }
.mv-bar i{ display:block; height:100%; background:var(--steel); }
.mv-row.won .mv-bar i{ background:var(--warn); }
.mv-n{ font-family:var(--font-mono); font-size:12px; white-space:nowrap; }
.mv-pick{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:8px; margin:10px 0; }
.mv-cand{ display:flex; flex-direction:column; gap:6px; padding:8px 10px; border:1px solid var(--border); border-radius:6px; min-width:0; }
.mv-cand.on{ border-color:var(--steel); }
.mv-cand label{ overflow-wrap:anywhere; white-space:normal; }
.mv-cand input[type=text]{ width:100%; box-sizing:border-box; }
.crit-text{ color:var(--crit); }
/* Map Studio: plugin spots check */
.ms-spots{ margin-top:10px; padding-top:10px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:6px; font-size:12.5px; }
.ms-spots-head{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.ms-spot-file summary{ cursor:pointer; padding:3px 0; }
.ms-spot-table{ width:100%; border-collapse:collapse; margin:4px 0 6px; font-size:12px; }
.ms-spot-table td{ padding:3px 6px; border-top:1px solid var(--border); vertical-align:top; }
.ms-spot-table td:nth-child(2){ white-space:nowrap; font-family:var(--font-mono); font-size:11px; }
.ms-spot-table tr.ok td:last-child{ color:var(--ok); }
.ms-spot-table tr.move td:last-child{ color:var(--warn); }
.ms-spot-table tr.bad td:last-child{ color:var(--crit); }
.ms-spot-table tr.dead td{ color:var(--muted); }
/* Map Studio: wipe readiness chips, plugin spot dots, vote schedule */
.ms-chips{ display:flex; flex-wrap:wrap; gap:5px; }
.ms-chip.bad{ color:var(--crit); border-color:var(--crit); }
.ms-chip.none{ border-style:dashed; }
button.ms-chip{ cursor:pointer; }
button.ms-chip:focus-visible{ outline:2px solid var(--steel); outline-offset:1px; }
.ms-needs td:nth-child(2){ font-family:var(--font-body); font-size:12px; white-space:nowrap; }
.ms-needs tr.ok td:nth-child(2){ color:var(--ok); }
.ms-needs tr.move td:nth-child(2){ color:var(--warn); }
.ms-needs tr.bad td:nth-child(2){ color:var(--crit); }
.ms-spot{ position:absolute; width:8px; height:8px; border-radius:50%; border:1.5px solid #111; transform:translate(-50%,-50%) scale(var(--inv)); }
.ms-spot.ok{ background:#5fbf59; }
.ms-spot.move{ background:#e6b13c; }
.ms-spot.bad{ background:#e0503f; }
.mv-schedule{ margin-top:14px; padding-top:12px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:8px; }
.ms-spots .ms-link-row{ align-items:center; }
.ms-spots .ms-link-row .btn{ flex:none; }
.ms-spot-table.ms-needs tr td:last-child{ color:var(--muted); }

/* Map Studio themes: the viewer's side panel and the drawings on the big map */
.ms-viewer-body{ flex:1; min-height:0; display:flex; }
.ms-viewer-body .ms-panes{ flex:1; min-width:0; }
.ms-theme{ width:340px; flex:none; overflow-y:auto; border-left:1px solid var(--border); background:var(--surface); padding:14px; display:flex; flex-direction:column; gap:12px; font-size:13px; }
.ms-theme[hidden]{ display:none; }
@media (max-width:760px){ .ms-viewer-body{ flex-direction:column; } .ms-theme{ width:auto; max-height:45vh; border-left:0; border-top:1px solid var(--border); } }
.ms-theme h5{ margin:0; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); font-weight:600; }
.ms-theme .row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ms-theme .row > label{ min-width:64px; color:var(--muted); }
.ms-theme .row .select, .ms-theme .row input[type=text]{ flex:1; min-width:0; }
.ms-theme input[type=range]{ flex:1; min-width:0; }
.ms-theme .num{ width:60px; font-family:var(--font-mono); font-size:12px; text-align:right; color:var(--muted); }
.ms-draws{ display:flex; flex-direction:column; gap:8px; }
.ms-draw{ border:1px solid var(--border); border-radius:5px; padding:8px; display:flex; flex-direction:column; gap:6px; cursor:pointer; }
.ms-draw.sel{ border-color:var(--rust); box-shadow:0 0 0 1px var(--rust); }
.ms-draw.unplaced{ border-style:dashed; }
.ms-draw-head{ display:flex; gap:8px; align-items:center; }
.ms-draw-head .select{ flex:1; min-width:0; }
.ms-theme .btns{ display:flex; gap:8px; flex-wrap:wrap; }
.ms-theme .note{ color:var(--muted); font-size:12px; margin:0; }
.ms-theme .msg{ font-size:12.5px; min-height:1em; }
.ms-theme .msg.err{ color:var(--crit); }
.ms-art{ position:absolute; transform:translate(-50%,-50%) rotate(var(--rot,0deg)); cursor:move; touch-action:none; image-rendering:auto; opacity:.92; }
.ms-art.sel{ outline:calc(2px * var(--inv)) dashed #fff; outline-offset:calc(3px * var(--inv)); }
.ms-art.dragging{ opacity:.75; }
.ms-art-handle{ position:absolute; width:12px; height:12px; border-radius:50%; background:#fff; border:2px solid var(--rust); transform:translate(-50%,-50%) scale(var(--inv)); cursor:nwse-resize; touch-action:none; }

/* ---- Troubleshoot ---- */
.notice.crit{ border-color:var(--crit); color:var(--crit); }
.ts-health{ display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px; }
.ts-tile{ display:flex; flex-direction:column; gap:4px; padding:10px 12px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); min-width:0; }
.ts-tile b{ font-size:14px; overflow-wrap:anywhere; }
.ts-tile.ok{ border-left:3px solid var(--ok); }
.ts-tile.warn{ border-left:3px solid var(--warn); }
.ts-tile.crit{ border-left:3px solid var(--crit); }
.ts-incidents{ display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.ts-inc{ border:1px solid var(--border); border-radius:6px; background:var(--surface-2); }
.ts-inc.crit{ border-left:3px solid var(--crit); }
.ts-inc.warn{ border-left:3px solid var(--warn); }
.ts-inc > summary{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:8px 12px; cursor:pointer; }
.ts-inc[open] > summary{ border-bottom:1px solid var(--border); }
.ts-inc > :not(summary){ margin:8px 12px; }
.ts-when{ font-family:var(--font-mono); font-size:12px; min-width:170px; }
.ts-top{ flex:1; min-width:200px; }
.ts-findings{ list-style:none; padding:0; display:flex; flex-direction:column; gap:6px; }
.ts-f{ padding:6px 10px; border-left:3px solid var(--muted); font-size:13px; }
.ts-f.crit{ border-left-color:var(--crit); }
.ts-f.warn{ border-left-color:var(--warn); }
.ts-f.info{ border-left-color:var(--ok); }
.ts-log{ font-family:var(--font-mono); font-size:12px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; max-height:520px; overflow:auto; margin:10px 0 0; padding:10px; border:1px solid var(--border); border-radius:6px; background:var(--surface); }
.ts-log:empty{ display:none; }
.ts-tail{ max-height:260px; }
