/* ==========================================================================
   custom-menu.css — Melee release menus (design51)
   --------------------------------------------------------------------------
   Reconstruction of the approved reference sheet. Main and Mode are laid
   out from the reference game views; Queue and Results reuse the same parts.
   Plain CSS + inline SVG geometry: no framework, no JS dependency, no render
   loop. UI47/UI49 own state, data, focus, input ownership and audio.

   Stage: each screen draws into a 1920x1080 stage (.mm-stage) scaled
   uniformly to fit .mm-root; 1 stage px = var(--u). Placed parts read
   --x/--y/--w/--h in stage px (DESIGN.md has the reference mapping), so a QA
   correction is a one-number edit. Hidden roots/screens are display:none.
   ========================================================================== */

/* Bundled display face (child63): "MM Display" Bold Italic, derived from
   DejaVu Sans Bold 2.37 (Bitstream Vera / DejaVu licence, modification and
   embedding permitted; licence in assets/fonts/LICENSE-DejaVu.txt). Width
   0.77, 12deg slant, 80 codepoints (A-Z a-z 0-9 space . , : ; ! ? ' " - / #
   & % + ( ) U+2022). Not an original Melee font. Live text only.
   candidate230 (fonts): v2 = the same derivation (child63 derive_font.py,
   reproduces v1 byte for byte) plus what display labels can carry: the
   Latin-1 letters U+00C0-00FF (for example "Pokemon" with its e-acute), the
   middle dot, en/em dash, curly quotes (Yoshi's Story uses U+2019) and the
   ellipsis; every v1 glyph is unchanged
   (assets/fonts/font-metadata-v2.json). */
@font-face {
  font-family: "MM Display";
  src: url("assets/fonts/mm-display-v2.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: block;
}
/* Bundled UI/body face "MM UI" = Ubuntu Sans 1.006 variable (wdth 75-100,
   wght 100-800), unmodified, Ubuntu Font Licence 1.0 (licence and
   provenance in assets/fonts/ui-font-provenance.json). Replaces the
   unbundled Windows faces Bahnschrift / Segoe UI so phones and other
   desktop OSes render the same narrow type. Not an original Melee font. */
@font-face {
  font-family: "MM UI";
  src: url("assets/fonts/ubuntu-sans-vf.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "MM UI";
  src: url("assets/fonts/ubuntu-sans-italic-vf.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 100%;
  font-style: italic;
  font-display: block;
}

@property --x { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --y { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --w { syntax: "*"; inherits: false; }
@property --h { syntax: "*"; inherits: false; }

/* 1. Tokens --------------------------------------------------------------- */

.mm-root {
  /* Assets (DESIGN.md): logo = composite v3 of the original title layers
     (--mm-logo on .mm-logo); portraits = authentic 136x188 originals
     (--mm-portrait:url(assets/original-large69/portrait-<key>-costume-0.png)
     + data-fighter); medallion bars at the original mark's positions. */

  /* No fallback chains (user rule) and no reliance on installed faces:
     display labels use ONLY the bundled MM Display (covered ASCII labels);
     names/scores/captions and body text use the bundled MM UI (Ubuntu
     Sans), condensed for UI text via --mm-ui-stretch. Neither is an
     original Melee font (recorded as a remaining discrepancy). */
  --mm-font-display: "MM Display";
  --mm-font-ui: "MM UI";
  --mm-font-body: "MM UI";
  --mm-ui-stretch: 82%;
  --mm-dsx: 1;                     /* MM Display is already condensed */
  --mm-dskew: 0deg;                /* MM Display is already 12deg italic */
  --mm-dweight: 700;

  --mm-navy-0: #040817;
  /* 71: grid a step stronger (review72 V64-1: read as hairline) */
  --mm-grid: rgb(80 120 212 / 0.16);
  --mm-grid-major: rgb(92 132 226 / 0.23);
  --mm-band: 30 64 150;            /* rgb triplet for background bands */
  --mm-line: 84 128 220;           /* rgb triplet for orbit lines */
  --mm-ink: #eef2f8;
  --mm-ink-2: #a9b3c7;
  --mm-amber: #ffad1f;
  --mm-glow-c: #ff8a00;
  --mm-tx-silver: linear-gradient(180deg, #ffffff 0%, #f2f4f8 46%, #b5bdca 100%);
  --mm-tx-amber: linear-gradient(180deg, #ffe89a 0%, #ffc43c 44%, #ff9608 100%);
  --mm-tx-blue: linear-gradient(180deg, #ffffff 0%, #dde8ff 45%, #9db4e4 100%);
  --mm-tx-shadow: rgb(0 0 0 / 0.8);

  /* Old-school grain: one static 256px neutral-grey fractal-noise tile
     (rasterised once by the browser, then tiled), overlay-blended over the
     visible screen. Fine, not coarse; no animation, no per-frame work. */
  --mm-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0.45 0.45 0.45 0 -0.18 0.45 0.45 0.45 0 -0.18 0.45 0.45 0.45 0 -0.18 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23g)'/%3E%3C/svg%3E");
  --mm-grain-o: 0.16;

  --mm-t-focus: 90ms;
  --mm-t-enter: 220ms;
  --mm-t-leave: 120ms;
  /* candidate131 motion (section 12): prompt-band cycle, background drift
     (one way) and one orbit-light revolution */
  --mm-t-hint: 4.6s;
  --mm-t-drift: 44s;
  --mm-t-orbit: 80s;
  /* candidate166 motion (section 12c) */
  --mm-t-rise: 340ms;
  --mm-t-stagger: 60ms;
  --mm-ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* the medallion's metal shape (ring + cross), for its sheen mask */
  --mm-emb-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-50 -50 100 100'%3E%3Cpath fill-rule='evenodd' d='M38.5 0A38.5 38.5 0 1 1 -38.5 0A38.5 38.5 0 1 1 38.5 0ZM-14.57 5.58V-27.36A31 31 0 0 0 -30.49 5.58ZM-4.03 5.58V-30.74A31 31 0 0 1 30.49 5.58ZM-14.57 11.16H-28.92A31 31 0 0 0 -14.57 27.36ZM-4.03 11.16H28.92A31 31 0 0 1 -4.03 30.74Z'/%3E%3C/svg%3E");
  /* candidate131 USER131-01: the ONE pointing glove, a drawn SVG.
     candidate166 (USER166-05): redrawn as one smooth silhouette with an
     outside outline (candidate166/tools/make-hand.js); fingertip at about
     11% / 16% of its box.
     candidate182 (USER182-17): INTERIM ONLY — the user rejected this glove.
     The reviewed reference-based pointer from helper 183 replaces it through
     these five tokens alone (HAND-CONTRACT182.md): the image, its hotspot
     (the fingertip) as fractions of the image box, its height/width ratio
     and one overall size factor. Every surface names only the point the
     fingertip touches (--tx/--ty, section 12b). */
  --mm-hand: url("assets/pointer/menu-pointer.png");
  --mm-hand-fx: 0.23365231259968103;
  --mm-hand-fy: 0.0733652312599681;
  --mm-hand-ar: 1;
  --mm-hand-scale: 1;

  /* Device safe areas (notched phones; the host page sets
     viewport-fit=cover). The stage scales and centres inside them;
     decorative edge strips still run to the physical screen edges. */
  --mm-safe-l: env(safe-area-inset-left, 0px);
  --mm-safe-r: env(safe-area-inset-right, 0px);
  --mm-safe-t: env(safe-area-inset-top, 0px);
  --mm-safe-b: env(safe-area-inset-bottom, 0px);
  /* Smallest rendered text size: small captions keep their desktop size
     until the stage shrinks below it (phone landscape), then stop here. */
  --mm-min-fs: 11px;

  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  container: mm / size;
  isolation: isolate;
  color: var(--mm-ink);
  background: var(--mm-navy-0);
  font-family: var(--mm-font-body);
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mm-root *,
.mm-root *::before,
.mm-root *::after { box-sizing: border-box; }

.mm-root[hidden],
.mm-root [hidden] { display: none !important; }

.mm-root[data-input="gamepad"] { cursor: none; }

/* Optional fade when handing the screen to native/gameplay; UI47 sets
   [hidden] on animationend (immediately under reduced motion). */
.mm-root[data-leaving] {
  pointer-events: none;
  animation: mm-leave var(--mm-t-leave) linear forwards;
}

/* Shared SVG gradients/emblem symbol. Never display:none (gradients would
   stop resolving in some engines). */
.mm-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.mm-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 2. Backdrop, screens, stage ------------------------------------------- */

.mm-backdrop {
  --u: min(calc((100cqw - var(--mm-safe-l) - var(--mm-safe-r)) / 1920), calc((100cqh - var(--mm-safe-t) - var(--mm-safe-b)) / 1080));
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Deep navy (never flat black): vignette, fine 47px grid with a brighter
     5-cell major grid, two soft light pools, navy base. */
  background:
    radial-gradient(ellipse 120% 105% at 45% 45%, transparent 48%, rgb(1 3 10 / 0.72) 100%),
    repeating-linear-gradient(0deg, var(--mm-grid-major) 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(90deg, var(--mm-grid-major) 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(0deg, var(--mm-grid) 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u))),
    repeating-linear-gradient(90deg, var(--mm-grid) 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u))),
    /* 71: the pool behind the actions quietened (review72 V64-1) */
    radial-gradient(ellipse 50% 60% at 24% 52%, #09142f 0%, #08112a 35%, transparent 62%),
    radial-gradient(ellipse 45% 55% at 80% 30%, #09142d 0%, transparent 66%),
    linear-gradient(180deg, #070f25 0%, #060c1f 55%, #040817 100%);
}

/* One <section class="mm-screen" data-screen="…"> per custom screen. */
.mm-screen, .mm-settings {
  --u: min(calc((100cqw - var(--mm-safe-l) - var(--mm-safe-r)) / 1920), calc((100cqh - var(--mm-safe-t) - var(--mm-safe-b)) / 1080));
  position: absolute;
  inset: 0;
}
/* Film grain over the whole visible screen (labels included, at a level
   that keeps them crisp). Hidden screens/roots are display:none, so the
   layer does not exist during gameplay. Tile is in device-independent px so
   grain stays fine at every size. */
.mm-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--mm-grain) 0 0 / 256px 256px repeat;
  mix-blend-mode: overlay;
  opacity: var(--mm-grain-o);
}

.mm-stage {
  position: absolute;
  left: calc(50% + (var(--mm-safe-l) - var(--mm-safe-r)) / 2);
  top: calc(50% + (var(--mm-safe-t) - var(--mm-safe-b)) / 2);
  width: calc(1920 * var(--u));
  height: calc(1080 * var(--u));
  translate: -50% -50%;
}

/* Sweeping navy bands + orbit lines, painted once per visible screen.
   The layer overhangs the stage by 1000 stage px on every side so bands run
   to the screen edges on wide desktop / phone aspect ratios (gradient
   coordinates below are therefore stage + 1000). */
.mm-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1000 * var(--u));
  pointer-events: none;
  background: var(--mm-bands, none);
  opacity: 0.85;  /* band alphas are set per layer */
}

/* Absolute placement in stage px (also inside placed parents). */
.mm-at {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}

/* 3. Display type --------------------------------------------------------
   Heavy italic, fallback compressed to the reference proportions.
   .mm-lbl places a label by its left edge (--lx) and cap centre (--ly). */

.mm-dt {
  display: inline-block;
  padding: 0 0.16em 0 0.04em;      /* keeps italic overhang inside the clip */
  font-family: var(--mm-font-display);
  font-weight: var(--mm-dweight);
  font-style: italic;
  font-synthesis: none;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transform: skewX(var(--mm-dskew)) scaleX(var(--mm-dsx));
  transform-origin: 0 50%;
}
.mm-dt--silver,
.mm-dt--amber,
.mm-dt--blue {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  /* crisp hard shadow + tight dark edge, as the reference labels */
  filter:
    drop-shadow(0 0 calc(1.5 * var(--u)) rgb(0 0 0 / 0.55))
    drop-shadow(calc(2 * var(--u)) calc(4 * var(--u)) 0 var(--mm-tx-shadow));
}
.mm-dt--silver { background-image: var(--mm-tx-silver); }
.mm-dt--amber { background-image: var(--mm-tx-amber); --mm-tx-shadow: rgb(26 8 0 / 0.9); }
.mm-dt--blue { background-image: var(--mm-tx-blue); }

.mm-lbl {
  position: absolute;
  left: calc(var(--lx) * var(--u));
  top: calc(var(--ly) * var(--u));
  font-size: calc(var(--fs) * var(--u));
  translate: 0 -56%;
}
.mm-lbl--c {
  translate: -50% -56%;
  transform-origin: 50% 50%;
}

/* 4. Frame layers (inline SVG, drawn in the part's own stage-px viewBox) --
   Each shape is one <polygon id> in the SVG's <defs>, painted by <use>
   layers in this order:
     glow2, glow  soft outer light (selected only; below the face)
     face         deep navy / warm-edged dark amber fill
     rim          wide low-alpha light band on the edge: its inner half
                  lights the face along the frame (blue sheen, warm amber
                  when selected), its outer half lifts the frame off the bg
     edge         continuous brushed-metal bead (gradient along the path)
     groove       1.3px specular ridge on the bead (reads as raised metal) */

.mm-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mm-frame * {
  stroke-linejoin: miter;
  stroke-miterlimit: 8;
}
.mm-f-glow2 { fill: none; stroke: var(--mm-glow-c); stroke-width: 38; stroke-opacity: 0.09; opacity: var(--glow, 0); transition: opacity var(--mm-t-focus) linear; }
.mm-f-glow  { fill: none; stroke: #ff9a18; stroke-width: 16; stroke-opacity: 0.26; opacity: var(--glow, 0); transition: opacity var(--mm-t-focus) linear; }
.mm-f-face  { fill: var(--face, url(#mm-g-face)); }
/* Brushed/worn finish: static anisotropic noise pattern (#mm-p-brush),
   overlay-blended onto the face just drawn (same SVG). */
.mm-f-tex,
.mm-p-tex,
.mm-s-tex  { fill: url(#mm-p-brush); mix-blend-mode: overlay; pointer-events: none; }
.mm-f-tex  { opacity: 0.16; }
.mm-p-tex  { opacity: 0.22; }
/* Panel trim band: diagonal brushing for local variation (review72 V64-7). */
.mm-p-tex--d { fill: url(#mm-p-brush-d); opacity: 0.34; }
.mm-s-tex  { opacity: 0.16; }
.mm-f-rim   { fill: none; stroke: var(--sheen, rgb(120 160 255)); stroke-width: 26; stroke-opacity: var(--sheen-o, 0.1); }
.mm-f-edge  { fill: none; stroke: var(--edge, url(#mm-g-steel)); stroke-width: 5; }
.mm-f-groove { fill: none; stroke: var(--ridge, rgb(255 255 255 / 0.55)); stroke-width: 1; }

/* Main bars: three stepped plates behind the angled end (reference Play /
   Practice ends); drawn under the face so only their outer ends show.
   review122 R122-02: filled, bevelled plates (a lit steel-blue face, amber-
   brown when selected) under the bar's own edge bead; the end profile runs
   out along one diagonal to the lower corner. The Mode rows' separate end
   fin is gone (USER131-09). */
.mm-f-slat { fill: var(--slat-face, url(#mm-g-slat)); stroke: none; }
/* candidate166 (USER166-22/23, reference view 1): each Main action has TWO
   contours, as the reference: the bar's own closed contour (.mm-f-edge) and
   an outer housing line round the round end and along the band that stops
   short of the right end on top and below (open, the reference's gaps).
   The end plates are filled plates outlined on their top and outer side
   only, so no plate closes into the bar or the outer line. */
.mm-f-line { fill: none; stroke: var(--edge, url(#mm-g-steel)); stroke-width: 3; stroke-linecap: butt; stroke-linejoin: miter; }
.mm-f-line--tab { stroke-width: 2.5; }
/* candidate182 (USER182-05): the Main bars' interior shading. A soft glow
   inside the bar's own edge, in the bar's sheen colour (blue idle, amber
   selected) and clipped to the bar so only its inner half shows; with the
   rim light it steps about 0.43 / 0.33 / 0.12 / 0 (selected) from the edge
   to 22 px in, so the face fades toward its centre. Outline geometry is
   unchanged. USER182-04: the selected glow round the Main housing is tighter,
   so the highlight never reads as a larger shape. */
.mm-f-inglow { fill: none; stroke: var(--sheen, rgb(120 150 220)); stroke-width: 44; stroke-opacity: 0.025; pointer-events: none; transition: stroke-opacity var(--mm-t-focus) linear; }
.mm-f-inglow--near { stroke-width: 16; stroke-opacity: 0.03; }
.mm-act:is(:focus, [data-selected]) .mm-f-inglow { stroke-opacity: 0.12; }
.mm-act:is(:focus, [data-selected]) .mm-f-inglow--near { stroke-opacity: 0.144; }
:is(.mm-act--play, .mm-act--practice) .mm-f-glow2 { stroke-width: 26; }
:is(.mm-act--play, .mm-act--practice) .mm-f-glow { stroke-width: 12; }
/* candidate202 (USER202-12..15: "a better transparency gradient here and at
   the top for both buttons"): the housing band between the outer line and the
   bar is translucent (0.88) and, with its glow, texture and the open outer
   line, fades out over its last ~175 px toward the end (one shared mask,
   #mm-m-act-fade: x 560 -> 736 in the actions' own px), so neither the band
   nor the line stops in a hard cut; the end plates are translucent and fade
   downward (#mm-g-slat / -a). Geometry, bar face and the 166 gaps unchanged. */
:is(.mm-act--play, .mm-act--practice) .mm-h-face { fill-opacity: 0.88; }
/* Panel header plate and a restrained diagonal sheen on the panel face. */
.mm-p-head  { fill: url(#mm-g-head); }
.mm-p-sheen { fill: url(#mm-g-sheen); pointer-events: none; }

/* Mode CTA side housing: its own plate beside the label plate's diagonal,
   stepped in at top and bottom, with a dark recessed perimeter under its
   steel bead (validator64 + review72 V64-3). */
.mm-h-face { fill: var(--house-face, url(#mm-g-house)); }
.mm-h-rim  { fill: none; stroke: #02040c; stroke-width: 9; stroke-opacity: 0.8; }
.mm-h-edge { fill: none; stroke: var(--edge, url(#mm-g-steel)); stroke-width: 3.5; }
/* a housing around a button keeps quiet steel even when the button inside
   is selected (the button carries the amber) */
.mm-h-edge--quiet { stroke: url(#mm-g-steel-dim); stroke-width: 3; }

/* Call-to-action wedge inside a mode row / standalone wedge buttons. */
.mm-c-rim  { fill: none; stroke: #050914; stroke-width: 9; stroke-opacity: 0.85; }
.mm-c-face { fill: var(--cta-face, url(#mm-g-cta-steel)); }
/* candidate131 (USER131-01/08): a bevel band just inside the rim (clipped to
   the plate) so Queue / Join / wedges / Start read as filled, bevelled plates. */
.mm-c-bevel { fill: none; stroke: var(--cta-bevel, rgb(84 96 124 / 0.75)); stroke-width: 14; }
.mm-c-edge { fill: none; stroke: var(--cta-edge, url(#mm-g-steel)); stroke-width: 4; }

/* Panels: brushed-metal band between an outer and an inner bead, over a
   deep navy face. */
.mm-p-band   { fill: url(#mm-g-band); }
.mm-p-face   { fill: url(#mm-g-panel-face); }
.mm-p-rim    { fill: none; stroke: #02040c; stroke-width: 6; stroke-opacity: 0.85; }
.mm-p-edge   { fill: none; stroke: url(#mm-g-steel); stroke-width: 3.4; }
.mm-p-rim-i  { fill: none; stroke: #02040c; stroke-width: 5; stroke-opacity: 0.8; }
.mm-p-edge-i { fill: none; stroke: url(#mm-g-steel-dim); stroke-width: 2; }
/* Header separator: bright steel line over a dark cut (a clear step between
   the header plate and the list, review72 V64-7); --sub is the quieter
   line under the "This week" row. Thin RECTS, not <line>s: an exactly
   horizontal line has a zero-height bounding box, so a bounding-box
   gradient stroke on it is not painted at all (the design70 separator was
   invisible for that reason). */
.mm-p-line   { fill: url(#mm-g-steel-h); }
.mm-p-line-d { fill: #02040c; fill-opacity: 0.85; }
.mm-p-line--sub { opacity: 0.5; }
.mm-p-strip  { fill: url(#mm-g-strip-face); stroke: url(#mm-g-steel-dim); stroke-width: 2; }

/* Strips at the screen edges (title, fighter, prompts). */
.mm-s-face { fill: url(#mm-g-strip-face); }
.mm-s-title { fill: url(#mm-g-title-face); }
.mm-s-rim  { fill: none; stroke: #02040c; stroke-width: 7; stroke-opacity: 0.8; }
.mm-s-edge { fill: none; stroke: url(#mm-g-steel); stroke-width: 3.4; }
.mm-s-groove { fill: none; stroke: rgb(255 255 255 / 0.6); stroke-width: 1.2; }
/* Header band (USER-POLISH-01). candidate131 (USER131-11/12, review122
   R122-01): a dark directional blue-steel plate that fades across the slant
   into a darker translucent rail (#mm-g-title-face, x in header px),
   diagonal brushing, a darkening toward the lower edge, the upper-left
   light and ONE broad diagonal light facet. No inner underline: the only
   line under the title is the plate's outer metal edge.
   candidate144 (review146 R122-01): the shoulder measured about rgb(47-58,
   60-74, 87-105) in actual140 against the reference's rgb(32-39, 40-52,
   52-69): the plate is darker and greyer, the upper-left light softer, and
   the shade no longer pads a light wash up the tall-screen extension
   (1615x1158 measured rgb(68,83,114) there). The diagonal facet stays. */
.mm-s-title--short { fill: url(#mm-g-title-face-s); }
/* candidate182 (USER182-19): the plate is OPAQUE (#mm-g-title-face: each
   stop is the colour the translucent 144 stop showed over the backdrop), and
   the header SVG is its own blend group, so drifting bands, the orbit light,
   the screen entry or a zoom level can no longer shift its colour. Shape and
   base colour are unchanged. */
.mm-strip > .mm-frame { isolation: isolate; }
.mm-s-tex--d { fill: url(#mm-p-brush-d); opacity: 0.2; }
.mm-s-shade { fill: url(#mm-g-title-shade); pointer-events: none; }
.mm-s-sheen { fill: url(#mm-g-title-sheen); pointer-events: none; }
.mm-s-facet { fill: url(#mm-g-title-facet); pointer-events: none; }
/* candidate202 (USER202-05/06): the facet's light is 0 exactly on its two
   slanted sides (its gradient now runs across the slant), so no faint line
   marks where it starts or ends. The short (MELEE) plate's facet has its own
   slant geometry. Plate colour and shape unchanged. */
.mm-strip--short .mm-s-facet { fill: url(#mm-g-title-facet-s); }

/* Emblem: <svg class="mm-emblem" viewBox="0 0 100 100"><use href="#mm-sym-emblem"
   width="100" height="100"/></svg>. The shared symbol reads --emb-* from the
   button. Its face is the ORIGINAL smash-mark silhouette (#mm-shp-mark,
   child55 exact reconstruction, see assets/child55/). */
.mm-emblem {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  aspect-ratio: 1;
  overflow: visible;
  pointer-events: none;
}
/* candidate131 (USER131-01/08): the medallion sits INSIDE the action's
   round end (Main r 136, Mode r 150) with the band's own dark face round
   it. candidate166 (USER166-11): ring and cross are ONE continuous metal
   path (symbol #mm-sym-emblem), gold with a warm inner glow when selected.
   The Mode medallion is drawn in a larger box (312) so its ring keeps the
   reference's larger share of the round end. A masked sheen (.mm-emblem-fx)
   crosses the metal once when the action gains focus and a warm glow ring
   (.mm-emblem-glow) breathes while it holds focus (section 12c). */
:is(.mm-act--normal, .mm-act--endless) :is(.mm-emblem, .mm-emblem-fx, .mm-emblem-glow) {
  top: calc(-16 * var(--u));
  left: calc(-16 * var(--u));
  height: calc(312 * var(--u));
}
.mm-emblem-fx,
.mm-emblem-glow {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  aspect-ratio: 1;
  pointer-events: none;
}
.mm-emblem-fx {
  overflow: hidden;
  -webkit-mask: var(--mm-emb-mask) center / 100% 100% no-repeat;
  mask: var(--mm-emb-mask) center / 100% 100% no-repeat;
}
.mm-emblem-fx > i,
.mm-splash__sheen::before,
.mm-splash__sheen::after {   /* title-card01: the splash logo's glint is this same bar */
  position: absolute;
  top: -20%;
  left: 0;
  width: 34%;
  height: 140%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55) 45%, rgb(255 250 230 / 0.8) 50%, rgb(255 255 255 / 0.5) 55%, transparent);
  rotate: 24deg;
  translate: -160% 0;
  opacity: 0;
}
.mm-emblem-glow::before {
  content: ""; position: absolute; inset: 0;
  animation: mm-emb-breathe 2.8s ease-in-out infinite alternate;
  background: radial-gradient(circle closest-side, transparent 74%, rgb(255 176 56 / 0.55) 80%, rgb(255 120 0 / 0.2) 89%, transparent 100%);
}
.mm-emblem-glow { opacity: 0; transition: opacity 180ms linear; }
.mm-act:is(:focus, [data-selected]) .mm-emblem-glow { opacity: 0.8; }

/* 5. Actions ---------------------------------------------------------------
   <button class="mm-act mm-at mm-act--play" data-menu-action="play-now">
     <svg class="mm-frame">…polygon + <use> layers…</svg>
     <svg class="mm-emblem">…</svg>
     <span class="mm-act__label mm-lbl mm-dt">Play Now</span>
     [<span class="mm-act__sub">…</span>] [<span class="mm-act__count">…</span>]
     [<span class="mm-cta mm-lbl mm-lbl--c mm-dt">Queue</span>]
   </button>
   Selected == DOM focus; UI47 moves real focus for keyboard/controller and on
   pointerenter. Amber is used only on the selected action. */

.mm-act {
  --edge: url(#mm-g-steel);
  --ridge: rgb(255 255 255 / 0.7);
  --sheen: rgb(120 150 220);
  --sheen-o: 0.05;
  --face: url(#mm-g-face);
  --house-face: url(#mm-g-house);
  --glow: 0;
  --cta-face: url(#mm-g-cta-steel);
  --cta-edge: url(#mm-g-steel);
  --cta-ink: #101a36;
  --emb-ring: url(#mm-g-emb-ring);
  --emb-bevel: url(#mm-g-emb-bevel);
  --emb-cross: url(#mm-g-emb-cross);
  --emb-well: url(#mm-g-emb-well);
  --emb-groove: url(#mm-g-emb-groove);
  --emb-edge: rgb(255 255 255 / 0.16);
  --emb-halo: 0;
  --slat-face: url(#mm-g-slat);
  --cta-bevel: rgb(84 96 124 / 0.75);
  --emb-recess: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none; /* selection is the amber material swap + glow + halo */
}
/* [data-selected] keeps the selection visible when the window or a prompt
   holds DOM focus; UI47 sets it on exactly one action per screen. */
.mm-act:is(:focus, [data-selected]) {
  --edge: url(#mm-g-amber);
  --ridge: rgb(255 244 205 / 0.9);
  --sheen: rgb(255 140 20);
  --sheen-o: 0.24;
  --face: url(#mm-g-face-amber);
  --house-face: url(#mm-g-house-a);
  --glow: 1;
  --cta-face: url(#mm-g-cta-amber);
  --cta-edge: url(#mm-g-amber);
  --cta-ink: #2a1300;
  --emb-ring: url(#mm-g-emb-ring-a);
  --emb-bevel: url(#mm-g-emb-bevel-a);
  --emb-cross: url(#mm-g-emb-cross-a);
  --emb-well: url(#mm-g-emb-well-a);
  --emb-groove: url(#mm-g-emb-groove-a);
  --emb-edge: rgb(255 214 140 / 0.28);
  --emb-halo: 1;
  --emb-recess: 0.3;
  --slat-face: url(#mm-g-slat-a);
  --cta-bevel: rgb(196 88 0 / 0.72);
}
.mm-act:is(:active, [data-pressed]) { filter: brightness(1.14); }
.mm-act:disabled { cursor: not-allowed; filter: saturate(0.25) brightness(0.7); }

.mm-act__label {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-silver);
  text-transform: uppercase;
  /* first shadow = a 1px light upper metal edge on the glyphs (review72
     V64-2), then the tight dark edge and the hard drop */
  filter:
    drop-shadow(0 calc(-1 * var(--u)) 0 rgb(255 255 255 / 0.32))
    drop-shadow(0 0 calc(1.5 * var(--u)) rgb(0 0 0 / 0.6))
    drop-shadow(calc(2 * var(--u)) calc(4 * var(--u)) 0 rgb(2 5 14 / 0.85));
}
.mm-act:is(:focus, [data-selected]) .mm-act__label {
  background-image: var(--mm-tx-amber);
  filter:
    drop-shadow(0 calc(-1 * var(--u)) 0 rgb(255 242 204 / 0.4))
    drop-shadow(0 0 calc(1.5 * var(--u)) rgb(40 12 0 / 0.7))
    drop-shadow(calc(2 * var(--u)) calc(4 * var(--u)) 0 rgb(24 7 0 / 0.95));
}

.mm-act__sub {
  position: absolute;
  left: calc(var(--lx) * var(--u));
  top: calc(var(--ly) * var(--u));
  translate: 0 -50%;
  color: #e3e8f1;
  font-family: var(--mm-font-body);
  font-size: calc(36 * var(--u));
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.75);
}

.mm-act__count {
  position: absolute;
  left: calc(1470 * var(--u));
  top: calc(78 * var(--u));   /* candidate182 (USER182-07): the housing band above Join */
  translate: -50% -50%;
  color: #eef1f6;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(28 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}

/* 330: key labels centre their MM Display caps on --ly, the key face centre
   (the shared -56% sat them 0.078em high); cap centre as the Main labels. */
.mm-cta {
  --fs: 62;
  translate: -50% -48.17%;
  color: var(--cta-ink);
  text-transform: uppercase;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(255 255 255 / 0.4);
}

/* 6. Main --------------------------------------------------------------- */

/* title-card01 (line coverage): the pause family (.mm-pause: Getting ready,
   recovery / error, rejoin, left, full-page pause and Controls) had no
   --mm-bands at all, so its full-page states showed the bare grid while every
   other screen carried orbit lines. It now takes Main's own two rings (no
   second geometry), re-centred on its panel and held still (section 12).
   Over live gameplay ([data-overlay]) and on the first-load splash the layer
   is not drawn (pause block, section 11). */
.mm-main .mm-stage,
.mm-pause .mm-stage {
  /* candidate131 orbit light (section 12): travels round the medium circle */
  --mm-orbit-x: 1000; --mm-orbit-y: 600; --mm-orbit-r: 638;
  --mm-orbit-i0: 95.3%; --mm-orbit-i1: 95.7%; --mm-orbit-o1: 99.1%; --mm-orbit-o0: 99.5%;
  /* Edged curved bands (a translucent band between two brighter edge lines)
     plus fine contour lines, replacing the diffuse blue wash (validator64). */
  --mm-bands:
    /* (pseudo coords = stage + 1000) Traced on a contrast-boosted normalised
       reference. 71-03 (review73 V64-1/R68-bands: the 71-02 thick band was a
       full circle whose lower return added a second diagonal below
       Practice):
       - THICK band: the left flank of a very large circle (stage centre
         3058,-69, r 2248-2298), nearly straight: x ~760-810 at the top edge,
         right of the Play tip / Practice end at mid height, then under the
         weekly panel; its fine companion line (r 2210) is the reference's
         thin double line at x ~850 on the top edge;
       - MEDIUM band from behind the logo's right end, down through the
         action column to the ONE rightward sweep below Practice (stage
         centre 1000,600, r 610-634) with its thin inner companion line.
       Every stop is a 1.5px ramp, not a hard stop, so the arcs stay
       antialiased at 1440p and above (review73 R73-07). */
    radial-gradient(circle at calc(4058 * var(--u)) calc(931 * var(--u)), transparent calc(2248 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.5) calc(2248 * var(--u) + 0.75px) calc(2250.5 * var(--u) - 0.75px), rgb(var(--mm-band) / 0.32) calc(2250.5 * var(--u) + 0.75px) calc(2295.5 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.38) calc(2295.5 * var(--u) + 0.75px) calc(2298 * var(--u) - 0.75px), transparent calc(2298 * var(--u) + 0.75px)),
    radial-gradient(circle at calc(4058 * var(--u)) calc(931 * var(--u)), transparent calc(2210 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.24) calc(2210 * var(--u) + 0.75px) calc(2212 * var(--u) - 0.75px), transparent calc(2212 * var(--u) + 0.75px)),
    radial-gradient(circle at calc(2000 * var(--u)) calc(1600 * var(--u)), transparent calc(596 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.22) calc(596 * var(--u) + 0.75px) calc(598 * var(--u) - 0.75px), transparent calc(598 * var(--u) + 0.75px)),
    radial-gradient(circle at calc(2000 * var(--u)) calc(1600 * var(--u)), transparent calc(610 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.42) calc(610 * var(--u) + 0.75px) calc(612 * var(--u) - 0.75px), rgb(var(--mm-band) / 0.26) calc(612 * var(--u) + 0.75px) calc(632 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.3) calc(632 * var(--u) + 0.75px) calc(634 * var(--u) - 0.75px), transparent calc(634 * var(--u) + 0.75px));
}

/* Logo slot (reference bbox 48,20–255,105). ONE representation, no fallback.
   candidate166 (USER166-21): the classic Melee logo the user named
   (static.wikia.nocookie.net …/Meleelogo.png; no TM mark), cropped to its
   alpha bounds and scaled once in premultiplied alpha
   (assets/enhanced/logo-melee-classic.png, 1040x469; provenance in
   candidate166/logo-src/PROVENANCE.json). The slot takes the logo's own
   aspect (2.22), so it is never stretched. The URL is set on the element
   (--mm-logo). A missing/failed asset is shown as a failure, never replaced
   by another brand treatment. */
.mm-logo {
  /* candidate182 (USER182-03): further into the upper left, on the action
     column's left edge (logo x 42, medallions x 44) */
  --x: 42;
  --y: 22;
  --w: 480;
  --h: 216;
  margin: 0;
  background: var(--mm-logo) center / contain no-repeat;
}

/* Visible asset failure (set data-asset-error when an image fails to load):
   a red dashed frame and label. Deliberately ugly: a failed candidate. */
:is(.mm-logo, .mm-portrait)[data-asset-error] {
  background: repeating-linear-gradient(135deg, rgb(255 60 60 / 0.25) 0 calc(6 * var(--u)), transparent 0 calc(12 * var(--u)));
  outline: calc(3 * var(--u)) dashed #ff3b3b;
  outline-offset: calc(-3 * var(--u));
}
.mm-logo[data-asset-error]::after {
  content: "LOGO ASSET MISSING";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ff5a5a;
  font: 700 calc(28 * var(--u)) / 1 var(--mm-font-ui);
}

/* Reference: emblem 37,133–146,245 / bar 130,158–409,228 (Play Now);
   emblem 37,255–144,369 / bar 135,276–391,338 (Practice).
   Common-sense corrections of generated artefacts: each emblem is centred
   on its bar (reference drifted ±10px), and the Play Now tip stops 61px
   short of the weekly panel instead of touching it. (Since candidate182 the
   two bars are one structure: the reference's shorter Practice bar read as a
   size mismatch, USER182-04.) */
/* 71 (review72 V64-2): labels at 0.9 width and 14px further left, so the
   gap after the medallion and the clearance before the angled end balance
   (PLAY NOW had nearly reached its end bevel). */
/* candidate182 (USER182-01/04): Play and Practice are ONE structure (same
   round end, band, bar, end plates and length; tools/make-actions.js) on one
   left edge (x 44, the logo's column), 314 apart (42 px between the round
   ends instead of 10). The bar ends 35 shorter than 166's Play, so the whole
   column (plates, rim light, glove) keeps a gutter of at least 53 px to the
   weekly panel: bar end x 895 + bead, panel x 951; 166's Play end was at 946.
   Selection changes colour and glow only, never size. */
.mm-act--play { --x: 44; --y: 312; --w: 846; --h: 272; }
.mm-act--practice { --x: 44; --y: 626; --w: 846; --h: 272; }
/* MM Display cap centre: (1 + (1901 - 483 - 1493) / 2048) / 2 = .481689em. */
:is(.mm-act--play, .mm-act--practice) .mm-act__label { --lx: 306; --ly: 129; --fs: 96; --mm-dsx: 0.9; translate: 0 -48.17%; }

/* Weekly panel (reference 412,32–810,400). Frame polygons live in the
   panel SVG; text is placed in panel px. Corrected: the panel ends 33px
   above the prompt band (the reference let them touch), and the THIS WEEK /
   YOUR RANK captions, rank value and score share the row columns (text
   column x=106, name column x=336, score right edge x=837). */
.mm-weekly {
  --x: 951;
  --y: 67;
  --w: 936;
  --h: 884;
  margin: 0;
}
/* 71 (review72 V64-2): smaller, cooler blue-silver title, as the reference. */
.mm-weekly__title { --lx: 468; --ly: 74; --fs: 58; translate: -50% -48.17%; text-transform: uppercase; background-image: linear-gradient(180deg, #f4f7ff 0%, #d3def5 48%, #8e9dc0 100%); }
/* candidate166 (USER166-13): the inner insets are one consistent 30 px
   from the panel's inner frame (rows, notice, YOUR RANK strip and the THIS
   WEEK line), instead of 58. */
.mm-weekly__period {
  position: absolute;
  left: calc(78 * var(--u));
  right: calc(78 * var(--u));
  top: calc(149 * var(--u));
  translate: 0 -50%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
}
.mm-weekly__this {
  color: #e6ebf3;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(30 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.mm-weekly__reset {
  color: #a9b3c7;
  font-family: var(--mm-font-body);
  font-size: max(var(--mm-min-fs), calc(28 * var(--u)));
  font-style: italic;
}
.mm-weekly__rows {
  position: absolute;
  left: calc(56 * var(--u));
  top: calc(194 * var(--u));
  width: calc(824 * var(--u));
  display: grid;
  grid-auto-rows: calc(96 * var(--u));
  row-gap: calc(13 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Standings row: compact outlined rank cell, framed portrait slot, name,
   right-aligned score. Shared by weekly (.mm-row) and results (.mm-rrow). */
.mm-row,
.mm-rrow {
  position: relative;
  background: linear-gradient(90deg, rgb(22 32 58 / 0.6), rgb(13 20 40 / 0.5) 65%, rgb(10 16 32 / 0.3));
  /* layered inset row: light upper lip, dark lower lip, recessed interior */
  box-shadow:
    inset 0 calc(1.5 * var(--u)) 0 rgb(150 172 220 / 0.16),
    inset 0 calc(-2 * var(--u)) 0 rgb(2 4 12 / 0.85),
    inset 0 0 calc(14 * var(--u)) rgb(0 0 0 / 0.35);
}
.mm-cell {
  position: absolute;
  display: grid;
  place-items: center;
  isolation: isolate;
  --ch: calc(10 * var(--u));   /* corner chamfer */
  /* directional steel (lit upper left, falling to dark lower right) around
     a well that is darkest under its top edge = recessed (review72 V64-7) */
  --cell-rim: linear-gradient(145deg, #dfe4ec 0%, #9ba5b9 28%, #4c5569 66%, #262d3d 100%);
  --cell-well: linear-gradient(180deg, #02040b 0%, #0a1226 45%, #16203b 100%);
  color: #f4f6fa;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.6);
}
/* Chamfered, recessed rank well: steel rim + darker inset well (the well
   is darkest at the top edge, lighter at the bottom = recessed). */
.mm-cell::before,
.mm-cell::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
}
.mm-cell::before { inset: 0; background: var(--cell-rim); }
.mm-cell::after { inset: calc(3 * var(--u)); background: var(--cell-well); box-shadow: inset 0 calc(4 * var(--u)) calc(5 * var(--u)) rgb(0 0 0 / 0.55); }
/* Portrait slot: ONE source, the authentic 136x188 transparent default-
   costume character-select portrait (assets/original-large69/
   portrait-<key>-costume-0.png, original extraction, not generated).
   The image keeps its aspect; it is scaled so --cw source px span the slot
   width, and positioned so the character's face focal point (--fx, --fy as
   fractions of 136x188, per character below) sits at the slot centre,
   clamped so the image always covers the slot. --pw/--ph = slot size in
   stage px; --pz widens the crop for fighters whose head, pair or round
   silhouette needs more context than a face (capped at the full 136 px).
   No icon/enhanced alternative. */
.mm-portrait {
  --pw: 113;
  --ph: 88;
  --cw: 92;
  --pz: 1;
  --fx: 0.66;
  --fy: 0.3;
  --fyo: 0;                        /* per-slot vertical offset of the focus */
  --ps: calc(var(--pw) / min(136, var(--cw) * var(--pz)));
  position: absolute;
  display: block;
  background:
    var(--mm-portrait, none)
      clamp(calc((var(--pw) - 136 * var(--ps)) * var(--u)), calc((var(--pw) / 2 - var(--fx) * 136 * var(--ps)) * var(--u)), 0px)
      clamp(calc((var(--ph) - 188 * var(--ps)) * var(--u)), calc((var(--ph) / 2 - (var(--fy) + var(--fyo)) * 188 * var(--ps)) * var(--u)), 0px)
      / calc(136 * var(--ps) * var(--u)) calc(188 * var(--ps) * var(--u))
      no-repeat,
    radial-gradient(ellipse 90% 80% at 62% 32%, #2a3b68, #121b37 60%, #0a1024);
}
/* Recessed steel frame (review72 V64-7): directional steel bevel (lit from
   the upper left), a dark hairline recess inside it and a soft inner shadow
   from the top edge. */
.mm-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border: calc(3 * var(--u)) solid transparent;
  border-image: linear-gradient(145deg, #e2e7f0 0%, #9ca6ba 30%, #4f586d 68%, #2a3142 100%) 1;
  box-shadow:
    inset 0 0 0 calc(1.5 * var(--u)) rgb(3 6 14 / 0.9),
    inset 0 calc(5 * var(--u)) calc(6 * var(--u)) calc(-1 * var(--u)) rgb(0 0 0 / 0.5);
  pointer-events: none;
}
.mm-name,
.mm-score {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  color: #f4f6fa;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.6);
}
.mm-name {
  overflow: hidden;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
.mm-score { font-variant-numeric: tabular-nums; }

.mm-row .mm-cell { left: calc(10 * var(--u)); top: calc(6 * var(--u)); width: calc(85 * var(--u)); height: calc(84 * var(--u)); font-size: calc(50 * var(--u)); }
.mm-row .mm-portrait { --pw: 113; --ph: 88; --cw: 92; left: calc(116 * var(--u)); top: calc(4 * var(--u)); width: calc(113 * var(--u)); height: calc(88 * var(--u)); }
.mm-row .mm-name { left: calc(252 * var(--u)); max-width: calc(330 * var(--u)); font-size: calc(40 * var(--u)); }
.mm-row .mm-score { right: calc(52 * var(--u)); font-size: calc(42 * var(--u)); }

/* Head focal points (fraction of the 136x188 portrait) and crop widening,
   measured on a 20 px grid over each original (review72 R72-01/02: the
   design70 values were eyeballed and cut faces). Unlisted keys use the base
   0.66/0.30/1. */
.mm-portrait[data-fighter="fox"]               { --fx: 0.72; --fy: 0.27; }
.mm-portrait[data-fighter="marth"]             { --fx: 0.72; --fy: 0.26; }
.mm-portrait[data-fighter="kirby"]             { --fx: 0.70; --fy: 0.38; --pz: 1.35; }
.mm-portrait[data-fighter="pikachu"]           { --fx: 0.68; --fy: 0.30; --pz: 1.3; }
.mm-portrait[data-fighter="captain-falcon"]    { --fx: 0.66; --fy: 0.21; }
.mm-portrait[data-fighter="falco"]             { --fx: 0.76; --fy: 0.23; }
.mm-portrait[data-fighter="peach"]             { --fx: 0.53; --fy: 0.32; --pz: 1.36; }  /* measured face y 46-89 */
.mm-portrait[data-fighter="jigglypuff"]        { --fx: 0.66; --fy: 0.50; --pz: 1.4; }   /* measured eyes y 58-126 */
.mm-portrait[data-fighter="samus"]             { --fx: 0.77; --fy: 0.21; --pz: 1.15; }
.mm-portrait[data-fighter="link"]              { --fx: 0.76; --fy: 0.26; }
.mm-portrait[data-fighter="luigi"]             { --fx: 0.73; --fy: 0.28; }
.mm-portrait[data-fighter="yoshi"]             { --fx: 0.63; --fy: 0.24; --pz: 1.3; }
.mm-portrait[data-fighter="ness"]              { --fx: 0.66; --fy: 0.30; --pz: 1.2; }
.mm-portrait[data-fighter="ice-climbers"]      { --fx: 0.59; --fy: 0.29; --pz: 1.4; }
.mm-portrait[data-fighter="donkey-kong"]       { --fx: 0.76; --fy: 0.42; --pz: 1.2; }
.mm-portrait[data-fighter="mario"]             { --fx: 0.72; --fy: 0.26; }
.mm-portrait[data-fighter="bowser"]            { --fx: 0.40; --fy: 0.52; --pz: 1.35; }  /* eye y 89 + muzzle to y 139 (review74 R74-05) */
.mm-portrait[data-fighter="dr-mario"]          { --fx: 0.69; --fy: 0.23; --pz: 1.35; }  /* head mirror y 2-39 with the face (review74 R74-04) */
.mm-portrait[data-fighter="ganondorf"]         { --fx: 0.33; --fy: 0.26; --pz: 1.1; }
.mm-portrait[data-fighter="zelda"]             { --fx: 0.68; --fy: 0.22; }
.mm-portrait[data-fighter="young-link"]        { --fx: 0.64; --fy: 0.27; }
.mm-portrait[data-fighter="pichu"]             { --fx: 0.56; --fy: 0.36; --pz: 1.3; }
.mm-portrait[data-fighter="mewtwo"]            { --fx: 0.62; --fy: 0.32; --pz: 1.2; }
.mm-portrait[data-fighter="mr-game-and-watch"] { --fx: 0.50; --fy: 0.24; --pz: 1.35; }
.mm-portrait[data-fighter="roy"]               { --fx: 0.71; --fy: 0.28; }

/* No blank frames: a portrait slot renders only when a real fighter is
   known (data-fighter set by UI47); otherwise the name takes its column. */
:is(.mm-row, .mm-rrow) .mm-portrait:not([data-fighter]) { display: none; }
.mm-row:not(:has(.mm-portrait[data-fighter])) .mm-name { left: calc(116 * var(--u)); max-width: calc(494 * var(--u)); }
/* candidate166 (USER166-12): weekly rows are seamless translucent bands on
   a lighter-weight panel face — a faint lift and hairlines, not opaque dark
   stripes — so the background reads through the list. Results rows keep
   their recessed treatment. candidate182 (USER182-06): the fill is lighter
   still; the hairlines, rank wells and text shadows carry the rows. */
.mm-weekly .mm-p-face { opacity: 0.84; }
.mm-row {
  background: linear-gradient(90deg, rgb(120 150 220 / 0.055), rgb(120 150 220 / 0.025) 60%, rgb(120 150 220 / 0));
  box-shadow:
    inset 0 calc(1 * var(--u)) 0 rgb(170 192 238 / 0.12),
    inset 0 calc(-1.5 * var(--u)) 0 rgb(2 4 12 / 0.4);
}
/* USER166-14: a row whose score just changed flashes once (the host/specimen
   animate this overlay only on an actual update; section 12c). */
.mm-row::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  /* candidate182 (USER182-20): the whole row lights, a warm wash and a thin
     ring round it, with no left lip */
  background: linear-gradient(90deg, rgb(255 176 48 / 0.22), rgb(255 176 48 / 0.08) 70%, rgb(255 176 48 / 0.04));
  box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgb(255 181 44 / 0.6);
}
.mm-rrow:not(:has(.mm-portrait[data-fighter])) .mm-rrow__who { left: calc(84 * var(--u)); }

/* Local player inside a standings list (never invented; only when true).
   USER-POLISH-05: the player's own row takes the P1 red identity of the
   character select (red-tinted face, red rim, red rank well, red YOU
   badge) — distinct from the amber of the selected action.
   candidate121: the live host marks that row data-you (weekly rows and
   Results rows), the specimen data-local; both select this treatment.
   candidate182 (USER182-20/21): no left lip; the red face, the ring round
   the whole row and the red rank well carry the emphasis. */
:is(.mm-row, .mm-rrow):is([data-local], [data-you]) {
  background: linear-gradient(90deg, rgb(122 20 26 / 0.62), rgb(70 12 18 / 0.5) 55%, rgb(24 14 30 / 0.35));
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) rgb(255 110 90 / 0.65),
    inset 0 calc(1.5 * var(--u)) 0 calc(2 * var(--u)) rgb(255 255 255 / 0.08);
}
:is(.mm-row, .mm-rrow):is([data-local], [data-you]) .mm-cell {
  --cell-rim: linear-gradient(145deg, #ffc2b4 0%, #ff4b2b 36%, #8a1410 74%, #ff7a5c 100%);
  --cell-well: linear-gradient(180deg, #1c0306, #3a070b 70%, #52101a);
}

/* Standings notice (loading / unavailable / no entries yet): ONE recessed
   plate over the whole rows area, which is hidden while it shows (review73
   R73-06: a plate over three of five ghost rows read as half-dimmed). Never
   shown over real rows. */
.mm-weekly__notice {
  position: absolute;
  left: calc(56 * var(--u));
  top: calc(194 * var(--u));
  width: calc(824 * var(--u));
  height: calc(532 * var(--u));
  display: grid;
  place-content: center;
  justify-items: center;
  row-gap: calc(10 * var(--u));
  margin: 0;
  background: linear-gradient(180deg, rgb(4 7 18 / 0.9), rgb(10 16 34 / 0.92));
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) rgb(143 154 176 / 0.55),
    inset 0 calc(4 * var(--u)) calc(10 * var(--u)) rgb(0 0 0 / 0.6);
  color: #e6ebf3;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(38 * var(--u));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.6);
}
.mm-weekly__notice-detail {
  color: #a9b3c7;
  font-family: var(--mm-font-body);
  font-size: max(var(--mm-min-fs), calc(28 * var(--u)));
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.mm-weekly[data-weekly-state="unavailable"] .mm-weekly__notice { box-shadow: inset 0 0 0 calc(2 * var(--u)) rgb(214 120 104 / 0.6), inset 0 calc(4 * var(--u)) calc(10 * var(--u)) rgb(0 0 0 / 0.6); }
.mm-weekly:has(.mm-weekly__notice:not([hidden])) .mm-weekly__rows { visibility: hidden; }

/* "Your rank" strip (reference 448,340–790,385). Shows real values only;
   "—" when the service does not publish them. */
.mm-weekly__you {
  position: absolute;
  left: calc(56 * var(--u));
  top: calc(746 * var(--u));
  width: calc(824 * var(--u));
  height: calc(94 * var(--u));
  margin: 0;
}
.mm-weekly__you-label {
  position: absolute;
  left: calc(22 * var(--u));
  top: 50%;
  translate: 0 -50%;
  color: #e6ebf3;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(36 * var(--u));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Rank value centred in the strip: three spaced anchors (label / rank /
   score) as the reference (review72 R72-05). */
.mm-weekly__you-rank { --lx: 402; --ly: 47; --fs: 54; translate: -50% -56%; transform-origin: 50% 50%; }
.mm-weekly__you-score { right: calc(52 * var(--u)); font-size: calc(52 * var(--u)); }

/* 7. Mode ---------------------------------------------------------------- */

.mm-modesel .mm-stage,
.mm-queue .mm-stage,
.mm-results .mm-stage,
.mm-select .mm-stage,
.mm-practice .mm-stage {
  /* candidate131 orbit light (section 12): travels round the right ring */
  --mm-orbit-x: 1400; --mm-orbit-y: 480; --mm-orbit-r: 410;
  --mm-orbit-i0: 91.5%; --mm-orbit-i1: 91.9%; --mm-orbit-o1: 98.8%; --mm-orbit-o0: 99.2%;
  --mm-bands:
    /* (pseudo coords = stage + 1000) 71, traced on a contrast-boosted
       normalised reference (review72: the 70 right ring sat ~80px low and
       its fine contours read as line drawing): a filled ring on the right
       (stage centre 1400,480, r 376-406, top edge at y ~75), one faint
       outer contour, and a filled arc at the left edge (centre 760,550).
       Stops are 1.5px ramps (antialiased at 1440p, review73 R73-07). */
    radial-gradient(circle at calc(2400 * var(--u)) calc(1480 * var(--u)), transparent calc(376 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.48) calc(376 * var(--u) + 0.75px) calc(378.5 * var(--u) - 0.75px), rgb(var(--mm-band) / 0.3) calc(378.5 * var(--u) + 0.75px) calc(403.5 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.36) calc(403.5 * var(--u) + 0.75px) calc(406 * var(--u) - 0.75px), transparent calc(406 * var(--u) + 0.75px)),
    radial-gradient(circle at calc(2400 * var(--u)) calc(1480 * var(--u)), transparent calc(452 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.2) calc(452 * var(--u) + 0.75px) calc(454 * var(--u) - 0.75px), transparent calc(454 * var(--u) + 0.75px)),
    radial-gradient(circle at calc(1760 * var(--u)) calc(1550 * var(--u)), transparent calc(700 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.4) calc(700 * var(--u) + 0.75px) calc(702.5 * var(--u) - 0.75px), rgb(var(--mm-band) / 0.26) calc(702.5 * var(--u) + 0.75px) calc(725.5 * var(--u) - 0.75px), rgb(var(--mm-line) / 0.3) calc(725.5 * var(--u) + 0.75px) calc(728 * var(--u) - 0.75px), transparent calc(728 * var(--u) + 0.75px));
}

/* Title strip, top-left (reference PLAY NOW plate at 8,466–~285,516). */
.mm-strip { --x: 0; --y: 0; --w: 660; --h: 131; margin: 0; }
/* Embossed dark-metal title (reference PLAY NOW / PRACTICE / MELEE plates):
   charcoal letters, light upper bevel, dark lower edge, on a steel plate. */
/* review72 R72-03: the 70 treatment (grey face + light shadows on every
   side) read as hollow outline lettering. Now a SOLID near-black face,
   debossed: a dark upper-left cut and a small light lower lip, on the
   lighter blue-steel plate. Sized to the reference cap height. */
.mm-strip__text {
  --lx: 105;
  --ly: 68;
  --fs: 88;
  color: #0b111f;
  text-transform: uppercase;
  text-shadow:
    calc(-1 * var(--u)) calc(-1.5 * var(--u)) 0 rgb(0 0 0 / 0.45),
    calc(1 * var(--u)) calc(2 * var(--u)) 0 rgb(176 192 220 / 0.5);
}

/* Reference: Normal emblem 70,539–182,660, row 166,555–799,638, Queue wedge
   589,572–783,621; Endless emblem 70,670–181,789, row 164,682–797,761.
   Corrected: the two peer rows share one geometry (the reference differed
   by 4px in height and 5px in x and dropped each emblem off-centre), each
   emblem is centred on its bar, and Queue/Join share one wedge. Join drops
   to make room only when real occupancy is shown. */
.mm-act--normal,
.mm-act--endless { --x: 138; --w: 1740; --h: 280; }
.mm-act--normal { --y: 202; }
.mm-act--endless { --y: 530; }
/* 74: leaves a ~100px optical gap before the housing's diagonal join
   (actual68 render: at 82 the heading nearly touched it). */
/* 71: taller, narrower caps (review72 V64-2): 78px at 0.92 width keeps the
   same run length and housing gap as 74px at full width. */
/* 330: title caps to subtitle baseline centred on the bar and medallion (y 140);
   the pair moves together, keeping its approved spacing. */
:is(.mm-act--normal, .mm-act--endless) .mm-act__label { --lx: 326; --ly: 110; --fs: 78; --mm-dsx: 0.92; translate: 0 -48.17%; }
:is(.mm-act--normal, .mm-act--endless) .mm-act__sub { --lx: 328; --ly: 186; }
:is(.mm-act--normal, .mm-act--endless) .mm-cta { --lx: 1470; --ly: 140; }
/* With real occupancy the housing holds two items. candidate182
   (USER182-07): the SAME housing as Normal (166's taller variant read as a
   bulky block). The full-size Join plate (Queue's exact plate) moves down 10
   inside it and the count sits in the housing band above the plate (housing
   top 57, plate top 98; count centre 78 at 28 px), so both fit without
   changing any shape. A uniform translate keeps rim, bevel, clip and edge
   coherent. */
.mm-act--endless:has(.mm-act__count:not([hidden])) .mm-cta-full { transform: translateY(10px); }
.mm-act--endless:has(.mm-act__count:not([hidden])) .mm-cta { --ly: 150; }

/* Selected-fighter strip, bottom-left (reference 8,800–~270,878). */
/* candidate131 (USER131-10): the plaque's shoulder runs OUT and down to a
   low footer (markup); a slightly larger head window; text on the reference
   lines. */
.mm-fighter { --x: 0; --y: 885; --w: 700; --h: 195; margin: 0; }
/* Head frame, as the reference plaque: the head fills it. R72-06 history:
   review72 (blaster fragment at lower left), review73 (ear tips cut, 1.81x
   too soft), review74 (mouth cut by the 140x130 window). A portrait-shaped
   120x140 slot showing 76 source px across (1.58x) with the focus raised
   0.08 holds the whole head: ears from the portrait's top edge (y 0-17)
   down past the mouth (y ~88), and starts right of the blaster (x <= 62). */
/* candidate166 (USER166-16, reference view 3 x98-268 y903-1060): a larger
   rounded steel frame inset in the band (164x154), the head filling it.
   candidate182 (USER182-08): square corners, as the band's now sharp
   shoulder and the header's angular plate. */
.mm-fighter .mm-portrait {
  --pw: 164;
  --ph: 154;
  --cw: 84;
  --fyo: -0.06;
  left: calc(100 * var(--u));
  top: calc(16 * var(--u));
  width: calc(164 * var(--u));
  height: calc(154 * var(--u));
  border-radius: 0;
}
.mm-fighter .mm-portrait::after {
  border: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 calc(3 * var(--u)) #b3bdd0,
    inset 0 0 0 calc(4.5 * var(--u)) rgb(3 6 14 / 0.9),
    inset 0 calc(6 * var(--u)) calc(8 * var(--u)) calc(-1 * var(--u)) rgb(0 0 0 / 0.5);
}
/* candidate166 (USER166-15): a quiet condensed caption and ONE line of name
   at every length. The name's size comes from the host's fit (--fs =
   min(76, 340 / (0.565 x length)), host-delta166), so a long name such as
   ICE CLIMBERS stays one readable line within the 340 px before the band's
   shoulder instead of wrapping into two crowded lines. */
.mm-fighter__label {
  position: absolute;
  left: calc(300 * var(--u));
  top: calc(56 * var(--u));
  translate: 0 -50%;
  color: #e8edf6;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(36 * var(--u));
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
.mm-fighter__name { --lx: 296; --ly: 123; --fs: 76; text-transform: uppercase; }
/* candidate206 (review201 R201-05): when the whole label would fall below
   the host's --fs 40, the host writes "Name\nColor N" with data-lines="2" and
   sizes --fs by the fighter name alone: the name keeps a readable display
   size (MR. GAME & WATCH 37 stage px, was 23) and the costume sits below it
   as smaller metadata. Short labels (MARIO / COLOR 2) stay one line. */
.mm-fighter__name[data-lines="2"] {
  white-space: pre-line;
  line-height: 0.95;
  font-size: max(var(--mm-min-fs), calc(26 * var(--u)));
}
.mm-fighter__name[data-lines="2"]::first-line { font-size: calc(min(48, var(--fs)) * var(--u)); }

/* 8. Prompt band, bottom-right (reference 555,401–824,441) --------------
   Glyph text is the ACTUAL configured binding written by UI47. Circle for
   gamepad (green confirm / red back, as the reference); keycap otherwise. */

/* Prompts sit right-aligned in the band (reference spacing for Confirm/
   Back); longer actual labels/bindings grow leftwards instead of clipping. */
/* candidate131 (USER131-03): the band is anchored to the viewport's bottom-
   right safe corner on every aspect ratio (not to the letterboxed stage). It
   is shown on each screen entry and then hidden (section 12), and reappears
   on any input-modality change (the host's data-input), on hover, and stays
   on the pause/help panel and for touch (where Back is the tap target). Back
   input itself never depends on it. */
.mm-prompts {
  --x: 1300; --y: 984; --w: 620; --h: 96;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(48 * var(--u));
  margin: 0;
  padding-right: calc(84 * var(--u));
  /* candidate166 (USER166-02): the band is right-anchored and as wide as its
     prompts need (at least the reference 620), so long actual labels such as
     "Esc Main menu" never overrun the band's slanted left edge; the SVG frame
     is left-aligned (xMinYMid) so the slant moves with the band's left. */
  left: auto;
  right: 0;
  width: max-content;
  min-width: calc(var(--w) * var(--u));
  padding-left: calc(78 * var(--u));
  translate:
    calc(50cqw - (var(--mm-safe-l) + var(--mm-safe-r)) / 2 - 960 * var(--u))
    calc(50cqh - (var(--mm-safe-t) + var(--mm-safe-b)) / 2 - 540 * var(--u));
  animation: mm-hint-g var(--mm-t-hint) ease-in-out both;
}
.mm-prompt {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
  height: calc(68 * var(--u));
  margin: 0;
  padding: 0;
  border: 0;
  color: #f1f4f9;
  background: none;
  font: inherit;
  cursor: pointer;
}
.mm-prompt:focus-visible { outline: calc(3 * var(--u)) solid var(--mm-amber); outline-offset: calc(4 * var(--u)); }
.mm-prompt__label {
  font-family: var(--mm-font-ui);   /* narrower than body text (validator64) */
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(36 * var(--u));
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
.mm-glyph {
  display: inline-grid;
  place-items: center;
  min-width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  padding: 0;
  border-radius: 50%;
  color: #fff;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(27 * var(--u)));
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 calc(1.5 * var(--u)) 0 rgb(0 0 0 / 0.45);
}
/* Flatter discs with dark letters (reference): turquoise confirm, red back. */
.mm-glyph[data-role="confirm"] {
  color: #04241f;
  text-shadow: none;
  background: linear-gradient(180deg, #55dcc8, #22b3a0);
  box-shadow: 0 0 0 calc(2 * var(--u)) #0b3a33;
}
.mm-glyph[data-role="back"] {
  color: #2b0806;
  text-shadow: none;
  background: linear-gradient(180deg, #f2716a, #cf3b33);
  box-shadow: 0 0 0 calc(2 * var(--u)) #4a0f0b;
}
.mm-root:is([data-input="keyboard"], [data-input="pointer"]) .mm-glyph {
  padding: 0 calc(12 * var(--u));
  border-radius: calc(9 * var(--u));
  font-size: max(var(--mm-min-fs), calc(24 * var(--u)));
}
/* Touch (review73 R73-01): no keys to show. Actions are tapped directly,
   so the Confirm prompt is dropped; Back stays as a clearly labelled
   tappable control: a steel disc with a back chevron and a hit area of at
   least 44px. */
.mm-root[data-input="touch"] .mm-prompt--confirm { display: none; }
/* candidate230 (independent review R230-07): with a mouse the selection follows
   the hand, so a clicked footer Confirm would act on whatever the hand last
   crossed on its way there. 316 scopes that omission to character selection. Other menus retain
   their meaningful Confirm hint; any key press restores the selection hint. */
.mm-root[data-input="pointer"] .mm-select .mm-prompt--confirm { display: none; }
.mm-root[data-input="touch"] .mm-prompt {
  min-height: max(44px, calc(68 * var(--u)));
  padding: 0 calc(10 * var(--u));
}
.mm-root[data-input="touch"] .mm-glyph[data-role="back"] {
  position: relative;
  background: linear-gradient(180deg, #c9d0dc, #7d879c);
  box-shadow: 0 0 0 calc(2 * var(--u)) #1a2238;
}
.mm-root[data-input="touch"] .mm-glyph[data-role="back"]::before {
  content: "";
  width: 38%;
  height: 46%;
  margin-left: -8%;
  background: #0b1120;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

/* review112 R112-06 (optional polish): the host's utility links (Weekly
   standings, Controls) read as small inset steel tabs rather than bare web
   text. Appearance only — the host keeps their placement, size and focus
   ring (no clip-path, so the outline is never clipped). */
.mm-utility .mm-prompt {
  height: auto;
  padding: 2px 12px 1px;
  border: 1px solid rgb(170 186 214 / 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, rgb(64 78 110 / 0.92), rgb(22 30 52 / 0.94));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 1px 0 rgb(2 4 12 / 0.8);
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.6);
}

/* candidate128 (USER-POLISH-04): the host's extra-colour buttons (.mm-colors,
   "Mario · Color 2") were bare text inside a rectangular focus outline, the
   only control on the character select outside the component language. They
   now read as small roster cells: the same chamfered steel rim and recessed
   well, the picked fighter's amber rim and warm well for the chosen colour,
   and the roster's bright amber rim and glow for focus. The host keeps
   placement, size, font and the amber text of the chosen colour.
   candidate227: the same cell also draws the Controls panel's setting keys
   (.mm-set__btn), and the amber rim follows real focus (:focus, as the
   actions), so a controller's focus lights it too. */
.mm-colors .mm-prompt,
.mm-set__btn {
  --ch: calc(10 * var(--u));
  --tile-rim: linear-gradient(145deg, #e6ebf3 0%, #a3adc0 26%, #4c5569 64%, #2a3142 82%, #8d97ab 100%);
  isolation: isolate;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
.mm-colors .mm-prompt::before,
.mm-colors .mm-prompt::after,
.mm-set__btn::before,
.mm-set__btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
}
.mm-colors .mm-prompt::before,
.mm-set__btn::before { inset: 0; background: var(--tile-rim); }
.mm-colors .mm-prompt::after,
.mm-set__btn::after {
  inset: calc(3 * var(--u));
  background: linear-gradient(180deg, #03060f, #0a1122 60%, #111b33);
  box-shadow: inset 0 calc(2.5 * var(--u)) 0 rgb(0 0 0 / 0.85), inset 0 calc(-1.5 * var(--u)) 0 rgb(150 166 196 / 0.18);
}
.mm-colors .mm-prompt[aria-pressed="true"] { --tile-rim: linear-gradient(160deg, #ffd27a 0%, #d9731a 50%, #ffb347 100%); }
.mm-colors .mm-prompt[aria-pressed="true"]::after { background: linear-gradient(180deg, #2a0e05, #4a1e0c 60%, #5a260e); }
.mm-colors .mm-prompt:focus,
.mm-set__btn:focus {
  --tile-rim: linear-gradient(160deg, #fff4c6 0%, #ffc540 30%, #ff8a00 70%, #ffd060 100%);
  outline: none;
  filter: drop-shadow(0 0 calc(12 * var(--u)) rgb(255 128 0 / 0.65));
}
.mm-colors .mm-prompt:disabled,
.mm-set__btn:disabled { color: #7d8699; cursor: not-allowed; }
/* candidate227 (USER227-01): the picked costume, shown only while it is not
   the standard one; state, not an action (the amber of the picked tile). The
   colour always shows whole; a name too long for the bar (it is also on the P1
   plate) ends in an ellipsis, with the full label as the title. */
.mm-colors__state {
  display: flex;
  min-width: 0;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(12px, calc(28 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--mm-amber);
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.8);
}
.mm-colors__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mm-colors__state > :last-child { flex: none; white-space: pre; }

.mm-lbl,
.mm-name,
.mm-score { margin: 0; }

/* 9. Wedge buttons (Queue/Results actions) ------------------------------
   Same trapezoid and materials as the mode-row Queue/Join ("/" left edge,
   "\" right edge). Shared polygon #mm-shp-wedge "40,10 380,10 430,100 10,100"
   in a 440x110 viewBox. */

.mm-act--wedge { --w: 440; --h: 110; }
.mm-act--wedge .mm-cta { --lx: 220; --ly: 55; --fs: 52; }

/* 10. Queue ---------------------------------------------------------------- */

.mm-qpanel { --x: 420; --y: 220; --w: 1080; --h: 620; margin: 0; }
.mm-qpanel__mode { --lx: 540; --ly: 69; --fs: 60; text-transform: uppercase; }
.mm-qpanel__status {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(160 * var(--u));
  height: calc(150 * var(--u));
  margin: 0;
}
.mm-qpanel__state { --lx: 540; --ly: 45; --fs: 56; text-transform: uppercase; }
.mm-qpanel__detail {
  position: absolute;
  left: 50%;
  top: calc(115 * var(--u));
  translate: -50% -50%;
  margin: 0;
  color: #c9d1df;
  font-family: var(--mm-font-body);
  font-size: calc(34 * var(--u));
  white-space: nowrap;
}
.mm-meter {
  position: absolute;
  left: 50%;
  top: calc(334 * var(--u));
  width: calc(520 * var(--u));
  height: calc(12 * var(--u));
  translate: -50% 0;
  pointer-events: none;
  /* the light at rest (found, reduced motion): a symmetric spindle */
  --mm-meter-rest: linear-gradient(90deg, transparent, #ffc540 45%, #fff4c6 55%, transparent);
}
/* loader-polish: one frameless light shaped as a comet. The radius tapers the
   body to a point at the tail and rounds the nose, the fill fades out along
   the tail and is brightest at the leading edge, and the glow follows the
   fill's alpha, so it gathers at the head. It scales from the nose
   (mm-load-run), so the tail draws out behind it and gathers back into it. */
.mm-meter::before {
  content: "";
  position: absolute;
  left: calc(194 * var(--u));
  top: calc(3 * var(--u));
  width: calc(132 * var(--u));
  height: calc(6 * var(--u));
  border-radius: 95% 5% 5% 95% / 50%;
  background: linear-gradient(90deg, transparent, #ffc540 70%, #fff4c6 92%);
  filter: drop-shadow(0 0 calc(5 * var(--u)) rgb(255 138 0 / 0.65));
  transform-origin: 100% 50%;
  animation: mm-load-run 2.4s linear infinite;
}
.mm-qpanel[data-queue-state="found"] .mm-meter::before { animation: none; border-radius: 50%; background: var(--mm-meter-rest); }
.mm-qpanel:is([data-queue-state="cancelling"], [data-queue-state="released"], [data-queue-state="error"]) .mm-meter::before {
  display: none;
}
/* When the queue ends, only the outcome and Main menu remain. */
.mm-qpanel:is([data-queue-state="released"], [data-queue-state="error"]) :is(.mm-meter, .mm-room-name) { display: none; }
.mm-qpanel:is([data-queue-state="released"], [data-queue-state="error"]) .mm-act--wedge { --y: 392; }
.mm-room-name {
  position: absolute;
  inset-inline: calc(40 * var(--u));
  top: calc(392 * var(--u));
  margin: 0;
  color: #f4f6fa;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(44 * var(--u));
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.6);
}
.mm-root:not([data-page="loading"]) [data-field="loading-room"] { display: none; }
.mm-qpanel .mm-act--wedge { --x: 320; --y: 468; }

/* 11. Results: every participant (16 in a full room), two columns ------- */

/* candidate206 (review201 R201-02): the panel ends 22 higher (h 758; rows
   66 tall with 5 gaps, so the rows keep the same clearance from the frame
   and its lower-right chamfer), so the whole action unit below fits the
   16:9 stage with room for the focused glove. */
.mm-rpanel { --x: 90; --y: 150; --w: 1740; --h: 758; margin: 0; }
/* Inset clear of the panel's sloped inner bevel (validator64: heading crossed it). */
.mm-rpanel__mode { --lx: 136; --ly: 70; --fs: 56; text-transform: uppercase; }
.mm-rpanel__you {
  position: absolute;
  right: calc(90 * var(--u));
  top: calc(70 * var(--u));
  translate: 0 -50%;
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  margin: 0;
}
/* candidate166 (USER166-17): three levels — a small tracked caption, the
   place as the hero (gold, 62), the score as a bold secondary value set off
   by a hairline divider — centred on one axis. */
.mm-rpanel__you-label {
  color: var(--mm-ink-2);
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(24 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}
.mm-rpanel__you-place { font-size: calc(62 * var(--u)); line-height: 1; text-transform: uppercase; }
.mm-rpanel__you-score {
  padding-left: calc(22 * var(--u));
  border-left: calc(2 * var(--u)) solid rgb(255 176 160 / 0.4);
  color: #f4f6fa;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(40 * var(--u));
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* DOM order stays 1…16 for assistive tech; columns read 1–8 then 9–16. */
.mm-rpanel__rows {
  position: absolute;
  left: calc(70 * var(--u));
  top: calc(136 * var(--u));
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(2, calc(780 * var(--u)));
  grid-template-rows: repeat(8, calc(66 * var(--u)));
  gap: calc(5 * var(--u)) calc(40 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}
.mm-rrow .mm-cell { left: calc(6 * var(--u)); top: calc(5 * var(--u)); width: calc(66 * var(--u)); height: calc(58 * var(--u)); font-size: calc(34 * var(--u)); }
.mm-rrow .mm-portrait { --pw: 86; --ph: 60; --cw: 100; left: calc(84 * var(--u)); top: calc(4 * var(--u)); width: calc(86 * var(--u)); height: calc(60 * var(--u)); }
.mm-rrow__who {
  position: absolute;
  left: calc(190 * var(--u));
  right: calc(180 * var(--u));
  top: 50%;
  translate: 0 -50%;
  display: flex;
  align-items: baseline;
  gap: calc(16 * var(--u));
  overflow: hidden;
  white-space: nowrap;
}
/* candidate206 (review201 R201-04): the identifier may use the whole
   name/stat lane; only if it alone exceeded the lane would it be cut. The
   KO / fall / SD detail (.mm-rrow__fighter, flex 0 1) yields first. */
.mm-rrow .mm-name {
  position: static;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  translate: none;
  font-size: calc(36 * var(--u));
}
.mm-rrow__fighter {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--mm-ink-2);
  font-family: var(--mm-font-body);
  font-size: max(var(--mm-min-fs), calc(26 * var(--u)));
}
/* red chamfered YOU badge (the P1 tag language) */
.mm-rrow__you {
  flex: none;
  align-self: center;
  padding: calc(3 * var(--u)) calc(12 * var(--u)) calc(2 * var(--u));
  clip-path: polygon(calc(7 * var(--u)) 0, 100% 0, 100% calc(100% - calc(7 * var(--u))), calc(100% - calc(7 * var(--u))) 100%, 0 100%, 0 calc(7 * var(--u)));
  background: linear-gradient(180deg, #ff6a4a, #c21a12 60%, #8a0e0a);
  color: #fff;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(24 * var(--u)));
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 calc(1.5 * var(--u)) 0 rgb(60 0 0 / 0.7);
}
.mm-rrow .mm-score { right: calc(22 * var(--u)); font-size: calc(40 * var(--u)); }

/* Podium (USER-POLISH-05): gold / silver / bronze rank wells for 1-3 and
   a restrained gold winner row — a result state, not a selection. */
.mm-rrow[data-rank="1"] {
  background: linear-gradient(90deg, rgb(120 88 22 / 0.5), rgb(52 40 16 / 0.36) 45%, rgb(13 20 40 / 0.4) 80%);
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) rgb(240 200 96 / 0.55),
    inset 0 calc(1.5 * var(--u)) 0 calc(2 * var(--u)) rgb(255 240 200 / 0.08);
}
.mm-rrow[data-rank="1"] .mm-cell { --cell-rim: linear-gradient(145deg, #fff3c4 0%, #f0c24a 30%, #93640f 68%, #e8b84c 100%); color: #ffe08a; }
.mm-rrow[data-rank="2"] .mm-cell { --cell-rim: linear-gradient(145deg, #ffffff 0%, #cfd6e2 30%, #6f7a90 68%, #dfe4ec 100%); }
.mm-rrow[data-rank="3"] .mm-cell { --cell-rim: linear-gradient(145deg, #ffd9b8 0%, #d68c4e 32%, #7a3f14 70%, #cf9058 100%); color: #ffd2b0; }
.mm-rrow[data-rank="1"] .mm-score { color: #ffe08a; }

/* Steel groove between the two result columns. */
.mm-rpanel__rows::before {
  content: "";
  position: absolute;
  left: calc(799 * var(--u));
  top: calc(4 * var(--u));
  bottom: calc(4 * var(--u));
  width: calc(3 * var(--u));
  background: linear-gradient(180deg, transparent, rgb(150 166 196 / 0.45) 12%, rgb(150 166 196 / 0.45) 88%, transparent);
  box-shadow: calc(-1.5 * var(--u)) 0 0 rgb(0 0 0 / 0.7);
}

/* YOUR PLACE: a red P1-style plate (steel lip, red face, chamfers). */
.mm-rpanel__you {
  padding: calc(14 * var(--u)) calc(30 * var(--u)) calc(12 * var(--u)) calc(28 * var(--u));
  clip-path: polygon(calc(16 * var(--u)) 0, 100% 0, 100% calc(100% - calc(16 * var(--u))), calc(100% - calc(16 * var(--u))) 100%, 0 100%, 0 calc(16 * var(--u)));
  /* red P1 material: lit top, deeper lower half, inner shadow under the rim */
  background:
    linear-gradient(180deg, rgb(255 150 130 / 0.22), rgb(255 150 130 / 0) 42%),
    linear-gradient(180deg, rgb(0 0 0 / 0) 55%, rgb(24 0 4 / 0.45)),
    radial-gradient(ellipse 90% 130% at 35% 25%, #8a181c, #520b10 60%, #300609);
  box-shadow:
    inset 0 0 0 calc(2.5 * var(--u)) #c9d0dc,
    inset 0 0 0 calc(5 * var(--u)) #2a0306,
    inset 0 0 0 calc(7 * var(--u)) rgb(255 90 68 / 0.8),
    inset 0 calc(10 * var(--u)) calc(12 * var(--u)) calc(-4 * var(--u)) rgb(20 0 3 / 0.55);
}
.mm-rpanel__you .mm-rpanel__you-label { color: #ffd0c6; }
.mm-rpanel__you-place { background-image: linear-gradient(180deg, #fff3c4 0%, #ffd060 45%, #e0a020 100%); }

/* Results actions sit directly on the footer, with a divider in the gap. */
.mm-actbar { --x: 60; --y: 918; --w: 1060; --h: 130; margin: 0; }
.mm-actbar__divider { fill: none; stroke: #a5b2c8; stroke-width: 2.5; stroke-opacity: 0.68; }
.mm-results .mm-act--requeue { --x: 126; --y: 928; }
.mm-results .mm-act--main { --x: 598; --y: 928; }

/* 11c. Character select (reference view 2) and Practice setup (reference
   view 4). Coordinates are read from the normalised reference views
   (evidence74/reference-view2-1920.png, reference-view4-1920.png) and
   corrected for generated artefacts (canonical 25-fighter roster in the
   original 9/9/7 order, real names, one coherent strip). ------------------ */

/* Character select: title plate (short, "MELEE" as the reference) + VS
   badge + the slanted "Choose your fighter" rail. */
/* candidate131 (USER131-07): a wider left shoulder (slant at 575/526, as
   reference view 2); MELEE — taller and condensed, as the reference — and the
   VS badge sit centred in it, a little further left; the rail nestles
   against the slant. */
.mm-strip--short .mm-strip__text { --lx: 104; --ly: 80; --fs: 100; --mm-dsx: 0.7; }
/* candidate182 (USER182-16): the VS ring spans MELEE's cap height (caps
   y ~36-109 at this size; ring 34-110) and is centred between MELEE's right
   edge (x ~311) and the shoulder's slant at that height (x ~531). */
.mm-vs { --x: 378; --y: 29; --w: 86; --h: 86; margin: 0; }
.mm-vs .mm-emblem { width: 100%; height: 100%; }
.mm-vs__text {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -52%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-silver);
  font-size: calc(36 * var(--u));
  filter: drop-shadow(0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.8));
}
/* candidate166 (USER166-19, reference view 2): the shoulder's slant is
   steeper (486,131 -> 560,34, as the reference 0.76) and the rail's left edge
   runs parallel to it, leaving the reference's dark ~42 px channel between
   plate and rail; MELEE and VS stay centred in the shoulder. */
.mm-titlerail { --x: 530; --y: 44; --w: 1115; --h: 84; margin: 0; }
.mm-titlerail__text { --lx: 565; --ly: 44; --fs: 56; text-transform: uppercase; }

/* Roster: 9 columns, the 7-fighter third row centred (reference: 8/8/7 with
   generated omissions; the original select has exactly 9/9/7). */
.mm-roster {
  --x: 100;
  --y: 140;
  --w: 1720;
  --h: 498;
  display: grid;
  grid-template-columns: repeat(9, calc(178 * var(--u)));
  grid-auto-rows: calc(158 * var(--u));
  gap: calc(12 * var(--u)) calc(14 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}
.mm-roster > li:nth-child(19) { grid-column-start: 2; }

/* Tile: thin steel frame, portrait window, dark name bar with the
   fighter's name; P1 tag on the picked fighter; amber rim + glow on focus;
   unavailable = disabled, desaturated, dimmed. */
/* review83 R83-04: a compact steel housing, not a thin rounded outline —
   chamfered corners, directional steel rim (lit upper left), a dark hairline
   recess inside it, and a separately recessed name well. */
/* candidate131 (USER131-06): every tile corner is cut, as the reference
   fighter panels — rim, well, portrait window, name well and stage art. */
.mm-tile,
.mm-thumb {
  --ch: calc(10 * var(--u));
  --tile-rim: linear-gradient(145deg, #e6ebf3 0%, #a3adc0 26%, #4c5569 64%, #2a3142 82%, #8d97ab 100%);
}
.mm-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  isolation: isolate;
}
.mm-tile::before,
.mm-tile::after,
.mm-thumb::before,
.mm-thumb::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
}
.mm-tile::before,
.mm-thumb::before { inset: 0; background: var(--tile-rim); }
.mm-tile::after,
.mm-thumb::after {
  inset: calc(3.5 * var(--u));
  background: linear-gradient(180deg, #02040b 0%, #0b1428 50%, #15223f 100%);
  box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgb(3 6 14 / 0.95), inset 0 calc(5 * var(--u)) calc(7 * var(--u)) rgb(0 0 0 / 0.6);
}
.mm-tile .mm-portrait {
  --pw: 171;
  --ph: 104;
  --cw: 104;
  left: calc(3.5 * var(--u));
  top: calc(3.5 * var(--u));
  width: calc(171 * var(--u));
  height: calc(104 * var(--u));
  clip-path: polygon(calc(9 * var(--u)) 0, calc(100% - calc(9 * var(--u))) 0, 100% calc(9 * var(--u)), 100% 100%, 0 100%, 0 calc(9 * var(--u)));
}
.mm-tile .mm-portrait::after { display: none; }
.mm-tile__name {
  position: absolute;
  left: calc(3.5 * var(--u));
  right: calc(3.5 * var(--u));
  bottom: calc(3.5 * var(--u));
  height: calc(47 * var(--u));
  display: grid;
  place-items: center;
  /* candidate182 (USER182-14): a name wider than the bar start-aligns
     instead of spilling both ways, so scrollWidth reports all of the
     overflow and the measured fit (28/26/24, then two lines) cannot accept
     a clipped name at any scale or zoom (fallback: plain centre) */
  place-items: safe center;
  padding: 0 calc(6 * var(--u));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - calc(9 * var(--u))), calc(100% - calc(9 * var(--u))) 100%, calc(9 * var(--u)) 100%, 0 calc(100% - calc(9 * var(--u))));
  background: linear-gradient(180deg, #03060f, #0a1122 60%, #111b33);
  /* recessed well: dark cut under the portrait, faint lower lip */
  box-shadow: inset 0 calc(2.5 * var(--u)) 0 rgb(0 0 0 / 0.85), inset 0 calc(3.5 * var(--u)) 0 rgb(150 166 196 / 0.28), inset 0 calc(-1.5 * var(--u)) 0 rgb(150 166 196 / 0.18);
  color: #f1f4f9;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(var(--fs, 28) * var(--u)));
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: pre-line;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
.mm-tile__p1 {
  position: absolute;
  right: calc(8 * var(--u));
  top: calc(4 * var(--u));
  display: none;
  color: #ff8a5c;
  font-size: calc(38 * var(--u));
  text-shadow: 0 0 calc(3 * var(--u)) #2a0600, calc(2 * var(--u)) calc(3 * var(--u)) 0 #2a0600;
}
.mm-tile[data-picked] .mm-tile__p1 { display: block; }
.mm-select[data-target="cpu"] .mm-tile__p1 { font-size: calc(30 * var(--u)); }
.mm-tile[data-picked] {
  --tile-rim: linear-gradient(160deg, #ffd27a 0%, #d9731a 50%, #ffb347 100%);
}
.mm-tile[data-picked]::after { background: linear-gradient(180deg, #2a0e05, #4a1e0c 60%, #5a260e); }
.mm-tile:is(:focus, [data-selected]) {
  --tile-rim: linear-gradient(160deg, #fff4c6 0%, #ffc540 30%, #ff8a00 70%, #ffd060 100%);
  z-index: 1;
}
/* candidate166 (USER166-20): the tile glow is its own layer under the tile
   (the slot's ::before) instead of a drop-shadow filter: the PICKED fighter
   breathes softly (section 12c), the FOCUSED tile holds a brighter steady
   glow. No glove is added for "picked" — the one glove stays on focus. */
:is(.mm-tile-slot, .mm-thumb-slot)::before {
  content: "";
  position: absolute;
  inset: calc(-10 * var(--u));
  z-index: 0;
  border-radius: calc(18 * var(--u));
  background: radial-gradient(closest-side, rgb(255 150 30 / 0.55), rgb(255 120 0 / 0.22) 62%, rgb(255 110 0 / 0) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms linear;
}
.mm-tile-slot:has(> .mm-tile[data-picked])::before { opacity: 0.6; }
:is(.mm-tile-slot, .mm-thumb-slot):has(> .mm-act:is(:focus, [data-selected]))::before { opacity: 1; animation: none; }
.mm-tile:disabled { filter: none; cursor: not-allowed; }
.mm-tile:disabled .mm-portrait { filter: grayscale(1) brightness(0.4); }
.mm-tile:disabled .mm-tile__name { color: #7d8699; }

/* P1 card (bottom-left): red card, the whole authentic portrait, name
   plate. For the CPU slot (Practice) the tag reads CPU. */
/* review116 R116-01: a clean lane for the host's live status line. The
   host places it in viewport units (left 2%, bottom 1%, 11-19px), so in
   stage units its top edge lands at about 1033 (844x390), 1044 (1280x720),
   1046 (1920x1080) and 1052 (2560x1440), while this card's lower lip and
   glow reached about 1054. The card is drawn at 94% from its top-left corner
   (lower lip about 1022) and at 88% on short phone-landscape containers
   (about 993, below). Proportions, P1 corner, name plate and left alignment
   are kept; the status text itself is not touched. */
.mm-p1card { --x: 95; --y: 660; --w: 530; --h: 385; margin: 0; scale: 0.94; transform-origin: 0 0; }
/* candidate131 (USER131-04) → candidate166 (USER166-03/04/25/26, reference
   view 2 x95-626 y665-1052, measured): the reference silhouette — a small
   upper-left chamfer (15), the broad upper-right shoulder (462,0 -> 530,86),
   a small lower-right chamfer and the LARGE lower-left chamfer (0,340 ->
   45,385) that the name plate's slant echoes. The red frame band carries the
   P1 tab (the frame widens into the upper-left step, as the reference), the
   field is translucent (0.78) with inner shading (a soft dark inner edge, a
   top-lit sheen), and the art is clipped to the field's own polygon so no
   part of any portrait escapes into the frame (Ice Climbers' lower-right
   parka). The name plate is taller (79) and reaches the inner frame on the
   right; the name is centred on the plate's optical centre with a size from
   the host's --fs that keeps any name within the plate's 360 px.
   Same box as before, so the R116-01 lane (scale above and in 11a) is
   unchanged. */
.mm-p1-glow { fill: none; stroke: #ff3a1a; stroke-width: 12; stroke-opacity: 0.2; }
.mm-p1-lip { fill: url(#mm-g-p1-frame); fill-opacity: 0.92; stroke: #ffc2b4; stroke-opacity: 0.75; stroke-width: 2; }  /* red frame band, fine light outer edge */
.mm-p1-face { fill: url(#mm-g-p1); fill-opacity: 0.78; }                              /* translucent field */
.mm-p1-shade { fill: none; stroke: #140103; stroke-width: 34; stroke-opacity: 0.3; }  /* soft inner shadow (clipped to the field) */
.mm-p1-shade--near { stroke-width: 12; stroke-opacity: 0.38; }
.mm-p1-sheen { fill: url(#mm-g-p1-sheen); }
.mm-p1-bevel { fill: none; stroke: #2a0306; stroke-width: 5; stroke-opacity: 0.9; }    /* dark cut inside the frame */
.mm-p1-edge { fill: none; stroke: url(#mm-g-p1-edge); stroke-width: 1.5; }
.mm-p1-plate { fill: url(#mm-g-strip-face); fill-opacity: 0.95; }
.mm-p1-plate-edge { fill: none; stroke: url(#mm-g-steel); stroke-width: 2.5; }
.mm-p1-plate-lit { fill: none; stroke: rgb(170 190 230 / 0.22); stroke-width: 1.5; }
/* candidate182 (USER182-10/11): the tab's "P1" (restored element) is light
   on the red frame (the 166 salmon ink all but vanished into it) and centred
   in the tab (caps y ~28-66 of 0-96). */
.mm-p1card__tag {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(22 * var(--u));
  color: #fff1ec;
  font-size: calc(52 * var(--u));
  text-shadow: 0 0 calc(3 * var(--u)) #2a0204, calc(3 * var(--u)) calc(4 * var(--u)) 0 #2a0204;
}
/* Art window (review83 R83-03): head and upper body, right-aligned so the
   portrait's source cut edge meets the card's inner edge, ending at the name
   plate, which is a separate opaque layer above it. 336 px wide = 2.47x. */
.mm-p1card__art {
  left: calc(178 * var(--u));
  top: calc(16 * var(--u));
  width: calc(336 * var(--u));
  height: calc(354 * var(--u));
  /* candidate166 (USER166-04): clipped to the field polygon itself (the
     shoulder at the top right AND the lower-right chamfer), so nothing
     escapes past the inner frame; runs down behind the name plate */
  clip-path: polygon(0 0, calc(277 * var(--u)) 0, 100% calc(77 * var(--u)), 100% calc(342 * var(--u)), calc(324 * var(--u)) 100%, 0 100%);
  background: var(--mm-portrait, none) calc(var(--p1-x, 0) * var(--u)) calc(var(--p1-y, 0) * var(--u)) / 100% auto no-repeat;
  filter: drop-shadow(calc(6 * var(--u)) calc(8 * var(--u)) calc(4 * var(--u)) rgb(0 0 0 / 0.45));
}
.mm-p1card__art::after { display: none; }
/* candidate182 (USER182-18): per-fighter framing hook (--p1-x / --p1-y,
   stage px). Measured on the 25 costume-0 portraits over the part shown
   above the name plate: every figure meets the card's inner right edge or
   comes within 7.4 px of it (Peach 4.9, Link 7.4, Zelda 7.4), except Yoshi,
   whose figure stays at least 29.6 px off it (it meets the source's cut edge
   only below the plate), so it floated left of Fox / Ice Climbers / Dr. Mario.
   Moved 24 right and 6 down it comes within 5.6 px and clears the shoulder
   chamfer by 4.7 px. Geometry only; the rendered card needs review. */
.mm-p1card__art[data-fighter="yoshi"] { --p1-x: 24; --p1-y: 6; }
/* USER166-25: on the plate's optical centre (x 310 allows for the italic
   overhang padding), one line always; 64 max, and never wider than the
   plate: the host's --fs = min(72, 400 / (0.565 x length)) scaled by 0.9
   bounds any name to ~360 px (DR. MARIO 64, ICE CLIMBERS 52, MR. GAME &
   WATCH 40). candidate202 (USER202-03): the plate now ends on the inner
   field's own bottom and right edges (y 370, x 514; 5 higher), so the name
   follows the plate's new optical centre. */
.mm-p1card__name {
  --lx: 307;
  --ly: 331;
  --fs: 72;
  font-size: calc(min(64, var(--fs) * 0.9) * var(--u));
  text-transform: uppercase;
}
.mm-select[data-target="cpu"] .mm-p1card__tag { top: calc(27 * var(--u)); font-size: calc(40 * var(--u)); }
/* candidate206 (review201 R201-05): as the Mode plaque: a long identity
   puts its costume on a smaller second line and the fighter name alone sets
   the size (MR. GAME & WATCH ~40 stage px, was ~24), centred on the plate
   (two lines ~62 px in the 79 px plate). Short labels stay one line. */
.mm-p1card__name[data-lines="2"] {
  white-space: pre-line;
  text-align: center;
  line-height: 0.95;
  font-size: max(var(--mm-min-fs), calc(26 * var(--u)));
}
.mm-p1card__name[data-lines="2"]::first-line { font-size: calc(min(46, var(--fs) * 0.9) * var(--u)); }

/* READY TO FIGHT banner (bottom-right): the Ready action. Tilted to the
   banner's slope; hidden while no fighter is picked. */
.mm-ready { --x: 640; --y: 690; --w: 1300; --h: 250; }
.mm-ready:disabled { visibility: hidden; }
/* candidate131 (USER131-05, reference view 2 x640-1920 y690-940; supersedes
   the review83 rim-only glow): a shallow band (about 3 deg, ~160 tall), a
   broad static red bloom (wide low-alpha strokes, no blur filter), red
   speed-tail panels running out to the right, gold italic text and the
   adaptive hint beneath. */
.mm-r-bloom { fill: none; stroke: #ff2a10; stroke-width: 76; stroke-opacity: 0.05; stroke-linejoin: round; }
.mm-r-bloom--near { stroke-width: 42; stroke-opacity: 0.09; }
.mm-r-glow { fill: none; stroke: #ff3a1a; stroke-width: 18; stroke-opacity: 0.24; stroke-linejoin: round; }
.mm-r-face { fill: url(#mm-g-ready); }
.mm-r-dark { fill: none; stroke: #1a0304; stroke-width: 5; }
/* candidate144 (review146 R146-02, reference view 2 x1690-1920 y700-850):
   the 131 tails started past x 1100 of the banner and faded in from
   transparent, so on a 1920 screen only their invisible start was on screen.
   Now ONE broad translucent red face inside the band, rising in behind the
   "!" and running out with the band (fixed to the banner's own coordinates,
   so it is visible on every screen width), and a narrower lower panel.
   Static fills, no blur. */
.mm-r-tail { fill: url(#mm-g-ready-tail); }
/* candidate166 (USER166-27): the broad tail face sits in the band's upper
   part (22-104 below its top, as the reference), the lower panel is only a
   faint haze, and a thin speed line runs just above the band on the right. */
.mm-r-tail--low { opacity: 0.3; }
.mm-r-edge--speed { stroke-width: 2; opacity: 0.55; }
/* a light streak crossing the tail faces (section 12c), clipped to the band.
   candidate182 (USER182-15): the layer runs on to the band's own end (x 2300
   of the banner, stage x 2940; clip polygon unchanged) instead of stopping at
   the banner box, and the streak travels exactly to the ACTUAL right screen
   edge at every aspect ratio and safe area (--mm-streak-run, from the root
   container's width), so it is visible all the way to the edge and never
   widens the page (the root clips). */
.mm-ready__streaks {
  position: absolute;
  inset: calc(-60 * var(--u)) calc(-1000 * var(--u)) 0 0;
  overflow: hidden;
  pointer-events: none;
  clip-path: polygon(calc(150 * var(--u)) calc(110 * var(--u)), calc(2300 * var(--u)) calc(2.5 * var(--u)), calc(2300 * var(--u)) calc(160 * var(--u)), calc(60 * var(--u)) calc(272 * var(--u)));
}
.mm-ready__streaks > i {
  /* candidate202 (USER202-07): starts left of the band's left end (x -200 of
     the banner, stage x 440; was 700, behind the "F") and crosses the WHOLE
     banner until its lower-left corner has passed the screen's right edge
     (100cqw of the root container) */
  --mm-streak-run: calc(50cqw - (var(--mm-safe-l) - var(--mm-safe-r)) / 2 + 580 * var(--u));
  position: absolute;
  left: calc(-200 * var(--u));
  top: 0;
  width: calc(220 * var(--u));
  height: calc(320 * var(--u));
  background: linear-gradient(90deg, rgb(255 90 50 / 0), rgb(255 120 80 / 0.22) 42%, rgb(255 210 170 / 0.3) 50%, rgb(255 120 80 / 0.2) 58%, rgb(255 90 50 / 0));
  transform: skewX(-18deg);
  opacity: 0;
}
.mm-r-edge { fill: none; stroke: #ff4b2b; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 3px rgb(255 60 30 / 0.9)); }
/* candidate182 (USER182-12): back to the 153 placement the user approved:
   along the band's own ~2.9 deg and inside it (166's 5 deg tilt from x 150
   pushed the first letters out over the band's left end). The Ready motion
   is unchanged. */
.mm-ready__text {
  position: absolute;
  left: calc(180 * var(--u));
  top: calc(76 * var(--u));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-amber);
  font-size: calc(124 * var(--u));
  text-transform: uppercase;
  rotate: -2.9deg;
  transform-origin: 0 50%;
  filter: drop-shadow(0 calc(-1 * var(--u)) 0 rgb(255 242 204 / 0.4)) drop-shadow(0 0 calc(1.5 * var(--u)) rgb(40 12 0 / 0.8)) drop-shadow(calc(3 * var(--u)) calc(5 * var(--u)) 0 rgb(24 7 0 / 0.95));
}
/* candidate182 (USER182-13): parallel to the band's lower edge and below
   it (153 placement): caps ~22 px under the red edge line along their whole
   length, roughly centred under the words (166's placement crossed the edge). */
.mm-ready__hint {
  position: absolute;
  left: calc(350 * var(--u));
  top: calc(214 * var(--u));
  color: #7f8aa3;
  font-size: calc(44 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: -2.9deg;
  transform-origin: 0 50%;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
.mm-ready:is(:focus, [data-selected]) .mm-r-glow { stroke-opacity: 0.45; stroke-width: 22; }
.mm-ready:is(:focus, [data-selected]) .mm-r-bloom { stroke-opacity: 0.08; }
.mm-ready:is(:focus, [data-selected]) .mm-r-bloom--near { stroke-opacity: 0.15; }
.mm-ready:is(:focus, [data-selected]) .mm-ready__hint { color: #c9d1df; }

/* Practice setup (reference view 4). */
.mm-thumbs__title { --lx: 1420; --ly: 80; --fs: 54; text-transform: uppercase; }
.mm-stageview {
  --x: 125;
  --y: 143;
  --w: 755;
  --h: 466;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: calc(6 * var(--u));
  background:
    repeating-linear-gradient(0deg, rgb(80 120 212 / 0.12) 0 1px, transparent 0 calc(34 * var(--u))),
    repeating-linear-gradient(90deg, rgb(80 120 212 / 0.12) 0 1px, transparent 0 calc(34 * var(--u))),
    radial-gradient(ellipse 80% 70% at 50% 45%, #111c3a, #050a18 80%);
  box-shadow:
    0 0 0 calc(3 * var(--u)) #9aa4b8,
    0 0 0 calc(6 * var(--u)) rgb(3 6 14 / 0.9),
    inset 0 calc(6 * var(--u)) calc(14 * var(--u)) rgb(0 0 0 / 0.6);
}
.mm-stageview__art { display: none; }
.mm-stageview__art[data-has-art] {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--mm-stage-art) center / cover no-repeat;
}
.mm-stageview__pending {
  margin: 0;
  color: #7d879c;
  font-family: var(--mm-font-body);
  font-size: calc(30 * var(--u));
  font-style: italic;
  text-align: center;
}
.mm-stageview__name { --lx: 502; --ly: 668; --fs: 84; text-transform: uppercase; }
.mm-stageview__name[data-lines="2"] { white-space: pre-line; line-height: 1; text-align: center; }

/* candidate202 (USER202-08): the stage grid shares the selected-stage view's
   top and bottom (y 143-609) and ONE 23 px gutter throughout: between rows,
   between columns, and between the view's outer ring (x 886) and the grid;
   the visible outer margins match (119 left, 119 right). */
.mm-thumbs {
  --x: 909;
  --y: 143;
  --w: 892;
  --h: 466;
  display: grid;
  grid-template-columns: repeat(5, calc(160 * var(--u)));
  grid-auto-rows: calc(140 * var(--u));
  gap: calc(23 * var(--u));
  margin: 0;
  padding: 0;
  list-style: none;
}
.mm-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.mm-thumb__art { display: none; }
.mm-thumb__art[data-has-art] {
  display: block;
  position: absolute;
  inset: calc(3.5 * var(--u));
  clip-path: polygon(calc(9 * var(--u)) 0, calc(100% - calc(9 * var(--u))) 0, 100% calc(9 * var(--u)), 100% calc(100% - calc(9 * var(--u))), calc(100% - calc(9 * var(--u))) 100%, calc(9 * var(--u)) 100%, 0 calc(100% - calc(9 * var(--u))), 0 calc(9 * var(--u)));
  background: var(--mm-stage-art) center / cover no-repeat;
}
.mm-thumb__name {
  padding: 0 calc(10 * var(--u));
  color: #e6ebf3;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(22 * var(--u)));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
/* A card with its original thumbnail shows only the image (the name stays
   as the button's accessible label); a failed load is a visible failure. */
.mm-thumb:has(.mm-thumb__art[data-has-art]) .mm-thumb__name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mm-thumb__art[data-asset-error] {
  background: repeating-linear-gradient(135deg, rgb(255 60 60 / 0.25) 0 calc(6 * var(--u)), transparent 0 calc(12 * var(--u)));
  outline: calc(3 * var(--u)) dashed #ff3b3b;
  outline-offset: calc(-3 * var(--u));
}
.mm-thumb[data-picked] { --tile-rim: linear-gradient(160deg, #ffd27a 0%, #d9731a 50%, #ffb347 100%); }
.mm-thumb[data-picked]::after { background: linear-gradient(180deg, #2a0e05, #4a1e0c 60%, #5a260e); }
.mm-thumb:is(:focus, [data-selected]) {
  --tile-rim: linear-gradient(160deg, #fff4c6 0%, #ffc540 30%, #ff8a00 70%, #ffd060 100%);
  z-index: 1;
}
.mm-thumb:disabled { filter: none; cursor: not-allowed; }
.mm-thumb:disabled .mm-thumb__name { color: #5f687b; }
/* review100 R100-01: an unavailable stage stays unmistakably unavailable
   when it has original art — the same greyscale + dimming as unavailable
   roster portraits (artwork never implies availability). */
.mm-thumb:disabled .mm-thumb__art { filter: grayscale(1) brightness(0.4); }

/* The one setup unit. candidate131 (USER131-13/14/15, reference view 4
   x95-1795 y728-1004): ONE angular unit — a blunt-ended bar (short
   chamfers, not long points) holding YOU / VS / CPU / CPU LEVEL, and a tab
   below its middle holding START PRACTICE (same group, after the level
   control, so the Start action and focus order are unchanged). The bar face
   is divided by slanted dark gaps into full-height zones — not floating
   islands — and focus lights its zone. */
/* candidate202 (USER202-09): the tab is 10 deeper (its sides extended along
   their own slopes, markup) and START PRACTICE sits 10 lower in it, so the
   YOU / CPU / CPU LEVEL zones' lower edges (y 147) show above Start (18 px
   clear, was 8). Unit bottom stage y 1018: 62 px above the screen edge. */
.mm-setup { --x: 95; --y: 728; --w: 1700; --h: 290; margin: 0; }
.mm-setup__face { fill: url(#mm-g-panel-face); }
.mm-setup__band { fill: none; stroke: url(#mm-g-band); stroke-width: 12; stroke-linejoin: miter; }
.mm-setup__zone { fill: url(#mm-g-setup-zone); stroke: rgb(140 162 214 / 0.2); stroke-width: 1.5; }
/* candidate166 (USER166-07, reference view 4 measured): the tab is the
   reference's housing — a "<" chevron on its left (513,156 -> 457,247 ->
   477,280) and a parallel slant on its right (1273,156 -> 1190,280) — centred
   under the unit (not 17 px left of centre); its edge is the Start amber
   while the bar keeps steel. */
.mm-setup__tabline { fill: none; stroke: url(#mm-g-steel-dim); stroke-width: 3; stroke-linejoin: miter; }
.mm-setup:has(.mm-act--startwide:enabled) .mm-setup__tabline { stroke: url(#mm-g-amber); stroke-opacity: 0.85; }
.mm-setup:has(.mm-slot--you:is(:focus, [data-selected])) .mm-setup__zone--you,
.mm-setup:has(.mm-slot--cpu:is(:focus, [data-selected])) .mm-setup__zone--cpu,
.mm-setup:has(.mm-levelctl:is(:focus, [data-selected])) .mm-setup__zone--level {
  fill: url(#mm-g-setup-zone-a);
  stroke: #ffb52c;
  stroke-width: 3;
}
.mm-slot {
  position: absolute;
  top: calc(20 * var(--u));
  height: calc(116 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: 0 calc(16 * var(--u));
  border-radius: calc(8 * var(--u));
}
.mm-slot--you { left: calc(55 * var(--u)); width: calc(460 * var(--u)); justify-content: center; }
.mm-slot--cpu { left: calc(714 * var(--u)); width: calc(400 * var(--u)); }
.mm-slot .mm-portrait {
  --pw: 96;
  --ph: 104;
  --cw: 80;
  position: relative;
  flex: none;
  width: calc(96 * var(--u));
  height: calc(104 * var(--u));
}
.mm-slot__label {
  color: #c9d1df;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(42 * var(--u));
  font-style: italic;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.mm-slot__name {
  min-width: calc(150 * var(--u));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-silver);
  font-size: calc(var(--fs, 50) * var(--u));
  text-transform: uppercase;
  filter: drop-shadow(calc(2 * var(--u)) calc(3 * var(--u)) 0 rgb(2 5 14 / 0.85));
}
/* review112 R112-01: the YOU identity keeps fighter-name scale. A long
   "Fighter / Costume" label (live: "Mario / Color 2") never shrinks to one
   line of fine print: the size is floored at 34, the name wraps (up to three
   lines in the 230-wide name box) and its first line — the fighter — is at
   least 44. Works with the host's current --fs and with a label that puts
   the costume after a line break (white-space: pre-line). */
.mm-slot--you .mm-slot__name {
  min-width: 0;
  max-width: calc(230 * var(--u));
  font-size: max(calc(34 * var(--u)), calc(var(--fs, 50) * var(--u)));
  line-height: 1.02;
  white-space: pre-line;
}
.mm-slot--you .mm-slot__name::first-line { font-size: max(calc(44 * var(--u)), 1em); }
.mm-slot--cpu .mm-slot__label { margin-left: calc(4 * var(--u)); }
/* A slot the host does not let the player change (e.g. the Practice CPU while
   only Mario is admitted) is display-only: not focusable, not dimmed. */
.mm-slot:disabled { filter: none; cursor: default; }
/* candidate144 (review146 R146-01): centred on the YOU / CPU row (slot
   centre y 78), not on the whole unit, which since 131 includes the Start
   tab; horizontally in the gap between the YOU and CPU zones. */
.mm-setup__vs {
  position: absolute;
  left: calc(578 * var(--u));
  top: calc(78 * var(--u));
  translate: 0 -50%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-blue);
  font-size: calc(56 * var(--u));
}
/* candidate166 (USER166-08, reference ◀ 100 · CPU LEVEL · 40 · 5 · 105 ▶):
   the caption and value are ONE centred group between the arrows, with a
   fixed 28 px gap between them, instead of the caption pushed against the
   value and the left arrow stranded. The zone keeps its own width, so a long
   YOU label never squeezes it. */
.mm-levelctl {
  position: absolute;
  left: calc(1160 * var(--u));
  top: calc(20 * var(--u));
  width: calc(490 * var(--u));
  height: calc(116 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0 calc(14 * var(--u));
  border-radius: calc(8 * var(--u));
  outline: none;
}
.mm-levelctl__step {
  display: grid;
  place-items: center;
  width: calc(56 * var(--u));
  height: calc(80 * var(--u));
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.mm-levelctl__step svg { width: 70%; height: 70%; }
.mm-levelctl__step polygon { fill: #ffae2b; stroke: #3a1a02; stroke-width: 2; }
.mm-levelctl__step[data-end] polygon { fill: #4d566b; stroke: #0a1024; }
.mm-levelctl__label {
  flex: 0 1 auto;
  margin-left: auto;
  color: #d7dde8;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: calc(38 * var(--u));
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}
.mm-levelctl__value {
  min-width: calc(50 * var(--u));
  margin: 0 auto 0 calc(28 * var(--u));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--mm-tx-silver);
  font-size: calc(56 * var(--u));
  text-align: center;
}
/* Focus on a setup control lights its zone (above); the level value turns
   amber. */
.mm-levelctl:is(:focus, [data-selected]) .mm-levelctl__value { background-image: var(--mm-tx-amber); }

/* candidate166 (USER166-06, reference view 4 x581-1321 y883-988): the
   reference button in the reference place — its top flush with the bar,
   centred under the unit, "<" point near its lower left, 105 tall — with
   the full layered effect: dark cut, orange face (not pale yellow), bright
   yellow inner rim, amber edge, outer glow (steady when enabled, stronger
   on focus) and two small top/bottom glints; a light sweep crosses it
   (section 12c). */
.mm-act--startwide { --x: 478; --y: 160; --w: 744; --h: 112; }   /* in the setup unit's tab; candidate202: 10 lower, still centred (x 850) and nested 29 px inside the tab's chevron */
.mm-act--startwide .mm-cta { --lx: 372; --ly: 58; --fs: 68; }
.mm-act--startwide .mm-c-bevel { stroke-width: 11; }
.mm-start-glint { fill: url(#mm-g-start-glint); opacity: 0; }
.mm-act--startwide:enabled .mm-start-glint { opacity: 0.9; }
.mm-act--startwide:enabled .mm-f-glow { opacity: 0.55; }
.mm-act--startwide:enabled .mm-f-glow2 { opacity: 0.5; }
.mm-act--startwide:enabled:is(:focus, [data-selected]) :is(.mm-f-glow, .mm-f-glow2) { opacity: 1; }
.mm-start__sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  clip-path: polygon(calc(59 * var(--u)) calc(5 * var(--u)), calc(737 * var(--u)) calc(5 * var(--u)), calc(743 * var(--u)) calc(20 * var(--u)), calc(688 * var(--u)) calc(105 * var(--u)), calc(683 * var(--u)) calc(110 * var(--u)), calc(12 * var(--u)) calc(110 * var(--u)), calc(2 * var(--u)) calc(95 * var(--u)));
}
.mm-start__sheen > i {
  position: absolute;
  left: 0;
  top: calc(-20 * var(--u));
  width: calc(120 * var(--u));
  height: calc(152 * var(--u));
  background: linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 248 220 / 0.42) 50%, rgb(255 255 255 / 0));
  transform: skewX(-24deg);
  translate: calc(-180 * var(--u)) 0;
  opacity: 0;
}
/* candidate128 (reference view 4): once the setup can start, START PRACTICE
   shows the reference's orange launch face, the same ready amber as READY TO
   FIGHT! on the character select. Focus adds the amber glow, stronger here
   (as on the Ready banner) because the face is already amber. While
   disabled it stays dim steel. */
.mm-act--startwide:enabled {
  --cta-face: url(#mm-g-start-face);
  --cta-edge: url(#mm-g-amber);
  --cta-ink: #1f0e00;
  --cta-bevel: #ffd63a;
}
.mm-act--startwide:is(:focus, [data-selected]) .mm-f-glow { stroke-opacity: 0.5; }
/* review112 R112-02: one line higher than the reference's footnote so the
   host's live status line (bottom-left, e.g. "Selected color portrait
   unavailable…") has its own clear line below it instead of overprinting. */
.mm-footnote {
  position: absolute;
  left: calc(40 * var(--u));
  top: calc(1002 * var(--u));
  translate: 0 -50%;
  margin: 0;
  color: #b8c1d2;
  font-family: var(--mm-font-body);
  font-size: max(var(--mm-min-fs), calc(30 * var(--u)));
  font-style: italic;
}

/* Pause / leave: a veil over the live canvas, one centred panel. */
.mm-root[data-overlay] { background: transparent; }
.mm-root[data-overlay] .mm-backdrop { background: rgb(3 6 16 / 0.74); }
.mm-root[data-overlay] .mm-gridlight { display: none; }   /* candidate202: no grid under the pause veil */
/* title-card01: nor any band or orbit layer, on any screen: over the live
   game there is only the veil and the panel */
.mm-root[data-overlay] .mm-stage::before,
.mm-root[data-overlay] .mm-stage::after { display: none; }
.mm-pausepanel { --x: 510; --y: 250; --w: 900; --h: 560; margin: 0; }
/* 330: same header well and cap centring as the Weekly Leaderboard title. */
.mm-pausepanel__title { --lx: 450; --ly: 74; --fs: 60; translate: -50% -48.17%; text-transform: uppercase; }
.mm-pausepanel__detail {
  position: absolute;
  left: calc(40 * var(--u));
  right: calc(40 * var(--u));
  top: calc(180 * var(--u));
  translate: 0 -50%;
  margin: 0;
  color: #c9d1df;
  font-family: var(--mm-font-body);
  font-size: calc(34 * var(--u));
  text-align: center;
}
/* failed-menu-presentation-repair01: a long detail (a compound failure cause)
   stays complete in its own face and size between the title rule (y 120) and
   the first action (y 250). The detail keeps its centre and grows to three
   lines, so up to three lines render as before; beyond that it scrolls in
   place. The host makes only an overflowing detail a focus target
   (custom-ui.mjs) and the menu's Up/Down page through it (custom-ui-input.mjs). */
.mm-pause .mm-pausepanel__detail {
  max-height: calc(3lh + 1px);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: var(--mm-ink-2) transparent;
}
.mm-pause .mm-pausepanel__detail:focus { outline: calc(3 * var(--u)) solid var(--mm-amber); outline-offset: calc(4 * var(--u)); }
.mm-root:is([data-input="pointer"], [data-input="touch"]) .mm-pause .mm-pausepanel__detail:focus { outline: none; }
.mm-pausepanel .mm-act--resume { --x: 230; --y: 250; }
.mm-pausepanel .mm-act--leave { --x: 230; --y: 392; }
/* candidate227 (USER227-03): pause-panel wedge labels (Done, Resume, Reload
   menu, Enter match, Main menu, Leave match, Controls) sit on the face's
   optical centre: x 212 is the middle of the face at cap height, where the
   left side slants in and the right side out. Symmetric padding replaces the
   display type's 0.04 / 0.16 em, so the ink, not the box, is centred. The host
   sets --fs so a label spans at most 296 of the face's ~360 stage px, clear of
   the glove at the right end (RELOAD MENU 47, short labels 52). The Queue and
   Results wedges keep their approved labels. */
.mm-pausepanel .mm-act--wedge .mm-cta { --lx: 212; padding: 0 0.1em; }

.mm-root[data-page="loading"] .mm-pausepanel__detail { top: calc(250 * var(--u)); }
.mm-root:not([data-page="loading"]) .mm-pausepanel .mm-meter,
.mm-root[data-boot] .mm-pausepanel .mm-meter { display: none; }
/* loader-polish: one pass per 2.4 s, then a short dark beat. The light blooms
   as a short glint at the left, draws its tail out while it accelerates
   (0-32%), glides and settles at the right as the tail gathers back into the
   nose (32-84%), dims, and rests (84-100%). The nose runs from 44 to 500 on
   the 520 rail. The two easings meet at the same speed (1.8 * 156 / 32 =
   1.52 * 300 / 52), so the pass is one continuous movement. Transform and
   opacity only. */
@keyframes mm-load-run {
  0% { opacity: 0; transform: translateX(calc(-282 * var(--u))) scaleX(0.45); animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.55); }
  10% { opacity: 1; }
  32% { transform: translateX(calc(-126 * var(--u))) scaleX(1); animation-timing-function: cubic-bezier(0.25, 0.38, 0.45, 1); }
  66% { opacity: 1; }
  84%, 100% { opacity: 0; transform: translateX(calc(174 * var(--u))) scaleX(0.45); }
}
/* the static boot view hands over without replaying the entrance */
.mm-root[data-boot] .mm-screen > .mm-stage,
.mm-root[data-boot] .mm-screen .mm-pausepanel { animation: none; }
/* candidate232 (fonts, no fallback; supersedes 230's pending valve): UI text is
   only ever drawn in its LOADED bundled face. data-fonts is "pending" from the
   first paint (index.html) until the loading panel's two faces have loaded,
   and "failed" if any required face fails; the host clears it only on success.
   While it is set, the loading and error panels show fixed outlines of the
   same faces (index.html .mm-outlines, tools/make-outlines.py: no font request,
   never a default face) and their live text, prompt band, status line and the
   rotate cover's text stay visually hidden. Opacity keeps the live text in the
   accessibility tree; the outlines are aria-hidden. No timer reveals live
   text. The only timed item is the late note, itself an outline (25 s, as 227). */
.mm-root[data-fonts] :is(.mm-pausepanel__title, .mm-pausepanel__detail, .mm-pause .mm-cta, .mm-rotate__title, .mm-rotate__detail, .mm-live-feedback) { opacity: 0; }
.mm-root[data-fonts] .mm-pause .mm-prompts { visibility: hidden; }
.mm-outlines { position: absolute; inset: 0; pointer-events: none; }
.mm-ol-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* each outline is centred on the content-area centre of the live text it
   stands in for (same face metrics), so the hand-over to live text keeps place */
.mm-ol {
  position: absolute;
  display: none;
  left: calc(var(--ol-x) * var(--u));
  top: calc(var(--ol-y) * var(--u));
  width: auto;
  height: calc(var(--ol-fs) * var(--ol-h) * var(--u));
  translate: -50% -50%;
  overflow: visible;
}
.mm-ol--title-loading,
.mm-ol--title-error {           /* .mm-pausepanel__title: lx 450, ly 74 cap-centred, fs 60 */
  --ol-x: 450; --ol-y: 75.1; --ol-fs: 60; --ol-h: 1.1641;
  fill: url(#mm-ol-silver);
  filter: drop-shadow(0 0 calc(1.5 * var(--u)) rgb(0 0 0 / 0.55)) drop-shadow(calc(2 * var(--u)) calc(4 * var(--u)) 0 var(--mm-tx-shadow));
}
.mm-ol--reload {                /* error wedge label: wedge (230, 250) + lx 212 / ly 55 cap-centred, fs 47 */
  --ol-x: 442; --ol-y: 305.9; --ol-fs: 47; --ol-h: 1.1641;
  fill: #101a36;
  filter: drop-shadow(0 calc(2 * var(--u)) 0 rgb(255 255 255 / 0.4));
}
.mm-pausepanel:has(.mm-act--resume:is(:focus, [data-selected])) .mm-ol--reload { fill: #2a1300; }
.mm-ol--status { --ol-x: 450; --ol-y: 250; --ol-fs: 34; --ol-h: 1.2; fill: #c9d1df; }   /* loading detail */
.mm-ol--late,
.mm-ol--noscript {
  --ol-x: 450; --ol-y: 430;
  height: calc(max(var(--mm-min-fs), calc(26 * var(--u))) * 1.2);
  max-width: calc(740 * var(--u));
  fill: var(--mm-ink-2);
}
.mm-root[data-fonts][data-page="loading"] :is(.mm-ol--title-loading, .mm-ol--status),
.mm-root[data-fonts][data-page="error"] .mm-ol--title-error,
.mm-root[data-fonts][data-page="error"] .mm-pausepanel:has(.mm-act--resume[data-action="reload"]) .mm-ol--reload { display: block; }   /* review R232-04: only on the Reload wedge */
/* still loading after 25 s (for example a module that never loads): a truthful
   note, shown in both motion settings; it has its own accessible name */
.mm-root[data-fonts="pending"][data-page="loading"] .mm-ol--late {
  display: block;
  visibility: hidden;
  animation: mm-boot-late 1ms linear 25s forwards !important;
}
@keyframes mm-boot-late { to { visibility: visible; } }
.mm-ol--noscript { display: block; }        /* exists only when scripting is off */
.mm-pausepanel:has(.mm-ol--noscript) .mm-ol--late { display: none !important; }
@media (forced-colors: active) {
  .mm-ol { fill: CanvasText !important; filter: none; }   /* review R232-02: also the focused Reload */
}

/* open-alpha01: the public deployment's first-load screen (replaces the PIN
   experience only where the access controller lets the page open directly).
   From the first paint (index.html data-boot) until the host's first real
   screen, the loading panel stands under a title card built from the menu's
   own vocabulary: the approved logo composite, centred in the frame and
   standing in a smash mark that is drawn out of the backdrop itself: two of
   the grid's own lines lit for its cross, one orbit line for its arc and a
   pool of light behind the logo (open-alpha06, below; no words, pips, frame
   or plate). Below it the existing status line,
   its outline and the 25 s late note keep their own
   panel geometry: only the panel moves down (y 250 -> 540), its frame and
   title are set aside (the title stays the screen's accessible name) and,
   on this first load only, its running-light rail is not drawn (open-alpha04)
   and the status is shown by its fixed outline, whose three dots keep a
   loading cadence (open-alpha06, end of this block).
   The splash is ONE element from the first paint to the mounted loading
   state (custom-ui.mjs keeps it connected while the template mounts), so the
   handoff repaints and replays nothing. The logo settles while the lines
   assemble over 0.86 s, then only the backlight breathes and the dots
   count. data-boot ends at the first non-loading screen (Main,
   Results, Rejoin or an error) and the splash is then removed, so later
   loading states and every other screen keep their approved composition.
   No percentage or minimum wait. */
.mm-splash {
  --u: min(calc((100cqw - var(--mm-safe-l) - var(--mm-safe-r)) / 1920), calc((100cqh - var(--mm-safe-t) - var(--mm-safe-b)) / 1080));
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  /* the stage's left and top edge in this (root-sized) box; used only in
     horizontal (--sx) and vertical (--sy) lengths, where 50% means that */
  --sx: calc(50% + (var(--mm-safe-l) - var(--mm-safe-r)) / 2 - 960 * var(--u));
  --sy: calc(50% + (var(--mm-safe-t) - var(--mm-safe-b)) / 2 - 540 * var(--u));
  /* title-card01 (block below): the picture-tube raster, a mask for the
     splash's two pools of light. 240 soft lines over the 1080 stage, never
     finer than 3 px */
  --mm-raster-p: max(3px, calc(4.5 * var(--u)));
  --mm-raster: repeating-linear-gradient(0deg, #000 0, rgb(0 0 0 / 0.5) calc(var(--mm-raster-p) / 2), #000 var(--mm-raster-p));
}
/* title-card01 (user: the boot splash should feel "more premium with a retro
   feel"). A title-card FINISH on what is already there: same logo, centre,
   lines, status line and dots; nothing is added to read, frame or follow.
   AT REST, two materials:
   - PHOSPHOR. The pool of light behind the logo, and the announcer's bloom,
     are drawn through a fine horizontal raster (--mm-raster: the line count of
     the 480i picture these title screens were made for), so the glow reads as
     light on a tube while everything in front of it stays sharp. The mask
     passes 75% on average, so the pool's own values are a step up (0.38 ->
     0.46, 0.17 -> 0.2) and its overall light is unchanged.
   - LACQUER. The logo is lifted off that light: the display type's own tight
     dark edge and a soft shadow 10 below it (.mm-splash__logo filter), so it
     sits above the screen like an enamelled badge instead of lying in the glow.
   IN MOTION, one thing: a single specular glint crosses the logo as it
   settles (0.52 -> 1.52 s, once, never looped: a title card's catch of light,
   not a meter), and once more on the announcer's accent, at the media clock's
   cue. It is the medallion's own sheen (bar geometry and mm-emb-sheen, section
   12c), clipped to the logo's own alpha (.mm-splash__sheen, the one decorative
   <i> inside the logo in index.html: a bar that moves inside a fixed mask
   needs a box of its own to stay transform-only). Transform and opacity only;
   no delay, request or asset: the mask is the logo file already shown.
   Reduced motion leaves the glint out and the raster and shadow in place; the
   rotate cover pauses it; forced colours remove it; a failed logo hides it. */
.mm-splash__sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: var(--mm-splash-logo) center / contain no-repeat;
  mask: var(--mm-splash-logo) center / contain no-repeat;
}
.mm-splash__sheen::before,
.mm-splash__sheen::after {
  content: "";
  /* a narrower, quieter light than the medallion's, for the larger surface */
  background: linear-gradient(90deg, transparent 22%, rgb(255 255 255 / 0.2) 42%, rgb(255 250 230 / 0.6) 50%, rgb(255 255 255 / 0.2) 58%, transparent 78%);
}
.mm-splash__sheen::before { animation: mm-emb-sheen 1000ms cubic-bezier(0.35, 0.1, 0.25, 1) 520ms both; }
.mm-splash__logo[data-asset-error] > .mm-splash__sheen { display: none; }
.mm-root[data-boot] > .mm-splash { display: block; }
/* open-alpha06 (user: "remove the open alpha stuff ... rework the position
   and centring of things ... the loading screen should also compliment the
   background"). ONE focal point, the logo, centred in the 16:9 frame; the
   rest of the art is the backdrop's own grid and light, not drawn over it.
   CENTRING (stage px). 05 kept the logo in the upper third with the label,
   line and status stacked under it; with the label gone the block is set
   about the frame's middle, a little above it (optical centre):
     logo ink      y 257 -> 605  (box 250; x 567 -> 1350 on the axis 960)
     level line    y ~704        (99 under the ink)
     Loading...    y 790         (86 under the line), late note 880
     margins       257 above the ink, ~278 under the status line
   and between the mark's own lines: upright x 470 and arc x ~1450 at the
   logo's widest row, so 97 clear on the left and ~100 on the right.
   THE MARK, FROM THE GRID. The smash mark keeps its proportions (disc centre
   662, 532, r 795; cross at the medallion's -0.2416 r and +0.2174 r), but:
   - the CROSS is no longer two steel rules laid over the grid. It is two of
     the grid's own lines, lit: each layer below is a light that fades along
     its length, clipped to one grid cell's width (47) about the mark's line
     and masked to the backdrop's own line gradients (as .mm-gridlight,
     section 12d), so exactly one existing grid line brightens and, at both
     ends, becomes the ordinary grid again. In a 16:9 window those are the
     major line x 470 and the line y 704; in any other window it is whichever
     grid line lies in that cell, so the cross always sits ON the grid;
   - the ARC is one fine line in the lit lines' pale blue with its narrow
     limb of light, without the dark cut, tapering above and below;
   - the pool of light behind the logo (04) moves with it.
   Opening and breath are 05's, unchanged in timing. Scale and opacity only. */
.mm-splash::before,
.mm-splash::after {
  content: "";
  position: absolute;
  inset: 0;
}
/* level line: brightest under the logo's axis, ends on the arc (x 1438) */
.mm-splash::before {
  background: linear-gradient(90deg, rgb(150 180 240 / 0) calc(var(--sx) + 60 * var(--u)), rgb(150 180 240 / 0.55) calc(var(--sx) + 470 * var(--u)), rgb(222 233 255 / 0.95) calc(var(--sx) + 960 * var(--u)), rgb(190 208 246 / 0.8) calc(var(--sx) + 1438 * var(--u)), rgb(190 208 246 / 0) calc(var(--sx) + 1438 * var(--u)));
  -webkit-mask:
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
  mask:
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
  clip-path: inset(calc(var(--sy) + 680.5 * var(--u)) 0 calc(100% - var(--sy) - 727.5 * var(--u)) 0);
  /* opening: drawn out from under the logo's axis, reaching the arc as it ends */
  transform-origin: calc(var(--sx) + 960 * var(--u)) 50%;
  animation: mm-splash-draw-x 620ms var(--mm-ease-out);
}
/* upright: a step quieter, brightest where it crosses the level line */
.mm-splash::after {
  background: linear-gradient(180deg, rgb(150 180 240 / 0) calc(var(--sy) - 160 * var(--u)), rgb(150 180 240 / 0.4) calc(var(--sy) + 200 * var(--u)), rgb(206 220 252 / 0.75) calc(var(--sy) + 704 * var(--u)), rgb(150 180 240 / 0) calc(var(--sy) + 960 * var(--u)));
  -webkit-mask:
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
  mask:
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
  clip-path: inset(0 calc(100% - var(--sx) - 493.5 * var(--u)) 0 calc(var(--sx) + 446.5 * var(--u)));
  /* opening: drawn out from its crossing with the level line */
  transform-origin: 50% calc(var(--sy) + 704 * var(--u));
  animation: mm-splash-draw-y 620ms var(--mm-ease-out) 180ms backwards;
}
.mm-splash__stage {
  position: absolute;
  left: calc(50% + (var(--mm-safe-l) - var(--mm-safe-r)) / 2);
  top: calc(50% + (var(--mm-safe-t) - var(--mm-safe-b)) / 2);
  width: calc(1920 * var(--u));
  height: calc(1080 * var(--u));
  translate: -50% -50%;
}
/* open-alpha04 (user, after 03: "it kinda looks like we have two different
   loading bars with the one at bottom and new side animation. maybe add some
   animation to logo and make everything more succinct"): ONE motion focus,
   the logo. 03's gleam on the arc is removed and the first load no longer
   draws the running-light rail (rule at the end of this block), so nothing
   on the screen travels along a track. What moves instead:
   - the logo SETTLES once (scale 1.06 -> 1, 760 ms, the menu's ease-out),
     at full opacity from the first frame, so it is readable immediately
     (.mm-splash__logo below);
   - its AURA breathes: the soft pool of light behind it (01's, now its own
     layer; since 06 660 x 320 about the logo's centre 960, 430, gone before
     the layer's edge) fades between 0.55 and 1 with the medallion's own breath
     (mm-emb-breathe, 2.8 s ease-in-out, alternate). It has no direction,
     no track and no end, so it reads as presence, not as a meter.
   Scale and opacity only, on two small layers, from the moment the splash is
   shown: no delay, no request. Both live in the splash and end with it.
   Reduced motion (the system preference and data-motion="reduced", section
   12 end: animation none) leaves the logo at rest and the aura at its full,
   still value; the portrait rotate cover pauses both (section 11); a page
   without scripting keeps a still aura (nothing is loading). */
.mm-splash__stage::before {
  content: "";
  position: absolute;
  left: calc(300 * var(--u));
  top: calc(110 * var(--u));
  width: calc(1320 * var(--u));
  height: calc(640 * var(--u));
  background: radial-gradient(ellipse closest-side, rgb(64 118 236 / 0.46), rgb(36 76 176 / 0.2) 55%, rgb(var(--mm-band) / 0));
  -webkit-mask: var(--mm-raster);   /* title-card01: phosphor raster */
  mask: var(--mm-raster);
  animation: mm-splash-rise 760ms var(--mm-ease-out) backwards, mm-emb-breathe 2.8s ease-in-out 760ms infinite alternate-reverse;
}
.mm-root[data-boot]:has(.mm-ol--noscript) .mm-splash__stage::before { animation: none; }
@keyframes mm-splash-settle { from { scale: 1.06; } }
/* Opening: the logo settles as the aura rises, the horizontal and
   vertical lines extend, and the arc fades in. The lines stay still
   afterward and the backlight breathes. Only scale and opacity animate. */
@keyframes mm-splash-rise { from { opacity: 0; } }
@keyframes mm-splash-draw-x { from { scale: 0 1; } }
@keyframes mm-splash-draw-y { from { scale: 1 0; } }
/* The arc (open-alpha03's line mark; 06 geometry and colour): the disc's
   right edge as one fine pale-blue line with a narrow limb of blue light
   just inside it (r 708 -> 795), in a box that holds only that side (stage
   900, -200, 600 x 1320). A radial mask about stage 1554, 424 (full to 440,
   none by 660) tapers it toward the top of the stage and below the status
   line, so it never reaches the late note (clear of it by ~47 at y 880).
   Nothing is filled or framed, so the grid runs through the whole screen. */
.mm-splash__mark {
  position: absolute;
  left: calc(900 * var(--u));
  top: calc(-200 * var(--u));
  width: calc(600 * var(--u));
  height: calc(1320 * var(--u));
  max-width: none;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(circle at calc(654 * var(--u)) calc(624 * var(--u)), #000 calc(440 * var(--u)), transparent calc(660 * var(--u)));
  mask-image: radial-gradient(circle at calc(654 * var(--u)) calc(624 * var(--u)), #000 calc(440 * var(--u)), transparent calc(660 * var(--u)));
  animation: mm-splash-rise 620ms var(--mm-ease-out) 240ms backwards;   /* open-alpha05 opening */
}
.mm-splash__arc { fill: none; stroke: rgb(190 208 246); stroke-width: 2; stroke-opacity: 0.8; }
/* The approved logo composite, its own aspect (contain), never stretched.
   Same size and axis as 01. open-alpha06: centred in the frame (y 136 ->
   250, see the block above). open-alpha04: it settles once about its own
   centre (at 1.06 its box is stage x 536 -> 1384, clear of the upright at
   470 and the arc at ~1450). */
.mm-splash__logo {
  --x: 560; --y: 250; --w: 800; --h: 360;
  /* title-card01: one name for the file, as .mm-logo's --mm-logo, so the
     glint's mask (.mm-splash__sheen) can never point at another image */
  --mm-splash-logo: url("assets/enhanced/logo-melee-classic.png");
  background: var(--mm-splash-logo) center / contain no-repeat;
  filter:
    drop-shadow(0 0 calc(1.5 * var(--u)) rgb(1 3 10 / 0.6))
    drop-shadow(0 calc(10 * var(--u)) calc(14 * var(--u)) rgb(1 3 10 / 0.5));
  animation: mm-splash-settle 760ms var(--mm-ease-out);
}
.mm-splash__logo[data-asset-error] {
  background: repeating-linear-gradient(135deg, rgb(255 60 60 / 0.25) 0 calc(6 * var(--u)), transparent 0 calc(12 * var(--u)));
  outline: calc(3 * var(--u)) dashed #ff3b3b;
  outline-offset: calc(-3 * var(--u));
}
/* The loading panel under the card: same internals, moved down, frameless.
   open-alpha04: on the first load the running-light rail and its light are
   not drawn (so the light's animation does not run either): the truthful
   status line, its outline and the late note say what is happening and the
   logo carries the motion. open-alpha06: the panel follows the centred logo
   (470 -> 540: status line at stage y 790) and the late note moves up to
   90 under it (stage y 880). Loading panels after the first screen keep
   their rail and their positions unchanged. */
.mm-root[data-boot] .mm-pausepanel { --y: 540; }
.mm-root[data-boot] .mm-pausepanel > .mm-frame,
.mm-root[data-boot] .mm-ol--title-loading { visibility: hidden; }
.mm-root[data-boot] .mm-pausepanel__title { opacity: 0; }
.mm-root[data-boot] .mm-pause .mm-stage::before { display: none; }
.mm-root[data-boot] .mm-ol--late { --ol-y: 340; }
/* Without scripting nothing is loading: only the existing no-script note,
   which takes the status line's place (stage y 790). */
.mm-root[data-boot] .mm-pausepanel:has(.mm-ol--noscript) .mm-ol--status { visibility: hidden; }
.mm-root[data-boot] .mm-ol--noscript { --ol-y: 250; }
/* open-alpha06 (user: "making the dots after loading do a loading
   animation"): the status line's three dots keep a loading cadence.
   The live status (.mm-pausepanel__detail, role="status") is one text node
   that the host rewrites on mount, so its dots cannot be told apart; the
   approved fixed outline of the same line can (index.html: its three dots
   are now three paths, .mm-ol-dot--a/b/c, same shapes and places as before,
   and the outline is carried into the mounted panel). So for the whole first
   load the OUTLINE is what is seen, not only while the faces are pending,
   and the live status stays where it is, visually hidden by opacity and still
   the one status in the accessibility tree: it is not animated, repeated or
   re-announced by any of this. No hand-over between two renderings happens
   on this screen, so nothing can shift.
   Fixed geometry: only each dot's opacity changes (0.3 <-> 1); the line's
   box, the word and the dots' places never move, and the whole "Loading..."
   stays centred on the logo's axis as one string (a dot at rest is still
   visible, so the line never reads as off centre).
   Cadence, 1.8 s: the dots come up one after another (at 0.22, 0.54 and
   0.86 s), hold together, and fall back together (1.4 -> 1.66 s).
   Reduced motion (the system preference and data-motion="reduced": animation
   none) leaves all three dots at full strength: a complete, still
   "Loading...". The portrait rotate cover pauses them (section 11). Loading
   panels after the first screen never animate them: there the outline is
   shown only while the faces are pending, with its dots at rest. */
.mm-root[data-boot][data-page="loading"] .mm-ol--status { display: block; }
.mm-root[data-boot][data-page="loading"] .mm-pausepanel__detail { opacity: 0; }
.mm-root[data-boot] .mm-ol-dot { animation: mm-boot-dot-a 1.8s ease-in-out infinite; }
.mm-root[data-boot] .mm-ol-dot--b { animation-name: mm-boot-dot-b; }
.mm-root[data-boot] .mm-ol-dot--c { animation-name: mm-boot-dot-c; }
@keyframes mm-boot-dot-a {
  0% { opacity: 0.3; }
  12%, 78% { opacity: 1; }
  92%, 100% { opacity: 0.3; }
}
@keyframes mm-boot-dot-b {
  0%, 18% { opacity: 0.3; }
  30%, 78% { opacity: 1; }
  92%, 100% { opacity: 0.3; }
}
@keyframes mm-boot-dot-c {
  0%, 36% { opacity: 0.3; }
  48%, 78% { opacity: 1; }
  92%, 100% { opacity: 0.3; }
}
@media (forced-colors: active) {
  .mm-splash::before, .mm-splash::after, .mm-splash__mark, .mm-splash__stage::before, .mm-splash__sheen { display: none; }
  .mm-splash__logo { filter: none; }
}

/* candidate227 (USER227-04/05): Controls is a settings panel in the menu's own
   language. Rows are recessed steel bands (label | control) under the header:
   Input device (the real <select>, styled) and Display (Fullscreen); Done is
   the one wedge (right, its glove inside the frame); Find controller is a
   secondary steel key level with it on the left.
   Every control keeps its native element, name, focus and behaviour. */
.mm-root[data-page="controls"] .mm-pausepanel__detail {
  top: calc(160 * var(--u));
  color: var(--mm-ink-2);
  font-size: max(var(--mm-min-fs), calc(28 * var(--u)));
  font-style: italic;
}
.mm-root[data-page="controls"] .mm-pausepanel .mm-act--resume { --x: 360; --y: 396; }
.mm-controls-body {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
}
.mm-controls-body > * { pointer-events: auto; }
.mm-set {
  position: absolute;
  left: calc(56 * var(--u));
  width: calc(788 * var(--u));
  height: calc(84 * var(--u));
  display: grid;
  grid-template-columns: calc(232 * var(--u)) minmax(0, 1fr);
  align-items: center;
  column-gap: calc(16 * var(--u));
  padding: 0 calc(16 * var(--u)) 0 calc(28 * var(--u));
  isolation: isolate;
}
.mm-set--device { top: calc(198 * var(--u)); }
.mm-set--display { top: calc(296 * var(--u)); }
/* the band: a chamfered dark well with a steel hairline, as the panel face */
.mm-set::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(calc(18 * var(--u)) 0, 100% 0, 100% calc(100% - calc(18 * var(--u))), calc(100% - calc(18 * var(--u))) 100%, 0 100%, 0 calc(18 * var(--u)));
  background:
    linear-gradient(90deg, rgb(120 150 220 / 0.14), rgb(120 150 220 / 0.03) 42%, transparent 70%),
    linear-gradient(180deg, #0c1428, #070c1b 60%, #0a1224);
  box-shadow: inset 0 max(1px, calc(1.5 * var(--u))) 0 rgb(150 166 196 / 0.28), inset 0 calc(-2 * var(--u)) 0 rgb(0 0 0 / 0.7);
}
/* candidate230 (fonts): row captions in the approved caption type (as
   CPU LEVEL / YOU: MM UI italic 600 at the UI width), not the display face */
.mm-set__label {
  justify-self: start;
  color: #d7dde8;
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(12px, calc(34 * var(--u)));
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--u)) 0 rgb(0 0 0 / 0.7);
  cursor: inherit;
}
.mm-set__ctl {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  min-width: 0;
  height: 100%;
}
/* USER227-04: the device select. A recessed well with a steel rim, the UI
   face, a drawn chevron; amber rim and glow when it holds the selection (as
   the roster). Native element: keyboard, screen readers and the pad's
   left/right cycling (custom-ui-input.mjs) are unchanged. */
#custom-device {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: calc(58 * var(--u));
  min-height: 28px;
  margin: 0;
  padding: 0 calc(58 * var(--u)) 0 calc(18 * var(--u));
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  border: max(1px, calc(2.5 * var(--u))) solid #8d97ab;
  border-radius: calc(4 * var(--u));
  color: var(--mm-ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M1 1l9 9 9-9' fill='none' stroke='%23c9d0dc' stroke-width='2.6'/%3E%3C/svg%3E") right calc(18 * var(--u)) center / calc(24 * var(--u)) auto no-repeat,
    linear-gradient(180deg, #03060f, #0a1122 60%, #111b33);
  box-shadow: inset 0 calc(2.5 * var(--u)) 0 rgb(0 0 0 / 0.85), inset 0 calc(-1.5 * var(--u)) 0 rgb(150 166 196 / 0.18);
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(28 * var(--u)));
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  outline: none;
  transition: border-color var(--mm-t-focus) linear, box-shadow var(--mm-t-focus) linear;
}
#custom-device option { color: var(--mm-ink); background: #0a1122; }
#custom-device option:disabled { color: #7d8699; }
#custom-device:focus {
  border-color: #ffc540;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M1 1l9 9 9-9' fill='none' stroke='%23ffc540' stroke-width='2.6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #03060f, #0a1122 60%, #111b33);
  box-shadow: inset 0 calc(2.5 * var(--u)) 0 rgb(0 0 0 / 0.85), 0 0 0 max(1px, calc(2 * var(--u))) rgb(255 138 0 / 0.5), 0 0 calc(14 * var(--u)) rgb(255 128 0 / 0.55);
}
/* controller: left / right changes the device, Confirm applies it */
.mm-root[data-input="gamepad"] #custom-device:focus {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 14'%3E%3Cpath d='M8 1L2 7l6 6M22 1l6 6-6 6' fill='none' stroke='%23ffc540' stroke-width='2.6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #03060f, #0a1122 60%, #111b33);
  background-size: calc(34 * var(--u)) auto, auto;
}
#custom-device:disabled { color: #7d8699; border-color: #4f586c; }
/* setting keys (Fullscreen, Find controller): the candidate128 steel cell
   (section 8 end), sized for the panel */
.mm-set__btn {
  flex: none;
  position: relative;
  height: calc(58 * var(--u));
  min-height: 28px;
  margin: 0;
  padding: 0 calc(22 * var(--u));
  border: 0;
  background: none;
  color: var(--mm-ink);
  font-family: var(--mm-font-ui);
  font-stretch: var(--mm-ui-stretch);
  font-size: max(var(--mm-min-fs), calc(25 * var(--u)));
  font-weight: 600;
  white-space: nowrap;
  outline: none;
}
.mm-set__find {
  position: absolute;
  left: calc(84 * var(--u));
  top: calc(422 * var(--u));
}

@container mm (max-height: 540px) {
  /* phone landscape: 12px text and >= 28px controls need taller rows */
  .mm-set { height: calc(96 * var(--u)); grid-template-columns: calc(216 * var(--u)) minmax(0, 1fr); }
  .mm-set--device { top: calc(190 * var(--u)); }
  .mm-set--display { top: calc(298 * var(--u)); }
  .mm-root[data-page="controls"] .mm-pausepanel .mm-act--resume { --y: 408; }
  .mm-set__find { top: calc(424 * var(--u)); left: calc(40 * var(--u)); padding: 0 calc(12 * var(--u)); }
}
@container mm (orientation: portrait) and (max-width: 820px) {
  .mm-meter::before,
  /* Pause splash motion behind the rotate cover. */
  .mm-root[data-boot] .mm-splash :is(.mm-splash__logo, .mm-splash__mark),
  .mm-root[data-boot] .mm-splash .mm-splash__stage::before,
  .mm-root[data-boot] .mm-splash .mm-splash__sheen::before,
  .mm-root[data-boot] > .mm-splash::before,
  .mm-root[data-boot] > .mm-splash::after,
  .mm-root[data-boot] .mm-pausepanel .mm-ol-dot { animation-play-state: paused; }
}

/* 11a. Phone landscape (short containers): the stage keeps the reference
   composition, but the smallest captions stop at 12px and the prompt
   labels grow, so text stays readable instead of shrinking with the stage
   (at 390px tall 1 stage px = 0.36 CSS px). */
@container mm (max-height: 540px) {
  .mm-screen { --mm-min-fs: 12px; }
  .mm-prompt__label { font-size: calc(44 * var(--u)); }
  /* Roster tiles: a taller name bar holds two lines of phone-size text
     (review74 R74-02 lesson: secondary labels need a phone scale). */
  .mm-tile .mm-portrait { --ph: 84; height: calc(84 * var(--u)); }
  .mm-tile__name { height: calc(68 * var(--u)); font-size: max(10px, calc(var(--fs, 28) * var(--u))); }
  /* thumbnails are ~58px wide on a phone: narrower face, no tracking */
  .mm-thumbs { grid-template-columns: repeat(5, calc(169 * var(--u))); column-gap: calc(12 * var(--u)); }   /* candidate202: same 892 width */
  .mm-thumb__name { font-size: 10px; font-stretch: 75%; letter-spacing: 0; padding: 0 3px; }
  .mm-stageview__pending { font-size: 12px; }
  .mm-slot__label,
  .mm-levelctl__label { font-size: max(13px, calc(42 * var(--u))); }
  /* R116-01: the status line is tallest in stage units here (11px floor) */
  .mm-p1card { --y: 654; scale: 0.88; }
  /* candidate144 (review146 R146-03): at the 12px floor the one-line
     footnote reached x ~580, into the Start tab's diagonal rim (x 511-585,
     y 884-1004). It now wraps into two balanced lines within 430 stage px,
     centred at y 966: text y ~929-1003, x 40-470, so >= 40 stage px from
     the rim, >= 45 below the setup bar and ~30 above the host status lane
     (top ~1034 here). Same type size. */
  .mm-footnote {
    top: calc(966 * var(--u));
    max-width: calc(430 * var(--u));
    line-height: 1.12;
    text-wrap: balance;
  }
}

/* 11b. Phone portrait: "Rotate to landscape" cover -----------------------
   Only while the menu container is portrait AND phone-narrow (a portrait
   desktop monitor keeps the letterboxed stage). It covers the screens and
   takes all pointer/touch input; the screens stay rendered underneath so
   rotation reveals the same state and focus. Sized in CSS px (the stage
   unit would be tiny here). */
.mm-rotate { display: none; }
@container mm (orientation: portrait) and (max-width: 820px) {
  .mm-gridlight { display: none; }   /* candidate202: nothing runs under the opaque cover */
  .mm-rotate {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: calc(24px + var(--mm-safe-t)) calc(24px + var(--mm-safe-r)) calc(24px + var(--mm-safe-b)) calc(24px + var(--mm-safe-l));
    background:
      repeating-linear-gradient(0deg, var(--mm-grid) 0 1px, transparent 0 24px),
      repeating-linear-gradient(90deg, var(--mm-grid) 0 1px, transparent 0 24px),
      radial-gradient(ellipse 90% 60% at 50% 45%, #0a1633, var(--mm-navy-0) 70%);
    text-align: center;
    pointer-events: auto;
    touch-action: none;
  }
  .mm-rotate::after {       /* same static grain as the screens */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--mm-grain) 0 0 / 256px 256px repeat;
    mix-blend-mode: overlay;
    opacity: var(--mm-grain-o);
  }
  .mm-rotate__icon { width: 132px; height: auto; overflow: visible; }
  .mm-rotate__phone { fill: #0b1428; stroke: #aab3c4; stroke-width: 3; }
  .mm-rotate__phone--to { fill: #1a1205; stroke: #ffb52c; }
  .mm-rotate__arrow,
  .mm-rotate__head { fill: none; stroke: #ffb52c; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
  .mm-rotate__title {
    margin: 6px 0 0;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: var(--mm-tx-amber);
    font-size: 32px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 1px rgb(40 12 0 / 0.7)) drop-shadow(1px 2px 0 rgb(24 7 0 / 0.95));
  }
  .mm-rotate__detail {
    max-width: 22em;
    margin: 0;
    color: var(--mm-ink-2);
    font-family: var(--mm-font-body);
    font-size: 16px;
    line-height: 1.35;
  }
}

/* 12. Motion (candidate131). Restrained, bounded, compositor-only, and only
   while a screen is shown: hidden screens, and the whole root during
   gameplay, are display:none, so nothing here runs or holds a timer then.
   No script, no per-frame layout or paint, no fullscreen blur.
   - Screen entry: the stage rises 14 stage px and fades in (220ms).
   - Background: the band layer drifts +-12/+-8 stage px (44s each way) and
     one light arc travels round a background ring (80s a turn): two
     transform-only layers. The pause veil has neither.
   - Prompt band (USER131-03): rises in, holds about 3.6s, sinks out; any
     modality change restarts it (one animation name per data-input value),
     hover shows it; pause/help and touch keep it.
   - Glove (USER131-01): a 120-180ms fade/slide onto the selected action and
     a short tap toward it while pressed.
   prefers-reduced-motion (and data-motion="reduced", section 12 end): all
   of it off — no entry motion, a static background, the prompt band simply
   stays visible, the glove appears without motion. */

@keyframes mm-enter { from { opacity: 0; transform: translateY(calc(14 * var(--u))); } }
@keyframes mm-leave { to { opacity: 0; } }
@keyframes mm-drift {
  from { translate: calc(-12 * var(--u)) calc(-8 * var(--u)); }
  to { translate: calc(12 * var(--u)) calc(8 * var(--u)); }
}
@keyframes mm-orbit { to { rotate: 1turn; } }
@keyframes mm-hint-g {
  from { opacity: 0; transform: translateY(calc(24 * var(--u))); }
  5%, 78% { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(calc(30 * var(--u))); }
}
@keyframes mm-hint-k {
  from { opacity: 0; transform: translateY(calc(24 * var(--u))); }
  5%, 78% { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(calc(30 * var(--u))); }
}
@keyframes mm-hint-p {
  from { opacity: 0; transform: translateY(calc(24 * var(--u))); }
  5%, 78% { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(calc(30 * var(--u))); }
}
@keyframes mm-hint-t {
  from { opacity: 0; transform: translateY(calc(24 * var(--u))); }
  5%, to { opacity: 1; transform: none; }
}
.mm-screen:not([hidden]) > .mm-stage { animation: mm-enter var(--mm-t-enter) cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Background drift and the orbit light (per-screen ring in --mm-orbit-*). */
.mm-stage::before { animation: mm-drift var(--mm-t-drift) ease-in-out infinite alternate; }
.mm-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc((var(--mm-orbit-x) - var(--mm-orbit-r)) * var(--u));
  top: calc((var(--mm-orbit-y) - var(--mm-orbit-r)) * var(--u));
  width: calc(2 * var(--mm-orbit-r) * var(--u));
  height: calc(2 * var(--mm-orbit-r) * var(--u));
  border-radius: 50%;
  pointer-events: none;
  /* candidate182 (USER182-02): a softer light (peak 0.45, was 0.6), so it
     reads as a quiet glint travelling the ring, not a bright moving arc */
  background: conic-gradient(transparent 0deg 190deg, rgb(120 160 255 / 0.07) 250deg, rgb(160 195 255 / 0.3) 318deg, rgb(215 230 255 / 0.45) 324deg, transparent 328deg);
  -webkit-mask: radial-gradient(closest-side, transparent var(--mm-orbit-i0), #000 var(--mm-orbit-i1) var(--mm-orbit-o1), transparent var(--mm-orbit-o0));
  mask: radial-gradient(closest-side, transparent var(--mm-orbit-i0), #000 var(--mm-orbit-i1) var(--mm-orbit-o1), transparent var(--mm-orbit-o0));
  animation: mm-orbit var(--mm-t-orbit) linear infinite, mm-drift var(--mm-t-drift) ease-in-out infinite alternate;
}
/* title-card01: the pause family's full-page states draw Main's rings as
   STILL linework (section 6): no drift and no orbit light, so they add no
   composited layer or timer to the loading path, the amber meter stays the
   only light that travels on the card, and reduced motion shows the same
   picture. The layer is shifted once so the medium ring (centre 1000, 600)
   sits on the panel's centre (960, 530): the ring clears every panel corner
   by at least 66 stage px and reads as two arcs either side of the card, with
   the thick band crossing behind it (top edge x ~750, bottom edge x ~1100). */
.mm-pause .mm-stage::before { animation: none; translate: calc(-40 * var(--u)) calc(-70 * var(--u)); }
.mm-pause .mm-stage::after { display: none; }

/* Prompt band cycle (USER131-03). */
.mm-root[data-input="keyboard"] .mm-prompts { animation-name: mm-hint-k; }
.mm-root[data-input="pointer"] .mm-prompts { animation-name: mm-hint-p; }
.mm-root[data-input="touch"] .mm-prompts { animation-name: mm-hint-t; }
.mm-root .mm-prompts:hover,
.mm-root .mm-pause .mm-prompts { animation: none; }

/* 12b. The pointing glove (USER131-01, reference views 1-3). ONE glove, on
   the action that is actually selected: DOM focus for keyboard/controller
   (the host's own focus), the hovered action for a mouse — so it moves with
   the real selection and never repeats on every action. Pure CSS on each
   action's own ::after (tiles and stage cards: on their list item), no
   hit-box change (pointer-events: none). candidate182 (USER182-17): each
   surface names only the point the fingertip touches (--tx/--ty, in the
   action's own stage px) and the glove width (--hw); the image and its
   hotspot come from the root tokens (--mm-hand, --mm-hand-fx/-fy/-ar/-scale),
   so helper 183's reviewed pointer drops in without touching any surface. */
:is(.mm-tile-slot, .mm-thumb-slot) { position: relative; }
:is(.mm-act--play, .mm-act--practice, .mm-act--normal, .mm-act--endless, .mm-act--wedge, .mm-act--startwide, .mm-ready)::after,
:is(.mm-tile-slot, .mm-thumb-slot)::after {
  content: "";
  position: absolute;
  z-index: 3;
  --mm-hand-w: calc(var(--hw) * var(--mm-hand-scale));
  left: calc((var(--tx) - var(--mm-hand-fx) * var(--mm-hand-w)) * var(--u));
  top: calc((var(--ty) - var(--mm-hand-fy) * var(--mm-hand-ar) * var(--mm-hand-w)) * var(--u));
  width: calc(var(--mm-hand-w) * var(--u));
  height: calc(var(--mm-hand-ar) * var(--mm-hand-w) * var(--u));
  background: var(--mm-hand) 0 0 / 100% 100% no-repeat;
  opacity: 0;
  transform: translate(calc(12 * var(--u)), calc(10 * var(--u)));
  transition: opacity 120ms ease-out, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
/* Fingertip targets. They keep 166's fingertip positions except: Main (one
   target for both bars, on the shortened end, USER182-01/04), Endless with a
   count (Join 10 lower, USER182-07) and the roster tile (above the name bar,
   so the glove never covers a fighter's name, USER182-14). */
:is(.mm-act--play, .mm-act--practice) { --tx: 716; --ty: 138; --hw: 96; }
:is(.mm-act--normal, .mm-act--endless) { --tx: 1612; --ty: 150; --hw: 100; }
.mm-act--endless:has(.mm-act__count:not([hidden])) { --ty: 160; }
.mm-act--wedge { --tx: 384; --ty: 70; --hw: 80; }
.mm-act--startwide { --tx: 660.1; --ty: 57.7; --hw: 92; }
.mm-ready { --tx: 1110; --ty: 139.2; --hw: 100; }
.mm-tile-slot { --tx: 138; --ty: 26; --hw: 64; }
.mm-thumb-slot { --tx: 118; --ty: 74; --hw: 60; }
/* candidate227 (USER227-09): the attached glove marks the keyboard /
   controller (and touch) selection only. With a mouse the same hand IS the
   cursor (section 12e) and the selection follows it, so no attached glove is
   drawn in pointer mode: never two hands. This also drops the root-level
   :has(:hover) test, so mouse motion no longer restyles from the root. */
.mm-root:not([data-input="pointer"]) :is(.mm-act--play, .mm-act--practice, .mm-act--normal, .mm-act--endless, .mm-act--wedge, .mm-act--startwide, .mm-ready):focus::after,
.mm-root:not([data-input="pointer"]) :is(.mm-tile-slot, .mm-thumb-slot):has(> .mm-act:focus)::after {
  opacity: 1;
  transform: translate(var(--tap, 0px), var(--tap, 0px));
}
/* candidate144 (UI140 actual-host finding): the glove follows REAL focus
   only (plus pointer hover), never [data-selected]. The live host keeps
   data-selected on the chosen stage card while focus moves to YOU / CPU /
   Start, which gave a second glove. The chosen stage keeps its amber rim;
   UI140's integration rule to the same effect stays compatible. */
/* press: a short tap toward the action */
:is(.mm-act--play, .mm-act--practice, .mm-act--normal, .mm-act--endless, .mm-act--wedge, .mm-act--startwide, .mm-ready):active,
:is(.mm-tile-slot, .mm-thumb-slot):has(> .mm-act:active) { --tap: calc(-4 * var(--u)); }

/* Higher-contrast preference: keep the texture but quieter. */
@media (prefers-contrast: more) {
  .mm-root { --mm-grain-o: 0.06; }
  .mm-f-tex, .mm-p-tex, .mm-s-tex { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-root,
  .mm-root *,
  .mm-root *::before,
  .mm-root *::after {
    animation: none !important;
    transition-duration: 0s !important;
  }
}
.mm-root[data-motion="reduced"],
.mm-root[data-motion="reduced"] *,
.mm-root[data-motion="reduced"] *::before,
.mm-root[data-motion="reduced"] *::after {
  animation: none !important;
  transition-duration: 0s !important;
}
/* loading-animation-static01: under either reduced-motion mechanism the
   active queue/loading meter light stays subtly alive without travelling: it
   rests at the rail's centre and only breathes its opacity (the medallion's
   existing mm-emb-breathe, 0.55 <-> 1, 2.8 s), so it is visible throughout;
   no translate or scale. Animation only (no display/visibility), so every
   existing hide still wins: [hidden] (queueReady), cancelling/released/error,
   data-boot and non-loading panels. The found-state stop is excluded by
   selector, and the portrait rotate cover's pause is restated at the same
   importance. Normal motion and everything else under the blanket unchanged.
   loader-polish: the breathing light takes the symmetric rest shape (as
   found does), since a comet standing still would point at nothing. */
@media (prefers-reduced-motion: reduce) {
  .mm-root .mm-meter:not(.mm-qpanel[data-queue-state="found"] .mm-meter)::before { animation: mm-emb-breathe 2.8s ease-in-out infinite alternate !important; border-radius: 50%; background: var(--mm-meter-rest); }
  @container mm (orientation: portrait) and (max-width: 820px) {
    .mm-root .mm-meter:not(.mm-qpanel[data-queue-state="found"] .mm-meter)::before { animation-play-state: paused !important; }
  }
}
.mm-root[data-motion="reduced"] .mm-meter:not(.mm-qpanel[data-queue-state="found"] .mm-meter)::before { animation: mm-emb-breathe 2.8s ease-in-out infinite alternate !important; border-radius: 50%; background: var(--mm-meter-rest); }
@container mm (orientation: portrait) and (max-width: 820px) {
  .mm-root[data-motion="reduced"] .mm-meter:not(.mm-qpanel[data-queue-state="found"] .mm-meter)::before { animation-play-state: paused !important; }
}

/* 12c. candidate166 motion (USER166 motion request; MOTION166.md) -------
   More life, still restrained: short staggered entrances when a screen is
   shown (candidate182, USER182-02: the 166 travelling lights on Main are
   removed), a sheen across the medallion when an action
   gains focus and a warm breathing ring while it holds focus, the picked
   fighter's glow breathing, a streak crossing the Ready tails, a sheen on
   an enabled Start, and weekly rows that move to their new rank on an actual
   update (script, section 12c in the host/specimen). Every animation is
   transform/opacity on a small or bounded layer; entrances animate the
   persistent containers (not the re-rendered tiles/cards, so a draft change
   does not replay them); hidden screens and the hidden root run nothing;
   reduced motion removes all of it (rules at the end of section 12). */
@keyframes mm-rise-in { from { opacity: 0; transform: translateX(calc(-28 * var(--u))); } }
@keyframes mm-rise-up { from { opacity: 0; transform: translateY(calc(22 * var(--u))); } }
@keyframes mm-pop-in { from { opacity: 0; transform: scale(0.965); } }
.mm-screen:not([hidden]) :is(.mm-act--play, .mm-act--normal) { animation: mm-rise-in var(--mm-t-rise) var(--mm-ease-out) both; }
.mm-screen:not([hidden]) :is(.mm-act--practice, .mm-act--endless) { animation: mm-rise-in var(--mm-t-rise) var(--mm-ease-out) var(--mm-t-stagger) both; }
.mm-screen:not([hidden]) :is(.mm-weekly, .mm-qpanel, .mm-rpanel, .mm-pausepanel) { animation: mm-pop-in 360ms var(--mm-ease-out) 90ms both; }
.mm-screen:not([hidden]) :is(.mm-roster, .mm-thumbs, .mm-stageview) { animation: mm-pop-in 320ms var(--mm-ease-out) 70ms both; }
.mm-screen:not([hidden]) :is(.mm-setup, .mm-fighter, .mm-actbar, .mm-p1card) { animation: mm-rise-up var(--mm-t-rise) var(--mm-ease-out) 120ms both; }
.mm-screen:not([hidden]) .mm-ready:enabled { animation: mm-rise-in 380ms var(--mm-ease-out) 160ms both; }

/* candidate182 (USER182-02): the 166 travelling lights (.mm-ambient: a comet
   down the thick band, a spark up its fine line, a spark round the inner
   line) are removed. The user found the bright moving arcs and diagonal
   streaks distracting and preferred the earlier background, so Main keeps the
   153 motion: the slow band drift and ONE orbit light (softer, section 12). */

/* Medallion: one sheen pass on gaining focus, a breathing warm ring while held. */
@keyframes mm-emb-sheen {
  0% { translate: -160% 0; opacity: 0; }
  12% { opacity: 1; }
  100% { translate: 320% 0; opacity: 0; }
}
@keyframes mm-emb-breathe { from { opacity: 0.55; } to { opacity: 1; } }
.mm-act:focus .mm-emblem-fx > i { animation: mm-emb-sheen 900ms cubic-bezier(0.35, 0.1, 0.25, 1) 60ms both; }
/* Breathing stays on the inner layer; the outer focus fade never resets it. */

/* Picked fighter: the glow breathes (the focused tile holds it steady). */
@keyframes mm-picked-glow { from { opacity: 0.4; } to { opacity: 0.85; } }
.mm-tile-slot:has(> .mm-tile[data-picked])::before { animation: mm-picked-glow 2.4s ease-in-out infinite alternate; }

/* Ready: a streak crosses the whole banner every 5 s while Ready is shown
   (candidate202: the pass is ~2.4x longer, so 3.6 s -> 5 s keeps about the
   166 pace the user called good). */
@keyframes mm-ready-streak {
  0% { translate: 0 0; opacity: 0; }
  10% { opacity: 1; }
  58% { opacity: 1; }
  62% { translate: var(--mm-streak-run) 0; opacity: 0; }
  100% { translate: var(--mm-streak-run) 0; opacity: 0; }
}
.mm-ready:enabled .mm-ready__streaks > i { animation: mm-ready-streak 5s cubic-bezier(0.45, 0, 0.25, 1) 700ms infinite; }

/* Start: a slow sheen while it can start; quicker while focused. */
@keyframes mm-start-sheen {
  0% { translate: calc(-180 * var(--u)) 0; opacity: 0; }
  8% { opacity: 1; }
  45% { opacity: 1; }
  55% { translate: calc(860 * var(--u)) 0; opacity: 0; }
  100% { translate: calc(860 * var(--u)) 0; opacity: 0; }
}
.mm-act--startwide:enabled .mm-start__sheen > i { animation: mm-start-sheen 4.6s ease-in-out 1.2s infinite; }
.mm-act--startwide:enabled:focus .mm-start__sheen > i { animation-duration: 2.6s; animation-delay: 200ms; }

/* 12d. candidate202 motion (USER202-02/18; MOTION202.md) -------------------
   Both are the orbit light's kind of motion: a soft light travelling along a
   background line, on a small or bounded composited layer, by transform and
   opacity only. Hidden screens and the hidden root run nothing; the pause
   veil, the portrait rotate cover, reduced motion and forced colours remove
   them. */

/* USER202-02: the orbit light's treatment on the Main THICK band (the tilted
   ring cut off by the top edge; centre 3058,-69, r 2248-2298). A whole ring
   layer that size would be ~4600 stage px square, so the light is a small
   72 x 520 arc segment: the ring section drawn about the true centre, a tail
   fading behind a soft head, turned about the ring's centre (its
   transform-origin). It runs down the visible arc (from above the top edge to
   behind the weekly panel) at about the orbit light's speed (~52 vs ~49
   stage px/s), then rests, and drifts with the band layer like the orbit. */
.mm-arclight {
  position: absolute;
  z-index: -1;
  left: calc(756 * var(--u));
  top: calc(-329 * var(--u));
  width: calc(72 * var(--u));
  height: calc(520 * var(--u));
  pointer-events: none;
  transform-origin: calc(2302 * var(--u)) calc(260 * var(--u));
  background: radial-gradient(circle at calc(2302 * var(--u)) calc(260 * var(--u)), transparent calc(2248 * var(--u) - 0.75px), rgb(190 212 255 / 0.32) calc(2248 * var(--u) + 0.75px) calc(2298 * var(--u) - 0.75px), transparent calc(2298 * var(--u) + 0.75px));
  -webkit-mask: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.14) 40%, rgb(0 0 0 / 0.55) 78%, #000 90%, transparent 97%);
  mask: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.14) 40%, rgb(0 0 0 / 0.55) 78%, #000 90%, transparent 97%);
  opacity: 0;
  rotate: 3deg;
  animation: mm-arclight 34s linear 2s infinite, mm-drift var(--mm-t-drift) ease-in-out infinite alternate;
}
@keyframes mm-arclight {
  0% { rotate: 3deg; opacity: 0; }
  4% { opacity: 1; }
  52% { opacity: 1; }
  60% { rotate: -24deg; opacity: 0; }
  100% { rotate: -24deg; opacity: 0; }
}

/* USER202-18: a soft light glides along the background grid lines. The light
   is one wide, soft, slanted band that moves by transform; its layer is
   masked to the grid's own lines (the same four repeating gradients as the
   backdrop, so they coincide exactly), so only the lines brighten as it
   passes: a slow glint, not a wash, and the grid itself never moves. One pass
   every 48 s (~26 s crossing, ~135 px/s at 1920x1080), then rest; it runs on
   every menu screen, as the grid does. */
.mm-gridlight {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask:
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
  mask:
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.5 * var(--u))), transparent 0 calc(235 * var(--u))),
    repeating-linear-gradient(0deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u))),
    repeating-linear-gradient(90deg, #000 0 max(1px, calc(1.3 * var(--u))), transparent 0 calc(47 * var(--u)));
}
.mm-gridlight > i {
  position: absolute;
  top: -10cqh;
  left: calc(-40cqw - 40cqh);
  width: 36cqw;
  height: 120cqh;
  background: linear-gradient(90deg, rgb(150 185 255 / 0), rgb(150 185 255 / 0.16) 34%, rgb(205 225 255 / 0.3) 50%, rgb(150 185 255 / 0.16) 66%, rgb(150 185 255 / 0));
  transform: skewX(-24deg);
  opacity: 0;
  animation: mm-grid-light 48s linear 6s infinite;
}
@keyframes mm-grid-light {
  0% { translate: 0 0; opacity: 0; }
  5% { opacity: 1; }
  50% { opacity: 1; }
  55% { translate: calc(140cqw + 80cqh) 0; opacity: 0; }
  100% { translate: calc(140cqw + 80cqh) 0; opacity: 0; }
}
/* Reduced motion: both lights are removed rather than frozen. */
@media (prefers-reduced-motion: reduce) {
  .mm-gridlight,
  .mm-arclight { display: none; }
}
.mm-root[data-motion="reduced"] :is(.mm-gridlight, .mm-arclight) { display: none; }

/* 13. Forced colours: system outlines replace the metal materials -------- */

@media (forced-colors: active) {
  .mm-screen::after,
  .mm-stage::after,
  .mm-gridlight,
  .mm-arclight,
  .mm-emblem-fx,
  .mm-emblem-glow,
  .mm-ready__streaks,
  .mm-start__sheen,
  :is(.mm-tile-slot, .mm-thumb-slot)::before { display: none; }
  .mm-act:is(:focus, [data-selected]) { outline: 4px solid Highlight; outline-offset: 4px; }
  .mm-act__label,
  .mm-rotate__title,
  .mm-dt--silver,
  .mm-dt--amber,
  .mm-dt--blue {
    color: CanvasText;
    background: none;
    filter: none;
  }
  .mm-cell,
  .mm-portrait { border: 2px solid CanvasText; }
  :is(.mm-row, .mm-rrow):is([data-local], [data-you]) { outline: 3px solid Highlight; outline-offset: -3px; }
  .mm-prompt:focus-visible { outline-color: Highlight; }
  .mm-colors .mm-prompt,
  .mm-set__btn { border: 2px solid ButtonText; }
  .mm-colors .mm-prompt[aria-pressed="true"] { border-color: Highlight; }
  .mm-colors .mm-prompt:focus,
  .mm-set__btn:focus,
  #custom-device:focus { outline: 3px solid Highlight; outline-offset: 3px; }
}

/* 316: one event-driven approved hand; no cursor-image fallback. */
.mm-root:is([data-input="keyboard"],[data-input="gamepad"],[data-input="pointer"]),
.mm-root:is([data-input="keyboard"],[data-input="gamepad"],[data-input="pointer"]) * { cursor: none !important; }
.mm-pointer { position: fixed; left: 0; top: 0; z-index: 50; width: 64px; height: 64px; pointer-events: none; transform: translate(calc(-100% * var(--mm-hand-fx)),calc(-100% * var(--mm-hand-fy))); }
.mm-pointer i { position: relative; display: block; width: 100%; height: 100%; transform-origin: calc(100% * var(--mm-hand-fx)) calc(100% * var(--mm-hand-fy)); transition: rotate 180ms cubic-bezier(.2,.8,.2,1), scale 220ms cubic-bezier(.25,1.45,.45,1); }
.mm-pointer[data-target] i { rotate: -7deg; }
/* 330: finger press. The approved hand (sha256 5c3ef99f...) is drawn twice:
   ::after is the index finger down to just past its knuckle, ::before the
   whole hand minus the fingertip and the finger's outer edges. Pressing
   foreshortens the finger along its own axis (26.565deg, the index/middle
   crease) about the fingertip hotspot, so the tip stays on the target; the
   palm follows along that axis by the same amount, so both meet at the
   knuckle (466/1254 = 37.16% from the tip). No joint bends. The ::before
   hole (fingertip plus bands along the finger's outer edges, so no outline is
   drawn twice) keeps every edge inside opaque ::after glove or background,
   and ::after's own edges lie over intact glove or background, so at rest the
   two layers reproduce the single image. Transform-only transitions: fast
   press, gentle springy release. */
.mm-pointer { --mm-press: 1; }
.mm-pointer[data-pressed] { --mm-press: .86; }
.mm-pointer i::before,
.mm-pointer i::after { content: ""; position: absolute; inset: 0; background: var(--mm-hand) center / contain no-repeat; transform-origin: calc(100% * var(--mm-hand-fx)) calc(100% * var(--mm-hand-fy)); transition: transform 220ms cubic-bezier(.25,1.45,.45,1); }
.mm-pointer i::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1254 1254'%3E%3Cpath fill-rule='evenodd' d='M0 0H1254V1254H0ZM114.1 114.4L346.7 -1.9L462.9 230.6L450.4 236.9L491.6 319.2L485.3 342.4L458.5 355.9L409.3 257.5L297.5 313.4L409.3 537L342.2 570.5Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1254 1254'%3E%3Cpath fill-rule='evenodd' d='M0 0H1254V1254H0ZM114.1 114.4L346.7 -1.9L462.9 230.6L450.4 236.9L491.6 319.2L485.3 342.4L458.5 355.9L409.3 257.5L297.5 313.4L409.3 537L342.2 570.5Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  transform: translate(calc((1 - var(--mm-press)) * -16.62%), calc((1 - var(--mm-press)) * -33.24%));
}
.mm-pointer i::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1254 1254'%3E%3Cpath d='M114.1 114.4L346.7 -1.9L462.9 230.6L450.4 236.9L500.5 337.1L494.2 360.3L560.4 492.7L354.7 595.6Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1254 1254'%3E%3Cpath d='M114.1 114.4L346.7 -1.9L462.9 230.6L450.4 236.9L500.5 337.1L494.2 360.3L560.4 492.7L354.7 595.6Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  transform: rotate(-26.565deg) scaleY(var(--mm-press)) rotate(26.565deg);
}
.mm-pointer[data-pressed] i { scale: .98; transition: rotate 180ms cubic-bezier(.2,.8,.2,1), scale 80ms cubic-bezier(.2,.7,.3,1); }
.mm-pointer[data-pressed] i::before,
.mm-pointer[data-pressed] i::after { transition-duration: 80ms; transition-timing-function: cubic-bezier(.2,.7,.3,1); }
.mm-root:not([data-input="pointer"]) .mm-pointer,.mm-pointer[hidden] { display: none; }
/* A finite fingertip-centred bow also marks a keyboard or controller target. */
.mm-root:not([data-input="pointer"]) :is(.mm-act--play,.mm-act--practice,.mm-act--normal,.mm-act--endless):focus::after { transform-origin: calc(100% * var(--mm-hand-fx)) calc(100% * var(--mm-hand-fy)); animation: mm-hand-settle 340ms ease-out; }
@keyframes mm-hand-settle { from { rotate: 9deg; } 65% { rotate: -3deg; } to { rotate: 0deg; } }
.mm-settings-trigger { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
.mm-cog { width: 28px; height: 28px; overflow: visible; fill: #283852; stroke: #c8d4e8; stroke-width: 1.7; transform-origin: center; transition: rotate 320ms cubic-bezier(.2,.8,.2,1), stroke 180ms; }
.mm-settings-trigger:is(:hover,:focus-visible) .mm-cog { rotate: 45deg; stroke: #ffc540; }
.mm-settings { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--mm-ink); overflow: hidden; }
.mm-settings::backdrop { background: rgb(3 6 16 / .68); }
.mm-settings .mm-stage { background: none; }
.mm-settings .mm-stage::before,.mm-settings .mm-stage::after { display: none; }
.mm-settings .mm-set--audio { top: calc(394 * var(--u)); }
.mm-settings .mm-volume-value { flex: none; min-width: 4ch; text-align: right; color: var(--mm-ink); font: 600 max(12px,calc(25 * var(--u))) var(--mm-font-ui); font-stretch: var(--mm-ui-stretch); }
.mm-settings #custom-volume { flex: 1; min-width: 0; height: max(28px,calc(58 * var(--u))); margin: 0; appearance: none; background: transparent; outline: none; cursor: inherit; }
.mm-settings #custom-volume::-webkit-slider-runnable-track { height: max(4px,calc(10 * var(--u))); border: 1px solid #8d97ab; background: linear-gradient(#03060f,#111b33); border-radius: 2px; }
.mm-settings #custom-volume::-webkit-slider-thumb { appearance: none; width: max(14px,calc(24 * var(--u))); height: max(20px,calc(38 * var(--u))); margin-top: calc((max(4px,calc(10 * var(--u))) - max(20px,calc(38 * var(--u)))) / 2 - 1px); border: 1px solid #c9d0dc; border-radius: 2px; background: linear-gradient(120deg,#a2adbd,#59677d 45%,#c9d0dc); }
.mm-settings #custom-volume::-moz-range-track { height: max(4px,calc(10 * var(--u))); border: 1px solid #8d97ab; background: #0a1122; border-radius: 2px; }
.mm-settings #custom-volume::-moz-range-thumb { width: max(14px,calc(24 * var(--u))); height: max(20px,calc(38 * var(--u))); border: 1px solid #c9d0dc; border-radius: 2px; background: linear-gradient(120deg,#a2adbd,#59677d 45%,#c9d0dc); }
.mm-settings #custom-volume:focus { outline: 2px solid #ffc540; outline-offset: 3px; }
.mm-settings #custom-volume:disabled { opacity: .5; }
.mm-settings .mm-audio-status { position: absolute; left: calc(84 * var(--u)); top: calc(486 * var(--u)); width: calc(732 * var(--u)); margin: 0; color: var(--mm-ink-2); font: 400 max(12px,calc(18 * var(--u))) var(--mm-font-ui); font-stretch: var(--mm-ui-stretch); line-height: 1.3; }
.mm-settings .mm-audio-status:empty { display: none; }
.mm-root[data-page="controls"] .mm-settings .mm-pausepanel .mm-act--resume { --y: 540; }
.mm-settings .mm-set__find { top: calc(562 * var(--u)); }
@container mm (max-height: 540px) { .mm-settings .mm-set--audio { top: calc(406 * var(--u)); } .mm-settings .mm-set__ctl { gap: calc(10 * var(--u)); } .mm-settings .mm-set--audio .mm-set__btn { padding: 0 calc(14 * var(--u)); } .mm-settings .mm-audio-status { top: calc(508 * var(--u)); } }
.mm-settings .mm-pausepanel { --y: 190; --h: 700; }
.mm-settings[open] .mm-pausepanel { animation: mm-pop-in 220ms var(--mm-ease-out); }
.mm-root[data-page="controls"] .mm-settings .mm-pausepanel__detail { top: calc(176 * var(--u)); font-size: max(12px,calc(26 * var(--u))); }
#custom-device,#custom-device::picker(select) { appearance: base-select; }
#custom-device::picker-icon { display: none; }
#custom-device,#custom-device:focus,.mm-root[data-input="gamepad"] #custom-device:focus { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'%3E%3Cpath fill='%23939eb3' d='M2 2h28v18l-7 7H2z'/%3E%3Cpath fill='%23131e36' d='M4 4h24v15l-6 6H4z'/%3E%3Cpath fill='%23ffbc38' d='M8 9h16l-8 10z'/%3E%3C/svg%3E") right calc(14 * var(--u)) center / calc(32 * var(--u)) auto no-repeat,linear-gradient(180deg,#03060f,#0a1122 60%,#111b33); }
#custom-device::picker(select) { color: var(--mm-ink); background: #0a1122; border: 2px solid #9faec7; border-radius: 0; padding: 5px; font: 600 max(12px,calc(28 * var(--u))) "MM UI"; font-stretch: var(--mm-ui-stretch); box-shadow: 0 8px 24px #030610; }
#custom-device option { padding: .4em .65em; gap: .6em; font: inherit; }
#custom-device option:is(:hover,:focus,:checked) { color: #fff2c9; background: #283044; }
#custom-device option::checkmark { color: #ffad1f; }
.mm-modesel .mm-fighter { --y: 925; --h: 155; }
.mm-modesel .mm-fighter .mm-portrait { --pw: 136; --ph: 130; width: calc(136 * var(--u)); height: calc(130 * var(--u)); top: calc(12.5 * var(--u)); }
.mm-modesel .mm-fighter__label { top: calc(44 * var(--u)); }
.mm-modesel .mm-fighter__name { --ly: 103; }
.mm-modesel .mm-prompts { --y: 985; --h: 95; translate: calc(50cqw - (var(--mm-safe-l) + var(--mm-safe-r)) / 2 - 960 * var(--u)) 0; height: calc(50cqh - 445 * var(--u) - (var(--mm-safe-t) + var(--mm-safe-b)) / 2); }
.mm-modesel .mm-prompts .mm-frame { height: calc(96 * var(--u)); }
.mm-root[data-input="pointer"] .mm-select .mm-prompts,
.mm-root[data-input="touch"] .mm-prompts,
.mm-prompts:has(> .mm-prompt[hidden]) { justify-content: center; padding-inline: calc(70 * var(--u)); }
@media (prefers-reduced-motion: reduce) { .mm-settings-trigger .mm-cog,.mm-pointer i,.mm-pointer[data-target] i,.mm-pointer[data-pressed] i { transition: none; rotate: 0deg; scale: 1; } .mm-pointer i::before,.mm-pointer i::after,.mm-pointer[data-pressed] i::before,.mm-pointer[data-pressed] i::after { transition: none; transform: none; } }
.mm-root[data-motion="reduced"] .mm-pointer i,.mm-root[data-motion="reduced"] .mm-cog { rotate: 0deg; scale: 1; }
.mm-root[data-motion="reduced"] .mm-pointer i::before,.mm-root[data-motion="reduced"] .mm-pointer i::after { transform: none; }

/* 325: the single hand can extend beyond the native picker border. */
#custom-device::picker(select) { overflow: visible; }

/* The media clock supplies one accent while the first-load splash is visible. */
.mm-root[data-boot][data-title-cue="accent"] .mm-splash__logo {
  animation: mm-splash-settle 760ms var(--mm-ease-out), mm-title-accent 1400ms linear;
}
.mm-root[data-boot][data-title-cue="accent"] .mm-splash__stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(120 * var(--u));
  top: calc(50 * var(--u));
  width: calc(1680 * var(--u));
  height: calc(760 * var(--u));
  background: radial-gradient(ellipse closest-side, rgb(200 222 255 / 0.5), rgb(96 146 255 / 0.3) 34%, rgb(40 84 200 / 0.12) 64%, transparent);
  -webkit-mask: var(--mm-raster);   /* title-card01: the same phosphor as the pool it rises from */
  mask: var(--mm-raster);
  opacity: 0;
  animation: mm-title-bloom 1800ms linear;
}
/* title-card01: the accent's own glint. A second bar, idle until the cue, so
   the settle's glint is neither restarted nor needs a second keyframe set. */
.mm-root[data-boot][data-title-cue="accent"] .mm-splash__sheen::after {
  animation: mm-emb-sheen 900ms cubic-bezier(0.35, 0.1, 0.25, 1) 80ms both;
}
@keyframes mm-title-accent {
  0% { scale: 1; animation-timing-function: cubic-bezier(0.2, 0.8, 0.3, 1); }
  9% { scale: 1.035; animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1); }
  100% { scale: 1; }
}
@keyframes mm-title-bloom {
  0% { opacity: 0; scale: 0.84; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }
  8% { opacity: 1; animation-timing-function: cubic-bezier(0.25, 0.4, 0.3, 1); }
  100% { opacity: 0; scale: 1.12; }
}
@container mm (orientation: portrait) and (max-width: 820px) {
  .mm-root[data-boot][data-title-cue="accent"] .mm-splash__logo,
  .mm-root[data-boot][data-title-cue="accent"] .mm-splash__sheen::after,
  .mm-root[data-boot][data-title-cue="accent"] .mm-splash__stage::after { animation-play-state: paused; }
}
@media (forced-colors: active) {
  .mm-root[data-title-cue="accent"] .mm-splash__stage::after { display: none; }
}

/* Keep Sheik's face and mask within the shallow portrait slots. */
.mm-portrait[data-fighter="sheik"] { --fx: 0.75; --fy: 0.55; --pz: 1.25; }
.mm-p1card__art[data-fighter="sheik"] { --p1-y: -62; }

/* Leave vertical room for Jigglypuff's costume headwear in compact frames. */
.mm-portrait[data-fighter="jigglypuff"] { --fy: 0.45; --pz: 1.6; }
