/*
  What only the dashboard needs, on top of the design system in ds/ (copied from
  docs/design/design-system, the app's Styles.axaml on the web). Components come from there: buttons,
  pills, status pills, rows, cards, notes, inputs, meters, rail buttons, host badges, console lines and
  menus. This file lays the page out as layout 1b and fills the gaps.

  Every colour is a token from /assets/tokens.css, written from the app's Tokens.axaml. A
  game's tint is the one colour that isn't, it comes from the game's module as --tint and --ink on the
  element that shows it.
*/

* { box-sizing: border-box; }
html, body { height: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.noscript { padding: 36px 40px; color: var(--text-secondary); }
.nl-icon { display: block; }
a.text-link { text-decoration: underline; }

/* Helpers the design system's text classes don't cover */
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.thin { font-weight: 400; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strong-text { color: var(--text); font-weight: 600; }
.is-live { color: var(--success); }
.is-danger { color: var(--danger-text); }
.is-warning { color: var(--warning); }
.is-accent { color: var(--accent-hover); }
.is-muted { color: var(--text-muted); }

/* ===== Shell, layout 1b ===== */
.app { display: grid; grid-template-columns: var(--layout-rail) var(--layout-list) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.side { display: contents; }
.topbar, .drawer-scrim { display: none; }
.content { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--background); }

.rail { background: var(--rail); border-right: 1px solid var(--hairline); padding: 12px 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; overflow-y: auto; scrollbar-width: none; }
.rail-top, .rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-logo { margin-bottom: 8px; text-decoration: none; }
.rail-logo:hover, .topbar-logo:hover { color: var(--on-brand); background: var(--brand-hover); }
.rail-divider { width: 24px; height: 1px; background: var(--card-border); margin: 4px 0; flex: none; }
a.nl-rail-btn { text-decoration: none; }
/* The badge's dot says how the host is: lime fine, red a server needs a look, amber connecting, faint offline */
.nl-host-badge__dot.is-problem { background: var(--danger); }
.nl-host-badge__dot.is-transition { background: var(--warning); }
.nl-host-badge__dot.is-offline { background: var(--text-faint); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; margin-top: 4px; flex: none;
  background: var(--secondary); color: var(--text); font: 600 11px var(--font-sans);
  display: flex; align-items: center; justify-content: center;
}
.avatar:hover { color: var(--title-text); background: var(--border); }

.list { background: var(--pane); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.list-head { padding: 16px 16px 14px; border-bottom: 1px solid var(--hairline); flex: none; }
.list-title { display: flex; align-items: center; gap: 8px; font: 600 14px/18px var(--font-sans); color: var(--text); }
.list-title .nl-icon { color: var(--text-secondary); }
.list-meta { margin-top: 3px; font-size: 12px; line-height: 16px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-status { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.list-activity { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--text-secondary); text-decoration: none; }
.list-activity:hover, .list-activity.is-on { color: var(--title-text); }
.meter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 10.5px; line-height: 12px; color: var(--text-secondary); }
.meter-head .nl-mono { color: var(--text); }
.list-search { margin: 12px 12px 4px; flex: none; }
.list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.list-empty { padding: 14px 16px; }
.group-head { display: flex; align-items: center; gap: 6px; padding: 14px 16px 6px; }
.group-head .nl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-os { margin-left: auto; font-size: 10.5px; color: var(--text-tertiary); flex: none; }
.group-rows { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
a.nl-row { text-decoration: none; }
.offline-icon { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); flex: none; }
.list-foot { padding: 12px; border-top: 1px solid var(--hairline); flex: none; display: flex; gap: 8px; }
.list-foot > .nl-btn--block { flex: 1; min-width: 0; }

/* ===== Game identity: badges and art ===== */
/* The game's icon over its tint once it's arrived, the letters hidden under it */
.badge { background: var(--icon, none) center / cover no-repeat, var(--tint); color: var(--badge-text, var(--ink)); line-height: 1; overflow: hidden; }
.badge-18 { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; }
.badge-26 { width: 26px; height: 26px; border-radius: 7px; font-size: 9.5px; }
.badge-28 { width: 28px; height: 28px; border-radius: var(--radius-badge-sm); font-size: 10.5px; }
.badge-32 { width: 32px; height: 32px; border-radius: 8px; font-size: 11px; }
.badge-34 { width: 34px; height: 34px; border-radius: 9px; font-size: 12px; }
.badge-40 { width: 40px; height: 40px; border-radius: 10px; font-size: 13px; }
.badge-44 { width: 44px; height: 44px; border-radius: 11px; font-size: 14px; }
.badge-52 { width: 52px; height: 52px; border-radius: 12px; font-size: 16px; }
.badge-ring { display: inline-flex; padding: 3px; border-radius: 13px; background: var(--surface); flex: none; }
.badge-ring.big { border-radius: 15px; background: var(--background); }
.pill-tint { background: var(--tint); }
/* The module's banner once it's arrived, a 135 degree stripe in the game's tint until then */
.art {
  background: var(--banner, repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--tint) 30%, transparent) 0 12px,
    color-mix(in srgb, var(--tint) 22%, transparent) 12px 24px)) center / cover no-repeat;
}
.fade-down {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--transparent-background) 10%, color-mix(in srgb, var(--background) 78%, transparent) 62%, var(--background) 100%);
}
.fade-down.is-surface { background: linear-gradient(180deg, var(--transparent-surface) 15%, var(--surface) 100%); }
.fade-across {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--background) 18%, var(--background-half) 60%, color-mix(in srgb, var(--background) 78%, transparent) 100%);
}

/* ===== Notes, banners and progress ===== */
.nl-note, .nl-banner { flex: none; }
.nl-note.is-column { flex-direction: column; align-items: stretch; gap: 8px; }
.note-line { display: flex; align-items: center; gap: 10px; }
.note-icon { color: var(--text-secondary); }
.note-icon.is-danger { color: var(--danger-text); }
.note-icon.is-live { color: var(--success); }
.note-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.note-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.note-progress { margin-top: 4px; max-width: 360px; }
.nl-btn.on-banner { color: var(--danger-muted-text); }
.nl-meter--progress.is-indeterminate .nl-meter__fill { width: 30%; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.hub-bar { display: flex; align-items: center; gap: 10px; padding: 8px 20px; flex: none; background: var(--surface); border-bottom: 1px solid var(--card-border); font-size: 12.5px; color: var(--text-secondary); }
a.nl-btn.is-disabled { background: var(--primary); color: var(--text-tertiary); pointer-events: none; }
.nl-btn.is-following .nl-icon { color: var(--accent-hover); }

/* ===== Pages ===== */
.page { flex: 1; min-height: 0; overflow: auto; padding: var(--layout-page-pad-y) var(--layout-page-pad-x) 24px; display: flex; flex-direction: column; gap: 14px; }
.page.loading { flex-direction: row; align-items: center; gap: 10px; }
.page-head { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.page-titles { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; }
.page-titles p { font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 8px; }

/* Home */
.filters { display: flex; align-items: center; gap: 8px; }
.filters .nl-pillrow { flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; }
.tile-art { height: 78px; flex: none; }
.tile-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--transparent-surface) 25%, var(--surface) 100%); }
.art-pill { position: absolute; left: 10px; top: 9px; z-index: 1; }
.tile-body { position: relative; margin-top: -22px; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-id { display: flex; align-items: flex-end; gap: 8px; }
.tile-names { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: 2px; }
.tile-name { font: 600 14px/18px var(--font-sans); color: var(--title-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-name:hover { color: var(--title-text); text-decoration: underline; }
.tile-where { font-size: 11.5px; line-height: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-address--flat { align-self: flex-start; max-width: 100%; }
.nl-address--flat span { overflow: hidden; text-overflow: ellipsis; }
.tile-foot { border-top: 1px solid var(--card-border); padding-top: 8px; margin-top: auto; }
.tile-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { font-size: 10.5px; color: var(--text-secondary); }
.stat-value { font: 600 13px var(--font-sans); color: var(--text); }
.stat-value.big { font-size: 15px; }
.tile-line { display: flex; align-items: center; gap: 8px; font-size: 12px; min-height: 18px; }
.tile-action { margin-left: auto; font-weight: 500; }
.tile-busy { display: flex; flex-direction: column; gap: 6px; }
.tile-busy-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.tile-busy-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-list { display: flex; flex-direction: column; gap: 4px; }
.home-row { display: grid; grid-template-columns: auto 2fr 1.5fr 1fr 1fr auto; gap: 12px; padding: 8px 10px; }

/* Hosts */
.host-cards { display: flex; flex-direction: column; gap: 12px; }
.host-card { flex: none; }
.host-card-main { display: grid; grid-template-columns: 280px minmax(0, 1fr) 190px; gap: 24px; padding: 14px 16px; align-items: center; }
.host-card.is-dim .host-name { color: var(--text-secondary); }
.host-card.is-dim .host-icon { color: var(--text-tertiary); }
.host-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.host-icon { position: relative; width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--primary); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center; }
.host-icon__dot { position: absolute; right: -4px; bottom: -4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-faint); }
.host-icon__dot.is-running { background: var(--success); }
.host-icon__dot.is-problem { background: var(--danger); }
.host-icon__dot.is-transition { background: var(--warning); }
.host-names { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.host-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.host-name { font: 600 14px var(--font-sans); color: var(--title-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-load { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.host-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.seg-meter { display: flex; flex-direction: column; gap: 5px; }
.host-runs, .host-status { display: flex; align-items: flex-start; gap: 6px; }
.host-runs .nl-icon, .host-status .nl-icon { margin-top: 1px; color: var(--text-secondary); }
.host-servers { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.host-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.host-card-foot { border-top: 1px solid var(--hairline); padding: 6px 10px 6px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-panel { border: 1px dashed var(--border); border-radius: var(--radius-tile); padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; flex: none; }
.link-steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 10px; }
.step-n { width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--primary); border: 1px solid var(--border); font: 600 11px var(--font-sans); display: flex; align-items: center; justify-content: center; }
.step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.step-text p { margin-top: 1px; font-size: 12.5px; }
.command { height: 32px; max-width: 520px; border-radius: 6px; padding: 0 4px 0 10px; background: var(--console); border: 1px solid var(--card-border); display: flex; align-items: center; gap: 8px; }
.command .prompt { color: var(--accent-hover); font-size: 12px; }
.command code { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-side { align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--pane); }
.offline { max-width: 640px; }
.offline-head { display: flex; align-items: center; gap: 12px; }

/* Signed out */
.app.signed-out { display: block; overflow: auto; }
.signin-page { padding: 36px 40px; }
.signin-card { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* ===== One server ===== */
.server { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.server-head { flex: none; }
.server-head.tall { height: var(--layout-header-tall); }
.server-head.slim { height: var(--layout-header-slim); }
.crumb { position: absolute; left: 24px; top: 14px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.crumb .nl-icon { color: var(--text-secondary); }
.server-head.tall .server-head-row { position: absolute; left: 24px; right: 24px; bottom: 16px; display: flex; align-items: flex-end; gap: 11px; }
.server-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-bottom: 3px; }
.server-title-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.server-title { font: 600 var(--text-server-title)/28px var(--font-sans); letter-spacing: var(--tracking-title); color: var(--title-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.server-title.small { font-size: var(--text-heading-lg); line-height: 20px; letter-spacing: -0.01em; max-width: 260px; flex: none; }
.server-facts { display: flex; align-items: center; gap: 12px; font-size: 12.5px; flex-wrap: wrap; }
.sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); flex: none; }
.server-buttons { display: flex; align-items: center; gap: 8px; flex: none; padding-bottom: 3px; }
.server-head.slim .server-head-row { position: absolute; inset: 0 24px; display: flex; align-items: center; gap: 12px; }
.server-head.slim .server-buttons { padding: 0; }
.slim-facts { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slim-address { font-size: 12px; flex: none; }
.tabs { flex: none; height: var(--layout-tab-row); padding: 0 20px; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; gap: 12px; }
.tab-pills { position: relative; flex: 1; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tab-pills::-webkit-scrollbar { display: none; }
a.nl-pill { text-decoration: none; }
.module-text { flex: none; font-size: 11.5px; }
.messages { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 0; }
.tab-body { flex: 1; min-height: 0; overflow: auto; }
.tab-console .tab-body, .tab-players .tab-body, .tab-settings .tab-body { overflow: hidden; }
.side-panel { background: var(--pane); border-left: 1px solid var(--hairline); min-height: 0; overflow: auto; }

/* Menus open under their button */
.menu-anchor { position: relative; flex: none; }
.popover { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; }
.popover.left { left: 0; right: auto; }

.card-head { display: flex; align-items: center; gap: 10px; min-height: 18px; }
.card-head.spread { justify-content: space-between; }

/* Overview */
.overview { padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.big-number { height: 30px; font: 600 22px/30px var(--font-sans); letter-spacing: -0.44px; color: var(--text); white-space: nowrap; }
.big-number .unit { font: 500 13px var(--font-sans); letter-spacing: 0; color: var(--text-secondary); }
.big-number.is-none { font: 400 13px/34px var(--font-sans); letter-spacing: 0; color: var(--text-secondary); }
.spark { display: block; width: 100%; height: 22px; overflow: visible; }
.spark-fill { fill: var(--accent-tint22); }
.spark-line { fill: none; stroke: var(--accent-hover); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--accent-hover); }
.chart-card { display: flex; flex-direction: column; gap: 10px; }
.chart .nl-bar { flex: 1 1 0; }
.chart-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.overview-bottom { display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; min-height: 230px; }
.console-preview { min-width: 0; }
.card-head.bordered { padding: 10px 14px; border-bottom: 1px solid var(--hairline); }
.live-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; }
.preview-lines { padding: 8px 0; }
.ports-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ports { display: flex; flex-direction: column; }
.port { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 76px; align-items: center; gap: 8px; height: 24px; font-size: 12.5px; }
.port-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.port .nl-mono { font-size: 12px; }
.port-state { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 11.5px; }
.firewall-note { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.firewall-note p { margin: 0; line-height: 1.45; }
.last-backup { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--hairline); }

/* Console */
.console-tab { display: grid; grid-template-columns: minmax(0, 1fr) var(--layout-side-panel); height: 100%; }
.console-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 16px 16px var(--layout-content-pad); }
.console-tools { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.console-search { width: 180px; }
.console-box { position: relative; flex: 1; min-height: 0; }
.console-lines { flex: 1; min-height: 0; overflow: auto; padding: 10px 0; }
.suggestions { position: absolute; left: 12px; bottom: 50px; z-index: 5; width: min(430px, calc(100% - 24px)); }
.suggest-desc { font-family: var(--font-sans); font-size: 11.5px; }
.typed { color: var(--accent-hover); }
.online-rail { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.online-rail .see-all { align-self: flex-start; margin: 0 4px; }
.online-rail > p { padding: 0 4px; }
.rail-head { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.online-player { display: flex; align-items: center; gap: 9px; padding: 4px; font-size: 12.5px; }
/* A player's avatar: the same lightness and chroma for everyone, the hue from their name, like the app */
.avatar-dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font: 600 10px var(--font-sans); color: var(--art-pill-text); }
.avatar-dot.big { width: 52px; height: 52px; font-size: 17px; }

/* Players */
.players-tab { display: grid; grid-template-columns: minmax(0, 1fr) var(--layout-detail-panel); height: 100%; }
.players-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 16px 0 var(--layout-content-pad); }
.players-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.players-search { width: 200px; }
.players-table { flex: 1; min-height: 0; overflow: auto; }
.players-head, .players-row { display: grid; grid-template-columns: 1.5fr 1.5fr 0.8fr 0.7fr 0.6fr 0.8fr; gap: 12px; align-items: center; }
.players-table.is-detail .players-head, .players-table.is-detail .players-row { grid-template-columns: 1.4fr 1.4fr 1.7fr 1.3fr; }
/* Notes on a list, the plugin note and the bar with Add by ID and Message everyone */
.players-note { margin: 0; flex: 1; min-width: 0; line-height: 17px; }
.players-main > .players-note { flex: none; margin: 0 0 10px 2px; }
.players-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.players-bar > .players-note { margin-left: 2px; }
.player-moderation { display: flex; flex-direction: column; gap: 8px; }
.player-moderation:empty { display: none; }
.players-head { position: sticky; top: 0; z-index: 1; height: 30px; padding: 0 10px; background: var(--background); border-bottom: 1px solid var(--hairline); }
.players-head .nl-label { color: var(--text-tertiary); }
.players-row { height: 36px; margin: 1px 0; padding: 0 10px; font-size: 12px; }
.player-cell { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 12.5px; }
.players-empty { padding: 14px 10px; }
.player-panel { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.player-id { display: flex; align-items: center; gap: 12px; }
.player-names { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player-name { font: 600 var(--text-heading-lg) var(--font-sans); color: var(--title-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-status { display: flex; align-items: center; gap: 5px; }
.id-chip { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 4px 0 8px; border-radius: 6px; background: var(--search); border: 1px solid var(--card-border); font-size: 11.5px; }
.id-chip .ellipsis { flex: 1; }
.tiny-btn { width: 22px; height: 22px; }
.player-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.player-days { display: flex; flex-direction: column; gap: 7px; }
.day-bars { height: 40px; border-bottom: 0; }
.day-bars .nl-bar { border-radius: 2px; }
.ban-box { display: flex; flex-direction: column; gap: 6px; }
.ban-text { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px; background: var(--search); border: 1px solid var(--card-border); font-size: 12.5px; line-height: 18px; }
.player-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* The live map. The picture is the game's own, the same in both themes, so the labels on it are the chips drawn over a game's art */
.map-tab { display: grid; grid-template-columns: minmax(0, 1fr) var(--layout-detail-panel); height: 100%; }
.map-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 16px 16px var(--layout-content-pad); }
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.map-status { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.map-status p { margin: 0; }
.map-buttons { display: flex; align-items: center; gap: 6px; flex: none; }
.map-check { margin-right: 6px; }
.map-sep { width: 1px; height: 20px; background: var(--hairline); margin: 0 4px; }
.map-well { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--card-border); border-radius: 8px; background: var(--pane); overflow: hidden; }
.map-frame { position: relative; max-width: 100%; overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
.map-frame:active { cursor: grabbing; }
.map-stage { position: absolute; inset: 0; transform-origin: 0 0; }
.map-picture { display: block; width: 100%; height: 100%; pointer-events: auto; -webkit-user-drag: none; }
.map-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.map-chip { display: inline-block; padding: 1px 5px; border-radius: 4px; background: var(--art-pill); border: 1px solid var(--art-pill-border); color: var(--art-pill-text); font: 500 11px/16px var(--font-sans); white-space: nowrap; }
.map-place { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; transform-origin: 50% 0; pointer-events: none; }
.map-place-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--art-pill-text); border: 1.5px solid var(--art-pill); }
.map-player { position: absolute; display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 7px 7px; }
.map-player-dot { width: 10px; height: 10px; margin: 2px; border-radius: 50%; background: var(--success); border: 2px solid var(--art-pill); box-sizing: content-box; flex: none; }
.map-player.is-on .map-player-dot { outline: 2px solid var(--art-pill-text); outline-offset: 2px; }
.map-player.is-on .map-chip { font-weight: 600; }
.map-panel .map-list { display: flex; flex-direction: column; gap: 2px; }
.map-list-row { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; font-size: 12.5px; }
.map-note { margin: 4px 0 0; }
.map-back { align-self: flex-start; }
.map-viewers { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.map-viewers-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* Settings */
.settings-tab { display: flex; flex-direction: column; height: 100%; }
.unsaved { flex: none; height: 44px; padding: 0 20px; display: flex; align-items: center; gap: 10px; background: var(--accent-tint8); border-bottom: 1px solid var(--accent-tint22); }
.unsaved .nl-secondary { font-size: 12.5px; }
.changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hover); flex: none; }
.changed-dot.is-big { width: 7px; height: 7px; }
.unsaved-count { font: 500 12.5px var(--font-sans); color: var(--title-text); white-space: nowrap; }
.settings-body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--layout-settings-nav) minmax(0, 1fr); }
.settings-nav { border-right: 1px solid var(--hairline); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.settings-nav .nl-navitem { flex: none; }
.nav-divider { height: 1px; background: var(--hairline); margin: 10px 4px; flex: none; }
.nav-label { font-size: 10px; color: var(--text-tertiary); margin: 0 0 4px 10px; }
.settings-form { overflow: auto; padding: 4px 28px 24px; display: flex; flex-direction: column; }
.settings-form > * { max-width: 900px; }
.form-note { margin-top: 14px; }
.decimal-input { width: 110px; flex: none; text-align: center; }
/* A config file open in place of the form, or the launch line */
.file-panel { margin-top: 20px; flex: 1; min-height: 360px; display: flex; flex-direction: column; overflow: clip; }
/* Two classes, so it wins over .group-header further down whatever the order */
.group-header.file-head { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; }
.file-head p { margin: 0; }
.file-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.file-text { flex: 1; min-height: 280px; margin: 12px; width: auto; resize: none; font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; tab-size: 4; }
.file-loading { padding: 16px; }
.file-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--hairline); }
.launch-panel { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.launch-panel > .nl-card { align-self: stretch; }
.launch-panel p { margin: 0; }
.launch-text { padding: 14px 16px; font-size: 12.5px; line-height: 20px; word-break: break-all; white-space: pre-wrap; user-select: text; }
.own-args { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.own-args-row { display: flex; gap: 8px; }
.own-args-row .nl-input { flex: 1; min-width: 0; }
.setting-group { margin-top: 16px; scroll-margin-top: 16px; flex: none; }
.group-header { padding: 11px 16px; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
/* The app's rows are 220, the control, then 130 for the key, where the design system has 230 and 150 */
.setting-row { grid-template-columns: 220px minmax(0, 1fr) 130px; gap: 0; padding: 11px 16px; }
.setting-row .nl-setting__label { padding-right: 16px; }
.setting-row .nl-setting__key { padding-left: 16px; }
.setting-group .setting-row:last-child { border-bottom: 0; }
/* Settings a framework's plugin applies, on a server without one */
.section-locked { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--accent-tint8); border-bottom: 1px solid var(--hairline); }
.section-locked .note-text { flex: 1; min-width: 0; }
.changed-dot + span, .nl-setting__label-row span { min-width: 0; }
.setting-control { min-width: 0; }
.field-input { max-width: 420px; }
.nl-input.narrow { width: 72px; text-align: center; }
.nl-input.seed { width: 130px; }
.nl-input:disabled, .nl-stepper__value:disabled, .nl-stepper__btn:disabled { opacity: 0.6; cursor: not-allowed; }
.enum-select { width: 260px; }
.block-select { display: flex; width: 100%; }
.nl-select .nl-input { width: 100%; }
.row-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slider-field { display: flex; align-items: flex-start; gap: 14px; max-width: 420px; }
.slider-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slider { width: 100%; margin: 8px 0 4px; accent-color: var(--accent); }
.slider-marks { display: flex; justify-content: space-between; font-size: 10.5px; }
/* On and off, drawn like the app's Fluent ToggleSwitch */
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.switch-track { position: relative; width: 40px; height: 20px; border-radius: 999px; border: 1px solid var(--text-secondary); flex: none; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-secondary); }
.switch.is-on .switch-track { background: var(--accent); border-color: var(--accent); }
.switch.is-on .switch-knob { left: 23px; background: var(--on-accent); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }
/* Every setting the game has, in place of the form, and the form's Popular section with the same rows */
.all-panel { min-height: 480px; }
.all-tools { display: flex; align-items: center; gap: 14px; padding: 12px 16px 10px; border-bottom: 1px solid var(--hairline); flex: none; flex-wrap: wrap; }
.all-search { width: 300px; flex: none; }
.all-rows { flex: 1; min-height: 0; overflow: auto; }
.all-group { padding: 14px 16px 6px; border-bottom: 1px solid var(--hairline); color: var(--text-tertiary); }
.all-row { grid-template-columns: minmax(0, 1fr) 220px 170px; }
.all-row .nl-setting__label { padding-top: 6px; }
.all-key { font: 500 12.5px var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.all-tag { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--primary); color: var(--text-secondary); font: 500 10.5px/1.4 var(--font-sans); }
.all-form { color: var(--text-tertiary); }
.all-number { width: 110px; text-align: center; }
.all-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 8px 0 0 16px; min-width: 0; text-align: right; }
.all-side .nl-key { overflow-wrap: anywhere; }
.all-side .nl-btn { margin-right: -6px; }
.all-none, .all-more { margin: 14px 16px; }
.all-foot { flex: none; }

/* Backups and the schedule */
.backups-tab { padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.timeline-card { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.legend { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; }
.swatch { width: 8px; height: 8px; border-radius: 2px; }
.swatch.is-restart { background: var(--text-muted); }
.swatch.is-backup { background: var(--accent-hover); }
.timeline { display: flex; flex-direction: column; }
.timeline-days, .timeline-now-row, .lane { display: grid; grid-template-columns: 78px minmax(0, 1fr); }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-bottom: 2px; }
.days span { padding-left: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.now-tag-track { position: relative; height: 16px; }
.now-tag { position: absolute; bottom: 0; transform: translateX(-50%); padding: 1px 4px; border-radius: 3px; background: var(--title-text); color: var(--on-accent); font-size: 9.5px; font-weight: 600; line-height: 12px; }
.lane { height: 30px; align-items: center; }
.lane-label { font-size: 12px; }
.lane-track { position: relative; height: 100%; border-top: 1px solid var(--card-border); }
.lane-day { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--card-border); }
.lane-mark { position: absolute; top: 8px; bottom: 8px; border-radius: 3px; background: var(--text-muted); }
.lane-track.is-backup .lane-mark { background: var(--accent-hover); }
.lane-track.is-wipe .lane-mark { background: var(--tint); }
.swatch.is-wipe-lane { background: var(--tint); }
.lane-mark.is-past { opacity: 0.35; }
.lane-track .lane-mark.is-failed { background: var(--danger); }
.lane-now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--title-text); }
.backups-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; align-items: start; }
/* Reports, shared bans and the player panel's notes, built from the backups list's pieces */
.reports-tab { padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.tab-reports .tab-body { overflow: auto; }
.reports-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.reports-head, .reports-bans-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reports-bans-head { flex-direction: column; align-items: flex-start; }
.reports-summary { padding: 0 14px 10px; margin: 0; }
.reports-empty { padding: 4px 14px 14px; margin: 0; }
.reports-problem { margin-top: 6px; }
.report-row { display: flex; flex-direction: column; gap: 4px; }
.report-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.report-message { margin: 0; font-size: 12.5px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-note { overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shared-ban { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 10px 14px; }
.shared-ban-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.across p { margin: 0; }
.across-note-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; overflow-wrap: anywhere; }
.across-add { display: flex; gap: 6px; }
.across-add .nl-input { flex: 1; min-width: 0; height: 30px; font-size: 12px; }
.across-history { display: flex; flex-direction: column; gap: 6px; }

/* The activity log, a server's tab and a host's page. From ActivityView.axaml */
.activity-tab { padding: 16px var(--layout-content-pad) 20px; }
.host-activity .activity-card { max-width: 900px; }
.activity-card > .card-head { padding: 10px 14px; min-height: 40px; }
.activity-card > .card-head .ellipsis { min-width: 0; }
.activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; }
.activity-icon { flex: none; margin-top: 1px; color: var(--text-muted); }
.activity-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.activity-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.activity-failed { height: 18px; padding: 0 7px; font-size: 10.5px; }
.activity-meta { overflow-wrap: anywhere; }
.activity-when { flex: none; white-space: nowrap; margin-top: 1px; }
.activity-more { display: flex; align-items: center; gap: 8px; padding: 8px 14px; }
.host-card-actions { display: flex; align-items: center; gap: 4px; }

/* Sharing: hosts shared with this account, and the People page a host's owner manages them on */
.nl-host-badge.is-shared { border-style: dashed; }
.list-shared { display: flex; align-items: center; gap: 5px; }
.list-shared .nl-icon { flex: none; }
.group-shared { padding: 0 16px 6px; margin-top: -2px; }
.hosts-shared { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hosts-shared > .host-cards { margin-top: 4px; }
.people-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.people-invite { display: flex; flex-direction: column; gap: 12px; }
.people-invite .form-pair { grid-template-columns: minmax(0, 1fr) 140px; }
.people-lists { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.people-servers { gap: 6px; }
.people-server-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 0 24px; }
.check.is-off { color: var(--text-tertiary); cursor: default; }
.people-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; }
.people-row.is-editing { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; background: var(--accent-tint8); }
.people-row-head { display: flex; align-items: center; gap: 12px; }
.people-row-head .nl-select { width: 140px; flex: none; }
.people-avatar { width: 30px; height: 30px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--primary); border: 1px solid var(--border); color: var(--text-muted); font: 600 11px var(--font-sans); }
.people-avatar.is-waiting { border-style: dashed; color: var(--text-tertiary); }
.people-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.people-loading { display: flex; align-items: center; gap: 8px; }
.people-sent { display: flex; align-items: flex-start; gap: 6px; }
.people-sent .nl-icon { flex: none; margin-top: 1px; color: var(--success); }

/* The Discord page: one card per Discord server, built from the people page's pieces */
.discord-guild { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.discord-guild-head { display: flex; align-items: center; gap: 12px; }
.discord-guild-head > .nl-icon { color: var(--text-secondary); flex: none; }
.discord-guild-head .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.discord-section { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.discord-section > .card-head { padding: 10px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.discord-section .list-row { padding: 10px 14px; }
.discord-role-row { display: flex; align-items: center; gap: 12px; }
.discord-role-row .nl-select { width: 150px; flex: none; }
.discord-role-what { padding: 0 14px 10px; }
.discord-add-role .nl-select { max-width: 260px; }
.discord-server { display: flex; flex-direction: column; gap: 10px; }
.discord-server.is-linked { background: var(--accent-tint8); }
.discord-server-head { display: flex; align-items: center; gap: 12px; }
.discord-server-head .check { flex-wrap: wrap; }
.discord-server-body { display: flex; flex-direction: column; gap: 10px; padding-left: 24px; }
.discord-relays { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.page.discord { display: flex; flex-direction: column; gap: 16px; }
.page.discord > .nl-note, .page.discord > .nl-banner, .page.discord > .nl-card { max-width: 880px; }
.list-card { overflow: hidden; min-width: 0; }
.list-card > .card-head { padding: 10px 10px 10px 14px; min-height: 48px; }
.list-row { border-top: 1px solid var(--hairline); padding: 14px; }
.backup-row { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 8px 0 14px; }
.backup-row.is-newest { background: var(--accent-tint8); }
.size { width: 76px; text-align: right; }
.backups-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.backup-row .where { display: flex; align-items: center; gap: 5px; width: 118px; flex: none; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.cloud-card > .card-head { gap: 8px; }
.cloud-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 14px 10px; }
.cloud-setting .nl-select { width: 150px; }
.cloud-setting .keep { width: 72px; }
.cloud-meter { padding: 0 14px 10px; }
.cloud-row .from { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page.cloud { display: flex; flex-direction: column; gap: 16px; }
.page.cloud > .nl-note, .page.cloud > .nl-banner, .page.cloud > .nl-card { max-width: 980px; }
.cloud-usage { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cloud-file { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; }
.health { display: flex; justify-content: center; width: 28px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; }
.add-form { display: flex; flex-direction: column; gap: 10px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.wrap { white-space: normal; overflow-wrap: anywhere; }

/* The overview's card from the game's module, beside the players chart */
.chart-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.chart-row.has-module-card { grid-template-columns: minmax(0, 1fr) 320px; }
.wipe-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.game-mark { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }

/* The overview's game updates card, for a game from Steam that says which files are its own */
.updates-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.updates-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; }
.updates-card .build { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.updates-card .build-number { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 600; color: var(--text); }
.updates-card .build-number.nl-live { color: var(--success-text); }
.auto-updates { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.auto-field { flex-direction: row; align-items: center; justify-content: space-between; }
.updates-status { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.updates-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.updates-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.updates-buttons { display: flex; gap: 8px; flex: none; }
.tint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tint); flex: none; }
.wipe-when { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.wipe-date { font: 600 20px/26px var(--font-sans); letter-spacing: -0.4px; color: var(--text); }
.wipe-when .nl-mono { font-size: 14px; }
.wipe-none { font: 600 16px/26px var(--font-sans); color: var(--text); margin-top: 2px; }
.wipe-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.kept-line { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 16px; }
.kept-line .nl-icon { flex: none; }
.wipe-settings { margin-top: 4px; text-decoration: none; }

/* Wipes: the month and past wipes, then the next wipe. Wipe days are in the game's own colour */
.wipes-tab { padding: 16px var(--layout-content-pad) 20px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; }
.wipes-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.calendar-card { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.calendar-card > .card-head { gap: 2px; }
.calendar-title { font: 600 15px var(--font-sans); color: var(--title-text); margin-right: 6px; white-space: nowrap; }
.swatch.is-forced { background: var(--tint); }
.swatch.is-wipe { border: 1.5px solid var(--tint); }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-week .nl-label { color: var(--text-tertiary); padding-left: 10px; }
.calendar-day { height: 62px; min-width: 0; border-radius: 6px; padding: 6px 8px; border: 1px solid var(--hairline); background: var(--background); display: flex; flex-direction: column; gap: 4px; }
.calendar-day.is-outside { background: transparent; border-color: transparent; }
.calendar-day.is-today { border-color: var(--accent); }
.calendar-day.is-wipe { background: color-mix(in srgb, var(--tint) 10%, transparent); border-color: color-mix(in srgb, var(--tint) 60%, transparent); }
.calendar-day.is-forced { background: color-mix(in srgb, var(--tint) 55%, transparent); border-color: var(--tint); }
.day-top { display: flex; justify-content: space-between; gap: 4px; min-width: 0; }
.day-number { font-size: 12px; font-weight: 500; color: var(--text); }
.is-outside .day-number { color: var(--text-faint); }
.is-today .day-number { color: var(--title-text); }
.day-time { font-size: 10.5px; color: var(--tint); }
.day-tag { font-size: 10.5px; font-weight: 600; color: var(--tint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-forced .day-time, .is-forced .day-tag { color: var(--title-text); }
.wipe-row { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 14px; }
.wipe-row .when { width: 110px; flex: none; }
.wipe-row .played { flex: none; }
.wipe-row .size { width: 70px; flex: none; }
/* Each wipe is picked to show its report, like the app's rows */
button.wipe-row { width: 100%; border: 0; border-top: 1px solid var(--hairline); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
button.wipe-row:hover { background: var(--accent-tint8); }
button.wipe-row.is-on { background: var(--accent-tint18); }
button.wipe-row.is-on .nl-medium { color: var(--title-text); }
.wipe-row .outcome { flex: none; }
.warning-text { color: var(--warning-text); }
.danger-text { color: var(--danger-text); }
/* A wipe's report: each step with a dot for how it went, how long it took and what happened */
.wipe-report { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--hairline); }
.report-head { display: flex; align-items: center; gap: 10px; }
.report-summary { margin: 0; line-height: 17px; }
.report-steps { display: flex; flex-direction: column; gap: 6px; }
.report-step { display: grid; grid-template-columns: 16px minmax(0, 1fr); }
.report-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--success); }
.report-dot.is-skipped { background: var(--text-faint); }
.report-dot.is-warning { background: var(--warning); }
.report-dot.is-failed { background: var(--danger); }
.report-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.report-line .grow { flex: 1 1 0; }
.report-detail { line-height: 15px; margin-top: 1px; overflow-wrap: anywhere; }
/* The wipe day on the next-wipe card */
.wipe-day { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.wipe-day p { margin: 0; }
.rule-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.day-field { display: flex; flex-direction: column; gap: 3px; }
.day-text { width: 100%; min-height: 56px; resize: vertical; font: inherit; line-height: 17px; padding: 8px 10px; }
/* clip, not hidden, so the footer can stick to the scrolling tab below it */
.next-wipe-card { overflow: clip; display: flex; flex-direction: column; min-width: 0; }
.next-wipe-head { padding: 16px 16px 14px; background: color-mix(in srgb, var(--tint) 16%, transparent); display: flex; flex-direction: column; gap: 4px; }
.next-wipe-label { display: flex; align-items: center; gap: 6px; color: var(--tint); }
.next-wipe-label .nl-label { color: var(--tint); }
.next-wipe-title { font: 600 22px/28px var(--font-sans); letter-spacing: -0.44px; color: var(--title-text); }
.next-wipe-body { padding: 6px 16px 12px; display: flex; flex-direction: column; }
.wipe-steps { display: flex; flex-direction: column; padding-bottom: 6px; }
.wipe-step { display: grid; grid-template-columns: 44px 14px minmax(0, 1fr); }
.step-time { padding-top: 6px; }
.step-mark { display: flex; flex-direction: column; align-items: center; }
.step-mark::after { content: ""; flex: 1; width: 1px; background: var(--border); }
.step-mark.is-last::after { display: none; }
.step-dot { width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; border: 2px solid var(--text-secondary); flex: none; }
.step-dot.is-backup { border-color: var(--accent-hover); }
.step-dot.is-start { border-color: var(--success); }
.step-dot.is-wipe { border-color: var(--tint); }
.step-text { padding: 4px 0 9px 10px; line-height: 17px; }
.kept-reset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--card-border); }
.kept-reset > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wipe-rules { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.rule { display: flex; flex-direction: column; gap: 6px; }
.rule-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rule-line .switch { padding: 0; }
.warn-input { width: 110px; flex: none; }
/* One of the server's own wipe rules: kind, every how many, the day and the time */
.wipe-rule { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); }
.wipe-rule-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wipe-rule-line .grow { flex: 1 1 0; min-width: 0; }
.rule-every { flex: 0 0 72px; }
.rule-on { flex: 0 0 92px; }
.rule-time { flex: 0 0 64px; width: 64px; }
.warning-note { color: var(--warning-text); }
.add-rule { align-self: flex-start; }
.save-wipes { width: 100%; justify-content: center; margin-top: 4px; }
/* Wipe now stays in reach while the card scrolls, like the app's docked footer, on a row of its own */
.next-wipe-foot { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--card-border); background: var(--surface); }
.wipe-now-kind { flex: 1 1 0; min-width: 0; }

/* Plugins: the framework on top, what's installed and the catalog, or a plugin's config, below */
.plugins-tab { padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.framework-card { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.framework-title { font: 600 13px var(--font-sans); color: var(--title-text); margin-left: 2px; white-space: nowrap; }
.framework-choices { display: grid; grid-template-columns: repeat(var(--choices), minmax(0, 1fr)); gap: 10px; }
.framework-choice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--card-border); background: var(--background); min-width: 0; }
.framework-choice.is-on { border-color: var(--accent-strong-border); background: var(--accent-tint8); }
.small-title { font-size: 13px; margin-bottom: 3px; }
.plugins-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; align-items: start; }
.plugins-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.addon-row { padding: 9px 8px 9px 14px; }
.addon-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-buttons { display: flex; align-items: center; flex: none; }
.row-buttons .slot-only { visibility: hidden; border: 0; }
.addon-problem { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Plugin health: a card under the framework, a cost and findings on each plugin, a count on the tab and the overview */
.nl-warning { color: var(--warning-text); }
.health-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.health-headline { font-size: 12.5px; min-width: 0; }
.conflict-rows { display: flex; flex-direction: column; gap: 4px; }
.conflict-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.conflict-row > .nl-icon, .conflict-row > .nl-mono, .conflict-row > .nl-tertiary { flex: none; }
.addon-cost { flex: none; white-space: nowrap; }
.addon-findings { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.overview-health { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-width: 0; }
.overview-health > .nl-icon, .overview-health > .nl-status, .overview-health > .nl-label, .overview-health > .nl-btn { flex: none; }
.file-input { display: none; }
/* A plugin from a link: the form under the installed card's head */
.link-form { display: flex; flex-direction: column; gap: 6px; padding: 4px 14px 10px; }
.link-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-line .nl-input { min-width: 0; }
.catalog-head { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
.catalog-search { display: flex; align-items: center; gap: 8px; }
.catalog-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.installed-mark { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.catalog-pages { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--hairline); }
.config-card { display: flex; flex-direction: column; }
.config-text { display: block; width: auto; height: auto; min-height: 300px; margin: 0 14px; padding: 8px 10px; resize: vertical; font-size: 12px; line-height: 17px; white-space: pre; }
.config-actions { padding: 10px 14px; }

/* Files: the path and actions on top, the list on the left, a text file's editor on the right while one's open */
.files-tab { padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.files-top { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.file-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.file-crumb { border: 0; background: none; padding: 0 4px; height: 26px; font: 500 13px var(--font-sans); color: var(--text-secondary); cursor: pointer; border-radius: 4px; }
.file-crumb:hover { color: var(--title-text); }
.file-crumb.is-last { color: var(--title-text); font-weight: 600; }
.crumb-sep { color: var(--text-muted); flex: none; }
.files-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.files-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.files-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.files-card { position: relative; }
.file-row { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 14px; border-top: 1px solid var(--hairline); }
.file-row:hover:not(.is-head) { background: var(--accent-tint8); }
.file-row.is-open { background: var(--accent-tint18); }
.file-row.is-head { border-top: 0; height: 40px; }
.file-row.is-form { height: 44px; }
.file-icon, .file-icon-slot { width: 18px; flex: none; color: var(--text-muted); }
.file-icon.is-link { color: var(--warning); }
.file-name { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: 500 12.5px var(--font-sans); color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover:not(:disabled) { color: var(--title-text); }
.file-name:disabled { cursor: default; }
.file-size { width: 78px; flex: none; text-align: right; font-size: 12px; color: var(--text-muted); }
.file-when { width: 118px; flex: none; font-size: 12px; }
.file-buttons { width: 120px; flex: none; justify-content: flex-end; }
.files-grid:not(.is-single) .file-when { display: none; }
.drop-hint { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--surface); border: 1px solid var(--accent-strong-border); border-radius: inherit; font-size: 13px; font-weight: 500; color: var(--text); }
.editor-card .config-text { min-height: 360px; }

/* Loot: the containers on the left, the one picked on the right, or every item for values of its own */
.tab-loot .tab-body { overflow: hidden; }
.loot-tab { height: 100%; box-sizing: border-box; padding: 16px var(--layout-content-pad) 20px; display: flex; flex-direction: column; gap: 12px; }
.loot-top { display: flex; align-items: center; gap: 24px; flex: none; }
.loot-note { margin-left: auto; text-align: right; }
.loot-empty { max-width: 620px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.loot-empty p { margin: 0; }
.loot-empty-actions { display: flex; gap: 8px; margin-top: 4px; }
.loot-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; }
.loot-list, .loot-editor, .loot-items { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.loot-list-search { padding: 10px 10px 6px; flex: none; }
.loot-list-rows { flex: 1; min-height: 0; overflow: auto; padding: 0 6px 8px; }
.loot-group { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.loot-group-label { font-size: 10px; color: var(--text-tertiary); margin: 0 0 4px 8px; }
.loot-row { height: 30px; }
.loot-custom-dot { width: 6px; height: 6px; border-radius: 3px; flex: none; margin-left: 8px; }
.loot-none { margin: 8px 16px; }
.loot-editor-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); flex: none; }
.loot-title { font: 600 15px var(--font-sans); color: var(--title-text); }
.loot-vanilla-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; flex: none; }
.loot-vanilla-head p, .loot-table-head p { margin: 0; }
.loot-rows { flex: 1; min-height: 0; overflow: auto; }
.loot-vanilla-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 32px; box-sizing: border-box; }
.loot-amount { width: 90px; text-align: right; flex: none; }
.loot-table-head { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 10px; flex: none; }
.loot-limits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loot-gap { margin-left: 12px; }
.loot-num { width: 76px; height: 30px; font-size: 12.5px; box-sizing: border-box; }
.loot-num.is-short { width: 84px; }
.loot-cols, .loot-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px 76px 84px 30px; gap: 8px; align-items: center; }
.loot-cols, .item-cols { padding: 0 16px 6px; font-size: 10px; flex: none; }
.loot-item-row, .item-row { padding: 5px 16px; }
.loot-item-name { min-width: 0; }
.loot-check { justify-self: start; margin-left: 8px; width: 16px; height: 16px; accent-color: var(--accent); }
.loot-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--hairline); flex: none; }
.loot-items { flex: 1; }
.loot-items-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px 8px; flex: none; }
.loot-item-search { width: 280px; flex: none; }
.loot-items-note { margin: 0 16px 10px; flex: none; }
.item-cols, .item-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 100px 120px 120px; gap: 8px; align-items: center; }
.item-row .loot-num { width: 100%; }
.item-cols .right, .item-row .right { text-align: right; padding-right: 8px; }

/* ===== Dialogs ===== */
.dialog-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { position: relative; max-height: calc(100dvh - 32px); }
.dialog.confirm { width: min(560px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.dialog-title { font: 600 17px/22px var(--font-sans); color: var(--title-text); }
.dialog-text { line-height: 19px; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dialog-actions.spread > :first-child { margin-right: auto; }
.dialog.signin { width: min(480px, 100%); overflow: auto; }
.signin-art { height: 96px; }
.signin-art .badge { position: absolute; left: 20px; bottom: 6px; }
.dialog-body { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 8px; background: var(--input); border: 1px solid var(--card-border); }
.code { font-size: 24px; font-weight: 600; letter-spacing: var(--tracking-code); color: var(--title-text); }
.waiting { display: flex; align-items: center; gap: 8px; }
.dialog.new-server { width: min(920px, 100%); height: min(640px, calc(100dvh - 32px)); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.games-pane { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 18px 12px; background: var(--background); border-right: 1px solid var(--card-border); }
.games-head { display: flex; flex-direction: column; gap: 2px; padding: 0 6px 4px; }
.games { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.game-art { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.game-art .badge { position: absolute; right: 3px; bottom: 3px; }
.game-names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.request-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: 1px dashed var(--border); color: var(--text); flex: none; }
.request-card:hover { background: var(--accent-tint8); color: var(--text); }
.request-card > span { display: flex; flex-direction: column; }
.request-card .nl-icon { color: var(--text-secondary); }
.game-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.game-art-head { height: 118px; flex: none; }
.dialog-close { position: absolute; top: 8px; right: 10px; z-index: 1; }
.game-head-text { position: absolute; left: 24px; right: 24px; bottom: 4px; display: flex; flex-direction: column; gap: 3px; }
.game-title { font: 600 var(--text-title)/28px var(--font-sans); color: var(--title-text); }
.game-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 24px 16px; display: flex; flex-direction: column; gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.form-section { display: flex; flex-direction: column; gap: 8px; }
.host-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.choice-note { font-size: 11.5px; line-height: 15px; }
.new-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.checks { padding: 8px 14px; border-radius: 8px; background: var(--background); border: 1px solid var(--card-border); }
.check-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.check-line .nl-icon { color: var(--text-secondary); }
.check-line .nl-icon.is-live { color: var(--success); }
.check-line { align-items: flex-start; }
.check-line .grow { overflow-wrap: anywhere; }
.check-detail { flex: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 1px; }
.game-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--card-border); }
/* Importing: New or Import above the games, then the folder and what the host found in it */
.mode-pills { padding: 0 2px 4px; }
.import-fields { display: flex; flex-direction: column; gap: 14px; }
.import-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.import-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.import-fields .nl-note .note-text .nl-mono { overflow-wrap: anywhere; }

/* ===== Narrower windows ===== */
@media (max-width: 1280px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .host-card-main { grid-template-columns: 240px minmax(0, 1fr) 150px; }
}
@media (max-width: 1100px) {
  .console-tab { grid-template-columns: minmax(0, 1fr); }
  .online-rail { display: none; }
  .players-tab { grid-template-columns: minmax(0, 1fr) 240px; }
  .map-tab { grid-template-columns: minmax(0, 1fr) 240px; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-row { grid-template-columns: 180px minmax(0, 1fr) 100px; }
  .all-row { grid-template-columns: minmax(0, 1fr) 180px 150px; }
  .module-text { display: none; }
  .wipes-tab { grid-template-columns: minmax(0, 1fr) 340px; }
  .chart-row.has-module-card { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* ===== Phones: the rail and list fold into a top bar and a drawer ===== */
@media (max-width: 900px) {
  .app { display: flex; flex-direction: column; }
  .topbar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; flex: none; background: var(--rail); border-bottom: 1px solid var(--hairline); }
  .topbar-title { flex: 1; min-width: 0; font: 600 15px var(--font-sans); color: var(--title-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-logo { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
  .topbar .avatar { margin: 0; }
  .side {
    display: flex; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; max-width: calc(100vw - 40px);
    transform: translateX(-105%); transition: transform 0.18s ease, visibility 0.18s; visibility: hidden;
  }
  .drawer-open .side { transform: none; visibility: visible; box-shadow: var(--shadow-dialog); }
  .side .list { width: var(--layout-list); min-width: 0; flex: 1 1 var(--layout-list); }
  .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 0.18s ease; }
  .drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  .content { flex: 1; }
  .hub-bar { padding: 8px 16px; }
  .page { padding: 16px 16px 24px; }
  .page-titles { min-width: 0; flex-basis: 100%; }
  .page-actions .nl-btn { flex: 1; }
  .filters { flex-wrap: wrap; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .home-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .hide-phone { display: none !important; }
  .nl-note, .nl-banner { flex-wrap: wrap; }
  .note-actions { width: 100%; justify-content: flex-end; }

  .host-card-main { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .host-servers { align-items: flex-start; }
  .activity-tab { padding: 14px 16px 20px; }
  .activity-card > .card-head .ellipsis { display: none; }
  /* The time goes under the line on a phone, lined up with the text */
  .activity-row { flex-wrap: wrap; row-gap: 3px; }
  .activity-when { order: 3; flex-basis: 100%; padding-left: 29px; margin-top: 0; }
  .host-badges { justify-content: flex-start; }
  .link-panel { grid-template-columns: minmax(0, 1fr); }
  .people-grid { grid-template-columns: minmax(0, 1fr); }
  .people-row { flex-wrap: wrap; }
  .people-row .people-main { flex-basis: calc(100% - 42px); }
  .discord-role-row { flex-wrap: wrap; }
  .discord-role-row .nl-select { width: auto; flex: 1; }
  .discord-server-body { padding-left: 0; }
  .discord-server-body .form-pair { grid-template-columns: minmax(0, 1fr); }

  .server-head.tall { height: auto; min-height: var(--layout-header-tall); }
  .server-head.tall .server-head-row { position: relative; left: auto; right: auto; bottom: auto; padding: 44px 16px 14px; flex-wrap: wrap; }
  .crumb { left: 16px; }
  .server-head.tall .server-buttons { width: 100%; flex-wrap: wrap; }
  .server-title { font-size: 20px; line-height: 24px; }
  .server-head.slim .server-head-row { inset: 0 16px; gap: 10px; }
  .slim-facts, .slim-address, .server-head.slim .nl-status { display: none; }
  .server-title.small { max-width: none; flex: 1; min-width: 0; font-size: 15px; }
  .server-head.slim .server-buttons .nl-btn:not(.nl-btn--square) span { display: none; }
  .server-head.slim .server-buttons .nl-btn:not(.nl-btn--square) { width: 30px; padding: 0; }
  .tabs { padding: 0 12px; }
  .messages { padding: 12px 16px 0; }

  .overview, .backups-tab { padding: 14px 16px 20px; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .overview-bottom { grid-template-columns: minmax(0, 1fr); }

  .console-main { padding: 12px; }
  .console-tools { flex-wrap: wrap; }
  .console-tools .nl-pillrow { flex-basis: 100%; }
  .console-search { flex: 1; width: auto; }
  .console-lines .nl-cline__time { display: none; }
  .console-lines .nl-cline { padding: 0 10px; gap: 8px; }

  .tab-map .tab-body { overflow: auto; }
  .map-tab { display: flex; flex-direction: column; height: auto; }
  .map-main { padding: 12px 16px 0; }
  .map-tools { flex-wrap: wrap; }
  .map-buttons { flex: 1 1 100%; flex-wrap: wrap; }
  .map-panel { border-left: 0; border-top: 1px solid var(--hairline); margin-top: 12px; overflow: visible; }

  .tab-players .tab-body { overflow: auto; }
  .players-tab { display: flex; flex-direction: column; height: auto; }
  .players-main { padding: 12px 16px 0; }
  .players-tools { flex-wrap: wrap; }
  .players-search { width: 100%; }
  .players-table { overflow: visible; }
  .players-head, .players-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.7fr); }
  .players-head > :nth-child(2), .players-row > :nth-child(2),
  .players-head > :nth-child(5), .players-row > :nth-child(5),
  .players-head > :nth-child(6), .players-row > :nth-child(6) { display: none; }
  .players-table.is-detail .players-head, .players-table.is-detail .players-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .players-bar { flex-wrap: wrap; }
  .players-bar > .players-note { flex-basis: 100%; }
  .player-panel { border-left: 0; border-top: 1px solid var(--hairline); margin-top: 12px; overflow: visible; }

  .tab-settings .tab-body { overflow: auto; }
  .settings-tab { height: auto; }
  .unsaved { height: auto; min-height: 44px; padding: 8px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .settings-body { display: block; }
  /* The sections are one scroll on a phone, so only All settings and the files stay, in a row that scrolls sideways */
  .settings-nav { flex-direction: row; gap: 4px; padding: 12px 16px 0; border-right: 0; overflow-x: auto; }
  .settings-nav .nav-section-item, .settings-nav .nav-divider, .settings-nav .nav-label { display: none; }
  .settings-nav .nl-navitem { width: auto; border: 1px solid var(--card-border); }
  .settings-nav .nl-navitem__count { margin-left: 4px; }
  .settings-form { padding: 0 16px 24px; overflow: visible; }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .setting-row .nl-setting__label { padding: 0; }
  .setting-row .nl-setting__key { display: none; }
  .all-search { width: 100%; }
  .all-side { flex-direction: row; align-items: center; justify-content: space-between; padding: 0; text-align: left; }
  .all-row .nl-setting__label { padding: 0; }
  /* Save stays in reach at the end of a long list */
  .all-foot { position: sticky; bottom: 0; z-index: 1; background: var(--surface); flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  /* Back on a line of its own, the buttons together under it */
  .all-foot > .grow { flex-basis: 100%; height: 0; order: 1; }
  .all-foot > :first-child { order: 0; margin-right: auto; }
  .all-foot > :not(:first-child):not(.grow) { order: 2; }
  .all-panel .file-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .all-panel .file-title .nl-key { max-width: 100%; }
  .enum-select { width: 100%; max-width: 420px; }

  .backups-grid { grid-template-columns: minmax(0, 1fr); }
  .reports-grid { grid-template-columns: minmax(0, 1fr); }
  .reports-tab { padding: 14px 16px 20px; }
  .chart-row.has-module-card { grid-template-columns: minmax(0, 1fr); }
  .wipes-tab, .plugins-tab, .files-tab { padding: 14px 16px 20px; }
  .files-top { flex-wrap: wrap; row-gap: 8px; }
  .files-actions { width: 100%; justify-content: flex-end; }
  .files-grid { grid-template-columns: minmax(0, 1fr); }
  .file-when { display: none; }
  .file-size { width: 64px; }
  .wipes-tab, .plugins-grid, .framework-choices { grid-template-columns: minmax(0, 1fr); }
  .calendar-card { padding: 10px; }
  .calendar-card > .card-head, .framework-card > .card-head, .health-card > .card-head { flex-wrap: wrap; row-gap: 6px; }
  .health-headline { order: 3; flex-basis: 100%; white-space: normal; }
  .overview-health { flex-wrap: wrap; row-gap: 6px; }
  .overview-health > .grow { flex-basis: 100%; order: 3; white-space: normal; }
  .calendar-week, .calendar-days { gap: 2px; }
  .calendar-week .nl-label { padding-left: 4px; }
  .calendar-day { height: 50px; padding: 4px; }
  .day-time { display: none; }
  .day-tag { font-size: 9.5px; }
  .wipe-row .played, .wipe-row .size { display: none; }
  .wipe-row .when { width: 84px; }
  .tab-loot .tab-body { overflow: auto; }
  .loot-tab { height: auto; padding: 14px 16px 20px; }
  .loot-top { flex-wrap: wrap; row-gap: 6px; }
  .loot-note { margin-left: 0; text-align: left; }
  .loot-grid { display: flex; flex-direction: column; }
  .loot-list-rows { max-height: 240px; }
  .loot-gap { margin-left: 0; }
  .loot-rows { overflow: visible; }
  .loot-cols { display: none; }
  .loot-item-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto 30px; }
  .loot-item-row .loot-item-name { grid-column: 1 / -1; }
  .loot-item-row .loot-num { width: 100%; }
  .loot-items-head { flex-wrap: wrap; }
  .loot-item-search { width: 100%; }
  .item-cols { display: none; }
  .item-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .item-row .loot-item-name { grid-column: 1 / -1; }
  .item-row > :nth-child(2), .item-row > :nth-child(3) { display: none; }
  .addon-line { flex-wrap: wrap; }
  .addon-line > .grow { flex-basis: 100%; }
  .addon-line .row-buttons { margin-left: auto; }
  .timeline-days, .timeline-now-row, .lane { grid-template-columns: 56px minmax(0, 1fr); }
  .days span { font-size: 10px; padding-left: 3px; }
  .backup-row { gap: 8px; }
  .backup-row .why { display: none; }
  /* On a phone the cloud's icon says where a backup is, its words are in the tooltip */
  .backup-row .where { width: auto; }
  .backup-row .where > span { display: none; }
  .cloud-row .from { display: none; }
  .cloud-file { flex-wrap: wrap; row-gap: 4px; }
  .cloud-file > .nl-icon:first-child { display: none; }
  .cloud-file > .grow { flex-basis: 100%; }

  .dialog-layer { padding: 0; align-items: stretch; }
  .dialog.confirm, .dialog.signin { margin: auto 16px; }
  .dialog.new-server { width: 100%; height: 100%; max-height: none; border-radius: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .games-pane { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--card-border); padding: 12px; }
  .games { flex-direction: row; overflow-x: auto; }
  .games .nl-gamerow { flex: none; width: auto; }
  .request-card { display: none; }
  .game-scroll { padding: 12px 16px; }
  .host-choices, .new-fields, .import-pair, .import-modes { grid-template-columns: minmax(0, 1fr); }
  .check-detail { max-width: 120px; }
  .game-foot { padding: 12px 16px; }
  .signin-page { padding: 24px 16px; }
}

/* The updates card on a narrow screen: the two builds side by side, the settings and the buttons under them */
@media (max-width: 900px) {
  .updates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-updates { grid-column: 1 / -1; }
  .updates-foot { flex-direction: column; align-items: stretch; }
  .updates-buttons { flex-wrap: wrap; }
}

/* ---- Stats: the overview's charts, longer. From StatsView.axaml ---- */
.stats-top-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stats-heading { font: 600 16px/22px var(--font-sans); color: var(--text); }
.stats-exports { display: flex; gap: 8px; flex-wrap: wrap; }
.stats-tab .stat-card .ellipsis { min-width: 0; }
.stats-chart { position: relative; padding-bottom: 18px; }
.stats-svg { display: block; width: 100%; overflow: visible; }
.stats-grid { stroke: var(--card-border); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.stats-axis { stroke: var(--card-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.stats-fill { fill: var(--accent-tint22); }
.stats-line { fill: none; stroke: var(--accent-hover); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.stats-dot { fill: var(--accent-hover); }
.stats-compare { fill: none; stroke: var(--chart-bar); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.stats-compare-dot { fill: var(--chart-bar); }
.stats-hit { fill: transparent; }
.stats-hit:hover { fill: var(--accent-tint8); }
.stats-labels { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
.stats-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.stats-labels span:first-child { transform: none; }
.stats-labels span:last-child:not(:first-child) { transform: translateX(-100%); }
.stats-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-secondary); }
.stats-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch-line { width: 14px; height: 2px; background: var(--accent-hover); }
.swatch-dashed { width: 14px; height: 0; border-top: 1.5px dashed var(--chart-bar); }
.stats-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.stats-pair.wide-first { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.heat { display: flex; flex-direction: column; gap: 2px; }
.heat-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; height: 14px; }
.heat-cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; height: 100%; }
.heat-cell { position: relative; background: var(--primary); border-radius: 2px; }
.heat-fill { position: absolute; inset: 0; background: var(--accent-hover); border-radius: 2px; }
.heat-hours { display: grid; grid-template-columns: 34px repeat(4, minmax(0, 1fr)); }
.stats-table { padding: 12px 8px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stats-table > .card-head { padding: 0 6px 2px; }
.stats-row { display: grid; grid-template-columns: 2fr 1.6fr 0.9fr 1fr 0.9fr 0.9fr; gap: 8px; align-items: center; padding: 6px 8px; text-align: left; }
.stats-row.no-half { grid-template-columns: 2fr 1.6fr 1fr 0.9fr 0.9fr; }
.stats-head { padding-top: 0; padding-bottom: 0; }
.stats-pick { width: 100%; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; margin-bottom: 2px; }
.stats-pick:hover { background: var(--accent-tint8); }
.stats-pick.is-on, .stats-pick.is-on:hover { background: var(--accent-tint18); color: var(--title-text); }
.stats-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-weight: 500; }
.stats-name .ellipsis { display: flex; align-items: center; gap: 6px; }
.stats-bar { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 4px; padding-right: 10px; }
.stats-top { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.top-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 3px 0; }
.top-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12.5px; }
.top-time { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.stats-limits { display: flex; flex-direction: column; gap: 8px; }
.stats-limits .limit { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 8px; align-items: start; }

/* ---- Restarts when memory runs high, on the overview ---- */
.memory-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.memory-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.memory-checks { display: flex; gap: 18px; flex-wrap: wrap; }
.memory-status { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.memory-state { display: flex; align-items: center; gap: 7px; }

@media (max-width: 900px) {
  .stats-pair, .stats-pair.wide-first { grid-template-columns: minmax(0, 1fr); }
  .stats-row { grid-template-columns: 1.6fr 1.2fr 0.9fr 1fr; }
  .stats-row.no-half { grid-template-columns: 1.6fr 1.2fr 1fr; }
  /* On a phone the table keeps who, the peak, the half-life and who came back */
  .stats-row > :nth-child(n+5) { display: none; }
  .stats-row.no-half > :nth-child(n+4) { display: none; }
  .memory-fields { grid-template-columns: minmax(0, 1fr); }
  /* A phone has the height to spare, so notes and wipe names wrap rather than cut off */
  .stats-tab .stat-card .ellipsis, .stats-name .ellipsis { white-space: normal; }
}
