/* ============================================================
   X-WIRE — modern dark UI
   Calm graphite surfaces, one warm accent, real typography.
   ============================================================ */

:root {
  /* ---- obsidian ground -------------------------------------------------
     Everything sits on near-black. The "glass" is not a colour but a stack:
     a translucent fill, a blur behind it, a hairline in the accent, and a
     one-pixel highlight along the top edge where the light would catch. */
  --void: #04060a;
  --void-2: #060910;
  --bg: var(--void);

  /* glass layers, in rising order of prominence */
  --glass-1: linear-gradient(180deg, rgba(150, 200, 255, .045), rgba(120, 170, 255, .012));
  --glass-2: linear-gradient(180deg, rgba(150, 200, 255, .065), rgba(120, 170, 255, .02));
  --glass-3: linear-gradient(180deg, rgba(150, 200, 255, .09), rgba(120, 170, 255, .03));
  --blur: blur(22px) saturate(150%);
  --crystal: inset 0 1px 0 rgba(190, 240, 255, .10);

  /* flat fallbacks for the places a gradient will not do */
  --surface: rgba(9, 14, 22, .78);
  --surface-2: rgba(11, 17, 26, .82);
  --surface-3: rgba(14, 21, 32, .9);

  /* hairlines are cyan at low alpha: the etched edge of a pane, not a border */
  --line: rgba(0, 243, 255, .12);
  --line-strong: rgba(0, 243, 255, .28);
  --line-quiet: rgba(190, 220, 255, .07);

  /* ---- ink ---- */
  --text: #dff3f8;
  --muted: #7f97a8;
  --dim: #4d6274;

  /* ---- signal ----
     Cyan is the interface. Amber is data the interface is reporting on. */
  --accent: #00f3ff;
  --accent-2: #ffb020;
  --accent-soft: rgba(0, 243, 255, .10);
  --accent-line: rgba(0, 243, 255, .42);
  --accent-glow: 0 0 18px rgba(0, 243, 255, .35);
  --amber-soft: rgba(255, 176, 32, .12);
  --amber-glow: 0 0 16px rgba(255, 176, 32, .3);

  --link: #00f3ff;
  --good: #2fe6a8;
  --warn: #ffb020;
  --bad: #ff4d6a;
  --violet: #a78bfa;
  --magenta: #ff4d9d;
  --cyan: #00f3ff;

  /* legacy aliases so older rules keep resolving */
  --flame: var(--accent);
  --flame-hi: #7ff8ff;
  --flame-glow: rgba(0, 243, 255, .35);
  --cyan-dim: #4d6274;
  --green: var(--good);
  --red: var(--bad);
  --edge: var(--line);
  --hair: var(--line);
  --hair-hot: var(--line-strong);

  /* ---- geometry ----
     Small radii and a notched corner: panes read as cut, not rounded. */
  --radius: 3px;
  --radius-sm: 2px;
  --radius-xs: 2px;
  --notch: 10px;
  --shadow: 0 0 0 1px rgba(0, 243, 255, .05), 0 18px 50px rgba(0, 0, 0, .55);
  --shadow-lift: 0 0 0 1px rgba(0, 243, 255, .12), 0 24px 60px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* ---- type ----
     One geometric sans for structure, one mono for anything that is a value.
     Readouts are mono everywhere: a number that moves should not reflow. */
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "DejaVu Sans Mono", Menlo, monospace;
  --sans: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    /* the etched grid the whole interface is laid out on */
    linear-gradient(rgba(0, 243, 255, .028) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(0, 243, 255, .028) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(1100px 620px at 84% -14%, rgba(0, 243, 255, .09), transparent 64%),
    radial-gradient(820px 520px at 4% 6%, rgba(255, 176, 32, .05), transparent 60%),
    var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the old HUD chrome and starfield are retired in this design */
.hud-frame { display: none; }
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35; }
main, footer { position: relative; z-index: 1; }
/* above the page: the nav's dropdowns hang out of the header's box */
header { position: relative; z-index: 50; }

::selection { background: rgba(255, 106, 44, .3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #242832; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #333a45; background-clip: padding-box; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; }

/* ---------------- header ---------------- */
header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 14, .86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.head-top {
  display: flex; align-items: center; gap: 16px;
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
}
.head-user { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.logo {
  font-size: 17px; font-weight: 650; letter-spacing: -.2px;
  color: var(--text); white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.tagline, .hud-readout { display: none; }

/* second row: primary sections, tab style */
.head-nav {
  display: flex; align-items: center; gap: 2px;
  max-width: 1080px; margin: 0 auto; padding: 0 12px;
  overflow: visible;
}
.head-nav::-webkit-scrollbar { display: none; }
.head-nav a {
  padding: 10px 12px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 13px; font-weight: 500; letter-spacing: -.05px;
  color: var(--muted); white-space: nowrap;
  transition: color .14s var(--ease), border-color .14s var(--ease);
}
.head-nav a:hover { color: var(--text); text-decoration: none; }
.head-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

/* top row links + buttons */
.head-user a, .head-user .link-btn {
  padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.head-user a:hover, .head-user .link-btn:hover {
  color: var(--text); background: var(--surface-2); text-decoration: none;
}
.head-user a.active { color: var(--text); background: var(--surface-3); }
.head-user a.nav-cta {
  background: var(--accent); color: #100a06; font-weight: 600;
}
.head-user a.nav-cta:hover { background: var(--accent); filter: brightness(1.08); }
.head-user a.nav-admin { color: var(--magenta); }
.nav-me { display: flex; align-items: center; gap: 7px; color: var(--text) !important; }
.nav-bell { font-size: 15px; }
.nav-bell .badge { position: relative; top: -7px; margin-left: -4px; }
.nav-search { flex: 0 1 340px; }
.nav-search input {
  width: 100%; padding: 7px 12px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; color: var(--text);
}
.nav-search input:focus { border-color: var(--line-strong); background: var(--surface-2); }

main { max-width: 1080px; margin: 0 auto; padding: 26px 24px 40px; }

/* ---------------- panels ---------------- */
.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 26px;
  margin-bottom: 16px;
  clip-path: none;
  animation: rise .3s var(--ease) both;
}
.panel::before, .panel::after { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel h2 {
  position: relative;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 18px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.15px;
  text-transform: none; color: var(--text);
  border-bottom: none; padding-bottom: 13px;
}
.panel h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 62%);
}
.panel h2::before { display: none; }
.panel h2 .hint { font-weight: 400; }

.cols { display: flex; gap: 18px; flex-wrap: wrap; }
.cols > * { flex: 1; min-width: 300px; }
.hint { color: var(--muted); font-size: 12.5px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }

/* ---------------- controls ---------------- */
input, textarea, select, button {
  font: inherit; color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  box-shadow: none;
  transition: border-color .14s var(--ease), background .14s var(--ease),
    box-shadow .14s var(--ease), transform .14s var(--ease);
}
input, textarea, select { border-color: rgba(255, 255, 255, .05); }
input:hover, textarea:hover, select:hover { border-color: var(--line); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; font-family: inherit; }

button, .btn-link {
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 550; letter-spacing: -.05px; text-transform: none;
  background: var(--surface-3); color: var(--text); border: 1px solid rgba(255, 255, 255, .05);
  clip-path: none;
}
button:hover, .btn-link:hover {
  background: #242933; border-color: var(--line); text-decoration: none; box-shadow: none;
}
button:active, .btn-link:active { transform: scale(.985); }
button.primary, .btn-link.primary {
  background: var(--accent); border-color: transparent; color: #140a05; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
button.primary:hover { filter: brightness(1.07); box-shadow: 0 3px 10px rgba(255, 106, 44, .22); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--surface-2); color: var(--text); }
button.wide, .wide { width: 100%; justify-content: center; }
.link-btn {
  background: none; border: none; padding: 2px 4px; color: var(--muted);
  font-size: 12.5px; font-weight: 500;
}
.link-btn:hover { background: none; color: var(--text); text-decoration: underline; }
.link-btn.danger { color: #ff8f8f; }
.inline-form { display: inline; }
.row { margin-bottom: 14px; }
.row label {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--muted);
}
.row input, .row textarea, .row select { width: 100%; }
label.check, label.checkline {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  font-size: 13px; color: var(--text); cursor: pointer; text-transform: none; letter-spacing: 0;
}
label.check input, label.checkline input { width: auto; }
input[type="color"] { width: 56px; height: 36px; padding: 3px; cursor: pointer; }
.searchbar { display: flex; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.searchbar input { flex: 1; min-width: 200px; }

/* ---------------- hero + stats ---------------- */
.hero { text-align: center; padding: 54px 16px 38px; }
.hero h1 {
  font-size: 44px; font-weight: 680; letter-spacing: -1.8px; margin: 0 0 16px;
  line-height: 1.08;
}
.hero h1 em { color: var(--accent); font-style: normal; text-shadow: none; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 15px; line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

.statrow { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.stat {
  background: var(--surface-2); border: none; border-radius: var(--radius-sm);
  padding: 15px 24px; text-align: center; min-width: 108px; clip-path: none;
}
.stat::after { display: none; }
.stat b {
  display: block; font-size: 25px; font-weight: 650; color: var(--text);
  font-family: var(--sans); letter-spacing: -.8px; text-shadow: none;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0;
}

/* ---------------- rows & lists ---------------- */
.userrow, .game-row, .rank-row, .chan-row, .board-row, .thread-row, .feed-row, .gm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 1px -12px;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  border-radius: var(--radius-sm);
  transition: background .14s var(--ease);
}
.userrow:last-child, .game-row:last-child, .rank-row:last-child,
.chan-row:last-child, .board-row:last-child, .thread-row:last-child, .feed-row:last-child {
  border-bottom: none;
}
.userrow:hover, .game-row:hover, .rank-row:hover, .chan-row:hover,
.board-row:hover, .thread-row:hover, .feed-row:hover {
  background: var(--surface-2); box-shadow: none;
}
.thread-row.pinned { background: var(--accent-soft); }

.avatar {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; color: #fff;
  border: none; clip-path: none; box-shadow: none;
}
.avatar.big { width: 76px; height: 76px; font-size: 32px; border-radius: 16px; }
.avatar.tiny { width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; margin-right: 6px; }
.dot.online { background: var(--good); box-shadow: none; }
.dot.ingame { background: var(--accent); box-shadow: none; }
.dot.away { background: var(--warn); box-shadow: none; }
.dot.dnd { background: var(--bad); box-shadow: none; }
.dot.offline { background: #3b4250; box-shadow: none; }

.badge {
  display: inline-block; background: var(--accent); color: #140a05;
  border-radius: 99px; font-size: 11px; font-weight: 600; padding: 1px 7px;
  box-shadow: none;
}

.tag, .clantag, .tag-joined {
  display: inline-block; font-size: 11px; font-weight: 550; letter-spacing: 0;
  padding: 1px 7px; border-radius: 99px; margin-left: 6px;
  text-transform: none; clip-path: none; vertical-align: middle;
}
.tag-admin { background: rgba(244, 114, 182, .14); color: var(--magenta); border: 1px solid rgba(244, 114, 182, .3); }
.tag-banned { background: rgba(255, 93, 93, .13); color: #ff8f8f; border: 1px solid rgba(255, 93, 93, .3); }
.tag-joined { background: rgba(62, 207, 142, .13); color: var(--good); border: 1px solid rgba(62, 207, 142, .3); }
.tag-role { background: rgba(167, 139, 250, .14); color: var(--violet); border: 1px solid rgba(167, 139, 250, .3); }
.tag-role.role-leader { background: var(--accent-soft); color: var(--flame-hi); border-color: var(--accent-line); }
.tag-role.role-officer { background: rgba(56, 189, 248, .13); color: var(--cyan); border-color: rgba(56, 189, 248, .3); }
.tag-role.role-owner { background: var(--accent-soft); color: var(--flame-hi); border-color: var(--accent-line); }
.tag-role.role-admin { background: rgba(56, 189, 248, .13); color: var(--cyan); border-color: rgba(56, 189, 248, .3); }
.tag-role.role-member { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
a.tag-role:hover { text-decoration: none; filter: brightness(1.15); }
.clantag { font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; opacity: .95; }
.clantag:hover { text-decoration: none; filter: brightness(1.15); }

/* ---------------- bars & charts ---------------- */
.bar-outer {
  background: rgba(255, 255, 255, .055); border: none; border-radius: 99px;
  height: 6px; overflow: hidden; clip-path: none; box-shadow: none;
}
.bar-inner {
  background: var(--accent); height: 100%; border-radius: 99px; box-shadow: none;
  transition: width .5s var(--ease);
}
.bar-inner::after { display: none; }
.bar-inner.over { background: var(--bad); animation: none; }
.gamebar { margin-bottom: 14px; }
.gamebar .lbl { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.gamebar .lbl span { color: var(--muted); font-family: var(--sans); font-size: 12.5px; }

.chart { margin-top: 4px; }
.chart-plot {
  display: flex; align-items: flex-end; width: 100%;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%;
  border-bottom: 1px solid var(--line); padding-top: 6px;
}
.chart-slot {
  display: flex; align-items: flex-end; justify-content: center;
  height: 100%; box-sizing: border-box; border-radius: 4px 4px 0 0;
}
.chart-bar {
  width: 100%; background: var(--chart-accent, var(--accent));
  border-radius: 4px 4px 0 0; min-height: 2px; transition: filter .12s ease;
}
.chart-slot:hover { background: var(--surface-2); }
.chart-slot:hover .chart-bar { filter: brightness(1.2); }
.chart-axis {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 8px; color: var(--dim); font-size: 11.5px;
}
.chart-peak { color: var(--muted); }
#chart-tip {
  position: fixed; top: 0; left: 0; z-index: 800; pointer-events: none;
  max-width: 260px; width: max-content;
  opacity: 0; transition: opacity .12s var(--ease);
  background:
    linear-gradient(180deg, rgba(140, 190, 230, .10), rgba(90, 140, 200, .03)),
    rgba(5, 9, 15, .96);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6), var(--crystal);
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
  color: var(--text); padding: 5px 9px; white-space: nowrap;
}
#chart-tip.on { opacity: 1; }

/* ---------------- tables ---------------- */
table.sessions, .admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.sessions td, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.admin-table th {
  text-align: left; padding: 8px; font-size: 12px; font-weight: 550;
  color: var(--muted); text-transform: none; letter-spacing: 0;
  border-bottom: 1px solid var(--line);
}
table.sessions td:last-child { text-align: right; color: var(--muted); font-family: var(--sans); font-size: 12.5px; }
.admin-table tr.row-banned { background: rgba(255, 93, 93, .05); }
.admin-table tr:hover td { background: var(--surface-2); }
.action-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.action-cell button { padding: 4px 10px; font-size: 12px; }

/* ---------------- flashes ---------------- */
.flash {
  animation: rise .3s var(--ease) both;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(62, 207, 142, .3); background: rgba(62, 207, 142, .08);
  color: var(--good); border-radius: var(--radius-sm);
  padding: 11px 14px; margin-bottom: 18px; font-size: 13.5px;
  text-transform: none; letter-spacing: 0;
}
.flash-error { border-color: rgba(255, 93, 93, .32); background: rgba(255, 93, 93, .08); color: #ff9d9d; }
.flash-error span { display: block; }

/* ---------------- tabs & pagination ---------------- */
.scope-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.scope-tabs a {
  padding: 6px 13px; border-radius: 99px; font-size: 13px; font-weight: 500;
  color: var(--muted); background: var(--surface-2); border: 1px solid transparent;
  text-transform: none; letter-spacing: 0;
}
.scope-tabs a:hover { color: var(--text); text-decoration: none; }
.scope-tabs a.active { background: var(--accent); color: #140a05; font-weight: 600; }

.pager { margin-top: 18px; display: flex; justify-content: center; }
.pg { display: flex; gap: 5px; align-items: center; }
.pg a, .pg span {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; background: var(--surface-2); color: var(--muted);
}
.pg a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.pg .cur { background: var(--accent); color: #140a05; border-color: transparent; font-weight: 600; }

/* ---------------- members, channels, clans ---------------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.member-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text); clip-path: none;
}
.member-card:hover { background: var(--surface-3); border-color: var(--line-strong); text-decoration: none; box-shadow: none; }
.member-state { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

.chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.chan-card {
  display: flex; flex-direction: column; gap: 5px; padding: 15px;
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text);
}
.chan-card:hover { background: var(--surface-3); text-decoration: none; box-shadow: none; border-color: var(--line-strong); border-left-color: var(--accent); }
.chan-topic { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-meta, .board-stats, .board-latest {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; color: var(--muted); text-align: right; min-width: 100px;
}
.board-latest { min-width: 160px; }
.chan-header, .clan-header, .game-header, .capture-bar, .thread-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.clan-actions { display: flex; gap: 8px; }
.clan-crest {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 650; font-size: 15px; color: #fff; font-family: var(--sans);
  border: none; box-shadow: none;
}
.clan-crest.big { width: 76px; height: 76px; font-size: 26px; border-radius: 18px; }

/* ---------------- community servers ---------------- */
.guild-crest {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 650; font-size: 15px; color: #fff; letter-spacing: -.2px;
}
.guild-crest.big { width: 76px; height: 76px; font-size: 24px; border-radius: 22px; }

.guild-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; margin-bottom: 6px;
}
.guild-card {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text);
}
.guild-card {
  transition: background .14s var(--ease), border-color .14s var(--ease), transform .14s var(--ease);
}
.guild-card:hover {
  border-color: var(--line-strong); background: var(--surface-3);
  text-decoration: none; transform: translateY(-1px);
}
.guild-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.guild-card-body b { font-size: 14px; }
.guild-card-count { text-align: right; line-height: 1.25; font-size: 11.5px; flex-shrink: 0; }
.userrow select { padding: 5px 8px; font-size: 12.5px; }

.invite-code {
  font-family: var(--mono); font-size: 12.5px; color: var(--link);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 11px; cursor: pointer; display: inline-block;
}
.invite-code:hover { border-color: var(--line-strong); color: var(--text); }

.invite-panel { max-width: 520px; margin: 50px auto; text-align: center; padding: 34px 30px 30px; }
.invite-panel .guild-crest.big { margin: 0 auto; }
.invite-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.invite-actions form { margin: 0; }
.status-quote { color: var(--muted); font-style: italic; margin: 8px 0 0; }

/* ---------------- games ---------------- */
.game-hours, .gm-hours {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--text);
  text-align: right; min-width: 96px; font-variant-numeric: tabular-nums;
}
.game-hours .hint, .gm-hours .hint { display: block; font-weight: 400; font-size: 11.5px; }
.game-crest {
  width: 58px; height: 58px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
  text-shadow: none;
}
.rank {
  width: 28px; flex-shrink: 0; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--dim); font-family: var(--sans);
}
.rank.rank-top { color: var(--accent); text-shadow: none; }

/* ---------------- feed ---------------- */
.feed-day {
  margin: 20px 0 8px; font-size: 12px; font-weight: 550; color: var(--muted);
  text-transform: none; letter-spacing: 0; display: flex; align-items: center; gap: 10px;
}
.feed-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------- captures ---------------- */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.shot {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #000; aspect-ratio: 16 / 10;
}
.shot { transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.shot:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  font-size: 12px; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shot-stats {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: #fff;
  background: none; padding: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); font-family: var(--sans);
}
.shot-stats .saved { margin-left: auto; color: var(--accent); }
.shot-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; }
.capture-stage { display: flex; justify-content: center; background: #000; padding: 12px; }
.capture-media { max-width: 100%; max-height: 66vh; border-radius: var(--radius-sm); border: none; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 550; cursor: pointer;
}
.vote-btn:hover { background: var(--surface-3); }
.vote-btn.on { background: rgba(62, 207, 142, .14); border-color: rgba(62, 207, 142, .4); color: var(--good); }
.vote-btn.down.on { background: rgba(255, 93, 93, .13); border-color: rgba(255, 93, 93, .38); color: #ff9d9d; }
.vote-btn.on.saved { background: var(--accent-soft); border-color: var(--accent-line); color: var(--flame-hi); }

/* ---------------- achievements ---------------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.badge-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 16px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); clip-path: none;
}
.badge-card.locked { opacity: .38; filter: grayscale(1); }
.badge-icon { font-size: 26px; line-height: 1.2; }
.badge-name { font-size: 13px; font-weight: 600; }
.badge-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.badge-rarity { font-size: 11px; color: var(--dim); font-family: var(--sans); }
.badge-card.tier-silver { border-color: rgba(203, 213, 225, .22); }
.badge-card.tier-gold { border-color: rgba(240, 180, 41, .35); box-shadow: none; }
.badge-card.tier-legendary { border-color: rgba(244, 114, 182, .4); background: linear-gradient(180deg, rgba(244, 114, 182, .1), var(--surface-2)); }

/* a profile shows the trophies themselves — the full board lives on its own page */
.badge-shelf { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 9px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .05); color: var(--text);
  transition: background .14s var(--ease), border-color .14s var(--ease), transform .14s var(--ease);
}
.badge-chip:hover { transform: translateY(-1px); }
.badge-chip:hover { background: var(--surface-3); border-color: var(--line-strong); text-decoration: none; }
.badge-chip-icon { font-size: 16px; line-height: 1; }
.badge-chip-name { font-size: 12.5px; font-weight: 550; }
.badge-chip.tier-silver { border-color: rgba(203, 213, 225, .24); }
.badge-chip.tier-gold { border-color: rgba(240, 180, 41, .38); }
.badge-chip.tier-legendary { border-color: rgba(244, 114, 182, .42); background: rgba(244, 114, 182, .09); }

.panel-link { margin-left: auto; font-size: 12.5px; font-weight: 500; }

/* the achievements pages */
.ach-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ach-tier-head {
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin: 0 0 14px;
}
.ach-tier-head.mt { margin-top: 26px; }
.tier-dot { width: 9px; height: 9px; border-radius: 50%; background: #a1704a; flex-shrink: 0; }
.tier-dot.tier-silver { background: #cbd5e1; }
.tier-dot.tier-gold { background: var(--warn); }
.tier-dot.tier-legendary { background: var(--magenta); }

.ach-list { display: flex; flex-direction: column; }
.ach-row {
  display: flex; align-items: center; gap: 14px; padding: 11px 10px;
  border-bottom: 1px solid var(--line); border-radius: var(--radius-sm);
}
.ach-row:last-child { border-bottom: none; }
.ach-row:hover { background: var(--surface-2); }
.ach-row.mine { box-shadow: inset 2px 0 0 var(--good); }
.ach-icon { font-size: 22px; width: 30px; text-align: center; flex-shrink: 0; }
.ach-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ach-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ach-rarity { text-align: right; min-width: 92px; font-size: 13px; }
.ach-rarity .hint { display: block; font-size: 11.5px; }

.ach-tier-tally { display: flex; gap: 8px; flex-wrap: wrap; }
.tier-pill {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.tier-pill b { font-size: 14px; color: var(--text); }
.tier-pill.tier-silver { border-color: rgba(203, 213, 225, .24); }
.tier-pill.tier-gold { border-color: rgba(240, 180, 41, .35); }
.tier-pill.tier-legendary { border-color: rgba(244, 114, 182, .4); }

/* ---------------- forum ---------------- */
.board-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.thread-icon { font-size: 15px; width: 26px; text-align: center; flex-shrink: 0; color: var(--muted); }
.post { display: flex; gap: 20px; align-items: flex-start; }
.post-side {
  width: 158px; flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 5px; text-align: center;
  border-right: 1px solid var(--line); padding-right: 16px;
}
.post-user { font-size: 13.5px; }
.post-sig { margin-top: 10px; max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.post-body { flex: 1; min-width: 0; }
.post-meta {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.post-text { line-height: 1.7; word-wrap: break-word; font-size: 14.5px; }
.post-edit { margin-top: 12px; }
.post-edit textarea { width: 100%; margin-bottom: 8px; }

/* markdown */
.md-code, code.embed, .post-text .md-code {
  display: block; background: #0d0f13; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0;
  font-family: var(--mono); font-size: 13px; color: #b7c5d4;
  white-space: pre-wrap; overflow-x: auto; border-left: 1px solid var(--line);
}
code.embed { color: #9fd8a8; }
.md-inline, .post-text .md-inline {
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-family: var(--mono); font-size: 12.5px;
}
.md-quote, .post-text .md-quote {
  display: block; border-left: 2px solid var(--line-strong); padding-left: 12px;
  color: var(--muted); margin: 6px 0;
}
.md-link, .post-text .md-link { color: var(--link); text-decoration: none; }
.md-link:hover { text-decoration: underline; }
.md-mention, .post-text .md-mention {
  background: rgba(122, 162, 255, .15); color: var(--link);
  padding: 1px 5px; border-radius: 5px; text-decoration: none;
}
.md-spoiler, .post-text .md-spoiler { background: var(--surface-3); color: transparent; border-radius: 5px; cursor: pointer; }
.md-spoiler:hover, .md-spoiler.revealed { color: inherit; background: var(--surface-3); }

/* channel log on the website */
.chatlog { max-height: 440px; overflow-y: auto; }
.chatmsg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.chatmsg .m-from { font-weight: 600; color: var(--text); }
.chatmsg .m-ts { color: var(--dim); font-size: 11.5px; margin-left: 7px; }
.chatmsg .m-body { margin-top: 3px; }
.chatmsg .m-body.deleted { color: var(--dim); font-style: italic; }
.rx-row { display: flex; gap: 6px; margin-top: 6px; }
.rx {
  font-size: 12px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.composer { display: flex; gap: 9px; margin-top: 14px; }
.composer input { flex: 1; }

/* ---------------- servers ---------------- */
.server-table td { vertical-align: middle; }
.server-table tr.row-offline { opacity: .5; }
.server-full { color: var(--bad); }
code.addr, .addr {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
  cursor: pointer; white-space: nowrap; background: var(--surface-2);
}
code.addr:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------------- notifications ---------------- */
.alert-form { display: block; }
.alert-row {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  padding: 13px 10px; margin: 0 -10px;
  background: none; border: none; border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text); cursor: pointer;
}
.alert-row:hover { background: var(--surface-2); }
.alert-row.unread { background: var(--accent-soft); }
.alert-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--surface-3);
}
.alert-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: none; }

/* ---------------- auth ---------------- */
.auth-wrap { display: flex; justify-content: center; padding: 40px 0; }
.auth-panel { width: 420px; max-width: 100%; }
.auth-emblem { text-align: center; font-size: 30px; color: var(--accent); margin-bottom: 6px; text-shadow: none; }

/* ---------------- admin ---------------- */
.admin-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 2px solid var(--magenta);
}
.admin-bar a { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.admin-bar a:hover, .admin-bar a.active { color: var(--text); text-decoration: none; border-bottom: none; }
.admin-title { color: var(--magenta); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.admin-stats .stat { padding: 12px 18px; min-width: 92px; }
.admin-stats .stat b { font-size: 20px; }

/* ---------------- footer ---------------- */
footer {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .04); margin-top: 40px; padding: 24px 0 34px;
  color: var(--dim); font-size: 12.5px; text-transform: none; letter-spacing: 0;
}
.foot-mark { color: var(--accent); font-weight: 600; letter-spacing: 0; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.foot-build { font-family: var(--mono); font-size: 11.5px; }

@media (max-width: 1100px) { .tagline, .hud-readout { display: none; } }
@media (max-width: 760px) {
  main { padding: 18px 14px 30px; }
  .hero h1 { font-size: 30px; }
  header { padding: 10px 14px; }
}

/* ---------------- error pages ---------------- */
.err-panel { max-width: 560px; margin: 60px auto; text-align: center; padding: 40px 32px 36px; }
.err-code {
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
  color: var(--accent); margin-bottom: 10px;
}
.err-title { margin: 0 0 10px; font-size: 26px; font-weight: 650; letter-spacing: -.4px; }
.err-body { margin: 0 auto 24px; max-width: 420px; color: var(--muted); }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------- ratings ---------------- */
.stars { color: var(--warn); letter-spacing: 1px; white-space: nowrap; }
.stars.small { font-size: 12px; }
.stars .hint { margin-left: 4px; letter-spacing: 0; }

.review-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.review-form input[name="body"] { flex: 1; min-width: 220px; }

/* radio stars, drawn right-to-left so hovering one lights the ones before it */
.star-pick { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-pick label {
  font-size: 22px; line-height: 1; cursor: pointer; color: #39404c;
  transition: color .1s; margin: 0; padding: 0 1px;
}
.star-pick label:hover, .star-pick label:hover ~ label,
.star-pick input:checked ~ label { color: var(--warn); }
.star-pick input:focus-visible + label { outline: 2px solid var(--accent-line); border-radius: 4px; }

.review { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.review-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }

/* ---------------- play streak heatmap ---------------- */
.heatmap { display: flex; flex-direction: column; gap: 8px; }
.heat-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.heat-week { display: flex; flex-direction: column; gap: 3px; }
.heat-cell {
  width: 12px; height: 12px; border-radius: 3px; background: var(--surface-3);
  display: block; flex-shrink: 0;
}
.heat-cell.level-1 { background: rgba(255, 106, 44, .28); }
.heat-cell.level-2 { background: rgba(255, 106, 44, .5); }
.heat-cell.level-3 { background: rgba(255, 106, 44, .74); }
.heat-cell.level-4 { background: var(--accent); }
.heat-cell.future { opacity: .25; }
.heat-cell:hover { outline: 1px solid var(--line-strong); }
.heat-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heat-scale { display: flex; align-items: center; gap: 3px; }

/* ---------------- now playing ---------------- */
.now-game { padding: 12px 0; border-bottom: 1px solid var(--line); }
.now-game:last-child { border-bottom: none; }
.now-game-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.now-players { display: flex; flex-wrap: wrap; gap: 7px; }
.now-player {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: 12.5px;
}
.now-player:hover { background: var(--surface-3); border-color: var(--line-strong); text-decoration: none; }
.now-player .dot { margin-left: 4px; }

/* ---------------- events ---------------- */
.event-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child { border-bottom: none; }
.event-row:hover { background: var(--surface-2); border-radius: var(--radius-sm); }
.event-row.past { opacity: .55; }
.event-when {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 58px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); line-height: 1.3;
}
.event-when b { font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }
.event-when span { font-size: 13px; }
.event-when.big { min-width: 88px; padding: 14px 16px; }
.event-when.big b { font-size: 14px; }
.event-when.big span { font-size: 16px; font-weight: 600; }
.event-count { text-align: right; min-width: 74px; }
.event-count b { font-size: 15px; }
.event-count .hint { display: block; font-size: 11.5px; }
.rsvp-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.rsvp-buttons form { margin: 0; }

/* ---------------- stats ---------------- */
/* an even grid, so a trailing odd stat never stretches across the panel */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
.stat-row .stat { margin: 0; }


/* ---------------------------------------------------------------- premium */
.prem-hero {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(900px 200px at 12% -30%, rgba(255, 106, 44, .16), transparent 70%),
    var(--surface);
}
.prem-hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.prem-hero .hint { max-width: 62ch; }
.prem-word {
  background: linear-gradient(96deg, #ffb46a, var(--accent) 60%, #ff4d8d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.prem-mark {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #1a1206;
  background: linear-gradient(150deg, #ffd08a, var(--accent));
  box-shadow: 0 6px 22px rgba(255, 106, 44, .3);
}
.prem-state {
  display: inline-block; margin-top: 12px; padding: 7px 12px;
  border-radius: 999px; font-size: 13px; border: 1px solid var(--line);
}
.prem-state.on { border-color: rgba(62, 207, 142, .45); color: var(--good); }
.prem-state.off { color: var(--muted); }

.prem-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.prem-perk { display: flex; gap: 10px; align-items: flex-start; }
.prem-tick { color: var(--accent); font-size: 14px; line-height: 1.5; }
.prem-perk b { display: block; font-size: 13.5px; margin-bottom: 2px; }

.prem-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13.5px; }
.prem-table th, .prem-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prem-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prem-table .plus { color: var(--accent); font-weight: 600; }
.prem-table td:first-child { color: var(--text); }

.prem-code-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.prem-code-row code { font-size: 12.5px; letter-spacing: .06em; }
.prem-codes { max-height: 260px; overflow-y: auto; }

.prem-members { display: flex; flex-direction: column; gap: 2px; }
.prem-member {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 13px;
}
.prem-member:hover { background: rgba(255, 255, 255, .04); }

/* the mark that follows a member around the site */
.prem-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 5px; border-radius: 4px;
  font-size: 10px; line-height: 1; color: #1a1206; vertical-align: middle;
  background: linear-gradient(150deg, #ffd08a, var(--accent));
}
.prem-badge.lg { width: 19px; height: 19px; font-size: 12px; border-radius: 5px; }
.prem-flair {
  display: block; font-size: 12px; color: var(--accent);
  letter-spacing: .02em; margin-top: 2px;
}

.head-nav .nav-premium { color: var(--accent); }
.head-nav .nav-premium::after { content: ' ✦'; font-size: 10px; vertical-align: super; }

/* a server's own emoji, inline in a message */
.cemoji { width: 20px; height: 20px; vertical-align: -4px; object-fit: contain; margin: 0 1px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.emoji-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
  padding: 10px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02); font-size: 12px;
}
.emoji-card img { width: 36px; height: 36px; object-fit: contain; }
.emoji-card code { font-size: 11px; color: var(--muted); word-break: break-all; }

/* ------------------------------------------------------------------ logo */
.logo { display: inline-flex; align-items: center; }
/* margin, not gap: a flex gap would also push the x away from the Wire */
.logo-mark { width: 22px; height: 22px; flex-shrink: 0; margin-right: 8px; }
.logo-mark.small { width: 15px; height: 15px; margin-right: 6px; }
.foot-mark { display: inline-flex; align-items: center; }
.prem-mark svg { width: 30px; height: 30px; }

.logo span { color: var(--text); }
.logo { color: var(--accent); font-weight: 700; letter-spacing: -.01em; }

.member-filters { display: flex; gap: 8px; margin: 10px 0 4px; }
.member-filters .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.member-filters .chip:hover { color: var(--text); }
.member-filters .chip.on { border-color: var(--accent); color: var(--accent); }


/* ============================================================================
   QUANTUM GLASS — the command-interface layer
   Panes are cut glass over obsidian: a translucent fill, a blur behind, an
   etched cyan edge, and circuit traces that only light up under the cursor.
   Nothing here changes what anything does.
   ============================================================================ */

/* ---- the etched trace pattern, shared by every pane ---- */
.panel, .set-card, .auth-panel, .stat, .member-card, .guild-card, .badge-card,
.prem-hero, .cap-card, .chan-card, .board-row, .thread-row, .ev-card {
  position: relative;
  isolation: isolate;
}
.panel::before, .set-card::before, .auth-panel::before, .prem-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .35; transition: opacity .25s var(--ease);
  background:
    /* micro-etched circuit traces: corners, stubs and a via */
    linear-gradient(90deg, var(--line-strong) 0 18px, transparent 18px) 0 0 / 100% 1px no-repeat,
    linear-gradient(180deg, var(--line-strong) 0 18px, transparent 18px) 0 0 / 1px 100% no-repeat,
    linear-gradient(270deg, var(--line-strong) 0 18px, transparent 18px) 100% 100% / 100% 1px no-repeat,
    linear-gradient(0deg, var(--line-strong) 0 18px, transparent 18px) 100% 100% / 1px 100% no-repeat,
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(0, 243, 255, .05) 26px 27px);
}
.panel:hover::before, .set-card:hover::before, .prem-hero:hover::before {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(0, 243, 255, .5));
}

/* ---- the pane itself ---- */
.panel, .auth-panel, .set-card {
  background: var(--glass-1);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--crystal);
  padding: 14px 16px 16px;
  /* the cut corner that makes a pane read as machined rather than drawn */
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.panel:hover { border-color: var(--line-strong); }

/* ---- headings: geometric, tight, and labelled like an instrument ---- */
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.03em; font-weight: 640; }
h1 { font-size: 25px; }
h2 {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
  display: flex; align-items: center; gap: 9px;
}
h2::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
h2 .hint { letter-spacing: .04em; text-transform: none; color: var(--dim); font-size: 11px; }

/* ---- anything that is a value is monospaced ---- */
.stat b, .stat-value, .chart-value, .prem-table td, .admin-stats b, .sig-value,
code, .addr, .mono, .member-state, .heat-legend, .pagination {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* ---- readout tiles: dense, asymmetric, no dashboard padding ---- */
.stats, .admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 1px;
  background: var(--line-quiet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat, .admin-stats > div {
  background: rgba(6, 10, 16, .72);
  backdrop-filter: var(--blur);
  padding: 11px 13px 12px;
  border-radius: 0;
  border: none;
  position: relative;
}
.stat::after, .admin-stats > div::after {
  content: ''; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
  background: var(--accent); opacity: .0; transition: opacity .2s var(--ease);
}
.stat:hover::after, .admin-stats > div:hover::after { opacity: .9; box-shadow: var(--accent-glow); }
.stat b, .admin-stats b {
  display: block; font-size: 21px; font-weight: 600; color: var(--text);
  text-shadow: 0 0 22px rgba(0, 243, 255, .28);
}
.stat span, .admin-stats span {
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
}

/* ---- the dense asymmetric grid ---- */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 14px;
  align-items: start;
}
.cols > .panel { margin: 0; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* three-up pages stagger rather than sitting in equal boxes */
.grid-dense {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
}
@media (max-width: 1100px) { .grid-dense { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
@media (max-width: 760px) { .grid-dense { grid-template-columns: 1fr; } }

/* ---- header: a fixed instrument bar ---- */
header {
  background: rgba(4, 6, 10, .72);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.head-top { padding: 10px 18px; }
.head-nav {
  padding: 0 18px; gap: 0; border-top: 1px solid var(--line-quiet);
}
.head-nav a {
  padding: 9px 13px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); border-bottom: 1px solid transparent; position: relative;
}
.head-nav a:hover { color: var(--text); background: rgba(0, 243, 255, .05); }
.head-nav a.active {
  color: var(--accent); border-bottom-color: var(--accent);
  box-shadow: 0 1px 12px rgba(0, 243, 255, .35);
}

/* ---- controls ---- */
button, .btn, .primary, .ghost, input, select, textarea {
  border-radius: var(--radius-sm);
  font-family: var(--sans);
}
.primary, button[type="submit"], .nav-cta {
  background: linear-gradient(180deg, rgba(0, 243, 255, .22), rgba(0, 243, 255, .10));
  border: 1px solid var(--accent-line);
  color: var(--accent);
  letter-spacing: .06em; text-transform: uppercase; font-size: 11.5px; font-weight: 600;
  padding: 8px 14px;
  box-shadow: inset 0 1px 0 rgba(190, 240, 255, .18);
  transition: box-shadow .18s var(--ease), background .18s var(--ease);
}
.primary:hover, button[type="submit"]:hover, .nav-cta:hover {
  box-shadow: var(--accent-glow), inset 0 1px 0 rgba(190, 240, 255, .3);
  background: linear-gradient(180deg, rgba(0, 243, 255, .3), rgba(0, 243, 255, .14));
}
input, select, textarea {
  background: rgba(2, 5, 9, .6);
  border: 1px solid var(--line-quiet);
  color: var(--text);
  font-size: 13px;
  padding: 8px 10px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-line);
  box-shadow: 0 0 0 1px rgba(0, 243, 255, .18), 0 0 14px rgba(0, 243, 255, .18);
}
input::placeholder { color: var(--dim); }

/* ---- rows and tables: hairlines, not cards ---- */
table, .admin-table { border-collapse: collapse; width: 100%; font-size: 13px; }
th {
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim); font-weight: 600; text-align: left;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
td { padding: 8px 10px; border-bottom: 1px solid var(--line-quiet); }
tr:hover td { background: rgba(0, 243, 255, .04); }

.userrow, .chan-row, .board-row, .thread-row, .prem-code-row, .ev-item, .feed-item {
  border-bottom: 1px solid var(--line-quiet);
  border-radius: 0;
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}
.userrow:hover, .chan-row:hover, .board-row:hover, .thread-row:hover {
  background: rgba(0, 243, 255, .045);
  box-shadow: inset 2px 0 0 var(--accent);
}

/* ---- chips, tags, badges ---- */
.tag, .chip, .badge-chip, .clantag, .role-chip, .member-filters .chip {
  border-radius: 2px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); background: rgba(0, 243, 255, .05);
}
.prem-badge {
  border-radius: 2px;
  background: linear-gradient(150deg, var(--accent-2), #ff7a1a);
  color: #100a02; box-shadow: var(--amber-glow);
}

/* ---- presence dots read as indicator lamps ---- */
.dot { box-shadow: 0 0 8px currentColor; }
.dot.online, .dot.ingame { color: var(--good); }
.dot.away { color: var(--warn); }
.dot.offline { color: var(--dim); box-shadow: none; }

/* ---- the premium hero keeps its own amber identity ---- */
.prem-hero {
  background: var(--glass-2);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.prem-mark { border-radius: 3px; box-shadow: var(--amber-glow); }
.prem-word { background: linear-gradient(96deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- live telemetry strip ---- */
.telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line-quiet);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 14px;
}
.tm-cell {
  background: rgba(5, 8, 13, .8); backdrop-filter: var(--blur);
  padding: 9px 11px 7px; position: relative; min-width: 0;
}
.tm-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--dim);
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.tm-value {
  font-family: var(--mono); font-size: 17px; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.2;
}
.tm-value.amber { color: var(--accent-2); text-shadow: var(--amber-glow); }
.tm-value.cyan { color: var(--accent); text-shadow: 0 0 16px rgba(0, 243, 255, .4); }
.tm-graph { display: block; width: 100%; height: 26px; margin-top: 3px; }
.tm-cell::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .16) 3px 4px);
  opacity: .5;
}

/* the scanline treatment, applied once at the top level */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, .10) 2px 3px);
  mix-blend-mode: multiply; opacity: .55;
}


/* ---- glass needs something to be glass *over* ---------------------------
   backdrop-filter has nothing to blur above a flat black page, so the pane
   carries its own body: a cool translucent fill, a brighter top edge where
   the light catches, and a faint diagonal sheen across the crystal. */
.panel, .auth-panel, .set-card, .prem-hero {
  background:
    linear-gradient(135deg, rgba(0, 243, 255, .035), transparent 38%),
    linear-gradient(180deg, rgba(140, 190, 230, .075), rgba(90, 140, 200, .028)),
    rgba(7, 11, 18, .82);
}
.panel:hover, .set-card:hover {
  background:
    linear-gradient(135deg, rgba(0, 243, 255, .06), transparent 40%),
    linear-gradient(180deg, rgba(140, 190, 230, .095), rgba(90, 140, 200, .04)),
    rgba(8, 13, 21, .85);
}

/* the readout row on the home page uses .statrow, not .stats */
.statrow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 1px; background: var(--line-quiet);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: 18px auto; max-width: 680px;
}
.statrow .stat {
  background: rgba(6, 10, 16, .8); backdrop-filter: var(--blur);
  padding: 12px 14px 13px; text-align: center;
}

/* ---- the hero reads as a heads-up display, not a landing page ---- */
.hero { padding: 40px 0 26px; position: relative; }
.hero h1 {
  font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -.045em; line-height: 1.02;
  text-shadow: 0 0 60px rgba(0, 243, 255, .18);
}
.hero h1 span, .hero .accent { color: var(--accent); text-shadow: 0 0 32px rgba(0, 243, 255, .45); }
.hero p { color: var(--muted); font-size: 14px; }

/* a corner tick on every pane, the way an instrument marks its bounds */
.panel::after {
  content: ''; position: absolute; right: 0; top: 0; width: var(--notch); height: var(--notch);
  background: linear-gradient(225deg, var(--accent) 0 1px, transparent 1px);
  opacity: .5; pointer-events: none;
}
.panel:hover::after { opacity: 1; filter: drop-shadow(0 0 5px var(--accent)); }


/* ---- headings inside panes -------------------------------------------
   The original .panel h2 rule out-specifies a bare h2, so the instrument
   labelling is restated here rather than left half-applied. */
.panel h2, .panel h3, .set-card h2, .auth-panel h2 {
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px; padding: 0 0 8px;
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line-quiet);
}
.panel h2::after, .set-card h2::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  border: none; margin: 0;
}
.panel h2 .hint, .panel h3 .hint {
  letter-spacing: .04em; text-transform: none; color: var(--dim);
  font-size: 11px; font-weight: 400; font-family: var(--mono);
}
.panel h1 { font-size: 20px; letter-spacing: -.03em; margin: 0 0 10px; }

/* section titles that sit outside a pane */
.page-head h1, .hero h1 { letter-spacing: -.045em; }


/* ---------------------------------------------------------------- the nav */
.head-nav { display: flex; align-items: stretch; gap: 0; position: relative; z-index: 40; }
.head-nav .nav-flat, .nav-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); background: none; border: none; border-bottom: 1px solid transparent;
  font-family: var(--sans); font-weight: 600; cursor: pointer; text-decoration: none;
}
.head-nav .nav-flat:hover, .nav-top:hover { color: var(--text); background: rgba(0, 243, 255, .05); }
.head-nav .nav-flat.active, .nav-group.active > .nav-top {
  color: var(--accent); border-bottom-color: var(--accent);
  box-shadow: 0 1px 12px rgba(0, 243, 255, .3);
}
.nav-group { position: relative; display: flex; }
.nav-caret {
  width: 0; height: 0; margin-top: 1px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor; opacity: .55;
  transition: transform .16s var(--ease), opacity .16s var(--ease);
}
.nav-group.open .nav-caret { transform: rotate(180deg); opacity: 1; }
.nav-group.open > .nav-top { color: var(--accent); background: rgba(0, 243, 255, .07); }

/* the menu is a cut-glass pane, same language as everything else */
.nav-menu {
  position: absolute; top: 100%; left: 0; min-width: 268px; z-index: 60;
  display: none; flex-direction: column; padding: 5px;
  background:
    linear-gradient(135deg, rgba(0, 243, 255, .05), transparent 40%),
    linear-gradient(180deg, rgba(140, 190, 230, .085), rgba(90, 140, 200, .03)),
    rgba(5, 9, 15, .96);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), var(--crystal);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.nav-group.open .nav-menu { display: flex; animation: navIn .14s var(--ease); }
@keyframes navIn { from { transform: translateY(-5px); } }

.nav-menu a {
  display: block; padding: 8px 11px; text-decoration: none; border-radius: 2px;
  border-left: 2px solid transparent; transition: background .14s var(--ease);
}
.nav-menu a b {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text);
  letter-spacing: 0; text-transform: none;
}
.nav-menu a span {
  display: block; font-family: var(--mono); font-size: 10.5px; color: var(--dim);
  letter-spacing: .02em; margin-top: 1px;
}
.nav-menu a:hover, .nav-menu a:focus-visible {
  background: rgba(0, 243, 255, .08); border-left-color: var(--accent); outline: none;
}
.nav-menu a:hover b, .nav-menu a:focus-visible b { color: var(--accent); }
.nav-menu a.here { border-left-color: var(--accent); background: rgba(0, 243, 255, .05); }
.nav-menu a.here b { color: var(--accent); }

.head-nav .nav-premium { color: var(--accent-2); }
.head-nav .nav-premium::after { content: ' ✦'; font-size: 9px; vertical-align: super; }
.head-nav .nav-premium.active { border-bottom-color: var(--accent-2); box-shadow: 0 1px 12px rgba(255, 176, 32, .3); }


/* The header has to sit above the page: it and main both carried z-index 1, so
   a dropdown rendered underneath whatever the page was showing. */



/* Narrow windows: the bar wraps rather than scrolling. A scroll container
   clips whatever hangs out of it, and what hangs out of this one is the menus. */
@media (max-width: 820px) {
  .head-nav { flex-wrap: wrap; padding: 0 12px 4px; }
  .nav-menu { min-width: 220px; }
}
@media (max-width: 520px) {
  .nav-menu { position: static; box-shadow: none; clip-path: none; border-left: none;
              border-right: none; background: rgba(0, 243, 255, .04); }
  .nav-group { flex-direction: column; }
}

/* ---- charts wear the data colour: thin amber marks that glow ------------- */
.chart-bar {
  box-shadow: 0 0 9px color-mix(in srgb, var(--chart-accent, var(--accent-2)) 35%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .22);
  border-radius: 2px 2px 0 0;
}
.chart-slot:hover .chart-bar {
  filter: brightness(1.25);
  box-shadow: 0 0 16px color-mix(in srgb, var(--chart-accent, var(--accent-2)) 60%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .3);
}
.chart-plot { border-bottom-color: var(--line-strong); }
.gamebar .bar-inner { box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---- native controls join the instrument panel --------------------------- */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  width: 14px; height: 14px;
}
input[type="color"] {
  background: rgba(2, 5, 9, .6); border: 1px solid var(--line);
  border-radius: 2px; padding: 2px; height: 30px; cursor: pointer;
}
input[type="range"] { accent-color: var(--accent); }
progress { accent-color: var(--accent); }

/* ---- the sign-in emblem is the mark itself, lamp-lit ---------------------- */
.auth-emblem { display: flex; justify-content: center; margin-bottom: 8px; }
.auth-emblem svg {
  width: 40px; height: 40px;
  filter: drop-shadow(0 0 14px rgba(255, 106, 44, .45));
}

/* ============================================================================
   CINEMATIC LAYER — scroll-reveal, hero cold-start, command palette.
   Motion and one new overlay; no page's content or links change. Everything
   collapses under prefers-reduced-motion at the end.
   ============================================================================ */

/* ---- scroll-reveal: panels resolve into place as they enter view --------- */
.reveal-on .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
.reveal-on .reveal.is-in { opacity: 1; transform: none; }
.reveal-instant .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---- the hero plays a scripted cold-start on load ------------------------ */
.hero-cine .hero-rise { opacity: 0; animation: heroRise .7s var(--ease) both; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero-cine h1 { position: relative; }
.hero-cine h1 .accent, .hero-cine h1 span {
  text-shadow: 0 0 42px rgba(0, 243, 255, .5);
}
/* a light sweep crosses the hero once, like a scanner passing over it */
.hero-cine::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(105deg, transparent 40%, rgba(0, 243, 255, .10) 50%, transparent 60%);
  background-size: 300% 100%; background-position: 120% 0;
  animation: heroSweep 1.6s var(--ease) .3s 1;
}
@keyframes heroSweep { to { background-position: -120% 0; } }

/* ---- the ⌘K cue chip in the header --------------------------------------- */
.cmdk-cue {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  background: rgba(0, 243, 255, .05); border: 1px solid var(--line);
  border-radius: 4px; padding: 4px 7px; margin-left: 8px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.cmdk-cue:hover { border-color: var(--accent-line); background: rgba(0, 243, 255, .1); }
.cmdk-cue kbd {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  background: none; border: none; padding: 0; line-height: 1;
}
@media (max-width: 720px) { .cmdk-cue { display: none; } }

/* ---- the command palette overlay ----------------------------------------- */
.cmdk { position: fixed; inset: 0; z-index: 2000; }
.cmdk[hidden] { display: none !important; }
.cmdk-scrim {
  position: absolute; inset: 0; background: rgba(2, 4, 8, .72);
  backdrop-filter: blur(4px); animation: cmdkFade .18s var(--ease);
}
@keyframes cmdkFade { from { opacity: 0; } }
.cmdk-panel {
  position: absolute; left: 50%; top: 14vh; transform: translateX(-50%);
  width: min(620px, 92vw);
  background:
    linear-gradient(135deg, rgba(0, 243, 255, .05), transparent 42%),
    linear-gradient(180deg, rgba(140, 190, 230, .08), rgba(90, 140, 200, .03)),
    rgba(6, 10, 16, .97);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), var(--crystal), 0 0 0 1px rgba(0, 243, 255, .06);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  overflow: hidden; animation: cmdkPop .2s var(--ease);
}
@keyframes cmdkPop { from { opacity: 0; transform: translate(-50%, -8px); } }
.cmdk-field {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.cmdk-prompt { font-family: var(--mono); color: var(--accent); font-size: 18px; }
.cmdk-field input {
  flex: 1; background: none; border: none; outline: none; padding: 0;
  color: var(--text); font-size: 15px; font-family: var(--sans);
}
.cmdk-esc {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px;
}
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.cmdk-item {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  gap: 2px 12px; padding: 9px 12px; border-radius: 4px; cursor: pointer;
  border-left: 2px solid transparent;
}
.cmdk-item .cmdk-label { color: var(--text); font-size: 13.5px; }
.cmdk-item .cmdk-sub {
  grid-column: 1; font-family: var(--mono); font-size: 10.5px; color: var(--dim);
}
.cmdk-item .cmdk-path {
  grid-row: 1 / span 2; align-self: center;
  font-family: var(--mono); font-size: 10.5px; color: var(--dim); opacity: .7;
}
.cmdk-item.sel {
  background: rgba(0, 243, 255, .08); border-left-color: var(--accent);
}
.cmdk-item.sel .cmdk-label { color: var(--accent); }
.cmdk-item.sel .cmdk-path { color: var(--accent); opacity: 1; }
body.cmdk-open { overflow: hidden; }

/* ---- collapse the motion for anyone who asks for calm -------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  .hero-cine .hero-rise { opacity: 1; animation: none; }
  .hero-cine::after, .cmdk-scrim, .cmdk-panel { animation: none; }
}

/* ============================================================================
   HIGH-TECH SCHEME — a HUD reticle framing the viewport, indexed instrument
   headers, and a deeper signal palette. All static or hover-only: nothing here
   animates continuously, so it adds no idle cost.
   ============================================================================ */

/* ---- viewport reticle: L-brackets in the four corners, like a targeting frame */
html::before {
  content: ''; position: fixed; inset: 10px; z-index: 940; pointer-events: none;
  opacity: .45;
  --b: 20px;   /* bracket arm length */
  background:
    linear-gradient(var(--accent), var(--accent)) left  top    / var(--b) 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left  top    / 1px var(--b) no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top    / var(--b) 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top    / 1px var(--b) no-repeat,
    linear-gradient(var(--accent), var(--accent)) left  bottom / var(--b) 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left  bottom / 1px var(--b) no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / var(--b) 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px var(--b) no-repeat;
  filter: drop-shadow(0 0 4px var(--accent-line));
}
/* a hairline coordinate readout in two corners */
html::after {
  content: 'XW·NET // SECTOR 04'; position: fixed; right: 16px; bottom: 13px; z-index: 941;
  pointer-events: none; font-family: var(--mono); font-size: 8.5px; letter-spacing: .28em;
  color: var(--dim); opacity: .6; text-transform: uppercase;
}
@media (max-width: 640px) { html::before { inset: 6px; } html::after { display: none; } }

/* ---- instrument headers: an index tag and a segmented spectrum line -------- */
.panel > h2::before, .panel > h3::before {
  content: '▚'; color: var(--accent); opacity: .8; font-size: 10px;
  margin-right: -3px; text-shadow: 0 0 8px var(--accent-line);
}
h2::after {
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 7px) !important;
  opacity: .8;
}

/* ---- a thin spectrum rail along the top of major panels -------------------- */
.panel::after {
  content: ''; display: block; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 22%,
              transparent 70%, var(--accent-2) 100%);
  opacity: .5; transition: opacity .25s var(--ease);
}
.panel:hover::after { opacity: 1; }

/* ---- deeper signal palette: values glow faintly, units read as annotations - */
.stat b, .tm-value, .statrow .stat b {
  text-shadow: 0 0 20px rgba(0, 243, 255, .22);
}
.stat span, .admin-stats span, .tm-label {
  position: relative;
}
.stat span::before { content: '// '; color: var(--accent); opacity: .5; }

/* status dots get a machined ring */
.dot { box-shadow: 0 0 0 1px rgba(0,243,255,.15), 0 0 8px currentColor; }

/* ============================================================================
   COMMAND DECK — the landing hero rebuilt as a showpiece: an oversized display
   headline beside a live network-status console on layered glass. Static glow
   only; the one "live" pulse is a single tiny element.
   ============================================================================ */
.deck {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 40px; align-items: center;
  padding: 30px 0 40px; position: relative;
}
@media (max-width: 900px) { .deck { grid-template-columns: 1fr; gap: 26px; } }

.deck-kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent); opacity: .9; margin-bottom: 16px;
  text-shadow: 0 0 14px var(--accent-line);
}
.deck-title {
  font-size: clamp(40px, 6vw, 74px); line-height: .96; letter-spacing: -.045em;
  font-weight: 720; margin: 0 0 20px; color: var(--text);
}
.deck-title em {
  font-style: normal;
  background: linear-gradient(96deg, var(--accent), #baf9ff 40%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(0, 243, 255, .35);
}
.deck-sub { color: var(--muted); font-size: 15px; line-height: 1.62; max-width: 46ch; margin: 0 0 24px; }
.deck-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.deck-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.deck-tags span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--line); border-radius: 2px; padding: 4px 9px;
  background: rgba(0, 243, 255, .03);
}

/* ---- the live console: layered cut glass with a glow ---- */
.deck-console {
  position: relative; padding: 20px 22px 18px; isolation: isolate;
  background:
    linear-gradient(135deg, rgba(0, 243, 255, .07), transparent 42%),
    linear-gradient(180deg, rgba(140, 190, 230, .10), rgba(90, 140, 200, .035)),
    rgba(6, 11, 18, .82);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), var(--crystal), 0 0 40px rgba(0, 243, 255, .06);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.deck-console::before {   /* spectrum rail */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
}
.dc-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line-quiet);
}
.dc-head .dc-id { margin-left: auto; color: var(--dim); }
.dc-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 8px var(--good); animation: dcLive 2.4s ease-in-out infinite;
}
@keyframes dcLive { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.dc-emblem { display: flex; justify-content: center; padding: 20px 0 22px; }
.dc-emblem svg {
  width: 96px; height: 96px;
  filter: drop-shadow(0 0 26px rgba(0, 243, 255, .45)) drop-shadow(0 0 50px rgba(255, 176, 32, .12));
}
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-quiet); border: 1px solid var(--line); }
.dc-cell { background: rgba(4, 8, 13, .7); padding: 12px 14px; }
.dc-cell b {
  display: block; font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--text);
  line-height: 1; letter-spacing: -.02em; text-shadow: 0 0 20px rgba(0, 243, 255, .2);
}
.dc-cell b.cyan { color: var(--accent); text-shadow: 0 0 16px var(--accent-line); }
.dc-cell b small { font-size: 12px; color: var(--dim); margin-left: 2px; }
.dc-cell span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.dc-foot {
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); margin-top: 12px; text-align: center; opacity: .7;
}
/* the deck already leads the page — no reveal delay hiding it on load */
.reveal-on .deck.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dc-live { animation: none; } }
