/* ════════════════════════════════════════════════════════════════
   FlirtWorks dashboard
   Same language as flirtworks.co: solid black, hard white, hairline
   square boxes, Archivo (expanded) for anything that names something.
   White is the action colour. Red is only for danger and live signals.
   ════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --gap: 20px;      /* between cards */
  --fld-gap: 20px;  /* between fields inside a card */
  --bg: #060606;
  --bg-soft: #0b0b0b;
  --panel: #0a0a0a;
  --panel-2: #151515;
  --line: #232323;
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-hover: #4a4a4a;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --faint: #5a5a5a;
  --accent: #f2f2f2;       /* the action colour is the ink itself */
  --on-accent: #060606;
  --accent-2: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.07);
  --red: #ff3b5c;
  --cyan: #22f0ff;
  --good: #34d399;
  --warn: #ffd25c;
  --r-lg: 2px;
  --r-md: 2px;
  --r-sm: 2px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  --ctl-h: 38px;
  --side-w: 244px;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  font-family: var(--body);
  font-size: 14px; line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
small { font-size: 12px; color: var(--muted); font-weight: 400; }
code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 6px; font-size: 12px; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
kbd { font: 11px ui-monospace, Consolas, monospace; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-sm); color: var(--muted); }
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--muted); font-weight: 700; }

/* ── base controls ── */
input[type="text"], input[type="url"], input[type="password"], input[type="number"],
input[type="search"], input:not([type]), select, textarea {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0 12px; height: var(--ctl-h);
  font: inherit; width: 100%; min-width: 0;
  transition: border-color .15s, background .15s;
}
textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #5a5a5a; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a2947f' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 18px; }
select option { background: var(--panel); color: var(--text); }
select option:disabled { color: #5a5a5a; }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.5); cursor: pointer; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: progress; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within > .switch {
  outline: 2px solid var(--accent-2); outline-offset: 2px;
}
label { font-size: 13px; font-weight: 600; }

/* checkbox */
input[type="checkbox"]:not(.switch) {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; flex: 0 0 18px; margin: 0; cursor: pointer;
  display: inline-grid; place-content: center; vertical-align: middle;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: background .15s, border-color .15s;
}
input[type="checkbox"]:not(.switch):hover { border-color: var(--line-hover); }
input[type="checkbox"]:not(.switch):checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:not(.switch)::after {
  content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px); opacity: 0; transition: opacity .12s;
}
input[type="checkbox"]:not(.switch):checked::after { opacity: 1; }

/* switch (checkbox styled as a toggle) */
input.switch {
  appearance: none; -webkit-appearance: none; flex: 0 0 40px;
  width: 40px; height: 22px; border-radius: 0; position: relative; cursor: pointer; margin: 0;
  background: var(--bg-soft); border: 1px solid var(--line);
  transition: background .18s, border-color .18s;
}
input.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 0;
  background: var(--muted); transition: transform .18s, background .18s;
}
input.switch:checked { background: var(--accent); border-color: var(--accent); }
input.switch:checked::after { transform: translateX(18px); background: #fff; }
input.switch:hover { border-color: var(--line-hover); }
input.switch:checked:hover { border-color: var(--accent); filter: brightness(1.08); }

/* radio */
input[type="radio"] {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0;
  border: 1px solid var(--line); border-radius: 0; background: var(--bg-soft); cursor: pointer; display: inline-grid; place-content: center;
}
input[type="radio"]::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .12s; }
input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="radio"]:checked::after { transform: scale(1); }

/* range */
input[type="range"] {
  --pct: 40%;
  appearance: none; -webkit-appearance: none; width: 100%;
  height: 4px; padding: 0; border: none; border-radius: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--pct), var(--line) var(--pct));
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: none; transition: transform .1s; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: none; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: transparent; }

/* width helpers */
.w-xs { width: 80px !important; flex: 0 0 auto; }
.w-sm { width: 110px !important; flex: 0 0 auto; }
.w-md { width: 180px !important; flex: 0 0 auto; }
.grow { flex: 1 1 160px; }

/* ── buttons ── */
.btn, .btn-primary, .btn-quiet, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--ctl-h); padding: 0 16px; white-space: nowrap;
  border-radius: var(--r-sm); font-weight: 600; font-size: 13px;
  transition: border-color .15s, color .15s, background .15s, filter .15s;
}
.btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.btn:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-primary { background: var(--accent); border: 1px solid var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-quiet { height: 32px; background: transparent; border: 1px solid var(--line); border-radius: 0; color: var(--muted); font-size: 12.5px; }
.btn-quiet:hover { color: var(--text); border-color: var(--accent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; }
.icon-btn { width: 32px; height: 32px; padding: 0; flex: 0 0 32px; background: transparent; border: 1px solid transparent; color: var(--muted); }
.icon-btn:hover { border-color: var(--line); color: var(--text); background: var(--panel-2); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── shell ── */
.wrap { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; z-index: 60;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 12px 14px;
  background: #080808; border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 10px; font-family: var(--display); font-weight: 800; font-size: 21px; }
.brand-name { line-height: 1; }
.brand small { flex-basis: 100%; margin-left: 21px; font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase; }
.brand .dot { width: 11px; height: 11px; border-radius: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.sidenav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.nav-label { margin: 12px 10px 3px; font-size: 10px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muted); }
.sidenav button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 10px; background: transparent; border: none; border-radius: var(--r-sm);
  color: var(--muted); font-size: 13.5px; text-align: left;
  transition: background .15s, color .15s;
}
.sidenav button:hover { background: var(--panel-2); color: var(--text); }
.sidenav button.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-ico { width: 20px; flex: 0 0 20px; text-align: center; font-size: 14px; }
.side-foot { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 0; background: var(--good); box-shadow: 0 0 8px var(--good); }
.status-dot.off { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.scrim { display: none; }

.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--s8) 96px; min-width: 0; }
body.has-mini .content { padding-bottom: 110px; }

header.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; margin-bottom: 8px;
  background: rgba(6, 6, 6, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.crumb { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.kbd-hint { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; background: transparent; border: 1px solid var(--line); border-radius: 0; color: var(--muted); font-size: 12.5px; }
.kbd-hint:hover { border-color: var(--line-hover); color: var(--text); }
.hamburger { display: none; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.guild-select { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 4px 6px 4px 6px; }
.guild-select:hover { border-color: var(--line-hover); }
.guild-select img { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 0; object-fit: cover; background: var(--panel-2); }
.guild-select select { width: auto; max-width: 220px; height: 28px; border: none; background-color: transparent; padding: 0 26px 0 2px; font-weight: 600; text-overflow: ellipsis; }
.userbox { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.userbox img { width: 28px; height: 28px; border-radius: 0; }
.logout { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 0; color: var(--muted); }
.logout:hover { color: var(--red); background: var(--panel-2); text-decoration: none; }

/* ── page headings ── */
.page-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.5px; line-height: 1.2; margin: var(--s2) 0 var(--s2); }
.page-hint { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 var(--s6); max-width: 72ch; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.page-head-row .btn { margin-top: var(--s3); }
.page-hint b { color: var(--text); }
.page-foot { color: var(--muted); font-size: 13px; margin-top: var(--s4); }
.section-head { display: flex; align-items: baseline; gap: var(--s3); margin: var(--s8) 0 var(--s3); }
.section-title { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.3px; }
.section-meta { color: var(--muted); font-size: 12.5px; }
.group-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; color: var(--muted); margin: 16px 0 8px; }
.group-title:first-child { margin-top: 0; }
.subhead { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); padding-top: var(--fld-gap); margin-bottom: calc(var(--s3) - var(--fld-gap)); border-top: 1px solid var(--line-soft); }

.banner { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); margin-bottom: var(--s6); border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; }
.banner-warn { background: rgba(255, 210, 92, 0.08); border-color: rgba(255, 210, 92, 0.32); }
.banner .btn { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill-warn { color: var(--warn); border-color: rgba(255, 210, 92, 0.35); background: rgba(255, 210, 92, 0.08); }
.empty { border: 1px dashed var(--line); border-radius: var(--r-md); padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: 13.5px; }

.loading { display: flex; gap: 6px; padding: 40px 0; justify-content: center; }
.loading span { width: 8px; height: 8px; border-radius: 0; background: var(--accent); animation: blink 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: none; } }

/* ── lock screen ── */
.lock { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 34px 30px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.lock-card .brand { justify-content: center; }
.lock-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
#passwordBox { display: flex; flex-direction: column; gap: 10px; }
.discord-login { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: var(--r-sm); background: #5865f2; color: #fff; font-weight: 700; }
.discord-login:hover { filter: brightness(1.1); text-decoration: none; }
.lock-err { color: var(--red); font-size: 13px; min-height: 16px; }

/* ── overview ── */
.ov-grid { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.ov-tile { flex: 1 1 140px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 14px 13px; text-align: center; }
.ov-num { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.ov-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.3px; margin-top: 2px; }
.ov-hero { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-md); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.ov-hero-eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--accent-2); font-weight: 700; }
.ov-hero-title { font-family: var(--display); font-weight: 800; font-size: 17px; margin-top: 3px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.ov-hero-title .muted { font-weight: 600; }
.ov-quick { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.ov-quick-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; margin-right: 4px; }
.ov-quick button { height: 32px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 0; font-size: 12.5px; }
.ov-quick button:hover { border-color: var(--accent); color: var(--accent-2); }
#homeStats { margin-bottom: var(--s2); }
#homeStats .banner { margin-bottom: var(--s4); }

/* ── music console ── */
.now {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; margin-bottom: 14px;
}
.art-wrap { position: relative; width: 220px; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(135deg, #161616, #0a0a0a); }
.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #4a4a4a; }
.np-meta { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.np-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.np-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.4px; line-height: 1.18; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.np-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badges:empty { display: none; }
.badge { background: var(--panel-2); border: 1px solid var(--line); border-radius: 0; padding: 2px 10px; font-size: 11.5px; color: var(--muted); }
.badge.on { color: var(--text); border-color: rgba(255, 255, 255, 0.6); }
.progress { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.progress .t { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }
.progress .t:last-child { text-align: right; }
.bar { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 0; overflow: hidden; cursor: pointer; }
.bar:hover { height: 8px; }
.fill { height: 100%; width: 0; background: var(--accent); border-radius: 0; transition: width .3s linear; }
.transport { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.transport-main { display: flex; align-items: center; gap: 8px; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 auto; padding: 0;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 0;
  transition: border-color .15s, background .15s, color .15s;
}
.ctl:hover { border-color: var(--accent); }
.ctl .ico { display: block; }
.ctl.primary { width: 52px; height: 52px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ctl.primary:hover { filter: brightness(1.1); }
.ctl.danger:hover { color: var(--red); }
.ctl.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.ctl.wide { width: auto; height: 38px; border-radius: 0; padding: 0 15px; gap: 7px; font-size: 13px; font-weight: 600; }
.ctl.wide .ico { color: var(--muted); }
.ctl.wide:hover .ico, .ctl.wide.on .ico { color: inherit; }
.vol { display: flex; align-items: center; gap: 10px; color: var(--muted); min-width: 0; }
.vol input[type="range"] { width: 130px; }
.vol-num { display: inline-flex; align-items: center; gap: 1px; height: 30px; padding: 0 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0; cursor: text; }
.vol-num:focus-within { border-color: var(--accent); }
.vol-num input[type="number"] { width: 30px; height: 100%; padding: 0; background: transparent; border: none; border-radius: 0; color: var(--text); font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.vol-num input:focus { outline: none; }
.vol-num b { color: var(--muted); font-size: 11px; }

.search { display: flex; gap: var(--s3); margin: var(--s4) 0 var(--s3); }
.search input { flex: 1; height: 44px; }
.search .btn-primary { height: 44px; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.push-right { margin-left: auto; }

.queue { display: flex; flex-direction: column; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); border-bottom: 1px solid var(--line-soft); }
.q-item:last-child { border-bottom: none; }
.q-item:hover { background: var(--panel); }
.q-item[draggable="true"] { cursor: grab; }
.q-item.dragging { opacity: .4; }
.q-item.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.q-idx { width: 22px; flex: 0 0 22px; text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.q-art { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-sm); object-fit: cover; background: linear-gradient(135deg, #161616, #0a0a0a); display: block; }
.q-info { flex: 1; min-width: 0; }
.q-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-rm { width: 30px; height: 30px; flex: 0 0 30px; background: transparent; border: 1px solid transparent; border-radius: 0; color: var(--muted); }
.q-rm:hover { border-color: var(--red); color: var(--red); }

.disconnected { text-align: center; padding: 70px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.disc-ico { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 0; background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--line-hover); }
.disconnected .big { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--text); margin-bottom: 6px; }

/* ── cards & forms ── */
.manager { min-width: 0; }
.mgr-panel { max-width: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.grid-2 + .grid-2, .grid-2 + .card, .card + .grid-2 { margin-top: var(--gap); }
.span-2 { grid-column: 1 / -1; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fld-gap) var(--s6); align-items: start; }
.cols-2 > div:not(.fld) { display: flex; flex-direction: column; gap: var(--fld-gap); min-width: 0; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fld-gap) var(--s6); align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); min-height: 54px; }
.card-head h3 { font-family: var(--display); font-weight: 800; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; flex: 1; }
.card-head h3 small { font-family: var(--body); }
.card-status { font-size: 11.5px; color: var(--good); white-space: nowrap; opacity: 0; transition: opacity .2s; }
.card-status.saving, .card-status.ok, .card-status.err { opacity: 1; }
.card-status.saving { color: var(--muted); }
.card-status.err { color: var(--red); }
.card-head .switch { margin-left: 4px; }
.card { display: flex; flex-direction: column; }
.card-body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--fld-gap); flex: 1; }
.card-body:empty { display: none; }
.card-hint { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.card.is-off .card-body > :not(.card-hint) { opacity: .55; }
.card.is-off .card-body > :not(.card-hint):hover { opacity: 1; }
.card-warn { color: var(--warn); font-size: 12.5px; padding: var(--s2) var(--s3); background: rgba(255, 210, 92, 0.08); border: 1px solid rgba(255, 210, 92, 0.25); border-radius: var(--r-sm); }
details.card > summary { padding: var(--s4) var(--s5); font-weight: 600; font-size: 13.5px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: '▸'; color: var(--accent); transition: transform .18s; }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card > .card-hint { padding: 0 var(--s5) var(--s3); }
.mgr-power { margin-bottom: var(--s4); }

.fld { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fld > label { display: block; }
.help { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.fld > .help { margin-top: -2px; }
.inline { display: flex; align-items: center; gap: 8px; }
.unit { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fld > select, .fld > input[type="text"]:not([class*="w-"]), .fld > input[type="url"] { max-width: 100%; }
.card-body > .fld > select { max-width: 480px; }
.card-body > .seg, .fld > .seg { align-self: flex-start; }
.fld > .btn { align-self: flex-start; }

.sw-row { display: flex; align-items: center; gap: var(--s4); cursor: pointer; }
.sw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-label { font-weight: 600; font-size: 13.5px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.checks { display: flex; flex-direction: column; gap: var(--s3); }
.radios { display: flex; flex-direction: column; gap: var(--s2); }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
.radio:hover { border-color: var(--line-hover); }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio span { display: flex; flex-direction: column; }
.color-pick { display: flex; align-items: center; gap: 10px; }
input[type="color"] { width: 44px; height: 36px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: var(--r-sm); }
input[type="color"]::-moz-color-swatch { border: none; border-radius: var(--r-sm); }

/* token picker */
.multi { display: flex; flex-direction: column; gap: 8px; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.tokens-empty { color: var(--muted); font-size: 12.5px; }
.token { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 0; background: var(--accent-soft); border: 1px solid rgba(255, 255, 255, 0.4); font-size: 12.5px; font-weight: 600; max-width: 100%; }
.token-x { width: 20px; height: 20px; border-radius: 0; border: none; background: transparent; color: var(--muted); font-size: 10px; flex: 0 0 20px; }
.token-x:hover { background: rgba(255, 59, 92, 0.25); color: #fff; }
.multi-add { max-width: 280px; }
.multi-input { max-width: 320px; }
.chipset, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0; font-size: 12.5px; color: var(--muted); }
.chip:hover { border-color: var(--line-hover); color: var(--text); }
.chip.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

/* list rows */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.list > .row:first-child { padding-top: 0; }
.list > .row:last-child { padding-bottom: 0; }
.row-tight { padding: var(--s2) 0; }
.row:last-child { border-bottom: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub.clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-side { text-align: right; font-size: 12px; white-space: nowrap; }
.rank { width: 30px; flex: 0 0 30px; text-align: center; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.av { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 0; object-fit: cover; background: var(--panel-2); }
.av-none { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--muted); }
.tag-name { flex: 0 0 auto; }
.progress-mini { height: 4px; margin-top: 6px; max-width: 220px; background: var(--bg-soft); border-radius: 0; overflow: hidden; }
.progress-mini span { display: block; height: 100%; background: var(--accent); border-radius: 0; }
.list-search { max-width: 320px; }
.big-emoji { font-size: 22px; width: 34px; text-align: center; }
.date-chip { width: 44px; flex: 0 0 44px; height: 46px; border-radius: var(--r-sm); background: var(--bg-soft); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.date-chip b { font-family: var(--display); font-size: 16px; }
.date-chip span { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-2); }

/* mini forms */
.addform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: var(--s3); background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--r-md); }
.addform > input, .addform > select { flex: 1 1 140px; }
.addform > .w-sm, .addform > .w-md, .addform > .num { flex: 0 0 auto; }
.addform .btn-primary { flex: 0 0 auto; }
.addform.rowform { margin: 0; padding: 0; background: none; border: none; flex-wrap: nowrap; }
.addform.rowform .inline { gap: 6px; }

/* switch cards */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.mod-toggle { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s; }
.mod-toggle:hover { border-color: var(--line-hover); }
.mod-toggle.on { border-color: rgba(255, 255, 255, 0.35); }
.mod-toggle:not(.on) .mod-name, .mod-toggle:not(.on) .mod-emoji { opacity: .55; }
.mod-emoji { font-size: 18px; width: 24px; text-align: center; }
.mod-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.25; }
.mod-name small { font-size: 11px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); }
.type-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
.type-toggle:hover { border-color: var(--line-hover); }
.rules { display: flex; flex-direction: column; gap: var(--s2); }
.rule { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s4); background: var(--bg-soft); transition: border-color .15s; }
.rule.on { border-color: rgba(255, 255, 255, 0.4); }
.rule .sw-row { padding: var(--s3) 0; }
.rule-extra { display: none; border-top: 1px solid var(--line-soft); padding: var(--s4) 0; }
.rule.on .rule-extra { display: block; }

/* health */
.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.hp { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; display: flex; flex-direction: column; min-width: 0; }
.hp span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.hp b { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp.good b { color: var(--good); }
.hp.bad b { color: var(--red); }

/* ── command manager ── */
.mgr-toolbar { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s4); flex-wrap: wrap; }
.mgr-filter { flex: 1 1 240px; }
.mgr-commands { display: flex; flex-direction: column; gap: var(--s3); }
.cat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cat.mod-off { border-style: dashed; }
.cat-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: transparent; border: none; font-size: 14.5px; text-align: left; }
.cat-head:hover { background: var(--panel-2); }
.caret { color: var(--accent); transition: transform .18s; width: 10px; }
.cat.open .caret { transform: rotate(90deg); }
.count { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0; padding: 0 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-sum { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cat-tools { display: none; align-items: center; gap: 6px; padding: 10px 16px; border-top: 1px dashed var(--line); flex-wrap: wrap; background: var(--bg-soft); }
.cat.open .cat-tools { display: flex; }
.cat-tools-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-right: 2px; }
.cat-tools-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.cat-body { display: none; border-top: 1px solid var(--line); }
.cat.open .cat-body { display: block; }
.cmd { border-bottom: 1px solid var(--line-soft); }
.cmd:last-child { border-bottom: none; }
.cmd-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.cmd-head:hover { background: rgba(255, 255, 255, .04); }
.cmd.off .cmd-id, .cmd.off .seg { opacity: .5; }
.cmd-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmd-id code { align-self: flex-start; font-weight: 700; font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-state { font-size: 11.5px; color: var(--accent-2); }
.cmd-state.warn { color: var(--warn); }
.cmd.off .cmd-state { color: var(--red); }
.cmd-expand svg { transition: transform .18s; }
.cmd.expanded .cmd-expand { border-color: var(--line); background: var(--panel-2); color: var(--text); }
.cmd.expanded .cmd-expand svg { transform: rotate(180deg); }
.cmd-detail { display: none; padding: 4px 16px 16px 70px; flex-direction: column; gap: 12px; }
.cmd.expanded .cmd-detail { display: flex; }
.cmd-detail-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmd-detail-lbl { flex: 0 0 52px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.sw { width: 40px; height: 22px; flex: 0 0 40px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); position: relative; transition: background .18s, border-color .18s; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 0; background: var(--muted); transition: transform .18s, background .18s; }
.sw.on { background: var(--accent); border-color: var(--accent); }
.sw.on::after { transform: translateX(18px); background: #fff; }
.seg { display: inline-flex; gap: 2px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 11px; background: transparent; border: none; border-radius: var(--r-sm); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.seg-sm button { height: 24px; padding: 0 9px; font-size: 12px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: var(--on-accent); }
.seg .n { opacity: .7; font-size: 11px; margin-left: 2px; }
.prole { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.prole:last-child { border-bottom: none; }
.prole-name { flex: 1; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.power-roles { padding: 0 var(--s5) var(--s4); max-height: 420px; overflow-y: auto; }
.mgr-actions { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.save-status { font-size: 12px; color: var(--good); margin-right: auto; }
.save-status.saving { color: var(--muted); }

/* ── mod cases ── */
.case-summary { color: var(--muted); font-size: 12.5px; margin: 0 0 6px; }
.case-num { width: 40px; flex: 0 0 40px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 0; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--bg-soft); border: 1px solid var(--line); flex: 0 0 auto; }
.tag-amber { color: var(--warn); border-color: rgba(255, 210, 92, 0.35); }
.tag-red { color: #ff6b84; border-color: rgba(255, 59, 92, 0.4); }
.tag-green { color: var(--good); border-color: rgba(52, 211, 153, 0.35); }
.case-row .tag { width: 110px; justify-content: flex-start; }
.case-row[hidden] { display: none; }

/* ── stats & badges ── */
.stat-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.stat-name { width: 200px; flex: 0 0 200px; background: none; border: none; padding: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-name.wide { width: auto; flex: 1 1 0; display: flex; flex-direction: column; font-weight: 600; font-size: 13px; }
.stat-name small { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.stat-bar { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 0; overflow: hidden; }
.stat-name.wide + .stat-bar { flex: 0 0 30%; }
.stat-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 0; }
.stat-count { width: 56px; flex: 0 0 56px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.ach { display: flex; align-items: center; gap: 11px; padding: 8px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); }
.ach.locked { opacity: .45; }
.ach-emoji { font-size: 20px; width: 26px; text-align: center; }
.ach-meta { flex: 1; min-width: 0; }
.ach-name { font-weight: 700; font-size: 13px; }
.ach-desc { font-size: 11.5px; color: var(--muted); }
.ach-have { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badges-card .card-body { max-height: 640px; overflow-y: auto; padding-top: 12px; }

/* greeting preview */
.var { height: 22px; padding: 0 7px; margin: 2px 2px 0 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: 11.5px ui-monospace, Consolas, monospace; }
.var:hover { border-color: var(--accent); }
.preview-line { display: flex; flex-direction: column; gap: var(--s2); }
.greet-preview { background: #313338; color: #dbdee1; border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }

/* ── log ── */
.log-feed { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 14px; max-height: 70vh; overflow-y: auto; font-size: 13px; }
.log-feed .empty { border: none; }
.log-line { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.log-line:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 0; align-self: center; }
.log-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; font-size: 12px; }
.log-text { min-width: 0; overflow-wrap: anywhere; }

/* ── composer ── */
.composer-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.composer-form { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.cmp-fields { display: flex; flex-direction: column; gap: 8px; }
.cmp-fields:empty { display: none; }
.cmp-field, .cmp-role-row { display: flex; gap: 8px; align-items: center; }
.cmp-field .f-name { flex: 0 0 34%; }
.cmp-field .f-value { flex: 1; }
.cmp-field .check { font-size: 12px; flex: 0 0 auto; }
.cmp-role-row { margin-bottom: 8px; }
.cmp-role-row select { flex: 1.2; }
.cmp-role-row .r-label { flex: 1; }
.cmp-role-row .r-emoji { flex: 0 0 60px; text-align: center; }
.composer-preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: var(--s3); }
.cmp-stage { background: #313338; border-radius: var(--r-md); padding: 16px 16px 18px; }
.cmp-msg { display: flex; gap: 14px; }
.cmp-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 0; background: radial-gradient(circle at 50% 50%, var(--accent) 0 30%, #0c0c0c 31%); }
.cmp-msg-body { flex: 1; min-width: 0; }
.cmp-msg-name { color: #f2f3f5; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.cmp-bot { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.cmp-time { color: #949ba4; font-size: 11.5px; font-weight: 400; }
.cmp-empty { color: #949ba4; font-style: italic; font-size: 13.5px; }
.cmp-msg-content { white-space: pre-wrap; margin-bottom: 6px; color: #dbdee1; font-size: 14px; overflow-wrap: anywhere; }
.cmp-msg-content:empty { display: none; }
.cmp-embed { position: relative; display: flex; background: #2b2d31; border-radius: 4px; overflow: hidden; max-width: 460px; }
.cmp-embed-bar { width: 4px; flex: 0 0 4px; background: var(--accent); }
.cmp-embed-body { padding: 10px 14px 12px; flex: 1; min-width: 0; }
.cmp-pv-author { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.cmp-pv-title { font-size: 15.5px; font-weight: 700; color: #f2f3f5; margin-bottom: 6px; overflow-wrap: anywhere; }
.cmp-pv-linked { color: #00a8fc !important; cursor: pointer; }
.cmp-pv-linked:hover { text-decoration: underline; }
.cmp-url-help { color: #ffd25c; }
.cmp-pv-desc { font-size: 13.5px; color: #dbdee1; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmp-pv-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.cmp-pv-fields:empty { display: none; }
.cmp-pv-field { flex: 1 1 100%; display: flex; flex-direction: column; font-size: 13px; color: #dbdee1; min-width: 0; }
.cmp-pv-field.inline { flex: 1 1 28%; }
.cmp-pv-field b { color: #f2f3f5; font-size: 13px; }
.cmp-pv-image { max-width: 100%; border-radius: 4px; margin-top: 10px; display: block; }
.cmp-pv-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; margin: 12px 12px 0 0; flex: 0 0 72px; }
.cmp-pv-footer { font-size: 12px; color: #b5bac1; margin-top: 8px; }
.cmp-pv-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmp-pv-buttons:empty { display: none; }
.cmp-pv-btn { background: #4e5058; color: #fff; border-radius: 4px; padding: 6px 14px; font-size: 13px; font-weight: 600; }

/* ── mini-player ── */
.mini {
  position: fixed; right: 22px; bottom: 18px; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  background: rgba(8, 8, 8, 0.96); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 0;
  padding: 7px 8px 7px 8px; box-shadow: var(--shadow);
  max-width: min(400px, calc(100vw - 32px));
}
.mini img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 0; object-fit: cover; }
.mini-meta { min-width: 0; flex: 1; cursor: pointer; padding: 0 4px 0 6px; }
.mini-title { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini button { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 0; }
.mini button:hover { border-color: var(--accent); }

/* ── palette ── */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(6, 6, 6, 0.6); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.palette-box { width: min(480px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.palette-box input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; height: 50px; font-size: 15px; padding: 0 16px; }
.palette-list { display: flex; flex-direction: column; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list button { background: transparent; border: none; border-radius: var(--r-sm); padding: 9px 12px; text-align: left; }
.palette-list button:hover, .palette-list button.sel { background: var(--panel-2); color: var(--accent-2); }
.palette-empty { color: var(--muted); padding: 12px; font-size: 13px; }

/* ── toasts ── */
#notice { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--r-sm); padding: 10px 16px; box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s; }
.toast.in { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--warn); }
body.has-mini #notice { bottom: 84px; }

/* ── server picker ── */
body.picking .sidenav, body.picking .side-foot, body.picking .kbd-hint { display: none; }
.picker { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 140px); max-width: 720px; margin: 0 auto; padding: 20px 0 60px; }
.picker-head { text-align: center; margin-bottom: 28px; }
.picker-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.picker-title { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 4vw, 38px); letter-spacing: -0.8px; line-height: 1.15; }
.picker-sub { color: var(--muted); font-size: 14px; margin-top: 10px; }
.picker-list { display: flex; flex-direction: column; gap: 12px; }
.gp-item { display: flex; align-items: center; gap: 18px; width: 100%; padding: 16px 20px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, transform .15s, background .15s; }
.gp-item:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-2px); }
.gp-icon { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 0; object-fit: cover; background: var(--bg-soft); }
.gp-icon-fallback { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--accent); }
.gp-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.gp-name { font-family: var(--display); font-weight: 800; font-size: clamp(17px, 2.2vw, 22px); letter-spacing: -0.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-role { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.gp-go { font-size: 22px; color: var(--muted); }
.gp-item:hover .gp-go { color: var(--accent); }

/* ── number stepper ── */
.num { position: relative; display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle; flex: 0 0 auto; }
.num > input[type="number"] { padding-right: 26px; }
.fld > .num { align-self: flex-start; }
.num-steps { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 14px; height: 24px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.num-steps button { flex: 1; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: var(--r-sm); padding: 0; pointer-events: auto; }
.num-steps button:hover { background: var(--panel-2); }
.num-steps button::before { content: ''; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
.num-up::before { border-bottom: 4px solid var(--muted); }
.num-down::before { border-top: 4px solid var(--muted); }
.num-steps button:hover::before { border-bottom-color: var(--accent-2); border-top-color: var(--accent-2); }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--r-sm); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-hover); }

/* ════════════ responsive ════════════ */
@media (max-width: 1180px) {
  .composer-wrap { grid-template-columns: 1fr; }
  .composer-preview { position: static; }
}
@media (max-width: 1000px) {
  .now { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
  .art-wrap { width: 170px; }
  .np-title { font-size: 22px; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 262px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(6, 6, 6, 0.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .hamburger { display: inline-flex; }
  .content { padding: 0 var(--s4) 96px; }
  :root { --gap: 16px; --fld-gap: 18px; }
  .card-head { padding: var(--s3) var(--s4); }
  .card-body { padding: var(--s4); }
  .kbd-hint { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .now { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .art-wrap { width: 100%; max-width: 280px; margin: 0 auto; }
  .np-meta { text-align: center; align-items: center; }
  .badges { justify-content: center; }
  .progress { width: 100%; }
  .transport { flex-direction: column; align-items: stretch; width: 100%; }
  .transport-main { justify-content: center; }
  .vol { justify-content: center; }
  .vol input[type="range"] { flex: 1; width: auto; max-width: 260px; }
  .search { flex-direction: column; }
  .search input { flex: none; }
  .search .btn-primary { width: 100%; }
  .toggles .ctl.wide { flex: 1 1 auto; justify-content: center; }
  .push-right { margin-left: 0; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 22px; }
  .cmd-head { flex-wrap: wrap; gap: 10px; }
  .cmd-id { flex-basis: calc(100% - 100px); }
  .cmd-head .seg { order: 3; margin-left: 54px; }
  .cmd-detail { padding-left: 16px; }
  .cat-sum { display: none; }
  .row { flex-wrap: wrap; }
  .addform.rowform { width: 100%; justify-content: flex-end; }
  .case-row .tag { width: auto; }
  .row-side { width: 100%; text-align: left; padding-left: 52px; display: flex; gap: 8px; }
  .stat-name { width: 120px; flex-basis: 120px; }
  .stat-name.wide + .stat-bar { display: none; }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-field { flex-wrap: wrap; }
  .cmp-field .f-name, .cmp-field .f-value { flex: 1 1 100%; }
  .cmp-role-row { flex-wrap: wrap; }
  .cmp-role-row select { flex: 1 1 100%; }
  .guild-select select { max-width: 150px; }
  .userbox #userName { display: none; }
  .mini { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .gp-item { gap: 14px; padding: 14px 16px; }
  .gp-icon { width: 48px; height: 48px; flex-basis: 48px; }
  .w-md { width: 100% !important; flex: 1 1 100% !important; }
  .addform > input, .addform > select { flex: 1 1 100%; }
  .addform .btn-primary { width: 100%; }
  .addform.rowform .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── owner tools ── */
.ov-tile.warn .ov-num { color: var(--warn); }
.bot-strip { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; padding: var(--s3) var(--s4); margin-bottom: var(--s6); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12.5px; color: var(--muted); }
.bot-strip b { color: var(--text); }
.srv-list { padding: var(--s2) var(--s5); }
.srv-list .row:first-child { padding-top: var(--s3); }
.srv-list .row:last-child { padding-bottom: var(--s3); }
.av-lg { width: 44px; height: 44px; flex: 0 0 44px; font-size: 16px; }
.srv-stats { display: flex; gap: var(--s5); flex: 0 0 auto; }
.srv-stats div { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; }
.srv-stats b { font-variant-numeric: tabular-nums; }
.srv-stats span { font-size: 11px; color: var(--muted); }
.srv-actions { display: flex; gap: var(--s2); flex: 0 0 auto; }
.btn-danger:hover { border-color: var(--red); color: var(--red); background: rgba(255, 59, 92, 0.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill-live { color: var(--good); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.warn-text { color: var(--warn); font-size: 12.5px; }
.resolved { min-height: var(--ctl-h); display: flex; flex-direction: column; justify-content: center; font-size: 13.5px; }
.pick-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); }
.pick { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line-soft); font-weight: 500; cursor: pointer; }
.pick:last-child { border-bottom: none; }
.pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.disabled { opacity: .45; cursor: not-allowed; }
#bcPick { display: flex; flex-direction: column; gap: var(--s3); }
#bcPick[hidden] { display: none; }
details.plan > summary { cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; display: flex; gap: var(--s2); align-items: center; }
details.plan > summary::-webkit-details-marker { display: none; }
details.plan > summary::before { content: '▸'; color: var(--accent); transition: transform .18s; }
details.plan[open] > summary::before { transform: rotate(90deg); }
details.plan > .list { margin-top: var(--s3); max-height: 280px; overflow-y: auto; }
.meter { height: 8px; background: var(--bg-soft); border-radius: 0; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0; transition: width .3s; }
#bcFailures:empty { display: none; }
.hist-row .btn-row { gap: var(--s1); }
.cmp-pv-btn.link { background: #4e5058; }
.composer-preview > .card { margin-top: var(--s3); }
@media (max-width: 900px) {
  .srv-row { flex-wrap: wrap; }
  .srv-row .row-main { flex: 1 1 calc(100% - 60px); }
  .srv-row .row-sub { white-space: normal; }
  .srv-stats { order: 3; margin-left: 56px; }
  .srv-stats div { align-items: flex-start; }
  .srv-actions { order: 4; width: 100%; padding-left: 56px; }
  .srv-actions .btn { flex: 1 1 0; }
}
@media (max-width: 720px) {
  .srv-list { padding: var(--s1) var(--s4); }
  .srv-stats { margin-left: 56px; }
  .srv-actions { padding-left: 0; }
  .page-head-row { flex-direction: column; gap: 0; }
  .page-head-row .btn { margin: 0 0 var(--s4); }
}

/* ── vetting ── */
.page-tabs { margin-bottom: var(--s5); }
.page-tabs .dot-err { display: inline-block; width: 7px; height: 7px; border-radius: 0; background: var(--red); margin-left: 4px; vertical-align: middle; }
.ov-tile.warn { border-color: rgba(255, 210, 92, 0.35); }
.vet-queue { display: flex; flex-direction: column; gap: var(--s4); }
.vet-app { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); display: flex; flex-direction: column; }
.vet-app-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.vet-app-head .av { width: 38px; height: 38px; flex-basis: 38px; }
.vet-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qa-list { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); }
.qa-q { font-size: 12px; font-weight: 700; color: var(--muted); }
.qa-a { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa-a.muted { font-style: italic; }
.vet-held { padding: 0 var(--s4) var(--s4); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vet-held .eyebrow { margin-right: 4px; }
.vet-app-actions { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.vet-app-actions .vet-deny { flex: 1 1 280px; }
.btn-good { background: #2f9a55; border-color: #2f9a55; }
.btn-quiet-link { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet-link:hover { text-decoration: none; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.ck { display: flex; gap: var(--s3); align-items: flex-start; font-size: 13.5px; }
.ck > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.ck b { font-weight: 600; }
.ck-ico { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; margin-top: 1px; }
.ck-ok .ck-ico { background: rgba(52, 211, 153, 0.15); color: var(--good); }
.ck-warn .ck-ico { background: rgba(255, 210, 92, 0.15); color: var(--warn); }
.ck-error .ck-ico { background: rgba(255, 59, 92, .1); color: var(--red); }
.access-state { font-family: var(--display); font-weight: 800; font-size: 15px; }
.access-state.good { color: var(--good); }
.access-state.bad { color: #ff6b84; }
.q-row { align-items: center; }
.q-row .addform.rowform { flex: 1 1 auto; min-width: 0; }
.q-move { display: flex; flex: 0 0 auto; }
.q-move .icon-btn { width: 28px; flex-basis: 28px; }
.icon-sp { display: inline-block; width: 28px; }
@media (max-width: 720px) {
  .vet-badges { justify-content: flex-start; width: 100%; }
  .q-row { flex-wrap: wrap; }
  .q-row .addform.rowform { flex-wrap: wrap; width: 100%; order: 3; }
  .vet-app-actions > * { width: 100%; }
  .vet-app-actions .addform.rowform { flex-wrap: nowrap; }
}
.vet-app-head .row-sub { white-space: normal; }

/* ── live alerts ── */
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: var(--s3); font-size: 13.5px; line-height: 1.6; }
.steps pre { margin-top: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12.5px; }
.pill-live-red { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.1); margin-left: 6px; }
.la-row .row-title a { color: var(--text); }
.la-row .pill-warn { margin-left: 6px; }
.la-platform { margin-left: 6px; font-weight: 600; }
.la-twitch { color: #b794ff; border-color: rgba(145, 70, 255, 0.45); background: rgba(145, 70, 255, 0.12); }
.la-youtube { color: #ff7a8c; border-color: rgba(255, 0, 51, 0.4); background: rgba(255, 0, 51, 0.1); }
.la-kick { color: #7dfc4d; border-color: rgba(83, 252, 24, 0.35); background: rgba(83, 252, 24, 0.08); }
.la-tiktok { color: #ff7d98; border-color: rgba(254, 44, 85, 0.4); background: rgba(254, 44, 85, 0.1); }
.la-setup { margin-top: 12px; border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: var(--r-sm); padding: 8px 12px; }
.la-setup summary { cursor: pointer; font-weight: 600; }
.la-setup summary small { font-weight: 400; opacity: 0.75; }

/* Server audit: readable, compact diagnostics alongside existing settings. */
.audit-issues { display: grid; gap: 9px; margin: 10px 0 0; padding-left: 20px; }
.audit-issues li { color: var(--text); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.audit-issues b { font-weight: 650; }

/* v1.9.1 — refinement of existing surfaces, not additional dashboard features.
   Keep controls comfortable at laptop/mobile sizes, with clearer focus and
   stronger hierarchy between headings, help text and editable values. */
header.topbar { border-bottom-color: var(--line-soft); }
.sidenav button { min-height: 34px; }
.sidenav button.active { font-weight: 700; }
.sidenav button:focus-visible { outline-offset: -2px; }
.card { transition: border-color .16s ease; }
.card:focus-within { border-color: var(--line-hover); }
.card-head h3 { line-height: 1.4; }
.card-hint, .page-hint, .help { text-wrap: pretty; }
.card-body .fld > label { color: var(--text); }
.card-status { font-variant-numeric: tabular-nums; }
.ov-tile { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.ov-num { line-height: 1.2; }
.ov-lbl { line-height: 1.5; }
.q-item { transition: background-color .12s ease; }
.q-item:focus-within { background: var(--panel-2); }
.q-rm { width: 34px; height: 34px; flex-basis: 34px; }
.q-rm:focus-visible { border-color: var(--red); }
.q-title, .q-artist { min-width: 0; }
.queue .empty { margin-top: 6px; }
.toast { max-width: min(460px, calc(100vw - 32px)); line-height: 1.45; text-wrap: pretty; }
@media (max-width: 560px) {
  header.topbar { gap: 7px; }
  .topbar-right { gap: 6px; }
  .guild-select { max-width: min(205px, calc(100vw - 112px)); }
  .guild-select select { max-width: min(145px, calc(100vw - 170px)); }
  .content { padding-left: 12px; padding-right: 12px; }
  .ov-tile { flex-basis: calc(50% - 8px); padding: 14px 10px; }
  .ov-num { font-size: 22px; }
  .q-item { gap: 8px; padding: 8px 4px; }
  .q-art { width: 36px; height: 36px; flex-basis: 36px; }
  .q-idx { width: 18px; flex-basis: 18px; }
  .q-dur { font-size: 11px; }
  .card-head { gap: 8px; }
  .card-head h3 { font-size: 13px; }
}

/* v1.9.3 — existing command navigation and queue reordering refinements. */
.queue-hint { margin: -4px 0 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.q-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--panel-2); }
.mgr-filter-status { color: var(--muted); font-size: 12px; white-space: nowrap; align-self: center; font-variant-numeric: tabular-nums; }
.mgr-filter-status:empty { display: none; }
@media (max-width: 560px) {
  .queue-hint { font-size: 11px; }
  .mgr-filter-status { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   v1.9.6 — Experience polish. Shared visual language for existing pages.
   No additional interfaces, data requests, commands, or animation loops.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --surface-sheen: rgba(255,255,255,.025);
  --hairline: rgba(255,255,255,.055);
  --focus-ring: rgba(255, 255, 255, .15);
}
/* Deliberately quiet iconography: one stroke size and one accent system. */
.side { gap: 20px; padding: 24px 13px 18px; background: linear-gradient(175deg,#080808 0%,#070707 64%,#060606 100%); }
.side .brand { padding: 1px 11px 18px; margin-bottom: 0; border-bottom: 1px solid var(--hairline); letter-spacing: -.4px; }
.side .brand .dot { width: 10px; height: 10px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .11); animation: none; }
.side .brand small { opacity: .72; font-size: 10px; letter-spacing: 1.7px; }
.sidenav { gap: 2px; padding-bottom: 10px; scrollbar-gutter: stable; }
.sidenav .nav-label { font-size: 10px; letter-spacing: 1.55px; margin: 21px 13px 7px; color: #6e6e6e; }
.sidenav .nav-label:first-of-type { margin-top: 18px; }
.sidenav button { min-height: 39px; padding: 8px 11px; gap: 12px; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 12.8px; line-height: 1.3; font-weight: 500; color: #a3a3a3; }
.sidenav button:hover { background: rgba(255,255,255,.055); color: var(--text); border-color: var(--hairline); }
.sidenav button.active { background: linear-gradient(90deg,rgba(255, 255, 255, .18),rgba(255, 255, 255, .045)); border-color: rgba(255, 255, 255, .20); box-shadow: inset 2px 0 0 var(--accent); color: #ffffff; font-weight: 700; }
.nav-ico { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; align-items: center; justify-content: center; color: #8a8a8a; }
.nav-svg { display:block; width: 18px; height: 18px; flex-shrink: 0; }
.sidenav button:hover .nav-ico { color: var(--text); }
.sidenav button.active .nav-ico { color: #ffffff; }
.side-foot { border-top: 1px solid var(--hairline); padding: 16px 12px 0; font-size: 10px; letter-spacing: .8px; }

/* Stronger page hierarchy, softer component borders, better use of space. */
.content { max-width: 1400px; }
header.topbar { min-height: 67px; margin-bottom: 17px; background: rgba(6, 6, 6, .92); }
.crumb { font-size: 12px; font-weight: 700; letter-spacing: .45px; text-transform: none; color: #bdbdbd; }
.page-title { font-size: clamp(23px,2.15vw,30px); letter-spacing: -.8px; margin: 4px 0 7px; }
.page-hint { font-size: 13px; line-height: 1.65; color: #8a8a8a; margin-bottom: 23px; }
.section-title { font-size: 18px; }
.section-head { margin-top: 27px; }
.card, .now, .ov-tile { background: linear-gradient(160deg,rgba(255,255,255,.025),transparent 54%),var(--panel); }
.card { border-color: #232323; box-shadow: 0 8px 22px -21px #000; }
.card:focus-within { border-color: #4a4a4a; }
.card-head { min-height: 59px; padding: 14px 20px; background: rgba(255,255,255,.012); }
.card-head h3 { font-family: var(--body); font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.card-body { padding: 20px; }
.card-hint { line-height: 1.65; }
.card-head .card-status.saving { color: #8a8a8a; }
.card-head .card-status.ok { color: var(--good); }
.card-head .card-status.err { color: #ff6b84; }
.fld label, .card-body .fld > label { font-size: 12.5px; font-weight: 650; }
.help { line-height: 1.55; }
input[type="text"],input[type="url"],input[type="password"],input[type="number"],input[type="search"],input:not([type]),select,textarea { border-color: #2a2a2a; background-color: #0b0b0b; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--focus-ring); }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.19); }
.btn:hover { background-color: #1c1c1c; }
.btn:active, .btn-primary:active, .btn-quiet:active { transform: translateY(1px); }
.btn:disabled, .btn-primary:disabled { transform: none; box-shadow: none; }
.seg { border-color: #232323; }
.seg button.active { box-shadow: 0 1px 6px rgba(0,0,0,.2); }
.sw-row { border-radius: var(--r-sm); }

/* Overview metrics: align their information and emphasize the values. */
.ov-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.ov-tile { text-align: left; padding: 20px 21px 18px; min-height: 106px; border-color: #232323; justify-content: center; }
.ov-num { font-size: clamp(23px,2.25vw,30px); font-weight: 800; letter-spacing: -.9px; line-height: 1.15; }
.ov-lbl { margin-top: 9px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: .1px; color: #8a8a8a; }
.ov-hero { background: linear-gradient(90deg,rgba(255, 255, 255, .105),rgba(255, 255, 255, .035)); }

/* Music console: one cohesive player with clearer control hierarchy. */
.now { position: relative; border-color: #232323; padding: 23px; gap: 25px; box-shadow: 0 20px 36px -35px #000; overflow: hidden; }
.now::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg,var(--accent),rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.art-wrap { box-shadow: 0 12px 27px -18px rgba(0,0,0,.9); }
.np-eyebrow { font-size: 10px; letter-spacing: 1.5px; }
.np-title { letter-spacing: -.65px; }
.np-sub { font-size: 13px; color: #8a8a8a; }
.progress { gap: 13px; }
.bar { height: 7px; background: #101010; }
.bar:hover { height: 9px; }
.fill { background: linear-gradient(90deg,#bdbdbd,#ffffff); }
.ctl { border-color: #2a2a2a; background: #121212; }
.ctl:hover { background: #1c1c1c; border-color: #8a8a8a; }
.ctl.primary { box-shadow: 0 5px 18px -9px rgba(255, 255, 255, .88); }
.search input { background: #0b0b0b; }
.q-item { min-height: 58px; padding: 9px 12px; border-radius: var(--r-sm); }
.q-item:hover { background: rgba(255,255,255,.035); }
.q-art { border-radius: var(--r-sm); }
.q-title { font-size: 13.5px; }
.q-artist { color: #8a8a8a; }
.mini { border-color: #2f2f2f; box-shadow: 0 12px 38px rgba(0,0,0,.34); }

/* Clearer status, management lists, command controls, and empty states. */
.row { min-height: 50px; }
.row:hover:not(.card-head) { background: rgba(255,255,255,.016); }
.cmd-head { min-height: 53px; }
.cmd-head:hover { background: rgba(255,255,255,.025); }
.mgr-toolbar { gap: 10px; }
.empty { background: rgba(255,255,255,.012); padding: 28px 18px; line-height: 1.65; }
.banner { border-color: #232323; }
.pill { border-color: #2a2a2a; }
.toast { border-radius: var(--r-sm); padding: 12px 16px; background: #111111; font-size: 13px; }
.palette-box { border-radius: var(--r-sm); border-color: #2f2f2f; }
.palette-list button.sel { background: rgba(255, 255, 255, .15); color: #ffffff; }
.gp-item { box-shadow: 0 13px 26px -26px #000; }
.gp-item:hover { transform: translateY(-1px); }
@media (max-width: 1140px) { .ov-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) {
  .side { padding: 22px 12px 16px; }
  .content { padding-left: 18px; padding-right: 18px; }
  header.topbar { min-height: 58px; }
}
@media (max-width: 620px) {
  .ov-grid { gap: 9px; }
  .ov-tile { min-height: 88px; padding: 15px 13px; }
  .ov-num { font-size: 23px; }
  .ov-lbl { font-size: 10.5px; margin-top: 4px; }
  .card-head { padding: 13px 15px; }
  .card-body { padding: 15px; }
  .now { padding: 16px; }
  .q-item { padding: 8px 6px; }
}
@media (max-width: 350px) { .ov-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .btn:active,.btn-primary:active,.btn-quiet:active { transform: none; } }
/* ── Spacing & rhythm pass (v1.9.42, every page) ─────────────────
   One spacing scale: 6px inside fields, 16px between fields, 18px between
   cards, 20px card padding. Controls fill their field; empty states and
   add-forms no longer stack two dashed boxes. */
.page-title { margin: 4px 0 6px; }
.page-hint { margin-bottom: 22px; }
.grid-2 { gap: 18px; }
.grid-2 + .grid-2, .grid-2 + .card, .card + .grid-2 { margin-top: 18px; }
.card { border-radius: var(--r-sm); }
.card-head { padding: 13px 20px; min-height: 52px; gap: 10px; }
.card-head h3 { font-size: 14.5px; letter-spacing: -0.1px; }
.card-body { padding: 18px 20px 20px; gap: 16px; }
.card-body > .card-hint:first-child { margin-top: -2px; }
.card-hint { font-size: 12.8px; }
.fld { gap: 6px; }
.fld > label { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: 0.1px; }
.help { line-height: 1.45; }
.card-body .fld > select, .card-body .fld > input[type="text"]:not([class*="w-"]), .card-body .fld > input[type="url"],
.card-body .fld > input[type="password"], .card-body .fld > textarea { width: 100%; max-width: 100%; }
.card.span-2 > .card-body > .fld > select, .card.span-2 > .card-body > .fld > input[type="text"]:not([class*="w-"]),
.card.span-2 > .card-body > .fld > input[type="url"] { max-width: 520px; }
.card-body > .fld > select { max-width: 100%; }
.cols-2, .cols-3 { gap: 16px 24px; }
.sw-row { padding: 2px 0; }
.empty { border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.01); padding: 20px 16px; font-size: 13px; border-radius: var(--r-md); }
.addform { border-style: solid; border-color: var(--line-soft); background: rgba(255, 255, 255, 0.018); padding: 10px; gap: 8px; }
.addform > input, .addform > select { min-width: 0; }
.list + .addform, .empty + .addform { margin-top: -2px; }
.row { padding: 11px 0; }
/* Stat tiles fill rows evenly (4 tiles = one row, not 3 + 1). */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 620px) { .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sidenav .nav-label { margin: 15px 13px 6px; }
.sidenav button { min-height: 32px; }
@media (max-width: 720px) {
  .card-head { padding: 12px 16px; }
  .card-body { padding: 16px; gap: 14px; }
  .card.span-2 > .card-body > .fld > select, .card.span-2 > .card-body > .fld > input[type="text"]:not([class*="w-"]) { max-width: 100%; }
}

/* ── Rust+ command center ─────────────────────────────────────────
   Built on the shared card/row/pill system. Status colours: --good live/healthy,
   --warn low, --accent critical/expired. */
.rust-command-center { display: flex; flex-direction: column; gap: var(--gap); }
.rust-command-center > .grid-2 { margin-top: 0; }
.rust-server-block .grid-2 { align-items: start; }
.rust-server-block .card, .rust-command-center .card { min-width: 0; }

/* connection strip */
.rust-conn { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.rust-conn-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); flex: 1 1 520px; }
.rust-conn-stats > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.rust-conn-stats b { font-family: var(--display); font-size: 18px; font-weight: 800; min-width: 18px; text-align: center; color: var(--muted); }
.rust-conn-stats b.ok { color: var(--good); }
.rust-conn-stats span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.rust-conn-action { flex: 0 0 auto; }

/* disclosures */
.rust-disclosure > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.rust-disclosure > summary::-webkit-details-marker { display: none; }
.rust-disclosure > summary::before { content: '▸'; color: var(--accent); transition: transform .18s; }
.rust-disclosure[open] > summary::before { transform: rotate(90deg); }
.rust-disclosure > summary:hover { color: var(--text); }
.rust-disclosure[open] > summary { margin-bottom: var(--s3); }
.rust-setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
.rust-setup-steps > div { display: flex; gap: 11px; align-items: flex-start; padding: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); }
.rust-setup-steps strong, .rust-setup-steps small { display: block; }
.rust-setup-steps small { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.rust-step-num { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 0; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 12.5px; }

/* server tabs */
.rust-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); align-self: flex-start; max-width: 100%; }
.rust-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rust-tabs button:hover { color: var(--text); }
.rust-tabs button[aria-selected="true"] { background: var(--panel-2); border-color: var(--line-hover); color: var(--text); }
.rust-tab-dot { width: 8px; height: 8px; border-radius: 0; background: var(--line-hover); flex: 0 0 8px; }
.rust-tab-dot.on { background: var(--good); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15); }

/* hero */
.rust-hero .card-head h3 { font-size: 16px; }
.rust-hero .card-hint code.rust-connect { user-select: all; }
.rust-metrics.ov-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); margin: 0; }
.rust-metrics .ov-tile { background: var(--bg-soft); padding: 14px 10px 12px; }
.rust-metrics .ov-num { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rust-metrics .ov-num small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.rust-metrics .ov-lbl { text-transform: none; letter-spacing: 0.2px; font-size: 12px; }
.rust-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.rust-insights > div { padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.rust-insights span, .rust-insights strong { display: block; overflow-wrap: anywhere; }
.rust-insights span { font-size: 11.5px; }
.rust-insights strong { margin-top: 3px; font-size: 13.5px; font-weight: 600; }
.rust-events { display: flex; gap: 6px; flex-wrap: wrap; }

/* rows */
.rust-server-block .row { gap: 10px; }
.rust-server-block .row-side { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.rust-left b { font-family: var(--display); font-size: 15px; font-variant-numeric: tabular-nums; }
.rust-left small { font-size: 11px; }
.rust-ico { width: 26px; flex: 0 0 26px; text-align: center; font-size: 16px; }
.rust-dot { width: 10px; height: 10px; border-radius: 0; flex: 0 0 10px; margin: 0 8px 0 8px; background: var(--line-hover); }
.rust-tc.stage-0 .rust-dot, .rust-member.online .rust-dot { background: var(--good); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14); }
.rust-tc.stage-1 .rust-dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 210, 92, 0.14); }
.rust-tc.stage-2 .rust-dot, .rust-tc.stage-3 .rust-dot, .rust-member.dead .rust-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.16); }
.rust-tc.stage-1 .rust-left b { color: var(--warn); }
.rust-tc.stage-2 .rust-left b, .rust-tc.stage-3 .rust-left b { color: var(--red); }
.rust-member.offline .row-title { color: var(--muted); }
.rust-meter { height: 4px; margin-top: 7px; max-width: 260px; background: var(--bg-soft); border-radius: 0; overflow: hidden; }
.rust-meter span { display: block; height: 100%; background: var(--good); border-radius: 0; }
.rust-tc.stage-1 .rust-meter span { background: var(--warn); }
.rust-tc.stage-2 .rust-meter span, .rust-tc.stage-3 .rust-meter span { background: var(--red); }
.rust-grid { display: inline-block; min-width: 40px; padding: 3px 8px; border-radius: var(--r-sm); background: var(--bg-soft); border: 1px solid var(--line); font: 600 12px ui-monospace, 'Cascadia Code', Consolas, monospace; text-align: center; }
.rust-server-block .row-title .pill { height: 20px; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
.rust-seg { flex: 0 0 auto; }
.rust-seg button.active.is-off { background: var(--panel-2); color: var(--text); }
/* Keep status, countdown and remove button on the row even when the global mobile rule wraps rows. */
.rust-server-block .row { flex-wrap: nowrap; }
.rust-server-block .row-main { min-width: 0; }
.rust-server-block .row-side { width: auto; padding-left: 0; flex: 0 0 auto; gap: 0; }

/* team chat */
.rust-chat { display: flex; flex-direction: column; gap: 2px; max-height: 300px; min-height: 120px; overflow-y: auto; padding: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); scrollbar-width: thin; }
.rust-msg { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 5px 6px; border-radius: var(--r-sm); font-size: 13px; }
.rust-msg:hover { background: rgba(255, 255, 255, 0.025); }
.rust-msg-who { font-weight: 700; color: var(--good); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.rust-msg.from-discord .rust-msg-who { color: var(--accent-2); }
.rust-msg-text { overflow-wrap: anywhere; min-width: 0; }
.rust-msg time { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rust-chat-empty { margin: auto; color: var(--muted); font-size: 13px; }
.rust-chatcard .addform input[disabled] { opacity: .6; }

/* settings */
.rust-settings-card .addform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-items: start; background: none; border: none; padding: 0; }
.rust-settings-card .addform .fld { min-width: 0; width: 100%; }
.rust-settings-card .addform .fld input, .rust-settings-card .addform .fld select { width: 100%; max-width: 100%; }
.rust-settings-card .addform input[type="hidden"] { display: none; }
.rust-settings-card .addform .add-btn { justify-self: start; grid-column: 1 / -1; }
/* Discord /rust command access (v1.9.49) */
.rust-access-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s3); }
.rust-access-top .fld { flex: 1 1 260px; max-width: 420px; margin: 0; }
.rust-access-presets { align-items: center; gap: var(--s2); margin: 0; }
.rust-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.rust-access-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-sm); min-width: 0; }
.rust-access-row select { flex: 0 0 auto; width: 190px; max-width: 48%; }
.rust-access-cmd { display: flex; flex-direction: column; min-width: 0; }
.rust-access-cmd code { align-self: flex-start; }
.rust-access-row.is-custom { border-left: 3px solid var(--accent); padding-left: calc(var(--s3) - 2px); }
.rust-access-cmd small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rust-access-row.is-off .rust-access-cmd { opacity: .5; }
@media (max-width: 760px) { .rust-access-grid { grid-template-columns: 1fr; } }
.rust-toggles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s4); }
.rust-toggle { padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); }
.rust-toggle:hover { border-color: var(--line-hover); }
.rust-diag { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.rust-diag > div { padding: 9px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.rust-diag span, .rust-diag b { display: block; }
.rust-diag span { font-size: 11px; }
.rust-diag b { font-variant-numeric: tabular-nums; font-size: 13.5px; margin-top: 2px; }
.rust-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: var(--s4); border-top: 1px solid var(--line-soft); }
.rust-settings-card .card-hint code { word-break: break-all; }

/* command reference */
.rust-command-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rust-command-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.rust-command-grid code { align-self: flex-start; font-size: 12.5px; color: var(--text); }
.rust-command-grid span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.rust-command-grid small { display: block; font-size: 11px; opacity: .8; }
.rust-commands .eyebrow { margin-top: var(--s2); }

@media (max-width: 1180px) { .rust-metrics.ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .rust-conn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rust-setup-steps, .rust-insights, .rust-toggles, .rust-settings-card .addform { grid-template-columns: 1fr; }
  .rust-diag { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .rust-metrics.ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rust-metrics .ov-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rust-server-block .row:has(.rust-seg) { flex-wrap: wrap; }
  .rust-server-block .row:has(.rust-seg) .row-main { flex: 1 1 calc(100% - 80px); }
  .rust-msg { grid-template-columns: 1fr auto; }
  .rust-msg-text { grid-column: 1 / -1; grid-row: 2; }
  .rust-tabs { align-self: stretch; }
}

/* Rust+: live / settings sections */
.rust-subtabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0; }
.rust-subtabs button { height: 32px; padding: 0 20px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.rust-subtabs button:hover { color: var(--text); }
.rust-subtabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.rust-server-block > .rust-pane { margin-top: 0; }
.rust-form-card .addform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; align-items: start; background: none; border: 0; padding: 0; }
.rust-form-card .addform input[type="hidden"] { display: none; }
.rust-form-card .addform .add-btn { grid-column: 1 / -1; justify-self: start; }
.rust-route .fld > select, .rust-route .fld > input { width: 100%; }
.rust-route-main { grid-column: 1 / -1; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.rust-route-main .fld > select { max-width: 520px; }

/* Rust+: server card panel */
.rust-card-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 28px; align-items: start; }
.rust-card-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rust-card-side .addform { display: flex; flex-direction: column; align-items: stretch; gap: 14px; background: none; border: 0; padding: 0; }
.rust-card-side .addform .add-btn { align-self: flex-start; }
.rust-card-side .addform input[type="hidden"] { display: none; }
.rust-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); overflow-wrap: anywhere; }
.rust-card-preview { min-width: 0; }

/* Discord-style message preview */
.dc-msg { padding: 14px; background: #313338; border-radius: 12px; font-family: 'gg sans', 'Noto Sans', 'Segoe UI', system-ui, sans-serif; color: #dbdee1; font-size: 14px; line-height: 1.375; }
.dc-embed { display: flex; gap: 14px; padding: 10px 14px 14px 12px; background: #2b2d31; border-left: 4px solid #747d92; border-radius: 4px; max-width: 520px; }
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #f2f3f5; }
.dc-author img { width: 22px; height: 22px; border-radius: 50%; }
.dc-title { font-size: 16px; font-weight: 700; color: #f2f3f5; }
.dc-title a { color: #00a8fc; }
.dc-desc { font-size: 14px; overflow-wrap: anywhere; }
.dc-desc code, .dc-fval code { background: #1e1f22; border: 0; color: #dbdee1; font-size: 12.5px; padding: 1px 4px; border-radius: 3px; }
.dc-desc code.dc-block { display: block; margin: 6px 0 2px; padding: 7px 9px; white-space: pre-wrap; }
.dc-sub { display: block; font-size: 12px; color: #949ba4; }
.dc-time { background: rgba(255, 255, 255, 0.06); border-radius: 3px; padding: 0 3px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-top: 4px; }
.dc-field { grid-column: 1 / -1; min-width: 0; }
.dc-field.dc-inline { grid-column: auto; }
.dc-fname { font-size: 13.5px; font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dc-fval { font-size: 13.5px; overflow-wrap: anywhere; }
.dc-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; flex: 0 0 72px; }
.dc-image { width: 100%; border-radius: 6px; margin-top: 8px; }
.dc-footer { font-size: 12px; color: #949ba4; margin-top: 4px; }
.dc-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; background: #4e5058; color: #fff; border-radius: 4px; font-size: 14px; font-weight: 500; }
.dc-button:hover { background: #6d6f78; text-decoration: none; }

@media (max-width: 1180px) { .rust-card-layout { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .rust-form-card .addform { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .dc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-thumb { width: 52px; height: 52px; flex-basis: 52px; } }

/* Rust+: built to scale — fixed-height lists, counts, summaries */
.rust-count { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); font: 600 11.5px 'Space Grotesk', sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.rust-pane[data-pane="live"] { align-items: stretch; }
.rust-pane[data-pane="live"] > .card:not(.span-2) .card-body > .addform:last-child,
.rust-pane[data-pane="live"] > .card:not(.span-2) .card-body > .rust-foot-hint:last-child,
.rust-pane[data-pane="live"] > .card:not(.span-2) .card-body > .rust-disclosure:last-child { margin-top: auto; }
.rust-scroll { max-height: 336px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); }
.rust-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rust-scroll > .row:last-child, .rust-scroll .rust-group:last-of-type .row:last-child { padding-bottom: 18px; }
.rust-foot-hint { font-size: 12px; }
.rust-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.rust-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.rust-chip i { width: 7px; height: 7px; border-radius: 0; background: var(--good); }
.rust-chip.stage-1 i { background: var(--warn); } .rust-chip.stage-2 i, .rust-chip.stage-3 i { background: var(--accent); }
.rust-chip.stage-3 { color: var(--red); border-color: rgba(255, 59, 92, 0.4); }
.rust-group + .rust-group { margin-top: 6px; }
.rust-group-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 6px 0; background: var(--panel); font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.rust-group-head span { font-weight: 600; letter-spacing: 0; }
.rust-filter { width: 100%; }
.rust-nomatch { padding: 18px 0; text-align: center; color: var(--muted); font-size: 13px; }
.rust-grid.approx { color: var(--muted); border-style: dashed; }
.rust-server-block .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Rust+: slim connection bar */
.rust-connbar { padding: 12px 16px; gap: 10px; }
.rust-connbar .banner { margin: 0 0 4px; }
.rust-connbar .rust-conn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rust-conn-item { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rust-conn-item i { width: 8px; height: 8px; border-radius: 0; background: var(--line-hover); }
.rust-conn-item.ok { color: var(--text); }
.rust-conn-item.ok i { background: var(--good); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15); }
.rust-conn-item.warn i { background: #ffd25c; box-shadow: 0 0 0 3px rgba(255, 210, 92, 0.15); }
.rust-conn-item.bad { color: var(--text); }
.rust-conn-item.bad i { background: #ff3b5c; box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18); }
.rust-listener-problem { margin: 2px 0 0; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid rgba(255, 210, 92, 0.35); background: rgba(255, 210, 92, 0.08); color: var(--text); font-size: 12.5px; line-height: 1.45; }
.rust-conn-status { flex: 1 1 220px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.rust-conn-action { margin-left: auto; }
.rust-connbar .rust-disclosure > summary { font-size: 12.5px; }
.rust-connbar.needs-attention { border-color: rgba(255, 210, 92, 0.35); }
/* Rust+: Steam sign-in shown inside the dashboard */
.rust-signin-page { display: grid; gap: 8px; }
.rust-signin-page .card-hint { margin: 0; }
.rust-lv { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #0e0b12; max-width: 1000px; width: 100%; justify-self: center; transition: border-color .15s, box-shadow .15s; }
.rust-lv.is-focused { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rust-lv-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; color: var(--muted); }
.rust-lv-url { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--text); }
.rust-lv-reload { flex: 0 0 auto; width: 28px; height: 28px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; }
.rust-lv-reload:hover { border-color: var(--line-hover); }
.rust-lv-screen { position: relative; aspect-ratio: 1000 / 720; }
.rust-lv-canvas { display: block; width: 100%; height: 100%; cursor: default; opacity: 0; transition: opacity .2s; }
.rust-lv.is-live .rust-lv-canvas { opacity: 1; }
.rust-lv-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.rust-lv.is-live .rust-lv-wait { display: none; }
.rust-lv-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: rust-lv-spin .9s linear infinite; }
@keyframes rust-lv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rust-lv-spin { animation: none; } }
.rust-lv-keys { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; pointer-events: none; }

/* Rust+: Steam sign-in from the viewer's own browser */
.rust-signin { margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); }
.rust-signin-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rust-signin-steps strong { color: var(--text); }
.rust-signin-steps a { color: var(--accent-2); }
.rust-signin kbd { font: 600 11px ui-monospace, Consolas, monospace; padding: 1px 5px; border: 1px solid var(--line-hover); border-bottom-width: 2px; border-radius: var(--r-sm); color: var(--text); }
.rust-signin-form { display: flex; gap: 8px; align-items: stretch; }
.rust-signin-form textarea { flex: 1 1 auto; min-width: 0; resize: vertical; font: 12px ui-monospace, 'Cascadia Code', Consolas, monospace; }
.rust-signin .card-hint { margin: 8px 0 0; }
.rust-signin-done { margin: 0; color: var(--good); font-size: 13px; font-weight: 600; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; text-decoration: underline; cursor: pointer; }
.btn-link:hover { color: var(--text); }
@media (max-width: 620px) { .rust-signin-form { flex-direction: column; } }

/* Rust+: many servers — tabs scroll instead of wrapping */
.rust-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; align-self: stretch; }
.rust-tabs button { flex: 0 0 auto; max-width: 240px; }
.rust-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Rust+: commands reference collapses */
details.rust-commands > summary small { margin-left: 6px; }
details.rust-commands > .card-body { padding-top: 0; }
@media (max-width: 620px) {
  .rust-conn-action { margin-left: 0; width: 100%; }
  .rust-conn-action .btn { width: 100%; }
  .rust-scroll { max-height: 300px; }
}

/* Every settings-page list scales: scroll inside the card, count in the header, filter when long. */
.card-body > .list.list-scroll { max-height: 440px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; overscroll-behavior: contain; }
.card-body > .list.list-scroll.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); padding-bottom: 14px; }
.list-count { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 0; background: var(--bg-soft); border: 1px solid var(--line); font: 600 11.5px 'Space Grotesk', sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-body > .list-filter { width: 100%; max-width: none; }
.list-none { padding: 18px 0; text-align: center; color: var(--muted); font-size: 13px; }
.tokens { max-height: 210px; overflow-y: auto; scrollbar-width: thin; }
.case-more { display: block; margin: 14px auto 0; }
.rust-conn-privacy { flex: 1 1 100%; order: 10; font-size: 12px; color: var(--muted); }
.rust-conn-privacy.is-private { color: var(--text); }

/* Welcome / goodbye: picture, card options and the Discord-style preview */
.greet-image-row { gap: 8px; flex-wrap: wrap; }
.greet-image-row .grow { flex: 1 1 220px; min-width: 0; }
.greet-upload { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); }
.greet-upload img { width: 120px; height: 68px; object-fit: cover; border-radius: var(--r-sm); background: #1e1f22; flex: none; }
.greet-upload .help { margin: 2px 0 8px; }
.greet-upload-status.err { color: #ff6b84; }
.greet-preview .greet-ping { margin-bottom: 6px; }
.greet-preview .greet-embed { position: relative; display: flex; gap: 12px; max-width: 432px; background: #2b2d31; border-left: 4px solid #747d92; border-radius: 4px; padding: 10px 12px; white-space: normal; }
.greet-preview .greet-embed .dc-main { flex: 1; min-width: 0; }
.greet-preview .dc-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; overflow-wrap: anywhere; }
.greet-preview .dc-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.greet-preview .dc-image { display: block; max-width: 100%; max-height: 260px; border-radius: 6px; margin-top: 8px; }
.greet-preview > .dc-image { max-width: min(100%, 400px); }
.greet-preview .greet-image-only { margin-top: 6px; padding: 8px; }
.greet-preview .greet-image-only .dc-image { margin-top: 0; }
.greet-preview .greet-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: #5865f2; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; }
.greet-preview .help { margin: 8px 0 0; }
.greet-test-hint { font-size: 12px; }

/* Timed messages */
.tm-row.is-off .row-title, .tm-row.is-off .row-sub { opacity: 0.6; }
.tm-row .pill { margin-left: 6px; }
.tm-editor { margin-top: var(--gap); }
.tm-editor [hidden] { display: none !important; }
.tm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-problem { color: #ffd25c; font-size: 13px; }
.tm-msg { display: flex; flex-direction: column; gap: 8px; }
.tm-msg .tm-text { white-space: normal; overflow-wrap: anywhere; }
.tm-when-preview { margin: 0; }
.tm-field .f-inline { margin: 0; }

/* Custom badges */
.cb-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); }
.cb-item + .cb-item { margin-top: 8px; }
.cb-item > .row { border: 0; background: none; }
.cb-item.is-off .row-title, .cb-item.is-off .row-sub, .cb-item.is-off .ach-emoji { opacity: 0.55; }
.cb-item .row-title .pill { margin-left: 6px; }
.cb-emoji-img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }
.cb-holders { padding: 0 12px 10px; }
.cb-holders summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.cb-holders summary:hover { color: var(--text); }
.cb-holders .addform { margin: 8px 0; }
.cb-holders .list { margin-top: 6px; }
.cb-sweep { margin: 12px 0 0; }
.cb-sweep .muted { font-size: 12px; flex: 1 1 260px; }
.cb-editor { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s3, 12px); }
.cb-editor [hidden] { display: none !important; }
.cb-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.cb-top .grow { flex: 1 1 200px; min-width: 0; }
.cb-emoji-fld { flex: 0 0 96px; }
.cb-emoji-fld input { text-align: center; font-size: 18px; }
.cb-auto { display: flex; flex-direction: column; gap: var(--s3, 12px); }
.cb-match { height: 24px; padding: 0 22px 0 8px; font-size: 12px; width: auto; display: inline-block; }
.cb-conds { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.cb-cond { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); }
.cb-cond .cb-type { flex: 0 0 240px; max-width: 100%; }
.cb-cond .cb-param { flex: 1 1 260px; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cb-cond .cb-role-mode { flex: 0 0 110px; }
.cb-cond .multi { flex: 1 1 220px; min-width: 0; }
.cb-summary { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-soft); border: 1px dashed var(--line); font-size: 13px; line-height: 1.45; }
.cb-preview-emoji { font-size: 24px; flex: none; }
@media (max-width: 620px) { .cb-cond .cb-type { flex-basis: 100%; } }

/* Website API */
.site-url, .site-key { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.site-url code, .site-key code { overflow-wrap: anywhere; padding: 6px 8px; background: #1e1f22; border-radius: var(--r-sm); font-size: 12px; flex: 1 1 260px; }
.site-snippet { margin: 8px 0; padding: 10px 12px; background: #1e1f22; border-radius: var(--r-sm); font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.site-error { color: #ff6b84; }
.site-key-state { margin: 0 0 8px; }
#siteEditor [hidden] { display: none !important; }

/* Owner: who may use Rust+ and the Website API */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s5); align-items: start; }
.acc-card .card-body { display: flex; flex-direction: column; gap: var(--s3); }
.acc-hint { margin: 0; }
.acc-list { display: flex; flex-direction: column; gap: var(--s3); }
.acc-list.acc-off .list { opacity: 0.55; }
.acc-row { align-items: center; }
.acc-id { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 12px; user-select: all; }
.acc-problem { margin: 0; font-size: 13px; }
.acc-how { grid-column: 1 / -1; margin: 0; }


/* ═══════════════════════════════════════════════════════════════════
   FlirtWorks system. One voice for names (expanded, uppercase, tracked),
   one for prose (regular width), flat black surfaces, hairlines, squares.
   ═══════════════════════════════════════════════════════════════════ */
::selection { background: var(--text); color: var(--bg); }
a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: currentColor; }
code { border-radius: var(--r-sm); font-family: var(--mono); background: transparent; border-color: var(--line); }
kbd { border-radius: var(--r-sm); border-bottom-width: 1px; }

/* the sky sits behind everything; grain and scanlines sit over it all, like the site */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.grain, .scan { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.grain { opacity: .05; }
.scan { opacity: .035; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .6) 0 1px, transparent 1px 3px); }
.wrap, .lock { position: relative; z-index: 1; }
body { cursor: crosshair; }
.side, .content > *, .lock-card, .mini, .palette-box, #notice { cursor: auto; }
button, select, summary, label, .switch, input[type="checkbox"], input[type="radio"], input[type="range"], input[type="color"], a { cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* ── display voice: page and section names ── */
.page-title, .picker-title, .section-title, .disconnected .big, .np-title, .gp-name, .access-state, .brand-name {
  font-family: var(--display); font-stretch: 125%; font-weight: 850; text-transform: uppercase; letter-spacing: -.02em;
}
.page-title { font-size: clamp(24px, 2.7vw, 40px); line-height: .95; margin: 14px 0 14px; letter-spacing: -.03em; }
.picker-title { font-size: clamp(26px, 4.6vw, 52px); line-height: .92; letter-spacing: -.03em; }
.section-title { font-size: 15px; letter-spacing: 0; }
.np-title { font-size: 22px; line-height: 1.08; letter-spacing: -.01em; }
.gp-name { font-size: clamp(14px, 1.7vw, 18px); letter-spacing: 0; }
.disconnected .big { font-size: 18px; letter-spacing: 0; }
.access-state { font-size: 13px; letter-spacing: .04em; }
.ov-num, .date-chip b { font-family: var(--display); font-stretch: 125%; font-weight: 800; letter-spacing: -.02em; }
.page-hint { color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 68ch; }

/* ── label voice: anything that names a control, a group or a state ── */
.nav-label, .sidenav .nav-label, .crumb, .card-head h3, .fld > label, .fld label, .card-body .fld > label, .eyebrow, .group-title, .subhead,
.ov-lbl, .side-foot, .brand small, .pill, .tag, .count, .badge, .picker-eyebrow, .gp-role, .np-eyebrow, .ov-hero-eyebrow, .ov-quick-lbl,
.cat-tools-lbl, .cmd-detail-lbl, .hp span, .date-chip span, .srv-stats span, .kbd-hint, .card-status, .save-status {
  font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .18em; font-weight: 600;
}
.nav-label, .sidenav .nav-label { font-size: 9px; letter-spacing: .3em; color: var(--faint); margin: 22px 12px 8px; }
.crumb { font-size: 10px; letter-spacing: .28em; color: var(--muted); font-weight: 600; }
.fld > label, .fld label, .card-body .fld > label { font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 600; line-height: 1.5; }
.fld > label small, .fld label small { font-family: var(--body); font-stretch: 100%; text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 11.5px; }
.eyebrow, .group-title, .subhead, .picker-eyebrow, .np-eyebrow, .ov-hero-eyebrow, .ov-quick-lbl, .cat-tools-lbl, .cmd-detail-lbl { font-size: 9.5px; letter-spacing: .26em; color: var(--muted); }
.ov-lbl { font-size: 9.5px; letter-spacing: .22em; color: var(--muted); margin-top: 10px; }
.hp span, .date-chip span, .srv-stats span, .gp-role { font-size: 9px; letter-spacing: .2em; color: var(--muted); }
.pill, .tag, .count, .badge { font-size: 9px; letter-spacing: .16em; height: 20px; padding: 0 8px; background: transparent; border-color: var(--line); color: var(--muted); }
.tag { height: 22px; }
.count { height: auto; padding: 2px 7px; }
.badge.on { color: var(--text); border-color: var(--line-hover); }
.card-status, .save-status { font-size: 9px; letter-spacing: .2em; }
/* nested labels that are really sentences stay in the prose voice */
.sw-label, .check, .radio, .pick, .type-toggle, .mod-name { font-family: var(--body); font-stretch: 100%; text-transform: none; letter-spacing: 0; }
.fld label.sw-row, .fld label.check, .fld label.radio, .fld label.pick, .fld label.type-toggle, .fld label.mod-toggle, .fld label.greet-drop, label.sw-row, label.check, label.radio, label.pick, label.type-toggle, label.mod-toggle {
  font-family: var(--body); font-stretch: 100%; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 13.5px;
}

/* ── controls ── */
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="search"], input:not([type]), select, textarea {
  background-color: var(--bg-soft); border-color: var(--line); border-radius: var(--r-sm);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: none; outline: 1px solid var(--text); outline-offset: 2px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238a8a8a' stroke-width='2' d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-size: 16px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, label:focus-within > .switch { outline: 1px solid #fff; outline-offset: 3px; }
input[type="checkbox"]:not(.switch) { border-radius: var(--r-sm); }
input[type="checkbox"]:not(.switch)::after { border-color: var(--on-accent); }
input[type="radio"]::after { background: var(--on-accent); }
input.switch, .sw { width: 40px; height: 22px; border-radius: var(--r-sm); background: transparent; border-color: var(--line-hover); }
input.switch::after, .sw::after { border-radius: 0; width: 14px; height: 14px; top: 3px; left: 3px; background: var(--faint); }
input.switch:checked, .sw.on { background: var(--text); border-color: var(--text); }
input.switch:checked::after, .sw.on::after { background: var(--on-accent); transform: translateX(18px); }
input.switch:checked:hover { filter: none; border-color: #fff; background: #fff; }
input[type="range"] { height: 2px; border-radius: 0; }
input[type="range"]::-webkit-slider-thumb { border-radius: 0; width: 10px; height: 14px; }
input[type="range"]::-moz-range-thumb { border-radius: 0; width: 10px; height: 14px; }
input[type="color"] { border-radius: var(--r-sm); }
input[type="color"]::-webkit-color-swatch, input[type="color"]::-moz-color-swatch { border-radius: 0; }

.btn, .btn-primary, .btn-quiet, .ctl.wide, .chip, .seg button, .ov-quick button, .var-btn, .discord-login, .palette-list button, .gp-go {
  font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .2em; font-weight: 600; font-size: 10px; line-height: 1;
}
.btn, .btn-quiet { background: rgba(6, 6, 6, .6); border: 1px solid rgba(255, 255, 255, .22); color: var(--text); border-radius: var(--r-sm); box-shadow: none; }
.btn:hover, .btn-quiet:hover { background-color: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-primary { background: var(--text); border: 1px solid var(--text); color: var(--on-accent); font-weight: 700; box-shadow: none; }
.btn-primary:hover { filter: none; background: #fff; border-color: #fff; }
.btn:active, .btn-primary:active, .btn-quiet:active { transform: none; }
.btn-quiet { height: 30px; color: var(--muted); border-color: var(--line); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 9.5px; }
.btn-xs { height: 24px; padding: 0 9px; font-size: 9px; }
.btn-danger:hover { border-color: var(--red); color: var(--red); background: rgba(255, 59, 92, .08); }
.btn-good { background: var(--good); border-color: var(--good); color: var(--on-accent); }
.btn-good:hover { background: var(--good); border-color: #fff; color: var(--on-accent); }
.btn-quiet-link { border-color: transparent; background: transparent; }
.icon-btn { border-radius: var(--r-sm); }
.icon-btn:hover { background: transparent; border-color: var(--line-hover); }
.chip { height: 28px; background: transparent; }
.chip.selected { background: var(--text); border-color: var(--text); color: var(--on-accent); }
.seg { background: transparent; border-color: var(--line); padding: 2px; }
.seg button { font-size: 9.5px; letter-spacing: .16em; border-radius: 0; }
.seg button.active { background: var(--text); color: var(--on-accent); box-shadow: none; }
.token { background: transparent; border-color: var(--line-hover); border-radius: var(--r-sm); font-weight: 500; }
.var { border-radius: var(--r-sm); background: transparent; font-family: var(--mono); }
.var:hover { border-color: var(--text); }

/* ── shell ── */
.side { background: #070707; border-right: 1px solid var(--line); gap: 14px; padding: 22px 12px 16px; }
.brand, .side .brand { display: grid; grid-template-columns: 26px 1fr; align-items: center; column-gap: 10px; row-gap: 5px; padding: 2px 10px 18px; border-bottom: 1px solid var(--line-soft); font-size: 17px; letter-spacing: 0; }
.brand-mark { width: 26px; height: 26px; display: block; color: var(--text); }
.brand-name { line-height: 1; font-size: 16px; white-space: nowrap; }
.brand small, .side .brand small { grid-column: 2; margin: 0; font-size: 8.5px; letter-spacing: .34em; color: var(--muted); opacity: 1; }
.sidenav { gap: 1px; }
.sidenav button { min-height: 36px; padding: 7px 12px; gap: 12px; border: none; border-radius: 0; font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .11em; font-size: 9.5px; font-weight: 600; line-height: 1.3; color: var(--muted); position: relative; white-space: nowrap; }
.sidenav button::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; background: var(--text); transform: scaleY(0); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.sidenav button:hover { background: rgba(255, 255, 255, .05); border: none; color: var(--text); }
.sidenav button.active { background: rgba(255, 255, 255, .07); border: none; box-shadow: none; color: #fff; font-weight: 700; }
.sidenav button.active::before { transform: scaleY(1); }
.nav-ico { color: var(--faint); }
.nav-svg { width: 16px; height: 16px; }
.sidenav button:hover .nav-ico, .sidenav button.active .nav-ico { color: #fff; }
.side-foot { border-top: 1px solid var(--line-soft); padding: 14px 12px 0; font-size: 8.5px; letter-spacing: .26em; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 0; box-shadow: none; position: relative; }
.status-dot::after { content: ''; position: absolute; inset: 0; background: inherit; animation: ping 2s cubic-bezier(.2, .7, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3.4); opacity: 0; } }

header.topbar { min-height: 64px; background: rgba(6, 6, 6, .86); border-bottom: 1px solid var(--line-soft); }
.hamburger { background: transparent; border-color: rgba(255, 255, 255, .22); }
.guild-select { background: rgba(6, 6, 6, .6); border-color: rgba(255, 255, 255, .22); border-radius: var(--r-sm); padding: 4px 6px; }
.guild-select:hover { border-color: rgba(255, 255, 255, .6); }
.guild-select img, .userbox img, .av, .gp-icon, .mini img, .q-art { border-radius: 0; }
.guild-select select { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 600; outline: none; }
.guild-select select:focus { outline: none; }
.guild-select:focus-within { outline: 1px solid #fff; outline-offset: 3px; }
.kbd-hint { font-size: 9px; letter-spacing: .2em; border-color: var(--line); border-radius: var(--r-sm); background: transparent; }
.userbox { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; font-size: 9.5px; font-weight: 600; color: var(--muted); }
.logout { border-radius: var(--r-sm); }
.logout:hover { background: transparent; color: var(--red); }

/* ── surfaces ── */
.card, .now, .ov-tile, .cat, .log-feed, .bot-strip, .banner, .gp-item, .lock-card, .palette-box, .toast { background: var(--panel); border-color: var(--line); box-shadow: none; border-radius: var(--r-sm); }
.card:focus-within { border-color: var(--line-hover); }
.card-head { background: transparent; min-height: 48px; padding: 12px 20px; border-bottom-color: var(--line); }
.card-head h3 { font-size: 10.5px; letter-spacing: .22em; font-weight: 700; line-height: 1.5; gap: 4px 10px; }
.card-head h3::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--faint); transition: background .2s; }
.card:focus-within > .card-head h3::before, .card:hover > .card-head h3::before { background: var(--text); }
.card-head h3 small, .card-head h3 .muted { font-family: var(--body); font-stretch: 100%; text-transform: none; letter-spacing: 0; font-weight: 400; }
.card-warn { border-radius: var(--r-sm); }
.banner { background: var(--panel); }
.banner-warn { background: rgba(255, 210, 92, .06); border-color: rgba(255, 210, 92, .3); }
.empty { background: transparent; border-color: var(--line); color: var(--muted); }
.addform { background: transparent; border-color: var(--line); }
.row:hover:not(.card-head) { background: transparent; }
details.card > summary::before, details.plan > summary::before, .rust-disclosure > summary::before, .caret { color: var(--muted); }
.mod-toggle, .type-toggle, .rule, .hp, .ach, .vet-app, .radio, .pick-list, .date-chip { background: transparent; }
.mod-toggle.on, .rule.on { border-color: var(--line-hover); }
.radio:has(input:checked) { border-color: var(--text); background: var(--accent-soft); }
.ov-tile { min-height: 104px; }
.ov-hero { background: transparent; border-color: var(--line-hover); }
.toast { border-radius: var(--r-sm); background: #0d0d0d; border-color: var(--line-hover); font-size: 12.5px; }
.palette { background: rgba(6, 6, 6, .7); }
.palette-box { border-color: var(--line-hover); box-shadow: var(--shadow); }
.palette-box input { border-radius: 0; outline: none !important; }
.palette-list button { border-radius: 0; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.palette-list button:hover, .palette-list button.sel { background: var(--text); color: var(--on-accent); }
.loading span { border-radius: 0; width: 6px; height: 6px; background: var(--text); }
::-webkit-scrollbar-thumb { border-radius: 0; background: #2a2a2a; }
::-webkit-scrollbar-thumb:hover { background: var(--line-hover); }

/* ── music console ── */
.now::before { background: var(--text); height: 1px; opacity: .5; }
.art-wrap { border-radius: 0; box-shadow: none; background: #0f0f0f; border: 1px solid var(--line); }
.art-empty { color: #2a2a2a; }
.bar { background: #1a1a1a; height: 3px; border-radius: 0; }
.bar:hover { height: 5px; }
.fill { background: var(--text); border-radius: 0; }
.ctl { border-radius: var(--r-sm); background: transparent; border-color: rgba(255, 255, 255, .22); }
.ctl:hover { background: transparent; border-color: rgba(255, 255, 255, .7); }
.ctl.primary { background: var(--text); border-color: var(--text); color: var(--on-accent); box-shadow: none; }
.ctl.primary:hover { filter: none; background: #fff; }
.ctl.on { background: var(--text); border-color: var(--text); color: var(--on-accent); }
.ctl.wide { border-radius: var(--r-sm); height: 36px; }
.ctl.wide.on .ico { color: inherit; }
.ctl.danger:hover { color: var(--red); border-color: var(--red); }
.vol-num { border-radius: var(--r-sm); background: transparent; }
.q-item { border-radius: 0; }
.q-item:hover, .q-item:focus-within { background: rgba(255, 255, 255, .04); }
.q-rm { border-radius: var(--r-sm); }
.mini { border-radius: var(--r-sm); background: rgba(6, 6, 6, .94); border-color: var(--line-hover); box-shadow: var(--shadow); }
.mini button { border-radius: var(--r-sm); background: transparent; }
.disc-ico { border-radius: 0; background: transparent; border: 1px solid var(--line); }
.progress-mini, .stat-bar, .meter { height: 3px; border-radius: 0; background: #1a1a1a; }
.progress-mini span, .stat-bar > span, .meter span { border-radius: 0; }

/* previews of Discord keep Discord's shapes; the bot's avatar there is the FlirtWorks mark */
.cmp-avatar { background: #060606 url('/logo.svg') center / cover no-repeat; border-radius: 50%; }

/* ── sign-in ── */
.lock-card { width: min(440px, 100%); padding: 40px 36px; text-align: left; gap: 18px; background: rgba(6, 6, 6, .82); }
.lock-card .brand { justify-content: start; padding: 0 0 22px; }
.lock-card .brand-name { font-size: 26px; letter-spacing: -.03em; }
.lock-card .brand-mark { width: 34px; height: 34px; }
.lock-card .brand { grid-template-columns: 34px 1fr; column-gap: 14px; }
.lock-card p { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .22em; font-size: 10px; font-weight: 500; color: var(--muted); margin-bottom: 18px; line-height: 1.8; }
.discord-login { background: var(--text); color: var(--on-accent); border-radius: var(--r-sm); height: 46px; width: 100%; text-decoration: none; font-weight: 700; font-size: 10.5px; }
.discord-login:hover { filter: none; background: #fff; }
.lock-err { color: var(--red); }
.gp-item:hover { transform: none; background: var(--panel); border-color: rgba(255, 255, 255, .7); }
.gp-icon-fallback { color: var(--text); font-stretch: 125%; }
.gp-item:hover .gp-go { color: #fff; }
.picker-eyebrow { color: var(--muted); letter-spacing: .42em; }

@media (max-width: 900px) {
  .side { background: #070707; }
  .page-title { font-size: clamp(22px, 6.4vw, 30px); }
}
@media (max-width: 560px) {
  .card-head h3 { font-size: 10px; letter-spacing: .18em; }
  .btn, .btn-primary { letter-spacing: .16em; }
}
@media (prefers-reduced-motion: reduce) { .status-dot::after { display: none; } }

/* ── the signal breaks up: red and cyan only ever appear in these bursts ── */
.page-title, .lock-card .brand-name { position: relative; isolation: isolate; }
.page-title::before, .page-title::after, .lock-card .brand-name::before, .lock-card .brand-name::after { content: attr(data-text); position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; }
.page-title::before, .lock-card .brand-name::before { color: #ff2b4f; }
.page-title::after, .lock-card .brand-name::after { color: var(--cyan); }
.glitch::before { opacity: .9; animation: slice-a .34s steps(1, end) both; }
.glitch::after { opacity: .9; animation: slice-b .34s steps(1, end) both; }
@keyframes slice-a {
  0% { clip-path: inset(12% 0 62% 0); transform: translate(-.06em, 0); }
  25% { clip-path: inset(58% 0 18% 0); transform: translate(.05em, 0); }
  50% { clip-path: inset(34% 0 44% 0); transform: translate(-.03em, 0); }
  75% { clip-path: inset(78% 0 4% 0); transform: translate(.04em, 0); }
  100% { clip-path: inset(0 0 100% 0); transform: none; } }
@keyframes slice-b {
  0% { clip-path: inset(64% 0 8% 0); transform: translate(.06em, 0); }
  25% { clip-path: inset(6% 0 70% 0); transform: translate(-.05em, 0); }
  50% { clip-path: inset(46% 0 30% 0); transform: translate(.04em, 0); }
  75% { clip-path: inset(22% 0 58% 0); transform: translate(-.03em, 0); }
  100% { clip-path: inset(0 0 100% 0); transform: none; } }

/* ── second pass: tidier grids and rows ── */
.ov-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.stat-row > .stat-name.wide + .stat-count { width: auto; flex: 0 0 auto; white-space: nowrap; }
.stat-row > .stat-name.wide + .stat-count small { color: var(--faint); }
/* feature tiles and rules name things, so they take the square marker instead of a picture */
.mod-emoji { font-size: 0; width: 6px; height: 6px; flex: none; background: var(--text); }
.mod-toggle:not(.on) .mod-emoji { background: var(--faint); opacity: 1; }
.mod-name { font-weight: 600; }
.mod-name small { color: var(--muted); font-weight: 400; }

/* ── messages & embeds: editing something already posted ── */
#cmpTask { align-self: flex-start; }
#cmpEditBox { display: flex; flex-direction: column; gap: var(--fld-gap); }
#cmpEditBox[hidden] { display: none; }
#cmpEditBox .inline > input { flex: 1; }
.cmp-recent { max-height: 264px; overflow-y: auto; border: 1px solid var(--line); padding: 0 var(--s3); }
.cmp-recent .row { padding: var(--s3) 0; }
.cmp-recent .empty { border: none; padding: var(--s5) 0; }
.cmp-editing { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--text); }
.cmp-editing[hidden] { display: none; }
.cmp-editing .row-sub { white-space: normal; }
.cmp-editing a.btn { text-decoration: none; }
.pulse-dot { position: relative; width: 6px; height: 6px; flex: none; background: var(--red); }
.pulse-dot::after { content: ''; position: absolute; inset: 0; background: inherit; animation: ping 2s cubic-bezier(.2, .7, .2, 1) infinite; }
select:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .pulse-dot::after { display: none; } }

/* ═══════════════════════════════════════════════════════════════════
   Finding your way: grouped sidebar, breadcrumb, on-this-page strip,
   the Home directory and search results that say what each page is for.
   ═══════════════════════════════════════════════════════════════════ */
.nav-find { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px 0 12px; background: rgba(6, 6, 6, .6); border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-sm); color: var(--muted);
  font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .16em; font-size: 9.5px; font-weight: 600; text-align: left; transition: border-color .2s, color .2s; }
.nav-find span { flex: 1; }
.nav-find:hover { border-color: rgba(255, 255, 255, .7); color: var(--text); }
.nav-find kbd { font-size: 9px; letter-spacing: .08em; border-color: var(--line); }
body.picking .nav-find { display: none; }

.sidenav { gap: 0; }
.sidenav > button[data-view] { margin-bottom: 6px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line-soft); }
.nav-group[hidden] { display: none; }
.nav-group > .nav-label, .sidenav .nav-group > .nav-label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 12px 12px 12px; min-height: 40px; font-size: 9px; letter-spacing: .3em; color: var(--muted); cursor: pointer; user-select: none; transition: color .2s; }
.nav-group > .nav-label:hover { color: var(--text); }
.nav-group > .nav-label:focus-visible { outline: 1px solid #fff; outline-offset: -3px; }
.nav-group.here > .nav-label { color: var(--text); }
.nav-label-text { flex: 1; }
.nav-count { font-size: 8.5px; letter-spacing: .1em; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-caret { width: 5px; height: 5px; margin: -3px 2px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .3s cubic-bezier(.2, .7, .2, 1), margin .3s; }
.nav-group:not(.closed) > .nav-label .nav-caret { transform: rotate(225deg); margin-top: 3px; }
.nav-group.closed > button { display: none; }
.nav-group:not(.closed) { padding-bottom: 8px; }
.nav-group:not(.closed) > .nav-label .nav-count { visibility: hidden; }

.crumb { display: flex; align-items: center; gap: 10px; }
.crumb-group { color: var(--faint); }
.crumb-sep { color: var(--faint); }
.crumb-here { color: var(--text); overflow: hidden; text-overflow: ellipsis; }

/* on this page */
header.topbar { flex-wrap: wrap; row-gap: 0; }
.page-index { flex: 0 0 100%; display: flex; align-items: center; gap: 2px; margin: 12px 0 -1px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line-soft); }
.page-index::-webkit-scrollbar { display: none; }
.page-index[hidden] { display: none; }
.page-index-label { flex: none; padding-right: 14px; font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .26em; font-size: 8.5px; font-weight: 600; color: var(--faint); }
.page-index button { flex: none; position: relative; height: 38px; padding: 0 12px; background: transparent; border: none; color: var(--muted); white-space: nowrap;
  font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 600; transition: color .2s; }
.page-index button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--text); transform: scaleX(0); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.page-index button:hover { color: var(--text); }
.page-index button.active { color: #fff; }
.page-index button.active::after { transform: scaleX(1); }
body.has-index header.topbar { padding-bottom: 0; }

/* Home: where everything is */
.directory { margin-top: var(--s8); }
.directory .section-head { margin-top: 0; flex-wrap: wrap; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); align-items: start; }
.dir-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; flex-direction: column; }
.dir-title { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .26em; font-size: 10px; font-weight: 700; }
.dir-title::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--text); }
.dir-item { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 13px 18px; background: transparent; border: none; border-bottom: 1px solid var(--line-soft); text-align: left; transition: background .2s; }
.dir-item:last-child { border-bottom: none; }
.dir-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--text); transform: scaleY(0); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.dir-item:hover, .dir-item:focus-visible { background: rgba(255, 255, 255, .05); }
.dir-item:hover::before, .dir-item:focus-visible::before { transform: scaleY(1); }
.dir-name { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 700; color: var(--text); }
.dir-desc { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* search results say what each page is for */
.palette-box { width: min(620px, calc(100vw - 32px)); }
.palette-list button { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 5px; padding: 11px 14px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-stretch: 100%; }
.pal-name { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 700; color: var(--text); }
.pal-group { font-family: var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .2em; font-size: 8.5px; font-weight: 600; color: var(--faint); align-self: center; }
.pal-desc { grid-column: 1 / -1; font-size: 12px; line-height: 1.45; color: var(--muted); font-weight: 400; white-space: normal; }
.palette-list button:hover .pal-name, .palette-list button.sel .pal-name, .palette-list button:hover .pal-desc, .palette-list button.sel .pal-desc, .palette-list button:hover .pal-group, .palette-list button.sel .pal-group { color: var(--on-accent); }
.palette-empty { font-size: 12.5px; padding: 16px 14px; }

@media (max-width: 900px) {
  .page-index { margin-top: 8px; }
  .page-index-label { display: none; }
  .page-index button:first-of-type { padding-left: 0; }
  .page-index button:first-of-type::after { left: 0; }
  .crumb-group, .crumb-sep { display: none; }
}

/* search lives at the top of the sidebar; the old top-bar hint stays in the page only as its trigger */
.kbd-hint { display: none; }

.cmp-editing .row-main { flex: 1 1 220px; }
.cmp-editing .row-title { white-space: normal; overflow: visible; }
/* the top bar wraps only for the on-this-page strip: the breadcrumb gives way first */
header.topbar > .crumb { flex: 1 1 0; min-width: 0; overflow: hidden; }
header.topbar > .topbar-right { flex: none; }
.crumb-group, .crumb-sep { flex: none; }
.crumb-here { white-space: nowrap; min-width: 0; }

/* ═══════════════════════════════════════════════════════════════════
   Legibility and colour.
   Bigger type, less letter-spacing and brighter greys so nothing has to be
   squinted at; grain and scanlines sit behind the page, not over the text.
   Colour carries meaning: every area of the dashboard has its own colour
   (like the links on flirtworks.co), green means on, gold means look here,
   red means danger.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --muted: #b0b0b0;          /* secondary text: 9:1 on the background */
  --faint: #858585;          /* tertiary text: still 5.5:1 */
  --line: #2e2e2e;
  --line-hover: #5c5c5c;
  --bg-soft: #101010;
  --panel: #0c0c0c;
  --side-w: 272px;
  --c-messages: #4fd8ff;
  --c-members: #ffd25c;
  --c-moderation: #ff5c7a;
  --c-connections: #34d399;
  --c-server: #b18cff;
  --c-owner: #ff9a5c;
  --here: var(--text);       /* the colour of the area you are in; set on <body> */
}
body[data-area="messages"] { --here: var(--c-messages); }
body[data-area="members"] { --here: var(--c-members); }
body[data-area="moderation"] { --here: var(--c-moderation); }
body[data-area="connections"] { --here: var(--c-connections); }
body[data-area="server"] { --here: var(--c-server); }
body[data-area="owner"] { --here: var(--c-owner); }
.nav-group[data-group="messages"], .dir-group[data-group="messages"] { --g: var(--c-messages); }
.nav-group[data-group="members"], .dir-group[data-group="members"] { --g: var(--c-members); }
.nav-group[data-group="moderation"], .dir-group[data-group="moderation"] { --g: var(--c-moderation); }
.nav-group[data-group="connections"], .dir-group[data-group="connections"] { --g: var(--c-connections); }
.nav-group[data-group="server"], .dir-group[data-group="server"] { --g: var(--c-server); }
.nav-group[data-group="owner"], .dir-group[data-group="owner"] { --g: var(--c-owner); }

/* texture goes behind the page so text stays crisp */
.grain, .scan { z-index: 0; }
.grain { opacity: .04; }
.scan { opacity: .025; }

/* ── type: larger, tighter tracking, brighter ── */
body { font-size: 15px; line-height: 1.55; }
.page-hint { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 72ch; }
.card-hint { font-size: 14px; color: var(--muted); }
.help, .fld > .help { font-size: 13px; line-height: 1.55; color: var(--muted); }
.row-title, .sw-label, .mod-name, .q-title { font-size: 14.5px; }
.row-sub, .q-artist, .cmd-desc, .ach-desc { font-size: 13px; color: var(--muted); }
.empty { font-size: 14px; color: var(--muted); }
small { font-size: 12.5px; }
code { font-size: 12.5px; color: var(--text); border-color: var(--line-hover); }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="search"], input:not([type]), select, textarea { font-size: 14.5px; background-color: #111; border-color: #3a3a3a; }
input::placeholder, textarea::placeholder { color: #777; }
:root { --ctl-h: 40px; }

.nav-label, .sidenav .nav-label, .crumb, .card-head h3, .fld > label, .fld label, .card-body .fld > label, .eyebrow, .group-title, .subhead,
.ov-lbl, .side-foot, .brand small, .pill, .tag, .count, .badge, .picker-eyebrow, .gp-role, .np-eyebrow, .ov-hero-eyebrow, .ov-quick-lbl,
.cat-tools-lbl, .cmd-detail-lbl, .hp span, .date-chip span, .srv-stats span, .card-status, .save-status { letter-spacing: .1em; }
.fld > label, .fld label, .card-body .fld > label { font-size: 11.5px; letter-spacing: .1em; color: #cfcfcf; font-weight: 600; }
.fld > label small, .fld label small { font-size: 12.5px; color: var(--muted); }
.fld label.sw-row, .fld label.check, .fld label.radio, .fld label.pick, .fld label.type-toggle, .fld label.mod-toggle, label.sw-row, label.check, label.radio, label.pick, label.type-toggle, label.mod-toggle { font-size: 14.5px; letter-spacing: 0; color: var(--text); }
.card-head h3 { font-size: 13px; letter-spacing: .1em; color: #fff; }
.card-head { min-height: 54px; padding: 14px 20px; }
.eyebrow, .group-title, .subhead, .picker-eyebrow, .np-eyebrow, .ov-hero-eyebrow, .ov-quick-lbl, .cat-tools-lbl, .cmd-detail-lbl { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.ov-lbl { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.hp span, .date-chip span, .srv-stats span, .gp-role { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.pill, .tag, .count, .badge { font-size: 10.5px; letter-spacing: .08em; height: 22px; color: #d0d0d0; border-color: var(--line-hover); }
.count { height: auto; }
.card-status, .save-status { font-size: 11px; letter-spacing: .08em; }
.btn, .btn-primary, .btn-quiet, .ctl.wide, .chip, .seg button, .ov-quick button, .var-btn, .discord-login, .gp-go { font-size: 11.5px; letter-spacing: .1em; }
.btn-sm { font-size: 11px; height: 32px; }
.btn-xs { font-size: 10.5px; height: 26px; }
.seg button { font-size: 11px; letter-spacing: .08em; height: 30px; }
.chip { font-size: 11px; height: 30px; }
.btn, .btn-quiet { border-color: rgba(255, 255, 255, .34); }
.section-title { font-size: 17px; }
.section-meta { font-size: 13.5px; color: var(--muted); }
.toast { font-size: 14px; }
.side-foot { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.brand small, .side .brand small { font-size: 9.5px; letter-spacing: .26em; color: var(--muted); }
.userbox { font-size: 11px; letter-spacing: .08em; color: var(--text); }
.guild-select select { font-size: 11.5px; letter-spacing: .08em; }

/* things that used to be dimmed until unreadable */
.card.is-off .card-body > :not(.card-hint) { opacity: .8; }
.ach.locked { opacity: 1; border-style: dashed; }
.ach.locked .ach-name { color: var(--muted); }
.ach.locked .ach-emoji { filter: grayscale(1); opacity: .55; }
.ach:not(.locked) { border-color: rgba(255, 210, 92, .55); box-shadow: inset 3px 0 0 var(--c-members); }
.ach:not(.locked) .ach-have { color: var(--c-members); font-weight: 700; }
.ach-name { font-size: 14.5px; }
.mod-toggle:not(.on) .mod-name, .mod-toggle:not(.on) .mod-emoji { opacity: 1; }
.mod-toggle:not(.on) .mod-name { color: var(--muted); }
.cmd.off .cmd-id, .cmd.off .seg { opacity: .7; }
select:disabled, input:disabled { opacity: .7; }

/* ── sidebar: readable, never cut off, each group in its colour ── */
.nav-find { height: 40px; font-size: 11.5px; letter-spacing: .1em; color: var(--text); border-color: rgba(255, 255, 255, .34); }
.nav-find kbd { font-size: 10.5px; color: var(--muted); border-color: var(--line-hover); }
.sidenav button { min-height: 38px; padding: 8px 12px; font-size: 11.5px; letter-spacing: .06em; line-height: 1.35; color: #c9c9c9; white-space: normal; text-align: left; }
.sidenav button::before { background: var(--g, var(--text)); width: 3px; }
.sidenav button.active { background: color-mix(in srgb, var(--g, #fff) 14%, transparent); color: #fff; }
.sidenav button.active .nav-ico, .sidenav button:hover .nav-ico { color: var(--g, #fff); }
.nav-ico { color: #8f8f8f; }
.nav-svg { width: 18px; height: 18px; }
.nav-group > .nav-label, .sidenav .nav-group > .nav-label { font-size: 11px; letter-spacing: .16em; color: #c9c9c9; min-height: 44px; }
.nav-group > .nav-label::before { content: ''; width: 7px; height: 7px; flex: none; background: var(--g); }
.nav-group.here > .nav-label { color: var(--g); }
.nav-count { font-size: 10.5px; color: var(--muted); }

/* ── top bar ── */
.crumb { font-size: 11.5px; letter-spacing: .12em; }
.crumb-group { color: var(--here); }
.crumb-sep { color: var(--faint); }
.page-index-label { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.page-index button { font-size: 11px; letter-spacing: .08em; height: 42px; color: #c4c4c4; }
.page-index button::after { background: var(--here); height: 3px; }
.page-index button.active { color: #fff; }
/* the strip scrolls sideways when a page has many cards: fade the edge so that is obvious */
.page-index { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); padding-right: 36px; }

/* ── colour that means something ── */
.card-head h3::before { width: 7px; height: 7px; background: var(--here); opacity: .55; }
.card:focus-within > .card-head h3::before, .card:hover > .card-head h3::before { background: var(--here); opacity: 1; }
.card:focus-within { border-color: color-mix(in srgb, var(--here) 55%, var(--line)); }
a { text-decoration-color: var(--here); }
a:hover { color: var(--here); }
.page-hint b, .card-hint b, .help b { color: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--here); outline-color: var(--here); }
/* on is green, everywhere */
input.switch:checked, .sw.on { background: var(--good); border-color: var(--good); }
input.switch:checked:hover { background: #4fe0ae; border-color: #4fe0ae; }
input.switch, .sw { border-color: #6a6a6a; }
input.switch::after, .sw::after { background: #9a9a9a; }
.mod-toggle.on, .rule.on { border-color: rgba(52, 211, 153, .5); }
.mod-toggle.on .mod-emoji { background: var(--good); }
.card-status.ok, .card-head .card-status.ok, .save-status { color: var(--good); }
.pill-live { color: var(--good); border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .1); }
.pill-warn, .tag-amber { color: var(--warn); border-color: rgba(255, 210, 92, .5); background: rgba(255, 210, 92, .08); }
.tag-red { color: #ff8098; border-color: rgba(255, 59, 92, .55); background: rgba(255, 59, 92, .08); }
.tag-green { color: var(--good); border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .08); }
.banner-warn { border-left: 3px solid var(--warn); color: #fff; }
.card-warn { border-left: 3px solid var(--warn); color: #ffe39a; font-size: 13.5px; }
.warn-text { color: var(--warn); font-size: 13.5px; }
.toast { border-left-width: 4px; }
.token { border-color: color-mix(in srgb, var(--here) 60%, transparent); background: color-mix(in srgb, var(--here) 9%, transparent); font-size: 13.5px; }
.chip.selected, .seg button.active, .rust-subtabs button[aria-selected="true"] { background: var(--here); border-color: var(--here); color: #060606; }
.radio:has(input:checked) { border-color: var(--here); background: color-mix(in srgb, var(--here) 8%, transparent); }
input[type="checkbox"]:not(.switch):checked, input[type="radio"]:checked { background: var(--here); border-color: var(--here); }
input[type="checkbox"]:not(.switch) { border-color: #6a6a6a; }
.progress-mini span, .stat-bar > span, .meter span { background: var(--here); }
.ov-num { color: #fff; }
.ov-tile { border-top: 2px solid color-mix(in srgb, var(--here) 70%, transparent); }
.hp.good b { color: var(--good); }
.cmp-editing { border-color: var(--here); }
.loading span { background: var(--here); }

/* Home directory in its group colours */
.dir-title { font-size: 12.5px; letter-spacing: .14em; color: var(--g); }
.dir-title::before { background: var(--g); width: 7px; height: 7px; }
.dir-group { border-top: 2px solid var(--g); }
.dir-item::before { background: var(--g); width: 3px; }
.dir-name { font-size: 12.5px; letter-spacing: .08em; }
.dir-desc { font-size: 13.5px; color: var(--muted); }
.dir-item:hover .dir-name, .dir-item:focus-visible .dir-name { color: var(--g); }
.pal-name { font-size: 12.5px; letter-spacing: .08em; }
.pal-group { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
.pal-desc { font-size: 13px; }
.palette-box input { font-size: 16px; height: 54px; }

/* ── nothing gets cut off ── */
.rust-access-row small, .rust-cmd small, .cmd-desc, .prole-name { white-space: normal; overflow: visible; text-overflow: clip; }
.row-title { white-space: normal; overflow-wrap: anywhere; }
.guild-select select { max-width: 260px; }
@media (max-width: 900px) {
  /* the page title sits right under the bar on a phone, so the breadcrumb would only repeat it, cut short */
  header.topbar > .crumb { visibility: hidden; }
  .sidenav button { font-size: 12.5px; min-height: 42px; }
  .side { width: min(300px, 86vw); }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .card-head h3 { font-size: 12.5px; letter-spacing: .08em; }
  .btn, .btn-primary { letter-spacing: .08em; }
}
