/* ============================================================
   XFX.SYSTEMS — Web Menu (overlay mirror)
   ------------------------------------------------------------
   Visual twin of the in-game overlay shell: grouped left nav with ON
   pills, a flat option list on the right, hairline surfaces. Tokens come
   from xfx.css, so this inherits the site palette automatically.
   ============================================================ */
.wm {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--card), #0b0b0b);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

/* ── top bar: what we detected + live status ──────────────── */
.wm-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
}
.wm-top-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wm-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-4); flex: 0 0 auto;
  transition: background .2s, box-shadow .2s;
}
.wm-dot-live { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.wm-prod { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.wm-sub { font-size: 12px; color: var(--text-3); }
.wm-top-r { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wm-search { width: 190px; }
.wm-chip {
  font-family: var(--xfx-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-3);
  white-space: nowrap;
}
.wm-chip-on   { color: #0a0a0a; background: var(--accent); border-color: var(--accent); }
.wm-chip-busy { color: var(--text); border-color: rgba(255, 255, 255, .34); }
.wm-chip-off  { color: var(--text-4); }
.wm-chip-err  { color: var(--danger); border-color: rgba(192, 57, 43, .5); }

/* ── body: nav + option list ─────────────────────────────── */
.wm-body {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 460px;
}
.wm-nav {
  padding: 12px 14px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .012);
  overflow-y: auto;
  max-height: 74vh;
}
.wm-nlabel {
  font-family: var(--xfx-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-4);
  padding: 14px 10px 7px;
}
.wm-nlabel:first-child { padding-top: 4px; }
.wm-nitem {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  transition: background .13s, color .13s;
}
.wm-nitem:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.wm-nitem.active {
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 255, 255, .015));
}
.wm-nitem.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent-glow);
}
.wm-nitem-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-bd {
  font-family: var(--xfx-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-4);
}
.wm-bd-on { color: var(--accent); }

/* ── main: section header + option rows ──────────────────── */
.wm-main { padding: 18px 20px 26px; overflow-y: auto; max-height: 74vh; }
.wm-panel { display: none; }
.wm-panel.active { display: block; }
.wm-phead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.wm-phead h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.wm-pcount {
  font-family: var(--xfx-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-4);
}
.wm-pacts { display: flex; gap: 8px; margin-left: auto; }
.wm-mini {
  font-family: var(--xfx-mono);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line-2); color: var(--text-3);
  transition: color .14s, border-color .14s, background .14s;
}
.wm-mini:hover { color: var(--text); border-color: var(--line-4); background: rgba(255, 255, 255, .05); }

.wm-rows { display: flex; flex-direction: column; }
.wm-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 11px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
}
.wm-row:last-child { border-bottom: 0; }
.wm-row[hidden] { display: none; }
.wm-row-stack { flex-direction: column; align-items: stretch; gap: 9px; }
.wm-label { font-size: 13.5px; color: var(--text-2); }

/* switch — mirrors the overlay's toggle */
.wm-sw {
  position: relative; flex: 0 0 auto;
  width: 40px; height: 22px; border-radius: 999px;
  border: 1px solid var(--line-3);
  background: #131313;
  transition: background .16s, border-color .16s;
}
.wm-sw::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-4);
  transition: transform .16s, background .16s;
}
.wm-sw.on { background: var(--accent); border-color: var(--accent); }
.wm-sw.on::after { transform: translateX(18px); background: #0a0a0a; }
.wm-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* slider + numeric readout */
.wm-slider { display: flex; align-items: center; gap: 12px; width: 100%; }
.wm-slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; height: 3px; border-radius: 3px;
  background: var(--line-2); outline: none;
}
.wm-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 0; cursor: pointer;
}
.wm-slider input[type=range]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 0; cursor: pointer;
}
.wm-val {
  flex: 0 0 auto; min-width: 58px; text-align: right;
  font-family: var(--xfx-mono); font-size: 12px; color: var(--text);
}

/* colour swatch, text + key inputs */
.wm-color {
  -webkit-appearance: none; appearance: none;
  width: 46px; height: 26px; padding: 0;
  border: 1px solid var(--line-3); border-radius: 7px;
  background: transparent; cursor: pointer;
}
.wm-color::-webkit-color-swatch-wrapper { padding: 2px; }
.wm-color::-webkit-color-swatch { border: 0; border-radius: 5px; }
.wm-input {
  background: #0d0d0d; border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); font: inherit; font-size: 13px;
  padding: 7px 10px; min-width: 0;
}
.wm-input:focus { outline: none; border-color: var(--line-4); }
.wm-input-sm { font-size: 12.5px; padding: 6px 9px; }
.wm-input-num { width: 76px; font-family: var(--xfx-mono); }
.wm-key { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wm-empty {
  padding: 46px 24px; text-align: center;
  color: var(--text-3); font-size: 13.5px; line-height: 1.7;
}

/* ── responsive: stack nav above the options ─────────────── */
@media (max-width: 900px) {
  .wm-body { grid-template-columns: minmax(0, 1fr); }
  .wm-nav {
    border-right: 0; border-bottom: 1px solid var(--line);
    max-height: 260px;
  }
  .wm-nitem.active::before { left: -14px; }
  .wm-main { max-height: none; }
  .wm-search { width: 100%; }
  .wm-top { align-items: flex-start; }
}
/* ============================================================
   Web Menu — full page (/webmenu)
   The launcher splash plus a full-height stage for the mounted menu.
   ============================================================ */
.wmp-page { max-width: 1600px; margin: 0 auto; padding: 26px 24px 90px; }

/* ── Launcher ─────────────────────────────────────────────── */
.wmp-splash {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 78px 32px 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(180deg, var(--card-2), #0a0a0a);
  text-align: center;
  box-shadow: var(--shadow-2);
}
.wmp-splash-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.wmp-splash h1 {
  font-size: clamp(36px, 6.4vw, 68px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
  margin: 14px 0 0;
}
.wmp-splash h1 .thin { font-weight: 300; color: var(--text-3); }
.wmp-lead {
  max-width: 60ch; margin: 18px auto 0;
  font-size: 15.5px; line-height: 1.75; color: var(--text-2);
}
.wmp-detect {
  display: inline-flex; align-items: center; gap: 11px;
  margin: 26px 0 30px; padding: 11px 20px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--xfx-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--text-2); max-width: 100%;
}
.wmp-detect b { color: var(--text); font-weight: 700; }
.wmp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--text-4);
  transition: background .2s, box-shadow .2s;
}
.wmp-dot.scan { background: var(--warn); animation: xfx-beat 1.4s ease-out infinite; }
.wmp-dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(142, 224, 176, .8); animation: xfx-beat 2.2s ease-out infinite; }
.wmp-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.wmp-hint { margin-top: 20px; font-size: 12.5px; color: var(--text-3); min-height: 18px; }
.wmp-hint.err { color: #eb9a90; }
.wmp-feats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin-top: 46px; text-align: left;
}
.wmp-feat {
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, .014);
}
.wmp-feat-k {
  font-family: var(--xfx-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-4); margin-bottom: 7px;
}
.wmp-feat-v { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

/* ── Stage: the mounted menu, full height ─────────────────── */
.wmp-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.wmp-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-2);
  font-family: var(--xfx-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
  transition: color .15s, border-color .15s, background .15s;
}
.wmp-back:hover { color: var(--text); border-color: var(--line-4); background: rgba(255, 255, 255, .05); }
.wmp-bar-t { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.wmp-stage .wm-body { min-height: calc(100vh - 340px); }
.wmp-stage .wm-nav,
.wmp-stage .wm-main { max-height: calc(100vh - 340px); }
@media (max-width: 900px) {
  .wmp-page { padding: 18px 14px 70px; }
  .wmp-splash { padding: 52px 18px 46px; }
  .wmp-stage .wm-body { min-height: 0; }
  .wmp-stage .wm-nav,
  .wmp-stage .wm-main { max-height: none; }
}