/* ───────────── Menu: a staging area over the live 3D scene ─────────────
   Olive graphite panels, bone text, signal amber for actions, radio teal for people/online.
   Stencil type only for the big words (navigation, mode names, deploy). */
:root {
  --m-ink: #141912;
  --m-ink2: #1c2219;
  --m-glass: rgba(16, 20, 14, 0.82);
  --m-bone: #e9e4d4;
  --m-dim: #a8a796;
  --m-faint: rgba(233, 228, 212, 0.14);
  --m-amber: #f2a33a;
  --m-teal: #5fb3a8;
  --m-red: #e5484d;
  --m-stencil: 'Big Shoulders Stencil Display', 'Saira Stencil One', 'Rajdhani', sans-serif;
  --m-body: 'Barlow', 'Inter', system-ui, sans-serif;
}

#game.menu-stage canvas { filter: saturate(1.05) contrast(1.03); }

.m-shell {
  position: absolute; inset: 0; display: grid; min-height: 0; overflow: hidden;
  grid-template-columns: 300px minmax(0, 1fr) 470px;
  grid-template-rows: 72px minmax(0, 1fr) 44px;
  grid-template-areas: 'top top top' 'nav stage panel' 'foot foot foot';
  font-family: var(--m-body); color: var(--m-bone); font-size: 15px;
  background:
    linear-gradient(90deg, rgba(8, 10, 7, 0.72) 0, rgba(8, 10, 7, 0.4) 300px, transparent 520px),
    radial-gradient(120% 90% at 40% 55%, transparent 45%, rgba(6, 8, 5, 0.55) 100%);
}
.m-shell.wide { grid-template-columns: 300px minmax(0, 0.55fr) minmax(560px, 1fr); }
.m-shell.auth { grid-template-columns: minmax(0, 1fr) 440px; grid-template-areas: 'top top' 'hero panel' 'foot foot'; }

/* top bar */
.m-top { grid-area: top; display: flex; align-items: center; gap: 18px; padding: 0 26px; background: linear-gradient(rgba(10, 13, 9, 0.85), rgba(10, 13, 9, 0)); }
.m-brand { display: flex; align-items: center; gap: 12px; }
.m-mark { font-family: var(--m-stencil); font-weight: 800; font-size: 26px; line-height: 1; color: var(--m-ink); background: var(--m-amber); padding: 6px 7px 3px; letter-spacing: 1px; }
.m-title { font-family: var(--m-stencil); font-weight: 700; font-size: 22px; letter-spacing: 1px; }
.m-party { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.m-party-note { color: var(--m-dim); font-size: 13px; }
.m-party .slot { position: relative; width: 116px; height: 42px; border: 1px solid var(--m-faint); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--m-bone); }
.m-party .slot.filled { justify-content: flex-start; padding: 0 10px; border-color: rgba(95, 179, 168, 0.55); }
.m-party .slot.me { border-color: var(--m-amber); }
.m-party .slot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; text-shadow: 0 1px 3px #000; }
.m-party .slot.open { width: 42px; background: rgba(16, 20, 14, 0.6); font-size: 22px; color: var(--m-dim); cursor: pointer; }
.m-party .slot.open:hover { color: var(--m-teal); border-color: var(--m-teal); }
.m-party .crown { position: absolute; top: -8px; left: 6px; font-style: normal; color: var(--m-amber); font-size: 12px; text-shadow: 0 1px 2px #000; }
.m-party .kick { position: absolute; top: 2px; right: 3px; background: none; border: 0; color: var(--m-dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px; }
.m-party .kick:hover { color: var(--m-red); }
.m-me { min-width: 220px; height: 52px; border: 1px solid var(--m-faint); background-size: cover; background-position: center; padding: 0 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; cursor: pointer; text-align: left; }
.m-me:hover { border-color: var(--m-amber); }
.m-me-name { font-family: var(--m-stencil); font-weight: 700; font-size: 20px; line-height: 1.05; }
.m-me-sub { font-size: 12px; color: var(--m-dim); }

/* navigation: big stencil words, the current one lit */
/* Centred when it fits, scrollable when the window is short (the spacers keep the top reachable). */
.m-nav { grid-area: nav; display: flex; flex-direction: column; gap: 2px; padding: 0 0 20px 26px; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.m-nav::before, .m-nav::after { content: ''; flex: 1 0 0; }
.m-nav button { background: none; border: 0; text-align: left; padding: 6px 0 6px 16px; cursor: pointer; border-left: 3px solid transparent; display: flex; flex-direction: column; color: var(--m-bone); }
.m-nav b { font-family: var(--m-stencil); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: 0.5px; color: rgba(233, 228, 212, 0.58); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); transition: color 0.15s; }
.m-nav span { font-size: 13px; color: var(--m-dim); max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.2s, opacity 0.2s; }
.m-nav button:hover b, .m-nav button:focus-visible b { color: var(--m-bone); }
.m-nav button:hover span, .m-nav button.on span { max-height: 20px; opacity: 1; }
.m-nav button.on { border-left-color: var(--m-amber); }
.m-nav button.on b { color: var(--m-bone); }
.m-nav button:focus-visible { outline: 2px solid var(--m-amber); outline-offset: 2px; }

/* the transparent stage you drag to turn your operator */
.m-stage { grid-area: stage; cursor: grab; touch-action: none; }
.m-stage:active { cursor: grabbing; }
.m-shell.auth .m-stage { display: none; }

/* the content panel */
.m-panel {
  grid-area: panel; margin: 0 22px 0 0; padding: 22px 24px 26px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--m-glass); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid var(--m-faint); border-top: 3px solid var(--m-amber);
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: rgba(233, 228, 212, 0.25) transparent;
}
.m-panel > * { flex-shrink: 0; }
/* Things scrolled into view (keyboard focus, find-in-page) stop above the sticky footers. */
.m-panel:has(.m-deploy) { scroll-padding-bottom: 200px; }
.m-panel:has(.m-sticky) { scroll-padding-bottom: 90px; }
.m-panel .op-list { overflow: visible; max-height: none; }
.m-foot { grid-area: foot; display: flex; align-items: center; padding: 0 26px; font-size: 12px; color: var(--m-dim); }
.foot-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.foot-link:hover, .foot-link:focus-visible { color: var(--m-amber); }
.changelog-modal { width: min(680px, 94vw); }
.changelog .cl-ver { margin: 16px 0 4px; font-size: 15px; color: var(--m-amber); }
.changelog .cl-major { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--m-faint); font-size: 22px; }
.changelog .cl-major:first-child { border-top: 0; margin-top: 0; }
.changelog .cl-patch { font-size: 13px; color: var(--m-bone); }
.changelog .cl-ver a { color: var(--m-dim); font-family: var(--mono); font-size: 12px; }
.changelog ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.changelog code { font-family: var(--mono); font-size: 12px; }
.changelog.legal .cl-major { margin-top: 18px; padding-top: 10px; font-size: 16px; }
.changelog.legal ul { margin-bottom: 6px; }
.m-check.small { font-size: 12px; color: var(--m-dim); }
.m-check a { color: var(--m-amber); }

/* type */
.m-h1 { font-family: var(--m-stencil); font-weight: 800; font-size: 40px; line-height: 1; margin: 0; letter-spacing: 0.5px; text-transform: none; }
.m-h2 { font-family: var(--m-stencil); font-weight: 700; font-size: 28px; line-height: 1.05; margin: 6px 0 0; letter-spacing: 0.5px; text-transform: none; }
.m-h3 { font-family: var(--m-body); font-weight: 600; font-size: 14px; color: var(--m-bone); margin: 0 0 8px; letter-spacing: 0; text-transform: none; }
.m-sub { color: var(--m-dim); font-size: 13px; margin: 0; line-height: 1.45; }
.m-big { font-family: var(--m-stencil); font-size: 30px; margin: 0; }
.m-label { font-size: 13px; color: var(--m-dim); margin-top: 4px; }
.m-empty { color: var(--m-dim); font-size: 13px; margin: 4px 0; padding: 14px; border: 1px dashed var(--m-faint); }
.m-tagline { font-size: 12px; color: var(--m-teal); }
.m-note .btn { white-space: nowrap; flex: none; }
.m-note { font-size: 13px; color: var(--m-dim); display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: rgba(242, 163, 58, 0.08); border-left: 2px solid var(--m-amber); }

/* buttons and inputs inside the menu */
.m-shell .btn, .modal .btn { font-family: var(--m-body); font-weight: 600; letter-spacing: 0.3px; text-transform: none; border-radius: 2px; background: rgba(233, 228, 212, 0.06); border-color: var(--m-faint); color: var(--m-bone); }
.m-shell .btn:hover, .modal .btn:hover { border-color: rgba(233, 228, 212, 0.4); }
.m-shell .btn.primary, .modal .btn.primary, .toast .btn.primary { background: var(--m-amber); border-color: var(--m-amber); color: var(--m-ink); }
.m-shell .btn.ghost, .modal .btn.ghost { background: transparent; }
.m-shell .btn.danger, .modal .btn.danger { border-color: rgba(229, 72, 77, 0.6); color: #ffb3b5; }
.m-shell input[type=text], .m-shell input[type=email], .m-shell input[type=password], .m-shell input[type=datetime-local], .m-shell select, .modal input[type=text], .modal input[type=number], .modal textarea, .ed input[type=text], .ed input[type=number], .ed select, .ed textarea {
  background: rgba(8, 10, 7, 0.6); border: 1px solid var(--m-faint); border-radius: 2px; padding: 9px 11px; color: var(--m-bone); font-family: var(--m-body); font-size: 14px;
}
.m-shell input[type=datetime-local] { color-scheme: dark; }
.m-shell input:focus-visible, .m-shell select:focus-visible { outline: 2px solid var(--m-amber); outline-offset: 0; border-color: transparent; }
.m-shell .field > span { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--m-dim); }
.m-shell .seg { border-color: var(--m-faint); border-radius: 2px; }
.m-shell .seg button { font-family: var(--m-body); text-transform: none; letter-spacing: 0.2px; font-size: 13px; color: var(--m-dim); }
.m-shell .seg button.sel { background: var(--m-amber); color: var(--m-ink); }
.m-shell .chip { border-radius: 2px; background: none; color: var(--m-bone); border-color: var(--m-faint); }
.m-shell .chip.sel { border-color: var(--m-amber); background: rgba(242, 163, 58, 0.15); }
.m-shell .swatch { border-radius: 2px; }
.m-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }

/* switch between two or more views (online / bots, armory kinds) */
.m-switch { display: flex; gap: 22px; border-bottom: 1px solid var(--m-faint); }
.m-switch.scroll { overflow-x: auto; gap: 18px; scrollbar-width: none; }
.m-switch button { background: none; border: 0; padding: 4px 0 10px; color: var(--m-dim); cursor: pointer; font-family: var(--m-body); font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.m-switch button.on { color: var(--m-bone); border-bottom-color: var(--m-amber); }
.m-switch button:hover { color: var(--m-bone); }

/* mode rows */
.mquads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mquads.off, .m-allmodes.off { opacity: 0.45; pointer-events: none; }
.mquad { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 112px; text-align: left; background: rgba(233, 228, 212, 0.03); border: 1px solid var(--m-faint); padding: 10px 12px 11px; cursor: pointer; color: var(--m-bone); position: relative; transition: background 0.15s, border-color 0.15s; }
.mquad:hover { background: rgba(233, 228, 212, 0.07); }
.mquad.sel { background: rgba(242, 163, 58, 0.1); border-color: var(--m-amber); box-shadow: inset 0 -3px 0 var(--m-amber); }
.mquad-size { position: absolute; top: 9px; right: 11px; font-size: 12px; color: var(--m-dim); }
.mquad-name { font-family: var(--m-stencil); font-weight: 700; font-size: 22px; line-height: 1.05; }
.mquad.ranked .mquad-name { color: #ffd48a; }
.mquad-goal { font-size: 12px; color: var(--m-dim); }
.mquad:focus-visible, .m-allmodes:focus-visible { outline: 2px solid var(--m-amber); outline-offset: -2px; }
.m-allmodes { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px; background: none; border: 1px solid var(--m-faint); padding: 9px 12px; color: var(--m-bone); font-family: var(--m-stencil); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.m-allmodes:hover { background: rgba(233, 228, 212, 0.05); }
.m-allmodes.has-sel { border-color: var(--m-amber); }
.m-allmodes span { font-size: 20px; color: var(--m-dim); }
.m-allmodes + .mrows { margin-top: 4px; }
.mrows { display: flex; flex-direction: column; }
.mrows.off { opacity: 0.45; pointer-events: none; }
.mrow { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: baseline; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--m-faint); padding: 7px 6px 8px 14px; cursor: pointer; color: var(--m-bone); position: relative; }
.mrow::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: transparent; }
.mrow:hover { background: rgba(233, 228, 212, 0.04); }
.mrow.sel { background: rgba(242, 163, 58, 0.09); }
.mrow.sel::before { background: var(--m-amber); }
.mrow-name { font-family: var(--m-stencil); font-weight: 700; font-size: 23px; line-height: 1.05; }
.mrow.ranked .mrow-name { color: #ffd48a; }
.mrow-size { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; color: var(--m-dim); }
.mrow-goal { font-size: 13px; color: var(--m-dim); }
.mrow:focus-visible { outline: 2px solid var(--m-amber); outline-offset: -2px; }

.m-join { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m-join input { width: 130px; text-transform: uppercase; letter-spacing: 3px; }
.lobby-list { display: flex; flex-direction: column; gap: 4px; }
.lobby-item { display: flex; align-items: center; gap: 10px; background: rgba(233, 228, 212, 0.04); border: 1px solid var(--m-faint); padding: 9px 12px; color: var(--m-bone); cursor: pointer; text-align: left; }
.lobby-item span { color: var(--m-dim); font-size: 13px; }
.lobby-item:hover { border-color: var(--m-teal); }

/* maps */
.map-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.map-tile { background: none; border: 1px solid var(--m-faint); padding: 0; cursor: pointer; color: var(--m-bone); display: flex; flex-direction: column; }
.map-tile img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; image-rendering: pixelated; display: block; background: #000; }
.map-tile span { font-size: 12px; padding: 4px 6px; text-align: left; }
.map-tile.sel { border-color: var(--m-amber); box-shadow: inset 0 0 0 1px var(--m-amber); }
.map-tile.off { opacity: 0.35; }

/* deploy */
.m-deploy { margin: auto -24px -26px; padding: 14px 24px 22px; border-top: 1px solid var(--m-faint); display: flex; flex-direction: column; gap: 12px; position: sticky; bottom: -26px; background: linear-gradient(rgba(20, 25, 18, 0.94), var(--m-ink)); z-index: 2; }
.m-deploy-info { display: flex; flex-direction: column; gap: 3px; }
.m-deploy-info b { font-weight: 600; font-size: 16px; }
.m-deploy-info span { font-size: 13px; color: var(--m-dim); line-height: 1.45; }
.m-party-line { color: var(--m-teal) !important; }
.deploy-btn { font-family: var(--m-stencil); font-weight: 800; font-size: 34px; letter-spacing: 1px; color: var(--m-ink); background: var(--m-amber); border: 0; padding: 12px 18px 9px; cursor: pointer; text-align: left; position: relative; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); transition: background 0.12s, padding 0.12s; }
.deploy-btn:hover { background: #ffb95a; padding-left: 24px; }
.deploy-btn:focus-visible { outline: 3px solid var(--m-bone); outline-offset: 2px; }
.deploy-btn[disabled] { opacity: 0.4; pointer-events: none; }
.deploy-btn.small { font-size: 22px; padding: 8px 26px 6px 14px; }

.m-rejoin { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: rgba(95, 179, 168, 0.12); border-left: 3px solid var(--m-teal); }
.m-rejoin div { display: flex; flex-direction: column; flex: 1; }
.m-rejoin span { font-size: 13px; color: var(--m-dim); }

/* lobby */
.l-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.l-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.l-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.l-team { border: 1px solid var(--m-faint); padding: 10px; min-height: 120px; }
.l-team.t { border-top: 3px solid var(--t); } .l-team.ct { border-top: 3px solid var(--ct); }
.l-team.wide { grid-column: span 2; min-height: 0; }
.l-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.l-player { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--m-faint); font-size: 14px; }
.l-cfg { display: flex; flex-direction: column; gap: 10px; }
.l-map { width: 100%; image-rendering: pixelated; }
.code-box { font-family: var(--m-stencil); font-size: 46px; letter-spacing: 6px; line-height: 1; color: var(--m-amber); }

/* operators */
.op-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.op-row { background: rgba(233, 228, 212, 0.04); border: 1px solid transparent; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--m-bone); display: flex; flex-direction: column; }
.op-row:hover { border-color: var(--m-faint); }
.op-row.sel { border-color: var(--m-amber); background: rgba(242, 163, 58, 0.1); }
.op-name { font-family: var(--m-stencil); font-weight: 700; font-size: 21px; line-height: 1.05; display: flex; gap: 8px; align-items: baseline; }
.op-name i { font-style: normal; font-family: var(--m-body); font-size: 11px; color: var(--m-teal); font-weight: 600; }
.op-role { font-size: 12px; color: var(--m-dim); }
.op-bio p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--m-dim); }
.op-perk { margin-top: 6px !important; color: var(--m-bone) !important; }
.op-perk b { color: var(--m-amber); font-weight: 600; margin-right: 4px; }
.m-panel .controls { display: flex; flex-direction: column; gap: 14px; overflow: visible; padding: 0; }
.m-sticky { position: sticky; bottom: -26px; margin: 0 -24px -26px; padding: 14px 24px; background: linear-gradient(transparent, var(--m-ink) 30%); display: flex; gap: 10px; align-items: center; }

/* armory */
.m-panel .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.m-panel .item-grid.cards { grid-template-columns: 1fr 1fr; }
.m-panel .item-card { border-radius: 0; background: rgba(233, 228, 212, 0.04); border: 1px solid var(--m-faint); color: var(--m-bone); text-align: left; padding: 7px; gap: 3px; font-family: var(--m-body); }
.m-panel .item-card .sw { height: 42px; border-radius: 0; display: grid; place-items: center; font-size: 22px; border: 0; }
.m-panel .item-card.wide .sw { height: 44px; background-size: cover !important; }
.m-panel .item-card b { font-size: 13px; font-weight: 600; }
.m-panel .item-card em { font-style: normal; font-size: 11px; color: var(--rc); line-height: 1.3; }
.m-panel .item-card.locked { opacity: 0.55; }
.m-panel .item-card.locked em { color: var(--m-dim); }
.m-panel .item-card.equipped { border-color: var(--rc); box-shadow: inset 0 0 0 1px var(--rc); }
.m-panel .item-card .slot-tag { position: absolute; top: 4px; right: 5px; font-style: normal; font-size: 10px; background: var(--m-amber); color: var(--m-ink); padding: 1px 4px; font-weight: 700; }
.card-preview { height: 96px; background-size: cover; background-position: center; display: flex; align-items: center; padding: 0 18px; border: 1px solid var(--m-faint); }
.card-preview span { font-family: var(--m-stencil); font-weight: 800; font-size: 32px; text-shadow: 0 2px 8px #000; }
.emote-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.eslot { background: rgba(233, 228, 212, 0.04); border: 1px solid var(--m-faint); color: var(--m-bone); padding: 7px; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; }
.eslot span { font-size: 11px; color: var(--m-dim); }
.eslot b { font-size: 13px; font-weight: 600; }
.eslot.sel { border-color: var(--m-amber); background: rgba(242, 163, 58, 0.1); }

/* stats */
.st-head { display: flex; align-items: flex-end; gap: 12px; }
.xp { height: 4px; background: var(--m-faint); }
.xp div { height: 100%; background: var(--m-amber); }
.st-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--m-faint); border: 1px solid var(--m-faint); }
.st-nums div { background: var(--m-ink); padding: 12px 14px; display: flex; flex-direction: column; }
.st-nums b { font-family: var(--m-stencil); font-weight: 700; font-size: 32px; line-height: 1; }
.st-nums span { font-size: 12px; color: var(--m-dim); margin-top: 4px; }
.st-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; }
.st-grid section { min-width: 0; }
.st-grid .span2 { grid-column: span 2; }
.st-grid .span3 { grid-column: 1 / -1; }
.spark { width: 100%; height: 90px; display: block; }
.spark .line { fill: none; stroke: var(--m-amber); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark .even { stroke: var(--m-faint); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.spark circle.win { fill: var(--m-teal); } .spark circle.loss { fill: var(--m-red); } .spark circle.draw { fill: var(--m-dim); }
.bar-row { display: grid; grid-template-columns: 96px 1fr 52px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 8px; background: var(--m-faint); }
.bar i { display: block; height: 100%; }
.bar .w { background: var(--m-teal); } .bar .l { background: var(--m-red); opacity: 0.8; }
.rivals { display: flex; flex-direction: column; }
.rivals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--m-faint); font-size: 14px; }
.rivals b { font-variant-numeric: tabular-nums; } .rivals b.up { color: var(--m-teal); } .rivals b.down { color: var(--m-red); }
.heat-maps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.heat { max-width: 100%; max-height: 360px; image-rendering: pixelated; display: block; border: 1px solid var(--m-faint); }
.st-search { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--m-faint); }
.st-search input { width: 240px; }
.st-search .btn { white-space: nowrap; }
.m-panel .tbl th { font-family: var(--m-body); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--m-dim); }
.m-panel .tbl td { font-size: 14px; }
.m-panel .tbl .num { font-family: var(--m-body); font-variant-numeric: tabular-nums; }
.m-panel .tbl.lb .pos { font-family: var(--m-stencil); font-size: 20px; color: var(--m-dim); }
.m-panel .tbl tr.me td { background: rgba(242, 163, 58, 0.1); }

/* replays */
.replay-list { display: flex; flex-direction: column; gap: 4px; }
.replay-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(233, 228, 212, 0.04); border: 1px solid var(--m-faint); }
.replay-item div { display: flex; flex-direction: column; }
.replay-item div span { font-size: 13px; color: var(--m-dim); }
.replay-item .res { font-family: var(--m-stencil); font-weight: 700; font-size: 20px; width: 60px; }
.res-win { color: var(--m-teal) !important; } .res-loss { color: var(--m-red) !important; }

/* settings inside the panel */
.m-panel .settings-grid { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 56px; }
.m-panel .settings-grid > span:first-child, .m-panel .settings-grid > span { color: var(--m-bone); }

/* auth */
.auth-hero { grid-area: hero; align-self: center; padding: 0 0 60px 60px; max-width: 640px; max-height: 100%; overflow: hidden; }
.m-hero { font-family: var(--m-stencil); font-weight: 800; font-size: clamp(64px, 9vw, 132px); line-height: 0.86; margin: 0 0 18px; text-transform: none; letter-spacing: 1px; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55); }
.auth-hero p { font-size: 17px; line-height: 1.5; max-width: 44ch; color: var(--m-bone); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); margin: 0 0 18px; }
.auth-hero .ranks { display: flex; gap: 8px; }
.auth-panel { align-self: center; margin-right: 40px; max-height: calc(100vh - 160px); }
.auth-panel .field input { width: 100%; }
.auth-panel .err { color: #ffb3b5; font-size: 13px; min-height: 18px; }

/* modals and toasts in the menu's voice */
.modal.m-card > * { flex-shrink: 0; }
.modal.m-card { background: var(--m-ink); border: 1px solid var(--m-faint); border-top: 3px solid var(--m-amber); border-radius: 0; padding: 22px 24px; color: var(--m-bone); font-family: var(--m-body); display: flex; flex-direction: column; gap: 12px; }
.modal.drawer { width: min(560px, 92vw); }
.friends { display: flex; flex-direction: column; }
.friend { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--m-faint); }
.friend div { display: flex; flex-direction: column; }
.friend div span { font-size: 12px; color: var(--m-dim); }
.m-search { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pm-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background-size: cover; background-position: center; border: 1px solid var(--m-faint); }
.toast { font-family: var(--m-body); background: var(--m-ink); color: var(--m-bone); border-radius: 0; display: flex; flex-direction: column; gap: 8px; }
.toast-actions { display: flex; gap: 6px; }

/* ───────────── banners, training, admin nav ───────────── */
.m-banners { grid-area: stage; align-self: start; display: flex; flex-direction: column; gap: 6px; margin: 10px 16px 0; z-index: 3; pointer-events: none; min-width: 0; }
.m-banners:empty { display: none; }
.m-banner { pointer-events: auto; display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--m-glass); border-left: 3px solid var(--m-teal); font-size: 13px; }
.m-banner b { font-family: var(--m-stencil); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; flex: none; }
.m-banner.warn { border-color: var(--m-red); } .m-banner.event { border-color: var(--m-amber); }
.m-train { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; margin-bottom: 8px; padding: 12px 14px; cursor: pointer; color: var(--m-bone); border: 1px solid var(--m-faint); background: linear-gradient(90deg, rgba(95, 179, 168, 0.16), rgba(95, 179, 168, 0.03)); }
.m-train b { font-family: var(--m-stencil); font-size: 22px; line-height: 1.05; }
.m-train span { font-size: 13px; color: var(--m-dim); }
.m-train:hover { border-color: var(--m-teal); }
.m-zombies { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--m-faint); background: linear-gradient(90deg, rgba(157, 255, 46, 0.12), rgba(157, 255, 46, 0.02)); }
.m-zombies b { font-family: var(--m-stencil); font-size: 22px; line-height: 1.05; color: var(--m-bone); }
.m-zombies span { font-size: 13px; color: var(--m-dim); }
.m-nav .nav-admin b { color: var(--m-red); }
.admin-badge { font-size: 12px; padding: 3px 8px; border: 1px solid var(--m-red); color: #ffb3b5; white-space: nowrap; }
.tag { font-size: 11px; padding: 2px 6px; border: 1px solid var(--m-faint); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.tag.bad { border-color: var(--m-red); color: #ffb3b5; } .tag.warn { border-color: var(--m-amber); color: #ffd48a; } .tag.ok { border-color: var(--good); color: var(--good); }

/* ───────────── season ───────────── */
.season-head { display: flex; gap: 16px; align-items: flex-end; padding: 14px 16px; border-left: 4px solid var(--sc); background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 22%, transparent), transparent); }
.season-head > div:first-child { flex: 1; min-width: 0; }
.season-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--sc); font-weight: 700; }
.season-tier { text-align: center; flex: none; }
.season-tier b { display: block; font-family: var(--m-stencil); font-size: 52px; line-height: .9; color: var(--sc); }
.season-tier span { font-size: 12px; color: var(--m-dim); }
.season-xp { margin: 10px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.bar.big { height: 10px; } .bar i { background: var(--m-amber); }
.track { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; overscroll-behavior-x: contain; }
.tier { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 22px 6px 8px; cursor: pointer; color: var(--m-bone); background: var(--m-ink2); border: 1px solid var(--m-faint); border-top: 3px solid var(--rc); text-align: center; min-width: 0; }
.tier .sw { width: 56px; height: 56px; display: grid; place-items: center; font-size: 26px; border-radius: 4px; }
.tier .sw.wide, .future-s .sw.wide, .ranked-reward .sw.wide { width: 96px; height: 24px; background-size: cover; background-position: center; border-radius: 2px; }
.tier b { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tier em { font-style: normal; font-size: 11px; color: var(--rc); }
.tier small { font-size: 10px; color: var(--m-dim); text-transform: uppercase; letter-spacing: .06em; }
.tier-n { position: absolute; left: 6px; top: 4px; font-family: var(--m-stencil); font-size: 15px; color: var(--m-dim); }
.tier.excl { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 18%, var(--m-ink2)), var(--m-ink2)); }
.tier.locked { opacity: .55; } .tier.locked .sw { filter: grayscale(.6); }
.tier.next { border-color: var(--m-amber); box-shadow: 0 0 0 1px var(--m-amber); opacity: 1; }
.tier-ok { position: absolute; right: 6px; top: 4px; font-style: normal; color: var(--good, #59d38a); font-weight: 700; }
.season-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.season-cols > section { min-width: 0; }
.ch { padding: 10px 12px; background: var(--m-ink2); border: 1px solid var(--m-faint); margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.ch-top { display: flex; gap: 8px; align-items: baseline; } .ch-top b { flex: 1; font-weight: 600; font-size: 14px; }
.ch-xp { font-size: 12px; color: var(--m-amber); white-space: nowrap; }
.ch.done { border-color: color-mix(in srgb, var(--good) 50%, transparent); } .ch.done .bar i { background: var(--good); }
.season-rank, .ranked-reward { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.season-rank > div, .ranked-reward > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.future { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.future-s { padding: 10px 12px; border: 1px solid var(--m-faint); border-left: 3px solid var(--sc); display: flex; flex-direction: column; gap: 8px; background: var(--m-ink2); }
.fs-head { display: flex; flex-direction: column; } .fs-head b { color: var(--sc); }
.fs-items { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fs-items .sw { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 3px; filter: grayscale(.5) brightness(.8); }

/* ───────────── social ───────────── */
.commend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.commend-grid .btn { display: flex; gap: 8px; align-items: center; justify-content: center; }
.ci { font-size: 18px; }
.report-reasons { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.radio { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 14px; }
.radio input { accent-color: var(--m-amber, #f2a33a); width: 16px; height: 16px; }
.modal textarea, .m-shell textarea { width: 100%; resize: vertical; font: inherit; }
.commends { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; font-size: 13px; color: var(--m-dim); }
.commends b { color: var(--m-bone); }
.warn-item { padding: 10px 12px; border-left: 3px solid var(--m-amber); background: rgba(242, 163, 58, .08); margin-bottom: 8px; }
.warn-item p { margin: 0 0 4px; }
.ban-screen { position: fixed; inset: 0; display: flex; overflow-y: auto; padding: 24px 16px; background: radial-gradient(ellipse at 50% 30%, rgba(229, 72, 77, .15), transparent 60%), #0b0e12; z-index: 50; font-family: var(--m-body); color: var(--m-bone); }
.ban-card { margin: auto; max-width: 480px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ban-icon { font-size: 54px; }
.ban-reason { padding: 8px 12px; border-left: 3px solid var(--m-red); background: rgba(229, 72, 77, .1); text-align: left; }
.ban-appeal { padding: 8px 12px; border-left: 3px solid var(--m-amber); background: rgba(242, 163, 58, .08); text-align: left; }
.ban-appeal-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ban-appeal-form textarea { width: 100%; resize: vertical; font: inherit; }

/* ───────────── admin ───────────── */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--m-faint); border: 1px solid var(--m-faint); margin-top: 10px; }
.adm-stats div { background: var(--m-ink); padding: 12px 14px; display: flex; flex-direction: column; }
.adm-stats b { font-family: var(--m-stencil); font-size: 30px; line-height: 1; }
.adm-stats span { font-size: 12px; color: var(--m-dim); margin-top: 4px; }
.adm-stats .hot b, em.hot { color: #ff8a8d; font-style: normal; }
#adm-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#adm-body > .seg { align-self: flex-start; }
.adm-report { padding: 10px 12px; background: var(--m-ink2); border: 1px solid var(--m-faint); border-left: 3px solid var(--m-red); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-report.actioned { border-left-color: #59d38a; } .adm-report.dismissed { border-left-color: var(--m-dim); opacity: .8; }
.ar-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ar-reason { font-family: var(--m-stencil); font-size: 18px; }
.ar-note { margin: 2px 0; font-style: italic; }
.ar-chat { font-size: 13px; max-height: 140px; overflow-y: auto; padding: 6px 8px; background: rgba(0, 0, 0, .25); }
.ar-actions { flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.adm-report a, .adm-player a, #adm-body a { color: var(--m-teal); }
.adm-list { display: flex; flex-direction: column; gap: 4px; }
.adm-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; color: var(--m-bone); background: var(--m-ink2); border: 1px solid var(--m-faint); text-align: left; }
.adm-row:hover { border-color: var(--m-amber); }
.adm-player { margin-top: 10px; padding: 12px; border: 1px solid var(--m-faint); background: rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow-x: auto; }
.adm-player .row { flex-wrap: wrap; gap: 8px; align-items: center; }
.st-nums.small b { font-size: 22px; }
.adm-switch { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--m-ink2); border: 1px solid var(--m-faint); flex-wrap: wrap; }
.adm-switch > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.adm-switch input[type=text] { width: 100%; }
.adm-ann { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--m-faint); flex-wrap: wrap; }
.adm-ann.live { border-color: var(--m-teal); }
.adm-form { display: flex; flex-direction: column; gap: 8px; }
.adm { container-type: inline-size; }
.adm-top { gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-find { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.adm-find input { width: 100%; }
.adm-find-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: var(--m-ink); border: 1px solid var(--m-faint); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-height: 320px; overflow-y: auto; }
.adm-wrap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; margin-top: 10px; align-items: start; }
.adm-wrap #adm-body { margin-top: 0; }
.adm-nav { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.adm-nav-g { display: flex; flex-direction: column; }
.adm-nav-g small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--m-dim); padding: 0 10px 4px; }
.adm-nav button { display: flex; align-items: center; gap: 8px; background: none; border: 0; border-left: 2px solid transparent; padding: 6px 10px; color: var(--m-dim); cursor: pointer; font: 600 14px var(--m-body); text-align: left; }
.adm-nav button:hover { color: var(--m-bone); background: var(--m-faint); }
.adm-nav button.on { color: var(--m-bone); border-left-color: var(--m-amber); background: rgba(242, 163, 58, .08); }
.adm-nav button i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 6px; text-align: center; border-radius: 9px; background: var(--m-faint); color: var(--m-bone); }
.adm-nav button i.hot { background: var(--m-red); color: #fff; }
@container (max-width: 640px) {
  .adm-wrap { grid-template-columns: minmax(0, 1fr); }
  .adm-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .adm-nav-g { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .adm-nav-g small { display: none; }
  .adm-nav button { border-left: 0; border-bottom: 2px solid transparent; }
  .adm-nav button.on { border-bottom-color: var(--m-amber); }
}
.adm-stats button { background: var(--m-ink); padding: 12px 14px; display: flex; flex-direction: column; border: 0; color: var(--m-bone); text-align: left; cursor: pointer; }
.adm-stats button:hover { background: var(--m-ink2); }
.adm-stats button b { font-family: var(--m-stencil); font-size: 30px; line-height: 1; }
.adm-stats button span { font-size: 12px; color: var(--m-dim); margin-top: 4px; }
.adm-todo { display: flex; flex-direction: column; gap: 4px; }
.adm-todo .adm-row b { font-family: var(--m-stencil); font-size: 22px; color: #ff8a8d; min-width: 28px; }
.adm-actions { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--m-faint); border-bottom: 1px solid var(--m-faint); }
.adm-actions > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: center; }
.adm-actions small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--m-dim); }
.adm-actions .row { gap: 6px; }
.adm-fold summary { cursor: pointer; font-family: var(--m-stencil); font-size: 17px; padding: 4px 0; }
.adm-fold summary i { font-style: normal; font-family: var(--m-body); font-size: 12px; color: var(--m-dim); margin-left: 4px; }
.adm-fold[open] summary { margin-bottom: 6px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 6px; }

@media (max-width: 1180px) {
  .m-shell, .m-shell.wide { grid-template-columns: 210px minmax(0, 1fr) minmax(380px, 46vw); }
  .m-nav b { font-size: 30px; }
  .m-title { display: none; }
  .st-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .m-shell, .m-shell.wide, .m-shell.auth { grid-template-columns: 1fr; grid-template-rows: auto auto auto minmax(0, 1fr) 36px; grid-template-areas: 'top' 'nav' 'banner' 'panel' 'foot'; }
  .m-stage, .auth-hero { display: none; }
  .m-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0 16px; }
  .m-nav::before, .m-nav::after { display: none; }
  .m-nav b { font-size: 24px; } .m-nav span { display: none; }
  .m-panel { margin: 0 16px; }
  .auth-panel { margin: 0 16px; max-height: none; }
  .m-party .slot { width: 42px; } .m-party .slot span { display: none; }
  .st-grid { grid-template-columns: 1fr; } .st-grid .span2 { grid-column: auto; }
  .l-grid { grid-template-columns: 1fr; }
  /* Settings: label on its own line, control and value below it. */
  .m-panel .settings-grid { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .m-panel .settings-grid > span:nth-child(3n + 1) { grid-column: 1 / -1; margin-top: 8px; }
  .op-list, .map-strip { grid-template-columns: repeat(2, 1fr); }
  .m-panel .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-banners { grid-area: banner; margin: 0 16px 6px; }
  .season-cols { grid-template-columns: 1fr; }
  .season-tier b { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-nav span, .deploy-btn, .m-nav b { transition: none; }
}

/* ───── achievements ───── */
.mastery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mastery-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--m-faint); background: rgba(16, 20, 14, 0.55); }
.mastery-name { font-weight: 600; color: var(--m-bone); }
.mastery-line { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--m-dim); margin: 6px 0 10px; }
.mastery-card .mastery-line { margin: 0; }
.mastery-line b { font-family: var(--m-stencil); font-size: 15px; color: var(--m-amber); letter-spacing: 0.5px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--m-faint); border-left: 3px solid color-mix(in srgb, var(--tc) 35%, transparent); background: rgba(16, 20, 14, 0.55); }
.ach.done { border-left-color: var(--tc); background: rgba(28, 34, 25, 0.85); }
.ach-icon { font-size: 26px; line-height: 1; filter: grayscale(1) opacity(.45); }
.ach.done .ach-icon { filter: none; }
.ach-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ach-body b { font-size: 15px; }
.ach-body span { color: var(--m-dim); font-size: 13px; }
.ach-body em { font-style: normal; font-size: 12px; color: var(--m-dim); }
.ach.done .ach-body em { color: var(--tc); }
.ach-bar { height: 4px; background: var(--m-faint); margin-top: 4px; }
.ach-bar i { display: block; height: 100%; background: var(--tc); }
.mastery-line .ach-bar { margin-top: 0; }
.mastery-line .ach-bar i { background: var(--m-amber); }
.ach-tier { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--tc); white-space: nowrap; }
.ach-strip { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.ach-strip span { color: var(--m-dim); font-size: 13px; margin-right: 4px; }
.ach-strip i { font-style: normal; font-size: 20px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--tc); background: rgba(16, 20, 14, 0.7); }

/* ───── friends ───── */
.friend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m-dim); opacity: .5; flex: none; }
.friend.on .dot { background: var(--good); opacity: 1; box-shadow: 0 0 6px var(--good); }
.friend.off b { color: var(--m-dim); }
.fr-add { display: flex; gap: 8px; margin-bottom: 10px; }
.fr-add input { flex: 1; }
.fr-on { color: var(--good); font-weight: 600; }
.fr-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--m-red); color: #fff; font-size: 11px; font-weight: 700; }

/* ───── map workshop ───── */
.ws-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--m-faint); flex-wrap: wrap; }
.ws-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.ws-row > div span { font-size: 13px; color: var(--m-dim); }
.ws-thumb { width: 72px; height: 48px; object-fit: contain; image-rendering: pixelated; background: #11140f; border: 1px solid var(--m-faint); flex: none; display: block; }
.ws-feat, .map-tag { font-style: normal; color: var(--m-amber); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.ws-search { gap: 10px; margin: 6px 0; }
.ws-search input { flex: 1; }

/* ───── map editor (full screen) ───── */
.ed { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 230px 1fr 280px; grid-template-rows: auto 1fr; background: var(--m-ink); color: var(--m-bone); font-family: var(--m-body); }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 3px solid var(--m-amber); flex-wrap: wrap; }
.ed-title { font-family: var(--m-stencil); font-size: 24px; letter-spacing: 1px; }
.ed-top input { width: 220px; }
.ed-side, .ed-props { overflow-y: auto; padding: 12px; border-right: 1px solid var(--m-faint); display: flex; flex-direction: column; gap: 8px; }
.ed-props { border-right: 0; border-left: 1px solid var(--m-faint); }
.ed-pal { display: flex; flex-direction: column; gap: 2px; }
.ed-pal button { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: none; border: 1px solid transparent; color: var(--m-bone); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ed-pal button:hover { background: var(--m-faint); }
.ed-pal button.sel { border-color: var(--m-amber); background: rgba(242, 163, 58, .12); }
.ed-pal i { width: 22px; height: 22px; flex: none; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; color: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.15); }
.ed-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-tools button.sel { background: var(--m-amber); color: var(--m-ink); }
.ed-main { position: relative; display: grid; place-items: center; overflow: auto; background: #0c0e0b; }
.ed-main canvas { cursor: crosshair; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--m-faint); }
.ed-hover { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: var(--m-dim); pointer-events: none; }
.ed-check ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--m-dim); }
.ed-check .ok { color: var(--good); }
.ed-check .warn { color: #e8b04a; margin: 8px 0 0; }
.ed-check .m-label { margin-top: 8px; }
.ed-layers, .ed-view, .ed-tools, .ed-dir .seg { flex-wrap: wrap; }
.ed-view button { font-size: 11px; }
.ed-tools button:disabled { opacity: .35; cursor: not-allowed; }
.ed-pal .m-label { margin-top: 6px; }
.ed-props .row { gap: 8px; }
.ed-props .row .field { flex: 1; }
@media (max-width: 900px) { .ed { grid-template-columns: 1fr; grid-template-rows: auto auto 60vh auto; } .ed-side, .ed-props { border: 0; } }
.ed-side > *, .ed-props > * { flex-shrink: 0; }
.ed input[type=number] { width: 100%; }
.maint-screen { background: radial-gradient(ellipse at 50% 30%, rgba(242, 163, 58, .16), transparent 60%), #0b0e12; z-index: 120; }
.maint-screen .maint-msg { font-size: 18px; margin: 0; }
.maint-screen .queue-pulse { margin: 8px auto 0; }
