.headless-canvas { display: block; outline: none; touch-action: none; }
.headless-canvas:focus-visible { outline: 2px solid #ffe9a9; outline-offset: -2px; }
@font-face { font-family: Bungee; src: url('./assets/fonts/Bungee.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: NunitoSans; src: url('./assets/fonts/NunitoSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Grenze Gotisch'; src: url('./assets/fonts/GrenzeGotisch-Bold.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Pirata One'; src: url('./assets/fonts/PirataOne.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lilita One'; src: url('./assets/fonts/LilitaOne.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Titan One'; src: url('./assets/fonts/TitanOne.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bangers'; src: url('./assets/fonts/Bangers.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Grenze'; src: url('./assets/fonts/Grenze-SemiBold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('./assets/fonts/AlegreyaSans-Bold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('./assets/fonts/Fredoka-SemiBold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('./assets/fonts/Kanit-SemiBold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('./assets/fonts/BarlowSemiCondensed-SemiBold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('./assets/fonts/Rubik-SemiBold.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
.headless-results-art { height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid #88643f; border-radius: 6px; background: linear-gradient(90deg,#241a29e8,#392735b8,#241a29e8),url('./assets/ember-valley.webp') center 55%/cover; color: #ffe5ac; }
.headless-results-art img { width: 43px; height: 55px; object-fit: contain; }
.headless-results-art strong { display: block; font: 18px var(--hl-display, Bungee, system-ui, sans-serif); }
.headless-results-art span { display: block; text-align: center; font: 700 16px var(--hl-ui, NunitoSans, system-ui, sans-serif); color: #fff0cf; }

.headless-loadout-preview { display:block; width:100%; height:100%; border-radius:8px; background:linear-gradient(#291d2b66,#291d2baa),url('./assets/ember-valley.webp') center/cover; }

[data-mm-part="preview"] { border:1px solid #88643f; border-radius:8px; }

/* The initial deploy has an identity strip; its native heading carries the game logo. */
.mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h { width:100%; font-size:0 !important; gap:0; justify-content:center; }
.mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { all:unset; content:''; display:block; width:100%; height:96px; background:url('./assets/branding/headless-logo.webp') center / contain no-repeat; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo { grid-template-rows:minmax(0, 1fr); }
/* The engine stacks preview and rows below 900px. Keep both rows in the scroll flow instead of collapsing the preview. */
@media (max-width:900px) { .mm-lo-card:has([data-mm-part="identity"]) .mm-lo { grid-template-rows:auto auto; align-content:start; } }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-right { min-height:0; }
@media (max-height:660px) { .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:64px; } }
@media (max-height:460px) {
  .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:48px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-right { min-height:auto; }
}

/* The rows share the picker's height instead of scrolling: each row's cards are 96px tall and shrink (to 40px) only when the window is short. */
.mm-lo-rows-l .mm-lo-right { display:flex; flex-direction:column; }
.mm-lo-rows-l .mm-lo-right > [data-mm-part="rows"] { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; gap:3px; }
[data-mm-part="rows"] > [data-mm-part="row"] { flex:0 1 auto; min-height:70px; gap:2px; }
[data-mm-part="row"] .mm-lo-rwb { flex:0 1 96px; min-height:40px; }
[data-mm-part="row"] .mm-lo-rwview, [data-mm-part="row"] .mm-lo-rwtrack { height:100%; }
[data-mm-part="row"] .mm-lo-rwtrack { align-items:stretch; }
[data-mm-part="row"] button[aria-pressed] { height:100%; min-height:40px; max-height:96px; padding:4px; box-sizing:border-box; overflow:hidden; }
[data-mm-part="row"] .mm-lo-rwart { max-height:100%; min-height:0; }
/* The row arrows follow the cards' height (the engine floors them at 44px, the cards at 40px): otherwise they hang 4px below
   each row and the bottom row's are cut short. */
[data-mm-part="row"] .mm-lo-rwarrow { min-height:40px; }
/* The row the keyboard is on (game.js menuKeys). */
/* Card names never sit on the art: the row header shows the hovered card's name (game.js), the cards show none. */
[data-mm-part="row"] button[aria-pressed] > span:not(:first-child), [data-mm-part="row"] .mm-lo-rwlbl {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
[data-mm-part="row"] .mm-lo-rwh { min-width:0; flex-shrink:0; flex-wrap:wrap; gap:2px 10px; }
[data-mm-part="row"] .mm-lo-rwl { flex:0 0 auto; }
@media (max-width:380px) { [data-mm-part="rows"] > [data-mm-part="row"] { min-height:100px; } }
.headless-rwhint { white-space:normal; overflow-wrap:anywhere; min-width:0; }
/* A row showing the hovered card's name in its header keeps its height: a taller row squeezed the others and pushed the
   last one out of the dialog (v72). */
.mm-lo-rwh.is-hinting .mm-lo-rwc:not(.headless-rwhint) { display:none; }
.mm-lo-rwh:not(.is-hinting) .headless-rwhint { display:none; }

/* Head portraits identify the rider; retain their accessible labels. */
[data-mm-part="row"]:first-child button[aria-pressed] > span:last-child {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}

/* Use the complete sprite rather than the avatar painter's face zoom. */
[data-mm-part="row"]:first-child button[aria-pressed] > span:first-child { height:100%; max-height:72px; width:auto; aspect-ratio:1; flex-shrink:0; margin:auto; }
[data-mm-part="row"]:first-child button[aria-pressed] img { position:static; width:100%; height:100%; transform:none; object-fit:contain; }
[data-mm-part="row"]:first-child button[aria-pressed] canvas { display:none; }

/* Respawn: the panel slides up and off the screen (the engine's 'lift' only rises 24px), then the dimmed backdrop clears;
   the ad board still takes the engine's 'drop'. Only the respawn picker declares exit 'lift' (game.js respawnLoadout). */
@keyframes headless-slide-off { 0% { transform:none; } 75%, 100% { transform:translateY(calc(-100vh - 100%)); } }
@keyframes headless-veil-off { 0%, 45% { opacity:1; } 100% { opacity:0; } }
.mm-modal.mm-cp-exit-lift { animation:headless-veil-off var(--mm-cp-ms, 450ms) linear both; }
.mm-modal.mm-cp-exit-lift .mm-lo-card { animation:headless-slide-off var(--mm-cp-ms, 450ms) cubic-bezier(.45,0,.7,.3) both; }
@media (prefers-reduced-motion:reduce) { .mm-modal.mm-cp-exit-lift .mm-lo-card { animation:mm-cp-fade-out var(--mm-cp-ms, 450ms) ease-in both; } }
/* Every engine dialog card (deploy and respawn pickers, Headquarters, results, help, settings, leaderboard) flies in from
   above the screen and settles with a small bounce. Leaving: both pickers fly off the top (exit 'lift', above). The
   engine removes its other dialogs at once, so their fly-off waits on engine-proposals/modal-presentation.md. */
@keyframes headless-fly-in { 0% { transform:translateY(calc(-100vh - 100%)); } 72% { transform:translateY(10px); } 87% { transform:translateY(-3px); } 100% { transform:none; } }
/* Two classes: the engine's own sheet is injected after ours, so a single class would lose to its card-in. */
.mm-modal .mm-modal-card { animation:headless-fly-in 520ms cubic-bezier(.22,.8,.3,1) both; }
@media (prefers-reduced-motion:reduce) { .mm-modal .mm-modal-card { animation:none; } }
/* No blur on the live arena behind the deploy/respawn picker. The arena redraws every frame, so a full-screen blur
   behind it is recomputed every frame too: about two thirds of that screen's frame rate in the v96 lab (16 -> 55-60fps
   software raster with both the game's and the engine's blur gone). The engine's dark vignette stays. Scoped to the
   loadout modal; engine-proposals/modal-backdrop-cost.md asks for an engine-owned switch. */
.mm-modal.mm-modal-loadout { backdrop-filter:none; -webkit-backdrop-filter:none; }
/* Unblurred, the game's own standings and Headquarters corner would read through the frame; both are repeated in the picker. */
body:has(.mm-modal-loadout) :is(.headless-roster, .headless-corner) { visibility:hidden; }

/* Parchment racks and dark leather cards, using the native carousel parts. */
[data-mm-part="rows"] { padding:0; border-radius:8px; background:#e4c184; }
[data-mm-part="row"] { padding:0 5px; border-radius:6px; background:#69402022; color:#472b18; }
[data-mm-part="row"] > div:first-child, [data-mm-part="row"] > div:first-child span { color:#472b18; text-shadow:0 1px #ffe9b4; font-weight:800; }
[data-mm-part="row"] button { border:2px solid #77502b; background:linear-gradient(#754b2d,#402a20); color:#fff0c5; box-shadow:inset 0 1px #b9874d,0 2px 2px #4a291633; }
[data-mm-part="row"] button[aria-pressed] { background:radial-gradient(ellipse at 50% 30%,#654332,#2e211c); border-radius:7px; }
[data-mm-part="row"] button[aria-pressed="true"] { border-color:#ffe095; background:radial-gradient(ellipse at 50% 35%,#9b6429,#49311f); box-shadow:inset 0 0 0 1px #f6bb4d,0 0 8px #e9a532; }
[data-mm-part="row"] button:focus-visible { outline:3px solid #fff6d5; outline-offset:2px; }
[data-mm-part="row"] button:disabled { opacity:.45; }
[data-mm-part="row"] button[aria-pressed] > span:last-child { color:#fff0c5; }
[data-mm-part="preview"] { overflow:hidden; box-sizing:border-box; border:5px ridge #946334; border-radius:8px; box-shadow:0 2px 5px #28170888; }
.headless-loadout-preview { border-radius:3px; }

[data-mm-part="chassis"] button[aria-pressed]:has(img) > span:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
[data-mm-part="chassis"] button[aria-pressed]:has(img) img { position:static; width:100%; height:100%; transform:none; object-fit:contain; }
[data-mm-part="chassis"] button[aria-pressed]:has(img) canvas { display:none; }
.headless-entry-preview { height:100%; min-height:140px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:16px; background:linear-gradient(#291d2b66,#291d2baa),url('./assets/ember-valley.webp') center/cover; }
.headless-entry-preview img:first-child { width:100px; height:100px; object-fit:contain; padding:12px; border:3px solid; border-radius:50%; background:#2e211ccc; }
.headless-entry-preview img:last-child { width:170px; max-height:70px; object-fit:contain; }

[data-mm-part="chassis"], [data-mm-part="slots"], [data-mm-part="catalog"] { background:#e4c184; color:#472b18; border-radius:7px; padding:8px; }
[data-mm-part="chassis"] button[aria-pressed]:has(img), [data-mm-part="slots"] button, [data-mm-part="catalog"] button { border:2px solid #77502b; border-radius:7px; color:#fff0c5; background:radial-gradient(ellipse at 50% 30%,#654332,#2e211c); }
[data-mm-part="chassis"] button[aria-pressed="true"]:has(img), [data-mm-part="catalog"] button[aria-pressed="true"] { border-color:#ffe095; box-shadow:inset 0 0 0 1px #f6bb4d,0 0 8px #e9a532; }
[data-mm-part="chassis"] button[aria-pressed]:has(img) > span:first-child { width:64px; height:64px; flex-shrink:0; margin:auto; }
[data-mm-part="identity"] { color:#472b18; }
.headless-entry-preview { width:100%; }

[data-mm-part="chassis"] div:has(> button[aria-pressed] img) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
[data-mm-part="chassis"] button[aria-pressed]:has(img) { width:100%; height:80px; min-height:80px; padding:4px; box-sizing:border-box; }
[data-mm-part="chassis"] button[aria-pressed]:has(img) img { transform:none !important; width:100% !important; height:100% !important; }
[data-mm-part="identity"] span { color:#472b18; }
[data-mm-part="identity"] .mm-lo-idlbl { color:#472b18; }
/* The engine keeps accessible names; reveal the same labels on hover/focus. */
[data-mm-part="row"] button[aria-pressed], [data-mm-part="chassis"] button[aria-pressed]:has(img) { position:relative; }
[data-mm-part="chassis"] button[aria-pressed]:has(img):is(:hover,:focus-visible) > span:last-child {
 position:absolute; inset:auto 2px 2px; width:auto; max-width:none; height:auto; padding:3px 4px; margin:0; transform:none; text-align:center; clip-path:none; white-space:normal; overflow:visible;
 background:#261c16f5; color:#fff0c5; border-radius:3px; font:700 16px/1.2 var(--hl-ui, NunitoSans, system-ui, sans-serif); z-index:1;
}
/* World switcher chip (bottom-left, placed in the chat bubble's row by game.js) and its world list. */
.headless-corner { position:absolute; left:12px; z-index:2; display:flex; flex-wrap:wrap; max-width:calc(100% - 24px); gap:8px; align-items:flex-end; }
.headless-world-chip { position:relative; box-sizing:border-box; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:1px; min-width:44px; min-height:44px; padding:7px 14px 8px; border:1px solid #88643f; border-radius:8px; background:#392a27e6; color:#fff0cf; cursor:pointer; text-align:left; box-shadow:0 2px 10px #0006; }
.headless-world-chip strong { font:700 16px/1.1 var(--hl-ui, NunitoSans, system-ui, sans-serif); letter-spacing:.02em; color:#efd186; }
.headless-world-chip span { font:600 16px/1.3 var(--hl-ui, NunitoSans, system-ui, sans-serif); color:#fff0cf; }
.headless-world-chip:hover, .headless-world-chip:focus-visible { border-color:#efd186; outline:none; }
.headless-world-list { display:flex; flex-direction:column; gap:6px; min-width:min(320px,70vw); }
.headless-world-row { min-height:44px; padding:8px 14px; border:1px solid #88643f; border-radius:8px; background:#513b2e; color:#fff0cf; font:700 16px/1.2 var(--hl-ui, NunitoSans, system-ui, sans-serif); text-align:left; cursor:pointer; }
.headless-world-row:hover:not(:disabled), .headless-world-row:focus-visible { border-color:#efd186; outline:none; }
.headless-world-row:disabled { opacity:.65; cursor:default; }
.headless-world-note { margin:6px 2px 0; color:#fff0cf; font:600 16px/1.4 var(--hl-ui, NunitoSans, system-ui, sans-serif); }
.headless-world-chip[hidden] { display:none; }
/* Badge and live balance share the world chip's height, including on narrow screens. */
.headless-hq-chip { flex-shrink:0; align-items:center; justify-content:center; gap:1px; padding:4px 8px; height:var(--hl-chip-h, 56px); min-height:44px; }
.headless-hq-chip strong { display:flex; align-items:center; justify-content:center; line-height:0; }
.headless-hq-chip .headless-hq-logo { height:calc(var(--hl-chip-h, 56px) - 30px); min-height:18px; max-height:32px; }
.headless-hq-chip .headless-hq-count { font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; white-space:nowrap; }
.headless-hq-logo { display:block; height:calc(var(--hl-chip-h, 56px) - 10px); max-height:48px; width:auto; flex-shrink:0; image-rendering:pixelated; }
/* Leaderboard chip beside it, the same height; its modal lists today's best. */
.headless-lb-chip { justify-content:center; height:var(--hl-chip-h, 56px); min-height:0; padding:4px 14px; }
/* The native details slot reserves room for the larger badge without covering the respawn title. */
[data-cls-details]:has(.headless-picker-hq) { display:flex; align-items:center; }
[data-mm-part="preview"]:has(.headless-picker-hq) { min-height:180px; }
.headless-picker-hq { box-sizing:border-box; width:100%; display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:0 10px; white-space:nowrap; padding:6px 10px; border:1px solid #88643f; border-radius:8px; background:#392a27e6; color:#fff0cf; font:700 16px/1.3 var(--hl-ui, NunitoSans, system-ui, sans-serif); cursor:pointer; }
.headless-picker-hq:hover, .headless-picker-hq:focus-visible { border-color:#efd186; outline:none; }
.headless-respawn-stats { box-sizing:border-box; color:#fff0cf; font:700 14px/1.2 var(--hl-ui, NunitoSans, system-ui, sans-serif); padding:4px 8px; border-top:1px solid #bd945b; background:linear-gradient(90deg,#2c201ceb,#4c3326f0,#2c201ceb); }
.headless-record-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.headless-record-heading strong { color:#efd186; font-size:16px; }
.headless-respawn-stats dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 10px; margin:4px 0; }
.headless-respawn-stats dt { min-height:2.4em; }
.headless-respawn-stats dd { margin:2px 0 0; font-size:20px; color:#ffe5a2; font-variant-numeric:tabular-nums; }
.headless-respawn-stats small { display:block; font-size:13px; color:#d9c39b; }
.headless-picker-record { display:flex; flex-direction:column; gap:6px; width:100%; height:100%; min-height:0; }
.headless-picker-record .headless-respawn-stats { flex:1; min-height:0; overflow:auto; }
.headless-picker-record .headless-respawn-stats dl > div { display:flex; align-items:center; justify-content:space-between; gap:4px; }
.headless-picker-record .headless-respawn-stats dt { min-height:0; }
.headless-picker-record .headless-respawn-stats dd { margin:0; font-size:16px; }
.headless-picker-record .headless-picker-hq { flex-shrink:0; min-height:44px; padding:4px 8px; }
.headless-picker-record .headless-hq-logo { height:30px; }
/* Spawn and respawn use the same armory materials as Headquarters, on the native picker. */
.mm-lo-card:has([data-mm-part="identity"]) { width:min(1080px,100%); padding:14px 18px 18px; box-sizing:border-box; border:3px ridge #bb8741; border-radius:12px; background:linear-gradient(120deg,#493023,#241b1c 70%); box-shadow:0 12px 32px #100b13aa,inset 0 0 0 2px #211515; color:#fff0c0; }
.mm-lo-card:has([data-mm-part="identity"])::before { display:none; }
.mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h { margin:0; flex-shrink:0; }
.mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:42px; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo { gap:12px; margin-top:6px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="decor"] { display:none; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="preview"] { border:5px ridge #d39c47; border-radius:10px; padding:3px; gap:5px; background:#261712; box-shadow:0 3px 4px #160c08,inset 0 0 0 2px #603b20; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-loadout-preview { border-radius:4px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-cls-details]:has(.headless-picker-record) { flex-shrink:0; height:160px !important; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats { padding:4px; border:2px ridge #b9823c; border-radius:6px; background:linear-gradient(110deg,#27180fea,#42251ae8); color:#ffedc1; font:600 12px/1.25 Rubik,system-ui,sans-serif; overflow:visible; scrollbar-width:thin; scrollbar-color:#b47c37 #2c1b12; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-record-heading strong { font:700 16px/1.2 Georgia,serif; color:#f6d384; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dd { color:#ffcc67; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dl { margin:3px 0; gap:3px 8px; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-picker-hq { border:3px ridge #c99448; border-radius:7px; background:linear-gradient(#54341f,#2e1c14); box-shadow:inset 0 0 0 1px #efc57455; font:700 15px/1.2 Georgia,serif; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-picker-hq:focus-visible { outline:2px solid #fff0b4; outline-offset:-5px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="identity"] { flex-shrink:0; padding:7px; border:3px ridge #bb8741; border-radius:8px; gap:7px 12px; background:linear-gradient(110deg,#40271a,#271a17); color:#ffe6ae; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname { flex:0 1 170px; position:relative; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname label { top:4px; left:8px; transform:none !important; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname input { height:48px; padding:18px 8px 4px; min-height:48px; border:2px solid #a9793d; border-radius:7px; background:#281c1a; color:#fff0c0; font:600 18px/1.2 Georgia,serif !important; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname label, .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idlbl { color:#efd186; font:700 13px/1.2 Georgia,serif !important; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idsw { width:40px; height:40px; min-width:40px; border:3px ridge #c48c3e; box-shadow:0 2px 2px #120a07; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idsw[aria-pressed="true"] { outline:3px solid #fff0b9; outline-offset:1px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="rows"] { padding:0; background:transparent; gap:8px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] { padding:4px 6px 6px; border:3px ridge #ae7937; border-radius:8px; background:linear-gradient(100deg,#42271be8,#251611e8); gap:4px; min-height:82px; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwh { gap:4px 8px; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwh span { font:700 17px/1.2 Georgia,serif !important; color:#ffe6ac; letter-spacing:0; text-shadow:0 1px #160b06; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwl { padding:1px 9px; border:1px solid #bd873b; border-radius:4px; background:linear-gradient(#edc078,#bc803b); color:#372010 !important; text-shadow:0 1px #f8dba2 !important; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwb { flex:1 1 110px; min-height:44px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button[aria-pressed] { padding:3px 8px; border:2px solid #77502b; border-radius:7px; background:linear-gradient(#241a18,#4b3224); box-shadow:inset 0 1px 5px #120e13; max-height:110px; min-height:44px; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button[aria-pressed="true"] { border-color:#ffde89; box-shadow:inset 0 0 0 2px #ffd98988,0 0 5px #e7aa4a99; filter:brightness(1.16); }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button.off { opacity:1; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button.off img { opacity:.38; }
.mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button.off::after { content:''; position:absolute; bottom:7px; right:8px; width:17px; height:20px; background:url('./assets/branding/shop-lock.svg') center / contain no-repeat; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwarrow { width:38px; min-height:44px; border:3px ridge #c49446; border-radius:7px; background:linear-gradient(#93602e,#412516); color:#ffe0a0; box-shadow:0 2px 2px #160c08; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwarrow:disabled { opacity:.35; }
.mm-lo-card:has([data-mm-part="identity"]) button:focus-visible { outline:3px solid #fff0b4; outline-offset:-3px; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions { margin-top:10px; }
.mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go { position:relative; height:50px; padding:4px 12px; min-height:50px; border:6px ridge #c99442; border-radius:9px; background:linear-gradient(110deg,#edb85f,#ffdfa0 42%,#f3c572); box-shadow:0 3px 0 #1d0e08,inset 0 0 0 2px #fff0bc; color:#342011; font:700 26px/1.15 Georgia,serif !important; text-shadow:0 1px #fff0be; }
.mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go::before, .mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go::after { content:''; position:absolute; top:50%; left:22px; width:90px; height:16px; transform:translateY(-50%); background:url('./assets/weapons/Spear_1/1.png') center / contain no-repeat; opacity:.65; }
.mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go::after { left:auto; right:22px; transform:translateY(-50%) scaleX(-1); }
@media (min-width:900px) { .mm-lo-card:has([data-mm-part="identity"]) .mm-lo { grid-template-columns:minmax(240px,28%) minmax(0,1fr); } }
/* Short laptop viewports retain the native ad reservation and a visible Respawn action. */
@media (max-height:700px) and (min-width:900px) {
  .mm-lo-card:has([data-mm-part="identity"]) { padding:10px 14px 14px; }
  .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:28px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo { margin-top:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-right { gap:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="identity"] { padding:2px 5px; border-width:2px; gap:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname { flex:0 1 140px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname input { height:44px; min-height:44px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idcolors { gap:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idlbl { display:none; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idsw { width:36px; height:36px; min-width:36px; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="rows"] { gap:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] { min-height:62px; padding:3px; display:grid; grid-template-columns:110px minmax(0,1fr); gap:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwh { flex-direction:column; justify-content:center; align-items:flex-start; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwh span { font-size:13px !important; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwl { padding:2px 4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwb { height:100%; min-height:44px; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] button[aria-pressed] { max-height:68px; padding:5px 8px; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-cls-details]:has(.headless-picker-record) { height:136px !important; }
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats { font-size:11px; padding:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) .headless-record-heading strong { font-size:14px; }
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dl { gap:3px 6px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions { margin-top:4px; }
  .mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go { height:44px; min-height:44px; font-size:22px !important; }
}
@media (max-width:899px) {
  .mm-lo-card:has([data-mm-part="identity"]) { padding:16px 18px; border:5px ridge #b7833c; border-radius:12px; background-size:auto 100%; background-color:#2e1a12; }
  .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:66px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo { grid-template-rows:auto auto; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="preview"] { min-height:340px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-pview { min-height:160px; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-right { min-height:0; overflow:visible; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="rows"] { flex:0 0 auto; }
  .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="row"] { min-height:92px; }
  .mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go::before, .mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go::after { display:none; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-idname { flex:0 0 auto; width:100%; }
  .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-rwh span { font-size:15px !important; }
}
@media (max-height:460px) { .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { height:42px; } .mm-lo-card:has([data-mm-part="identity"]) #mm-lo-go { min-height:44px; font-size:22px !important; } }


.mm-lo-card:has([data-mm-part="identity"]) .headless-picker-record .headless-respawn-stats { overflow:visible; flex:0 0 auto; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dt { white-space:nowrap; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dd { flex-shrink:0; font:700 12px/1.25 Rubik,system-ui,sans-serif; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-picker-record { gap:4px; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-picker-hq { margin-top:auto; }
@media (max-height:700px) and (min-width:900px) {
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats { padding:2px 4px; line-height:1.1; }
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dl { margin:2px 0; gap:2px 6px; }
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dd { font-size:11px; line-height:1.1; }
}
@media (max-width:460px) {
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats,
  .mm-lo-card:has([data-mm-part="identity"]) .headless-respawn-stats dd { font-size:11px; }
}
/* First deployment: a compact title and frame paint without a decorative image download. */
.mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) > .mm-modal-h { font:400 26px/1.15 Bungee,system-ui,sans-serif !important; color:#ffe2a0; }
.mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) > .mm-modal-h::before { display:none; }
.mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) [data-mm-part="preview"] { min-height:180px; }
@media (min-width:900px) {
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo { height:420px; }
}
@media (min-width:900px) and (max-height:700px) {
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo { height:320px; }
}
@media (max-width:899px) {
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) { padding:10px; }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo { grid-template-rows:160px minmax(0,1fr); }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) [data-mm-part="preview"] { height:160px; min-height:0; max-height:160px; }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo-pview { min-height:0; }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo-right { overflow:auto; }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) [data-mm-part="row"] { min-height:72px; }
  .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) .mm-lo-actions #mm-lo-go { height:auto; min-height:50px; font-size:19px !important; }
}
.mm-lo-card:has([data-mm-part="identity"]) .headless-entry-preview { min-height:0; flex:1; }
.mm-lo-card:has([data-mm-part="identity"]) .headless-entry-preview img:first-child { width:132px; height:132px; border-width:4px; box-shadow:0 3px 12px #160a0aaa; }
.mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions .mm-btn:not(#mm-lo-go) { height:50px; min-height:44px; padding:4px 12px; flex:0 1 28%; border:3px ridge #bc8843; background:linear-gradient(#57371e,#2e1d14); color:#ffe6af; font:700 20px/1.15 Georgia,serif !important; }
@media (max-height:700px) { .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions .mm-btn:not(#mm-lo-go) { height:44px; } }
@media (max-height:460px) { .mm-lo-card:has([data-mm-part="identity"]):not(:has(.headless-picker-record)) > .mm-modal-h::before { height:36px; } }
/* BIZARRECADE supplies the game branding outside the iframe; keep only functional picker headings here. */
html.headless-feed .mm-menu-hero,
html.headless-feed .mm-logo,
html.headless-feed .mm-title,
html.headless-feed .mm-lobby-logo-btn,
html.headless-feed .mm-lobby-logo,
html.headless-feed .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h::before { display:none; }
html.headless-feed .mm-lo-card:has([data-mm-part="identity"]) > .mm-modal-h { font:400 26px/1.15 Bungee,system-ui,sans-serif !important; color:#ffe2a0; }
/* v125, BIZARRECADE Game Factory requirements v10. One logo: the host's landing shows it above Play, so the engine's second
   flash of it over the game after Play is dropped. Visible headings and buttons are all caps in the feed. */
html.headless-feed .mm-bzc-brand { display:none; }
html.headless-feed .mm-modal-h,
html.headless-feed .mm-btn,
html.headless-feed .headless-picker-hq,
html.headless-feed .headless-lifetime summary,
html.headless-feed .headless-life-recap span { text-transform:uppercase; }
/* v127: the feed's one-button respawn card (session.modal): two numbers and where the full game lives. */
html.headless-compact .headless-feed-card .headless-life-recap { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:220px; }
.headless-feed-more { margin:10px 0 2px; text-align:center; color:#d9c9a3; font:700 12px/1.35 Rubik,system-ui,sans-serif; text-transform:uppercase; letter-spacing:.03em; }
/* The Headquarters (engine shop board) fits without scrolling: a wide card shows a page of six in one row
   (three a row on a narrow screen); on a short window or a phone the cards, labels and margins compact. */
/* Native shop, dressed as the approved wooden armory. Its controls, focus and economy stay engine-owned. */
.mm-modal-card:has(> [data-shop-body]) {
  --hq-cream:#fff0c0; --hq-gold:#d59b46; --hq-ink:#342011;
  width:min(1280px,100%); max-height:calc(100dvh - 24px); box-sizing:border-box;
  padding:34px clamp(42px,8.5vw,116px) 70px; border:0; border-radius:0;
  background:url('./assets/branding/hq-armory.webp') center / 100% 100% no-repeat;
  box-shadow:none; display:flex; flex-direction:column; overflow:hidden; color:var(--hq-cream);
}
.mm-modal-card:has(> [data-shop-body]) > [data-shop-body] { min-height:0; overflow:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:#ac7838 #2d1a15; }
.mm-modal-card:has(> [data-shop-body])::before { display:none; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-h { font-size:0 !important; gap:16px; margin:0; align-items:center; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-h::before { all:unset; content:''; display:block; flex:1; height:130px; background:url('./assets/branding/headquarters-store.webp') left center / contain no-repeat; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopmeta { flex-shrink:0; padding:10px 18px; border:3px ridge #dda951; border-radius:12px; background:linear-gradient(#432918,#23150f); box-shadow:0 3px 0 #160c08,inset 0 0 0 2px #7b4a24; color:var(--hq-cream); font:700 24px/1.2 Georgia,serif !important; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopmeta::before { content:''; width:30px; height:30px; background:url('./assets/branding/shop-skull.svg') center / contain no-repeat; }
.mm-modal-card:has(> [data-shop-body]) .mm-note { margin:0 0 8px !important; text-align:center; color:var(--hq-cream); opacity:1; font:400 18px/1.3 Georgia,serif !important; text-shadow:0 2px 2px #150b08; }
.mm-modal-card:has(> [data-shop-body]) .mm-note::before { content:'Heads will roll.'; display:block; margin:0 0 2px; font:700 38px/1.15 Georgia,serif; color:#fff0c0; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopgrid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; padding:0; box-sizing:border-box; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard {
  position:relative; min-width:0; height:248px; padding:38px 13px 17px; gap:4px; border:0; border-radius:48% 48% 9px 9px / 14% 14% 9px 9px;
  background:url('./assets/branding/hq-niche.webp') center / 100% 100% no-repeat; box-shadow:none; color:var(--hq-cream); transition:filter .15s,transform .15s;
}
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard:not(.off):hover { filter:brightness(1.2); transform:translateY(-2px); }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard:focus-visible { outline:3px solid #fff0b4; outline-offset:-5px; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopart { width:100%; height:99px; max-width:none; max-height:none; object-fit:contain; filter:drop-shadow(0 4px 3px #180b09); }
.mm-modal-card:has(> [data-shop-body]) .mm-shoplabel { width:100%; min-width:0; min-height:2.2em; white-space:pre-line; overflow-wrap:normal; font:700 20px/1.1 Georgia,serif !important; text-shadow:0 2px 1px #180a05; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcost { box-sizing:border-box; width:100%; min-height:34px; margin-top:auto; padding:3px 26px 3px 5px; gap:5px; border:2px ridge #d5a052; border-radius:6px; background:linear-gradient(#825325,#482c17); box-shadow:0 2px 2px #140b07,inset 0 0 0 1px #f4d08755; font:700 20px/1 Georgia,serif !important; color:var(--hq-cream); }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcost .mmi { width:20px; height:20px; fill:transparent; background:url('./assets/branding/shop-skull.svg') center / contain no-repeat; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard.off { opacity:1; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard.off .mm-shopart { opacity:1; }
.mm-modal-card:has(> [data-shop-body]) .mm-tgbadge { right:9px; bottom:17px; width:30px; height:34px; box-sizing:border-box; border:2px ridge #dcaa57; border-radius:50%; background:linear-gradient(#724720,#2b190f); color:#b9df85; box-shadow:0 2px 2px #150c08; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard.off .mm-tgbadge .mmi { fill:transparent; width:18px; height:24px; background:url('./assets/branding/shop-lock.svg') center / contain no-repeat; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard.on .mm-tgbadge { background:#294126; }
.mm-modal-card:has(> [data-shop-body]) .mm-shopcard.off .mm-tgbadge { background:linear-gradient(#724720,#2b190f); }
.mm-modal-card:has(> [data-shop-body]) .mm-shoppage { padding-top:6px; margin-top:6px; gap:20px; border:0; font:700 24px/1.2 Georgia,serif; }
.mm-modal-card:has(> [data-shop-body]) .mm-shoppage button { min-width:56px; min-height:42px; border:3px ridge #c99343; border-radius:10px; background:linear-gradient(#86552b,#442719); box-shadow:0 3px 0 #170c08,inset 0 0 0 1px #ffe3a333; color:#ffe3a3; }
.mm-modal-card:has(> [data-shop-body]) .mm-shoppage button:disabled { opacity:.45; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done { flex-shrink:0; margin-top:14px; min-height:60px; padding:8px 20px; border:6px ridge #c99442; border-radius:10px; background:linear-gradient(110deg,#edb85f,#ffdfa0 42%,#f3c572); box-shadow:0 4px 0 #1d0e08,inset 0 0 0 2px #fff0bc; color:var(--hq-ink); font:700 28px/1.15 Georgia,serif !important; text-shadow:0 1px #fff0be; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done:hover { filter:brightness(1.08); }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done { position:relative; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done::before, .mm-modal-card:has(> [data-shop-body]) .mm-modal-done::after { content:''; position:absolute; top:50%; left:22px; width:100px; height:18px; transform:translateY(-50%); background:url('./assets/weapons/Spear_1/1.png') center / contain no-repeat; opacity:.65; }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done::after { left:auto; right:22px; transform:translateY(-50%) scaleX(-1); }
.mm-modal-card:has(> [data-shop-body]) .mm-modal-done:focus-visible, .mm-modal-card:has(> [data-shop-body]) .mm-shoppage button:focus-visible { outline:3px solid #fff0b4; outline-offset:2px; }
.mm-modal-card:has(> [data-shop-body]) [data-shop-footer] { margin-top:6px !important; }
@media (max-width:1000px) {
  .mm-modal-card:has(> [data-shop-body]) { padding:28px 9% 40px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopgrid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopcard { height:230px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopart { height:82px; }
}
@media (max-width:640px) {
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-done::before, .mm-modal-card:has(> [data-shop-body]) .mm-modal-done::after { display:none; }
  .mm-modal-card:has(> [data-shop-body]) { padding:20px 18px; border:5px ridge #b7833c; border-radius:14px; background-size:auto 100%; background-color:#2e1a12; }
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-h { flex-direction:column; gap:4px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-h::before { flex:none; width:100%; height:86px; background-position:center; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopmeta { margin:0; padding:5px 14px; font-size:20px !important; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopmeta::before { width:23px; height:23px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-note { margin-top:12px !important; font-size:17px !important; }
  .mm-modal-card:has(> [data-shop-body]) .mm-note::before { font-size:28px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopgrid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopcard { height:224px; padding-inline:12px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shoplabel { font-size:18px !important; }
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-done { font-size:23px !important; min-height:54px; margin-top:12px; }
}
@media (max-height:700px) and (min-width:641px) {
  .mm-modal-card:has(> [data-shop-body]) { padding:18px 9% 28px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-h::before { height:66px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopmeta { font-size:18px !important; padding:6px 10px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-note { font-size:16px !important; }
  .mm-modal-card:has(> [data-shop-body]) .mm-note::before { font-size:26px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopgrid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .mm-modal-card:has(> [data-shop-body]) .mm-modal-done { min-height:44px; margin-top:8px; font-size:22px !important; }
}
/* Keep a whole shop page on short Chromebook screens. */
@media (max-height:700px) and (min-width:1001px) {
  .mm-modal-card:has(> [data-shop-body]) .mm-shopgrid { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopcard { height:200px; padding:28px 10px 14px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopart { height:68px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shoplabel { font-size:17px !important; line-height:1.25 !important; min-height:2.5em; flex-shrink:0; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopcost { font-size:17px !important; gap:2px; padding-left:3px; padding-right:22px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-shopcost .mmi { width:16px; height:16px; }
  .mm-modal-card:has(> [data-shop-body]) .mm-tgbadge { width:24px; height:30px; right:7px; bottom:14px; }
}
@media (prefers-reduced-motion:reduce) { .mm-modal-card:has(> [data-shop-body]) .mm-shopcard { transition:none; } }

/* $ tuning panel (outside the stage; local to this browser). */
.headless-tune { position:fixed; top:12px; right:12px; z-index:2147483000; width:420px; max-width:calc(100vw - 24px); max-height:calc(100vh - 24px); overflow:auto; box-sizing:border-box; padding:12px; border:1px solid #88643f; border-radius:10px; background:#241a16f7; color:#fff0cf; font:600 16px/1.4 Rubik,NunitoSans,system-ui,sans-serif; box-shadow:0 10px 30px #0009; }
.headless-tune-head { position:sticky; top:-12px; display:flex; gap:6px; align-items:center; margin:-12px -12px 8px; padding:10px 12px; background:#241a16; border-bottom:1px solid #5d4330; }
.headless-tune-head strong { flex:1; font:700 16px Rubik,NunitoSans,system-ui,sans-serif; color:#efd186; }
.headless-tune button { min-height:40px; padding:6px 10px; border:1px solid #88643f; border-radius:6px; background:#513b2e; color:#fff0cf; font:700 16px Rubik,NunitoSans,system-ui,sans-serif; cursor:pointer; }
.headless-tune button:hover, .headless-tune button:focus-visible { border-color:#efd186; outline:none; }
.headless-tune-note { margin:0 0 8px; color:#cdb48e; font-weight:600; }
.headless-tune fieldset { margin:0 0 10px; padding:6px 8px 8px; border:1px solid #5d4330; border-radius:8px; }
.headless-tune legend { padding:0 4px; color:#efd186; font-weight:800; }
.headless-tune-row { display:grid; grid-template-columns:1fr 120px 44px; gap:6px; align-items:center; margin:4px 0; }
.headless-tune-row input[type=range] { width:100%; accent-color:#e9a532; }
.headless-tune-row input[type=color] { grid-column:2 / span 2; width:100%; height:24px; padding:0; border:1px solid #88643f; border-radius:4px; background:none; }
.headless-tune-row output { text-align:right; font-variant-numeric:tabular-nums; color:#fff0cf; }
.headless-tune-row.is-fonts { grid-template-columns:1fr; }
.headless-tune-font { display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; }
.headless-tune-font b { font-size:22px; font-weight:400; line-height:1.15; color:#ffe9a9; }
.headless-tune-font small { color:#fff0cf; font-size:16px; font-weight:600; }
.headless-tune-font.is-on { border-color:#ffe095; box-shadow:inset 0 0 0 1px #f6bb4d; background:#6b4a2b; }
.headless-tune-json { display:block; width:100%; box-sizing:border-box; height:160px; margin:0 0 6px; padding:6px; border:1px solid #5d4330; border-radius:6px; background:#17110e; color:#f3e2c4; font:16px/1.4 ui-monospace,Menlo,Consolas,monospace; resize:vertical; }
.headless-tune-font.is-ui b { font-size:16px; font-weight:600; line-height:1.3; letter-spacing:.01em; }
.headless-tune-row .headless-tune-choice { display:inline-block; margin-right:6px; }
.headless-tune-choice.is-on { border-color:#ffe095; box-shadow:inset 0 0 0 1px #f6bb4d; background:#6b4a2b; }
.headless-corner span, .headless-corner strong { font-variant-numeric:lining-nums tabular-nums; }
.headless-results-hq { flex-basis:100%; margin-top:8px; min-height:44px; padding:6px 16px; border:1px solid #88643f; border-radius:8px; background:#513b2e; color:#fff0cf; font:700 16px var(--hl-ui, NunitoSans, system-ui, sans-serif); cursor:pointer; }
.headless-results-hq:hover, .headless-results-hq:focus-visible { border-color:#efd186; outline:none; }
.headless-results-art { flex-wrap:wrap; align-content:center; row-gap:6px; }

/* Standings: just names and numbers floating over the arena (no box), so threats behind stay visible. */
.headless-roster { width:auto; max-width:min(280px, calc(100vw - 32px)); border-collapse:collapse; table-layout:auto; background:none; border:0; font:700 16px/1.3 var(--hl-ui, NunitoSans, system-ui, sans-serif); font-variant-numeric:lining-nums tabular-nums; color:#fff0cf; text-shadow:0 1px 2px #000, 0 0 4px #000b; opacity:.95; }
.headless-roster td { padding:1px 4px; border:0; white-space:nowrap; }
.headless-roster td:first-child { max-width:128px; overflow:hidden; text-overflow:ellipsis; padding-left:0; }
.headless-roster td:nth-child(2) { text-align:right; color:#d9c39b; min-width:1.6em; }
.headless-roster td:last-child { text-align:right; color:#ffe5a2; min-width:1.6em; padding-right:0; }
.headless-roster .is-you { opacity:1; font-weight:800; }
.headless-roster .is-you td:first-child { text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:2px; }
.headless-roster th { padding:0 4px 2px; font-size:16px; font-weight:800; letter-spacing:.04em; text-align:right; color:#fff0cf; }
.headless-roster th:last-child { padding-right:0; }
.headless-roster th.headless-today-h { text-align:left; padding-left:0; color:#ffe5a2; }
.headless-roster .headless-today td { color:#f3e2c4; font-weight:700; }
.headless-roster .headless-today td:last-child { color:#ffe5a2; }
.headless-roster .headless-today-end td { padding:0; height:6px; border-bottom:1px solid #e6cf9f55; }
.headless-roster .headless-today-end + tr th { padding-top:4px; }
/* Shipped engine-heading face (the --mm-font-display token: results headline). The $ panel can override it locally. */
html:root { --mm-font-display: "Bungee", "Arial Black", Impact, system-ui, sans-serif; }
/* Readable baselines also cover menus opened before the renderer mounts or after leaving a match. */
.mm-subtitle, .mm-panel-h, .mm-note, .mm-rule, .mm-room, .mm-status, .mm-modal-b, .mm-err-b,
.mm-set-h, .mm-set-label, .mm-set-tab, .mm-set-note, .mm-set-sub, .mm-set-footer, .mm-range-val,
.mm-toggle, .mm-key-btn, .mm-select, .mm-num, .mm-lb-h, .mm-lb-list, .mm-brow,
.mm-badge, .mm-adlbl, .mm-sgroup-h, .mm-srow > span, .mm-segc, .mm-bot-diff,
.mm-chat-head, .mm-chat-headbtn, .mm-chat-gate-head, .mm-chat-gate small, .mm-chat-log, .mm-chat-sys, .mm-chat-input,
.mm-results-title, .mm-results-reason, .mm-results-bhead, .mm-results-timer,
.mm-wrow-name, .mm-wrow-n, .mm-wrow-tag, .mm-wact, .mm-avbadge, .mm-avcount, .mm-chat-badge,
.mm-credits, .mm-powered, .mm-gamever, .mm-title-footer, .mm-help-foot, .mm-emote-btn b,
.mm-avitem, .mm-avsub, .mm-tt { font-size:16px !important; }
.mm-menu-btn, .mm-btn, .mm-input { font-size:18px !important; }
.mm-float label { font-size:21px !important; }
.mm-float .mm-input { padding-top:29px; }
.mm-key-btn, .mm-toggle { min-height:32px; line-height:30px; }
.mm-powered-txt { max-width:calc(100vw - 32px); white-space:normal; overflow-wrap:anywhere; }
.mm-chat-head { flex-wrap:wrap; }
.mm-srow .mm-segc { white-space:normal; }
.mm-lobby .mm-room { white-space:normal; }
.mm-lobby .mm-roomwords { min-width:0; overflow-wrap:anywhere; }
.mm-results-actions { flex-wrap:wrap; }
.mm-results .mm-results-card .mm-results-winner { font-size:clamp(22px, 4vw, 38px) !important; overflow-wrap:anywhere; }
.mm-results-board .mm-nm { min-width:0; overflow-wrap:anywhere; }
.mm-modal-card:has(.mm-howto) { display:flex; flex-direction:column; overflow:hidden; }
.mm-modal-card:has(.mm-howto) .mm-modal-b { min-height:0; overflow:auto; }
.mm-modal-card:has(.mm-howto) .mm-modal-done, .mm-modal-card:has(.mm-howto) .mm-help-foot { flex-shrink:0; }
@media (max-width:600px) {
  .mm-set-card .mm-ctl-row { grid-template-columns:minmax(0,1fr) 60px; }
  .mm-set-card .mm-ctl-row > .mm-set-label { grid-column:1 / -1; min-width:0; overflow-wrap:anywhere; }
  .mm-set-card .mm-ctl-head > :first-child { display:none; }
  .mm-set-card .mm-key-slots { justify-self:start; }
  .mm-set-card .mm-key-btn { width:60px; }
}
@media (max-width:480px) {
  .mm-set-card .mm-modal-row { flex-wrap:wrap; }
  .mm-modal-row .mm-btn.mm-set-report { flex:1 1 100%; }
  .headless-tune-head { flex-wrap:wrap; }
  .headless-tune-row:not(.is-fonts) { grid-template-columns:minmax(0,1fr) 44px; }
  .headless-tune-row > span:first-child { grid-column:1 / -1; }
  .headless-tune-row input[type=range] { min-width:0; }
  .headless-tune-row input[type=color] { grid-column:1 / -1; }
}
/* The native guide already lives on the right and owns its 15-second lifetime. */
.mm-controls-hint { font:600 16px/1.5 var(--hl-ui, Rubik, NunitoSans, system-ui, sans-serif) !important; }
.mm-wchip-bottom-left .mm-wchip-sub { white-space:normal; overflow-wrap:anywhere; }

/* BIZARRECADE feed (v117): the one score box, drawn in the host's top-left slot (game.js updateFeed sets its rect and
   font size), and the compact respawn card's body. Neither exists outside the feed. */
.headless-feed-score { position:fixed; z-index:60; box-sizing:border-box; display:flex; align-items:center; justify-content:space-evenly; gap:.3em;
  padding:2px 8px; border:2px solid #88643f; border-radius:10px; background:linear-gradient(160deg,#513b2e,#2c1f24); box-shadow:0 3px 0 #1a1114;
  overflow:hidden; pointer-events:none; }
.headless-feed-stat { display:flex; align-items:center; gap:.3em; min-width:0; }
.headless-feed-stat img { width:1.3em; height:auto; flex:0 0 auto; }
.headless-feed-stat img.headless-feed-lance { width:1.7em; transform:rotate(-30deg); }
.headless-feed-stat b { font:800 1.1em/1 var(--hl-ui, Rubik, system-ui, sans-serif); color:#fff0cf; font-variant-numeric:tabular-nums; text-shadow:0 1px 0 #000; }
.headless-feed-stat { position:relative; }
.headless-feed-stat small { display:none; font:700 10px/1.1 Rubik,system-ui,sans-serif; color:#ffe2ab; }
.headless-feed-score.is-explained .headless-feed-stat { padding-bottom:13px; }
.headless-feed-score.is-explained small { display:block; position:absolute; bottom:0; width:100%; text-align:center; }
/* Native workbench summary/editor for feed and primary-touch devices. The native footer stays reachable. */
html.headless-compact .mm-lo-card { padding:12px; border:3px ridge #b7833c; border-radius:12px; background:linear-gradient(145deg,#37251e,#21181e); max-height:calc(100dvh - 16px); box-sizing:border-box; }
html.headless-compact .mm-lo-card > .mm-modal-h { font:400 22px/1.2 Bungee,system-ui,sans-serif !important; color:#ffe2a0; margin:0 0 8px; }
html.headless-compact .mm-lo-card > .mm-modal-h::before { display:none; }
html.headless-compact .mm-lo-card .mm-lo { height:auto; min-height:0; overflow:auto; grid-template-rows:auto; }
html.headless-compact .mm-lo-card [data-mm-part="preview"],
html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) [data-mm-part="preview"] { height:auto; min-height:max-content; max-height:none; }
html.headless-compact .mm-lo-card .mm-lo-pview,
html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-pview { flex:none; height:220px; min-height:160px; }
html.headless-compact .mm-lo-card .mm-lo-right { min-height:0; overflow:visible; }
html.headless-compact .mm-lo-card [data-cls-details]:has(.headless-picker-record) { height:auto !important; flex-shrink:0; }
html.headless-compact .headless-picker-record { height:auto; gap:4px; }
html.headless-compact .headless-picker-hq { position:static; width:100%; min-height:44px; margin:0; }
html.headless-compact .headless-life-recap { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 4px; text-align:center; color:#ffe6b3; }
html.headless-compact .headless-life-recap strong { display:block; font:400 25px/1.1 Bungee,system-ui,sans-serif; }
html.headless-compact .headless-life-recap span { display:block; margin-top:4px; font:700 11px/1.2 Rubik,system-ui,sans-serif; }
html.headless-compact .headless-lifetime summary { min-height:44px; padding:12px 8px; box-sizing:border-box; cursor:pointer; color:#e3ccaa; font:700 14px/1.2 Rubik,system-ui,sans-serif; }
html.headless-compact .headless-lifetime .headless-respawn-stats { overflow:visible; font-size:12px; }
html.headless-compact .mm-lo-card .mm-lo-actions { flex-shrink:0; flex-wrap:wrap; gap:6px; margin-top:8px; }
html.headless-compact .mm-lo-card .mm-lo-actions .mm-btn { height:auto; min-height:44px; flex:1 1 auto; padding:8px; font:700 17px/1.2 Rubik,system-ui,sans-serif !important; }
html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions .mm-btn:not(#mm-lo-go) { height:auto; flex:1 1 45%; font:700 17px/1.2 Rubik,system-ui,sans-serif !important; }
html.headless-compact .mm-lo-card .mm-lo-actions #mm-lo-go { flex:1 0 100%; min-height:52px; font-size:22px !important; }
html.headless-compact .mm-lo-card #mm-lo-go::before, html.headless-compact .mm-lo-card #mm-lo-go::after { display:none; }
html.headless-compact .mm-lo-sumrow { padding:7px 10px; gap:8px; }
html.headless-compact .mm-lo-suml { font-size:11px !important; }
html.headless-compact .mm-lo-sumv { font-size:15px !important; }
@media (max-width:899px) {
  html.headless-compact .mm-lo-card .mm-lo-bench { grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-auto-rows:max-content; gap:8px; }
  html.headless-compact .mm-lo-card .mm-lo-chassis { max-height:240px; overflow:auto; }
  html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-pview, html.headless-compact .mm-lo-card .mm-lo-pview { height:190px; }
}
@media (max-height:500px) {
  html.headless-compact .mm-lo-card .mm-lo-bench { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  html.headless-compact .mm-lo-card .mm-lo-chassis { grid-column:1 / -1; }
  html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-pview, html.headless-compact .mm-lo-card .mm-lo-pview { height:150px; min-height:150px; }
  html.headless-compact .mm-lo-card .mm-lo-actions { flex-wrap:nowrap; }
  html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-actions .mm-btn:not(#mm-lo-go) { flex:1 1 auto; }
  html.headless-compact .mm-lo-card .mm-lo-actions #mm-lo-go { flex:1 1 40%; min-height:44px; }
}
@media (max-width:899px) and (max-height:650px) {
  html.headless-compact .mm-lo-card:has([data-mm-part="identity"]) .mm-lo-pview, html.headless-compact .mm-lo-card .mm-lo-pview { height:120px; min-height:120px; }
}
/* Leaderboard score looks (#518): the rider portrait beside a stored score, in that rider's colour. */
.headless-score-look { width:100%; height:100%; box-sizing:border-box; object-fit:contain; padding:2px; border:2px solid #efd186; border-radius:50%; background:#2e211ccc; }
.headless-score-look-detail { display:block; background:linear-gradient(#291d2b66,#291d2baa),url('./assets/ember-valley.webp') center/cover; border-radius:6px; }
