/* Native title, staging, lobby and results chrome. No replacement controls or flow. */
:root {--mek-menu-paper:var(--mek-paper);--mek-menu-ink:var(--mek-ink);--mek-menu-signal:var(--mek-signal);--mek-menu-font:var(--mek-display)}
.mm-root .mm-title-screen {padding:20px 24px 68px !important}
.mm-root .mm-title-card.mm-title-menu {
  width:min(1180px,100%) !important; max-width:none !important; min-height:0 !important;
  display:grid !important; grid-template-columns:430px minmax(0,1fr) !important;
  grid-template-rows:82px auto !important; gap:12px 32px !important;
  padding:0 !important; position:relative; isolation:isolate;
  background:none !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; backdrop-filter:none !important;
}
/* Scene coordinates tie the Atlas's sole line to the platform surface in the
   hangar image (61% down its 16:9 frame), independent of menu card height. */
@media(min-width:900px) {
  .mm-root .mm-title-screen {
    --scene-width:max(140vw,calc(100dvh * 16 / 9));
    --hero-width:min(48vw,68dvh,760px);
    position:absolute !important; inset:0 !important; width:100%; height:100%; margin:0;
    isolation:isolate; background:#191e20;
    background-image:radial-gradient(ellipse 150px 16px at 70vw 78dvh,#0009,transparent),linear-gradient(#06101414,#06101414),url('./assets/loadout/hangar.webp?v=93cc2e0e');
    background-size:100% 100%,100% 100%,var(--scene-width) auto;
    background-position:0 0,0 0,calc(70vw - var(--scene-width) / 2) calc(78dvh - var(--scene-width) * .5625 * .61);
    background-repeat:no-repeat;
  }
  .mm-root .mm-title-screen::after {
    content:''; position:absolute; z-index:-1; pointer-events:none;
    left:calc(70vw - var(--hero-width) / 2); top:calc(78dvh - var(--hero-width) * .96);
    width:var(--hero-width); aspect-ratio:1;
    background:url('./assets/loadout/title-atlas.webp?v=b961491a') center/contain no-repeat;
    transform-origin:50% 96%; animation:mek-reactor-idle 6.4s ease-in-out infinite;
  }

}
.mm-root .mm-title-menu .mm-menu-hero {grid-column:1/-1;grid-row:1;min-width:0;display:flex !important;flex-direction:column;align-items:center !important;justify-content:center;gap:7px;text-align:center !important}
.mm-root .mm-title-menu .mm-logo {width:350px !important;max-width:100% !important;height:58px !important;max-height:58px !important;object-fit:contain;object-position:center;filter:grayscale(1) brightness(2);margin:0 !important}
.mm-root .mm-title-menu .mm-subtitle {font:800 16px/1.2 var(--mek-menu-font) !important;text-transform:uppercase;letter-spacing:.06em;color:var(--mek-menu-paper) !important;margin:0 !important;text-shadow:0 1px 5px #000}
.mm-root .mm-title-menu .mm-menu-actions {grid-column:1;grid-row:2;display:flex !important;flex-direction:column;min-width:0;position:relative;isolation:isolate;padding:24px !important;gap:14px !important;animation:mek-menu-dock .28s cubic-bezier(.16,1,.3,1) both}
.mm-root .mm-title-menu .mm-menu-actions::before {
  content:'';position:absolute;inset:0;z-index:-1;background:var(--mek-paper);
  clip-path:polygon(0 20px,20px 0,calc(100% - 36px) 0,100% 36px,100% calc(100% - 16px),calc(100% - 16px) 100%,24px 100%,0 calc(100% - 24px));
  box-shadow:none;
}
.mm-root .mm-title-menu .mm-menu-btns {gap:9px !important}
.mm-root .mm-title-menu .mm-menu-btn {width:100%;min-height:44px !important;border-radius:2px !important;font:800 16px/1.2 var(--mek-menu-font) !important;letter-spacing:.025em;padding:11px 16px !important;background:#191e20 !important;border:1px solid #8d8980 !important;color:#f0e7d2 !important;box-shadow:none !important;transition:transform .12s ease-out,background-color .12s}
.mm-root .mm-title-menu .mm-menu-quick {min-height:64px !important;font-size:25px !important;color:#f0e7d2 !important;background:var(--mek-signal) !important;border:2px solid #e64b32 !important;box-shadow:inset 0 0 0 2px #e64b32 !important}
.mm-root .mm-title-menu .mm-menu-ghost {background:transparent !important;color:#191e20 !important;border-color:#8d8980 !important;font-size:16px !important}
.mm-root .mm-title-menu .mm-menu-btn:hover {background:#444540 !important;color:#f0e7d2 !important}
.mm-root .mm-title-menu .mm-menu-quick:hover {background:#cc3924 !important;color:#f0e7d2 !important}
.mm-root .mm-title-menu .mm-menu-btn:active {transform:translateY(1px)}
.mm-root .mm-title-menu .mm-menu-quick {position:relative;overflow:hidden}
.mm-root .mm-title-menu .mm-menu-quick::after {content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 25%,#fff8 50%,transparent 75%);transform:translateX(-110%);pointer-events:none}
.mm-root .mm-title-menu .mm-menu-quick:hover::after {animation:hangar-button-sheen .42s ease-out both}
.mm-root .mm-title-menu .mm-input {min-height:52px;font:700 18px/1.2 var(--mek-menu-font) !important;background:#e5dac5 !important;color:#191e20 !important;border:1px solid #8d8980 !important;border-radius:2px !important}
.mm-root .mm-title-menu .mm-float label {color:#57554f !important}
.mm-root .mm-title-menu .mm-join-row {gap:8px}
.mm-root .mm-title-menu .mm-join-go {width:auto;min-width:78px}
.mm-root .mm-title-menu button:focus-visible,.mm-root .mm-title-menu input:focus-visible {outline:3px solid #191e20 !important;outline-offset:3px}
@keyframes mek-menu-dock {from {opacity:0;transform:translateX(-460px)} to {opacity:1;transform:none}}
@media(min-width:1600px) {
  .mm-root .mm-title-card.mm-title-menu {width:min(1480px,100%) !important;grid-template-columns:520px minmax(0,1fr) !important;grid-template-rows:96px auto !important}
  .mm-root .mm-title-menu .mm-logo {width:420px !important;height:70px !important;max-height:70px !important}
  .mm-root .mm-title-menu .mm-subtitle {font-size:18px !important}
  .mm-root .mm-title-menu .mm-menu-actions {padding:28px !important;gap:18px !important}
  .mm-root .mm-title-menu .mm-menu-btn {font-size:18px !important;min-height:50px !important}
  .mm-root .mm-title-menu .mm-menu-quick {font-size:30px !important;min-height:72px !important}
}
@media(max-width:899px) {
  .mm-root .mm-title-screen {padding:16px 16px 68px !important}
  .mm-root .mm-title-card.mm-title-menu {grid-template-columns:minmax(0,430px) !important;justify-content:center;gap:12px !important}
  .mm-root .mm-title-menu .mm-menu-actions {padding:22px !important}
  .mm-root .mm-title-menu .mm-menu-hero {align-items:center !important;text-align:center !important}
  .mm-root .mm-title-menu .mm-logo {object-position:center}
}
@media(max-height:560px) and (min-width:900px) {
  .mm-root .mm-title-screen {padding-top:12px !important;padding-bottom:46px !important}
  .mm-root .mm-title-card.mm-title-menu {grid-template-rows:58px auto !important;grid-template-columns:480px minmax(0,1fr) !important;gap:8px !important}
  .mm-root .mm-title-menu .mm-logo {height:36px !important}
  .mm-root .mm-title-menu .mm-subtitle {font-size:13px !important}
  .mm-root .mm-title-menu .mm-menu-actions {padding:16px 22px !important;gap:8px !important}
  .mm-root .mm-title-menu .mm-menu-btns {display:grid;grid-template-columns:1fr 1fr;gap:8px !important}
  .mm-root .mm-title-menu .mm-menu-quick,.mm-root .mm-title-menu .mm-join-row {grid-column:1/-1}
  .mm-root .mm-title-menu .mm-menu-quick {min-height:50px !important}
}
@media(prefers-reduced-motion:reduce) {.mm-root .mm-title-menu *,.mm-root .mm-title-menu *::after,.mm-root .mm-title-screen::before,.mm-root .mm-title-screen::after {animation:none !important;transition:none !important}.mm-root .mm-title-menu .mm-menu-btn:active {transform:none}}
/* Identity is the engine's compact staging card, dressed as an armor plate. */
.mm-root .mm-staging {padding:12px 24px !important;background:var(--mek-ink) !important}
.mm-root .mm-staging-card.mm-stage-compact {--stage-cut:polygon(0 20px,20px 0,calc(100% - 30px) 0,100% 30px,100% calc(100% - 18px),calc(100% - 18px) 100%,18px 100%,0 calc(100% - 18px));width:min(560px,100%) !important;max-height:calc(100dvh - 24px);overflow:auto;padding:22px 28px !important;position:relative;isolation:isolate;border:0 !important;border-radius:2px !important;background:transparent !important;box-shadow:none !important;backdrop-filter:none !important;color:var(--mek-menu-ink);animation:mek-report-arrive .28s ease-out both}
.mm-root .mm-staging-card::before {content:'';position:absolute;inset:0;z-index:-2;background:#f0e7d2;clip-path:var(--stage-cut)}
.mm-root .mm-staging-card::after {content:'';position:absolute;inset:3px;z-index:-1;background:var(--mek-paper);clip-path:var(--stage-cut);pointer-events:none}
.mm-root .mm-staging-h {font:900 28px/1.1 var(--mek-menu-font) !important;letter-spacing:.06em;text-transform:uppercase;color:var(--mek-menu-ink) !important}
.mm-root .mm-staging-h::before {content:'PILOT REGISTRATION';display:block;margin-bottom:7px;font:700 11px/1.2 var(--mek-menu-font);letter-spacing:.15em;color:var(--mek-menu-signal)}
.mm-root .mm-staging-sub,.mm-root .mm-staging-label {color:#57554f !important;font-size:14px !important}
.mm-root .mm-staging-card .mm-input {min-height:50px;background:#e5dac5 !important;color:#191e20 !important;border:1px solid #8d8980 !important;border-radius:2px !important;font-size:18px !important}
.mm-root .mm-staging-card .mm-float label {color:#57554f !important}
/* Registration owns name and paint. Choose the mech once in the workbench;
   keep join.classes declared for the SDK's actual loadout picker. */
.mm-root .mm-staging-card .mm-classgrid,
.mm-root .mm-staging-card .mm-staging-label:has(+ .mm-classgrid) {display:none !important}
.mm-root .mm-staging-card .mm-classchip {width:100% !important;min-width:0 !important;max-width:100%}
/* Keep native portraits at thumbnail size. The SDK's 192px avatar canvas
   cannot serve as the workbench's large, sharp 512px preview. */
.mm-root .mm-staging-card .mm-classchip .mm-avatar {width:76px !important;height:76px !important;max-width:100%;flex:none}
/* The join draft's color is applied only on JOIN in SDK 292. Keep these
   small class silhouettes neutral; the selected swatch is the paint choice. */
.mm-root .mm-staging-card .mm-classchip .mm-avatar canvas {filter:grayscale(1)}
.mm-root .mm-staging-card .mm-classchip {border-radius:2px !important;border:1px solid #8d8980 !important;background:#e5dac5 !important;transition:transform .18s ease-out,border-color .18s}
.mm-root .mm-staging-card .mm-classchip:hover {transform:translateY(-2px);border-color:#e64b32 !important}
.mm-root .mm-staging-card .mm-classchip.on {border-color:#e64b32 !important;box-shadow:inset 0 0 0 1px #e64b32 !important;background:#e64b32 !important}
.mm-root .mm-staging-card .mm-clslabel {color:#191e20 !important;font:800 14px/1.2 var(--mek-menu-font) !important}
.mm-root .mm-staging-card .mm-swatch {width:44px !important;height:44px !important;border-radius:3px !important}
.mm-root .mm-staging-card .mm-swatch {transition:transform .16s ease-out}
.mm-root .mm-staging-card .mm-swatch:hover {transform:translateY(-2px)}
.mm-root .mm-staging-card .mm-swatch.on {outline:3px solid #191e20;outline-offset:2px}
.mm-root .mm-staging-card .mm-swatch.on::after {content:'✓';color:#191e20;font-weight:900;font-size:23px;text-shadow:0 0 2px white}
.mm-root .mm-staging-card .mm-colorrow {flex-wrap:wrap;gap:12px !important}
.mm-root .mm-staging-card .mm-colorrow::after {content:'Next: choose your Mek and weapons in the hangar.';flex:0 0 100%;grid-column:1 / -1;margin-top:3px;color:#57554f;font:500 13px/1.4 var(--mek-body);text-align:center}
.mm-root .mm-staging-card .mm-stage-actions {flex-wrap:wrap;gap:10px !important}
.mm-root .mm-staging-card .mm-btn {min-height:48px;border-radius:2px !important;font:800 16px/1.2 var(--mek-menu-font) !important}
.mm-root #mm-stage-watch {background:#191e20 !important;color:#f0e7d2 !important;border:1px solid #8d8980 !important}
.mm-root #mm-stage-join {background:var(--mek-signal) !important;color:#f0e7d2 !important;border:2px solid #e64b32 !important;box-shadow:inset 0 0 0 2px #e64b32 !important;font-size:23px !important}
.mm-root .mm-staging-card button:focus-visible,.mm-root .mm-staging-card input:focus-visible {outline:3px solid #fff !important;outline-offset:3px}
@media(max-width:599px) {
  .mm-root .mm-staging {padding:8px !important}
  .mm-root .mm-staging-card.mm-stage-compact {padding:18px !important}
  .mm-root .mm-staging-card .mm-classchip {min-height:100px}
  .mm-root .mm-staging-card .mm-classchip .mm-avatar {width:64px !important;height:64px !important}
  .mm-root .mm-staging-card .mm-colorrow {display:grid !important;grid-template-columns:repeat(4,44px);justify-content:center}
  .mm-root .mm-staging-card .mm-clslabel {font-size:11px !important}
}
@media(prefers-reduced-motion:reduce) {.mm-root .mm-staging-card.mm-stage-compact,.mm-root .mm-staging-card * {animation:none !important;transition:none !important}.mm-root .mm-staging-card button:hover {transform:none}}

/* The engine owns the round break, score order and countdown. Its native
   card gets the same armored shell as the hangar, with no extra UI loop. */
.mm-root .mm-results-dim {background:#191e2080 !important;backdrop-filter:none !important}
.mm-root .mm-results-card {
  --report-cut:polygon(0 18px,18px 0,calc(100% - 36px) 0,100% 36px,100% calc(100% - 18px),calc(100% - 18px) 100%,26px 100%,0 calc(100% - 26px));
  position:relative;isolation:isolate;width:min(640px,calc(100vw - 32px)) !important;
  display:flex !important;flex-direction:column !important;
  max-width:none !important;max-height:calc(100dvh - 40px) !important;min-height:0 !important;
  padding:3px !important;border:0 !important;border-radius:0 !important;
  background:none !important;box-shadow:none !important;backdrop-filter:none !important;color:var(--mek-menu-ink);
  font-family:var(--mek-menu-font) !important;overflow:visible !important;
  animation:mek-report-arrive .24s cubic-bezier(.16,1,.3,1) both;
}
.mm-root .mm-results-card::before,.mm-root .mm-results-card::after {
  content:'';position:absolute;z-index:-1;pointer-events:none;clip-path:var(--report-cut);
}
.mm-root .mm-results-card::before {inset:0;background:var(--mek-paper)}
.mm-root .mm-results-card::after {inset:3px;background:var(--mek-paper)}
/* Match results also have an engine-owned sponsor slot 50px below the card. */
.mm-root .mm-results-card:not(.mm-results-inter) {max-height:calc(100dvh - 230px) !important}
/* Engine 292 can expose a raw winner id here (#329). Native board names
   remain the result; keep the report heading clear until that hook ships. */
.mm-root .mm-results-card:not(.mm-results-inter) .mm-results-winner {display:none !important}
.mm-root .mm-results-card:not(.mm-results-inter) .mm-results-title {
  font-size:30px !important;letter-spacing:.01em !important;margin-bottom:0 !important;
}
.mm-root .mm-results-card .mm-results-band {
  position:relative;flex:none;padding:28px 32px 24px !important;margin:0 !important;
  text-align:left !important;background:none !important;border:0 !important;
  box-shadow:inset 0 -1px #8d898060 !important;overflow:visible !important;
}
.mm-root .mm-results-card .mm-results-band::before {
  content:'';position:absolute;left:32px;top:0;width:80px;height:4px;background:var(--mek-menu-signal);
}
.mm-root .mm-results-card .mm-results-band::after {
  content:'';position:absolute;right:32px;top:25px;width:100px;height:22px;opacity:.6;
  background:url('./assets/branding/cut-paper-wordmark.webp?v=a59373d1') center/contain no-repeat;
}
.mm-root .mm-results-card .mm-results-title {
  margin:0 114px 12px 0 !important;font:800 12px/1.2 var(--mek-menu-font) !important;
  letter-spacing:.2em !important;text-transform:uppercase;color:var(--mek-menu-signal) !important;
  text-shadow:none !important;
}
.mm-root .mm-results-card .mm-results-winner {
  margin:0 !important;font:800 clamp(24px,3.2vw,34px)/1.1 var(--mek-menu-font) !important;
  text-transform:uppercase;letter-spacing:.015em !important;color:var(--mek-menu-ink) !important;
  -webkit-text-stroke:0 !important;text-shadow:none !important;filter:none !important;
  background:none !important;-webkit-text-fill-color:var(--mek-menu-ink) !important;
}
.mm-root .mm-results-card .mm-results-reason {color:#57554f !important;font:500 14px/1.4 var(--mek-menu-font) !important;margin:10px 0 0 !important}
.mm-root .mm-results-card .mm-results-scroll {min-height:0;padding:20px 32px !important;overflow-y:auto;scrollbar-color:#8d8980 #e5dac5}
.mm-root .mm-results-card .mm-results-bhead {color:#57554f !important;text-align:left !important;font:700 12px/1.2 var(--mek-menu-font) !important;text-transform:uppercase;letter-spacing:.12em}
.mm-root .mm-results-card .mm-results-board {width:100% !important;max-width:none !important;margin:0 !important;padding:0 !important;display:grid;gap:6px;list-style:none}
.mm-root .mm-results-card .mm-results-board li {
  display:grid !important;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:12px;
  min-height:48px;padding:8px 16px 8px 10px !important;margin:0 !important;
  border:0;border-left:3px solid #8d8980;border-radius:0 !important;
  background:#e5dac5 !important;color:#191e20 !important;font:700 17px/1.2 var(--mek-menu-font) !important;
}
.mm-root .mm-results-card .mm-results-board li:first-child {
  border-color:#e64b32;border-left-color:var(--mek-menu-signal);
  background:#e64b321b !important;
}
.mm-root .mm-results-card .mm-results-board li:has(> .mm-avatar) {grid-template-columns:26px 32px minmax(0,1fr) auto;gap:10px}
.mm-root .mm-results-card .mm-results-board li > .mm-avatar {width:32px;height:32px}
.mm-root .mm-results-card .mm-rk {color:#57554f !important;font:800 14px/1 var(--mek-menu-font) !important;text-align:center;font-variant-numeric:tabular-nums}
.mm-root .mm-results-card li:first-child .mm-rk {color:var(--mek-menu-signal) !important}
.mm-root .mm-results-card .mm-nm {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mek-menu-ink) !important}
.mm-root .mm-results-card .mm-results-board b {color:var(--mek-menu-ink) !important;font:800 23px/1 var(--mek-menu-font) !important;font-variant-numeric:tabular-nums}
.mm-root .mm-results-card .mm-results-timer {
  flex:none;margin:0 !important;padding:16px 32px 20px !important;min-height:52px;
  border-top:1px solid #8d898060;color:#57554f !important;text-align:left !important;
  font:500 14px/1.3 var(--mek-menu-font) !important;letter-spacing:.02em;
}
.mm-root .mm-results-card .mm-results-timer b {color:var(--mek-menu-signal);font-weight:800;font-variant-numeric:tabular-nums}
.mm-root .mm-results-card .mm-results-main {flex:none;padding:0 !important}
.mm-root .mm-results-card .mm-results-actions {padding:0 32px 18px !important;gap:10px !important}
.mm-root .mm-results-card .mm-results-actions .mm-btn {min-height:44px;border-radius:2px !important;font:800 16px/1.2 var(--mek-menu-font) !important}
.mm-root .mm-results-card .mm-results-rematch {background:var(--mek-menu-signal) !important;color:var(--mek-menu-paper) !important;border-color:#e64b32 !important}
.mm-root .mm-results-card .mm-results-leave {background:#e5dac5 !important;color:var(--mek-menu-ink) !important;border:1px solid #8d8980 !important}
.mm-root .mm-results-card button:focus-visible {outline:3px solid var(--mek-menu-signal) !important;outline-offset:3px}
@keyframes mek-report-arrive {from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@media(max-width:599px),(max-height:500px) {
  .mm-root .mm-results-card .mm-results-band {padding:20px 20px 16px !important}
  .mm-root .mm-results-card .mm-results-band::before {left:20px}
  .mm-root .mm-results-card .mm-results-band::after {right:20px;top:19px;width:80px;height:18px}
  .mm-root .mm-results-card .mm-results-scroll {padding:12px 20px !important}
  .mm-root .mm-results-card .mm-results-board li {min-height:40px;font-size:15px !important}
  .mm-root .mm-results-card .mm-results-timer {padding:12px 20px 16px !important}
  .mm-root .mm-results-card .mm-results-actions {padding:0 20px 14px !important}
}
@media(prefers-reduced-motion:reduce) {.mm-root .mm-results-card {animation:none !important}}
@media(max-height:500px) {.mm-root .mm-results-card:not(.mm-results-inter) {max-height:calc(100dvh - 150px) !important}}

/* One type system for native chrome, including the identity sheet. */
.mm-root {font-family:var(--mek-body) !important}
.mm-root .mm-logo,.mm-root .mm-lobby-logo {
  content:url('./assets/branding/cut-paper-wordmark.webp?v=a59373d1');
  filter:brightness(0) invert(1) !important;
}
/* The shell's dark form surfaces otherwise inherit the paper panel's ink. */
.mm-root select,.mm-root .mm-input,.mm-root input[type="number"],.mm-root .mm-chatin,
.mm-settings .mm-select {
  background:var(--mek-menu-paper) !important;color:var(--mek-menu-ink) !important;
  border:1px solid #8d8980 !important;box-shadow:none !important;
}
/* Settings mounts outside .mm-root; keep its native selects legible and able
   to shrink beside their labels on phones. */
.mm-settings .mm-select {min-width:0;max-width:65%}
.mm-root .mm-segc {background:var(--mek-menu-paper) !important;color:var(--mek-menu-ink) !important}
.mm-root .mm-segc.on {background:var(--mek-menu-signal) !important;color:var(--mek-menu-paper) !important}
.mm-root .mm-clock {color:var(--mek-menu-paper) !important;font-family:var(--mek-menu-font) !important}
.mm-root .mm-title-menu .mm-menu-quick,.mm-root #mm-stage-join {box-shadow:none !important;border-radius:0 !important}
.mm-root .mm-title-menu .mm-menu-quick::after {display:none}
.mm-root .mm-staging-card .mm-classchip.on .mm-clslabel {color:var(--mek-paper) !important}
.mm-root .mm-staging-card .mm-clslabel {background:none !important;box-shadow:none !important;text-shadow:none !important}
.mm-root .mm-staging-card button:focus-visible,.mm-root .mm-staging-card input:focus-visible {outline-color:var(--mek-ink) !important}
.mm-root .mm-results-reason,.mm-root .mm-results-timer {font-family:var(--mek-body) !important}
