/* The redesign's layout rules: beta.mypoke.space only.
 *
 * The root layout links this file on the redesign's host and puts
 * `mps-next` on <body> there (docs/features/ui-and-shell.md "The redesign
 * host"), so every rule here starts with `.mps-next` and mypoke.space never
 * loads it. It changes where things sit, never what a page loads or does:
 * one main column and at most one side column, on every page.
 *
 * When a page's redesign goes to everyone, its rules move into that page's
 * own stylesheet and leave this file.
 *
 * Speed (r7): a selector is matched right to left, and one whose last part is
 * `:is(...)`, `*` or only `:not(...)` is tried on every element on the page,
 * the hundreds of SVG nodes in each chart included. So a rule never ends in
 * `:is(a, b)`: it lists `a` and `b` instead. Where the arguments differ in
 * specificity, the less specific ones carry `:not(.np-pad)` / `:not(np-pad)`
 * (never-matching, so always true) to keep the `:is()`'s specificity exactly.
 */

/* ---------- The footer starts below the first screen ----------
 * A page that streams in grew under a footer already on screen, which then
 * jumped (layout shift on Settings and Find). The page's own box is at least
 * a screen tall, so the footer is never in the first view to move. */
.mps-next main { min-height: calc(100dvh - 64px); }

/* ---------- One page frame ----------
 * Log, Events and Meta start their column at the top bar's left edge with a
 * 36px title. Friends, Feed, Charts, Notifications, Invites, Changelog,
 * Support, Settings and Achievements each centred a column of their own
 * width under a 28 or 30px title, so moving between them shifted the whole
 * page. Same left edge and same title everywhere; a reading page keeps its
 * narrower measure. (Their roots are styled inline, hence !important.) */
body.mps-next > main[style]:not([class]),
.mps-next main.rl > .rl-page[style],
.mps-next .page.mps-enter[style] {
  margin-left: max(0px, calc((100% - 1280px) / 2)) !important; margin-right: auto !important;
  padding-left: var(--gutter) !important; padding-right: var(--gutter) !important;
  /* The body is a flex column and an auto margin switches off its stretch: without a width a page
   * with little on it shrank to its content. Border-box so the gutter never adds to 100%. */
  width: 100%; box-sizing: border-box;
}
body.mps-next > main[style]:not([class]) h1, .mps-next h1.rl-h1, .mps-next h1.t-h1, .mps-next h1.page-title {
  font-size: var(--title-size) !important; line-height: var(--title-lh) !important;
  letter-spacing: var(--title-ls) !important; font-weight: var(--title-weight) !important;
}

/* ---------- Text links that stand alone: a 24px target ----------
 * Card-header links ("Open the meta", "All 3"), the Log's quiet links and the
 * footer's are 18px tall text. Vertical padding on an inline box grows the
 * target without moving a line. */
.mps-next .rl-link, .mps-next .bt .bt-link-btn, .mps-next .bt a.bt-sm, .mps-next .bt a.bt-name,
.mps-next .ach-link, .mps-next .bt a:not([class]) { padding-block: 4px; }
/* A two-letter link ("Log") is also too narrow: widen it in place. */
.mps-next .rl-cardh .rl-link { padding-inline: 4px; margin-inline: -4px; }

/* ---------- Home: two columns, never three ----------
 * In reading order (DOM): your games, the side rail (setup, schedule), your numbers. From 861px the
 * games and the rail sit side by side and the numbers run under both; under 861px Home is one column
 * in DOM order (relaunch-styles). No re-ordering: what is read first is drawn first. */
@media (min-width: 861px) {
  .mps-next .rl-home-grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); column-gap: 48px; }
  .mps-next .rl-home-grid > .rl-col:nth-child(3) { grid-column: 1 / -1; }
}

/* ---------- Log › Games: the composer and your games, with one side panel ----------
 * Was list | composer | stats. Now the composer leads the main column with
 * the Earlier list under it (a filtered Log leads with its matches), and the
 * deck stats (or the opened game) keep their side column. BetaLog renders the
 * columns in that order on this host, so nothing here re-orders them: the
 * reading and Tab order is the order on screen. One column under 1180px. */
.mps-next .bt .bt-grid-log > .bt-col,
  .mps-next .bt .bt-grid-log > .bt-log-side { order: 0; }
@container bt (min-width: 760px) {
  .mps-next .bt .bt-grid-log { grid-template-columns: minmax(0, 1fr); }
}
@container bt (min-width: 1180px) {
  .mps-next .bt .bt-grid-log { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; }
  .mps-next .bt .bt-grid-log > .bt-col { grid-column: 1; }
  .mps-next .bt .bt-grid-log > .bt-log-side { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- A finished tournament: the event and its rounds, with one side column ----------
 * Was event | opened round | notes. The opened round heads the side column
 * and the notes and comparison sit under it. */
@container bt (min-width: 1120px) {
  .mps-next .bt .bt-grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mps-next .bt .bt-grid-3 > .bt-col:first-child { grid-column: 1; grid-row: 1 / span 2; }
  .mps-next .bt .bt-grid-3 > .bt-col:nth-child(2) { grid-column: 2; grid-row: 1; }
  .mps-next .bt .bt-grid-3 > .bt-col-side { grid-column: 2; grid-row: 2; }
}

/* ---------- Settings and Edit profile (g2) ----------
 * One card level: a settings/edit card is the only box; what sits inside it
 * is separated by spacing or a hairline, not a second border. Card body text
 * stops at a readable measure. Skin previews (.skin-preview) are loud
 * miniatures of profile skins on purpose and are left alone. */
.mps-next .st-card-body.st-card-body p,
  .mps-next .st-card-body.st-card-body li { max-width: 56ch; text-wrap: pretty; }
.mps-next .st-root fieldset { max-width: 56ch; }
.mps-next .st-root fieldset > p,
  .mps-next .st-root fieldset > small { text-wrap: pretty; }
/* Inline styles set these boxes, so the overrides need !important. */
.mps-next #push .st-card-body > div > div:first-child,
.mps-next #account-details .st-card-body > div:first-of-type,
.mps-next #stats-section .st-card-body > div,
.mps-next #stats-section .st-card-body > div > section {
  background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important;
}
.mps-next .npe-list.npe-list { border: 0; background: none; }
.mps-next .npe-row.npe-row { padding-inline: 0; }
.mps-next .st-root fieldset { border: 0 !important; padding: 0 !important; margin-inline: 0; min-width: 0; }
.mps-next .st-root fieldset > legend { padding: 0 !important; margin-bottom: 6px; }
.mps-next .media-uploader__bg-frame--empty { border: 0; background: var(--surface-2); }
.mps-next .mps-charm-banner { box-shadow: none !important; }

/* ---------- Log: decks, notes, stats (g1) ----------
 * A card inside a card becomes a plain block: the parent card keeps the
 * border, the child keeps its content and a hairline where it needs one. */
.mps-next .dp-prompt.dp-prompt > section,
.mps-next #map-decks > div {
  border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 8px 0 !important;
}
.mps-next .nts-matchups.nts-matchups > .nts-mx.nts-mx {
  border: 0; border-radius: 0; padding: 14px 0; border-top: 1px solid var(--border);
}
.mps-next .nts-matchups.nts-matchups > .nts-mx.nts-mx:first-child { border-top: 0; padding-top: 0; }

/* ---------- Profile and social (g3) ----------
 * Charts: a trainer's @handle link is 23px tall; two px above and below make it 24+. */
.mps-next .cv-handle { padding-block: 2px; }
/* Profile: the Competitive section is already the card the skin draws, so its
 * module blocks are a heading and rows on the section, not boxes inside it. The
 * stat tiles keep a fill (a tile row), but lose the second outline. */
.mps-next .pc-card { border: 0; border-radius: 0; padding: 0; }
.mps-next .pc-stat { border: 0; }
/* A tile with no wash is a plain figure: no inset either, so the row lines up with the heading. */
.mps-next .pc-stat:not([class*="pc-lvl-"]) { padding-inline: 0; }
.mps-next .st-card-body.st-card-body > div > section { border: 0 !important; padding: 0 !important; }

/* ---------- Events and tournaments (g4) ----------
 * Find's "Where" picker sits inside the filters card: a control row, not a second card. */
.mps-next .evb-where-picker { border: 0; border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--border); }

/* ---------- First run (h3): what a brand-new trainer sees ----------
 * Notes' column centred itself (max-width + auto margins) while the Log tabs above it hug the left edge. */
.mps-next .nts-column.nts-column { margin-inline: 0; }

/* ---------- Tournament day (h2) ----------
 * Log › Games with a game opened: bt.css turns the grid into three columns (list | composer |
 * game, or a 44px rail when the list is folded). Here it stays the two columns of the closed
 * Log: composer and Earlier list in the main column, the opened game in the sticky side
 * column. The list can't fold (there is no room to win), so its rail and fold button go and
 * the rail's hidden children come back. */
@container bt (min-width: 1180px) {
  .mps-next .bt .bt-grid-log.open, .mps-next .bt .bt-grid-log.open.fold { grid-template-columns: minmax(0, 1fr) 360px; }
  .mps-next .bt .bt-grid-log.open .bt-log-fold, .mps-next .bt .bt-grid-log.open.fold .bt-log-rail { display: none; }
  .mps-next .bt .bt-grid-log.open.fold > .bt-log-left { position: static; }
  .mps-next .bt .bt-grid-log.open.fold > .bt-log-left > :not(.bt-log-rail) { display: block; }
  .mps-next .bt .bt-grid-log.open.fold > .bt-log-left > .bt-rowflex,
  .mps-next .bt .bt-grid-log.open.fold > .bt-log-left > .lf-search-row,
  .mps-next .bt .bt-grid-log.open.fold > .bt-log-left > .bt-chips { display: flex; }
}

/* ---------- Footer ----------
 * The footer was a centred 960px block under pages that now start at the left
 * edge of the 1280px frame. Same box as the frame: 1280px wide, same left
 * edge, same gutter. Its top rule, wrapping, and the 220px bottom margin
 * (clearance for the fixed music player) stay as Footer.tsx sets them; the
 * legal links keep their margin-left: auto, so on a phone they stay right of
 * the bottom-left bug button. (Inline styles, hence !important.) */
.mps-next .site-footer {
  max-width: 1280px !important;
  margin-left: max(0px, calc((100% - 1280px) / 2)) !important; margin-right: 0 !important;
  align-self: stretch; /* the body is a flex column: stretch to the frame, not to the content */
  padding-left: var(--gutter) !important; padding-right: var(--gutter) !important;
}

/* ---------- Events with listings (k2) ----------
 * Find and a store's page drew three columns at 1280. One main column and at most one side
 * column: Find keeps its filters beside the list and the month calendar goes under the
 * filters (the same arrangement the 961-1180px layout already uses); a store's page puts
 * "What's played here" in the main column and the calendar + visit info in the side column. */
@media (min-width: 961px) {
  .mps-next [class*="evb-module"][class*="findGrid"] { grid-template-columns: 272px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mps-next [class*="evb-module"][class*="findGrid"] > :nth-child(2) { grid-row: span 2; }
  .mps-next [class*="evb-module"][class*="findGrid"] > :last-child { grid-column: 1; position: static; max-height: none; overflow: visible; }
  .mps-next [class*="evb-module"][class*="storeGrid"] { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr; }
  .mps-next [class*="evb-module"][class*="storeGrid"] > :nth-child(1) { grid-column: 2; grid-row: 1; }
  .mps-next [class*="evb-module"][class*="storeGrid"] > :nth-child(2) { grid-column: 1; grid-row: 1 / span 2; }
  .mps-next [class*="evb-module"][class*="storeGrid"] > :last-child { grid-column: 2; grid-row: 2; }
  /* A shared event: Who's here and the deck tally stack in the main column, the actions sit beside them. */
  .mps-next [class*="evb-module"][class*="sharedGrid"] { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; }
  .mps-next [class*="evb-module"][class*="sharedGrid"] > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .mps-next [class*="evb-module"][class*="sharedGrid"] > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .mps-next [class*="evb-module"][class*="sharedGrid"] > :last-child { grid-column: 2; grid-row: 1 / span 2; }
}
/* Links the size of their text line: give them a 24px target. */
.mps-next [class*="evb-module"][class*="plainLink"][class*="sm"] { padding-block: 3px; }
.mps-next a[class*="evb-module"][class*="name"] { padding-block: 2px; }
/* Phone rows: the title is 17px on a 22px line (1.29): 24px is a 24px target and a 1.41 leading. */
.mps-next [class*="phone-module"][class*="ttl"] { line-height: 24px; }
/* A row's actions, trailing control and extra line are z-index 1 stacking contexts, so the next row's
 * (later in the page) painted over an open Going menu. The one holding the open menu goes on top. */
.mps-next [class*="evb-module"][class*="eventRowActions"]:has([aria-expanded="true"]),
.mps-next [class*="phone-module"][class*="trail"]:has([aria-expanded="true"]),
.mps-next [class*="phone-module"][class*="extra"] > :has([aria-expanded="true"]) { z-index: 30; }

/* ---------- Labs and Star Chip (k1) ----------
 * Log patterns and Playtest, and every Star Chip page, drew their own centred column under their own
 * title size, so the page jumped sideways and its title shrank when you came from a neighbour.
 * Same left edge as the rest; the narrower reading measure stays, starting at that edge. */
.mps-next .pt-column.pt-column { margin-inline: 0; }
.mps-next [class*="sim-module"][class*="title"] {
  font-size: var(--title-size); line-height: var(--title-lh); letter-spacing: var(--title-ls); font-weight: var(--title-weight);
}
.mps-next main.sc-page.sc-page, .mps-next main.sc-col.sc-col,
.mps-next main.mp-page.mp-page {
  margin-left: max(0px, calc((100% - 1280px) / 2)); margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.mps-next main.sc-page.sc-page { max-width: 1280px; }
/* A disclosure inside the match's card: a divider, not a second card. */
.mps-next .sc-disc.sc-disc { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.mps-next .sc-disc.sc-disc > summary { padding-inline: 0; }
.mps-next .sc-disc-body.sc-disc-body { padding-inline: 0; }
.mps-next .sc-meta-muted.sc-meta-muted { max-width: 60ch; }
/* An event's own page (a listing, or "not listed anymore") has an inline max-width and centred itself,
 * while every other Events page starts at the frame's left edge: same edge, narrower measure. */
.mps-next main[class*="evb-module"][class*="root"][style*="max-width"] { margin-left: max(0px, calc((100% - 1280px) / 2)); margin-right: auto; }

/* ---------- Tournament management (t1) ----------
 * The casual runner and its public pages (/organize, /tournaments, /t/<slug>, /l/<slug>, /circuits, /c/<slug>)
 * each centred a column of their own width (720 to 1100px) under a 24-30px title, and the organizer pages
 * had no side padding at all on a phone. `tm-page` is on each page's root <main>: the frame's left edge,
 * gutter and 36px title. (The roots set max-width, margin and padding inline, hence !important.) */
.mps-next main.tm-page {
  width: 100%; max-width: 1280px !important; box-sizing: border-box; min-width: 0;
  margin-left: max(0px, calc((100% - 1280px) / 2)) !important; margin-right: auto !important;
  padding: var(--page-pad-top) var(--gutter) var(--page-pad-bottom) !important;
}
.mps-next main.tm-page h1 {
  font-size: var(--title-size) !important; line-height: var(--title-lh) !important;
  letter-spacing: var(--title-ls) !important; font-weight: var(--title-weight) !important;
}
/* Organizer pages: the page's own root <div> is the 1100px column. It is the frame now. */
.mps-next main.organize-shell > [style*="max-width"] { max-width: none !important; margin-inline: 0 !important; padding: 0 !important; }
/* A tournament's public page: the title is the page head, not a card. Reading blocks keep a 760px measure
 * from the left edge; pairings | standings keep their two columns. */
.mps-next .tourn-head { background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
.mps-next .tourn-pub > :is(section, .tourn-narrow, .tourn-mine, p) { max-width: 760px; }
.mps-next .tourn-pub > .tourn-narrow,
  .mps-next .tourn-pub > .tourn-mine { align-self: flex-start !important; }
.mps-next .tourn-pub > p { text-align: left !important; }
/* One card level: the tables (and the signed-up tiles) inside a section card are plain blocks. */
.mps-next .tourn-card > div { border: 0 !important; background: transparent !important; border-radius: 0 !important; }
.mps-next .tourn-card li { border: 0 !important; }
/* On a phone the trainer's own table and its result buttons come first, ahead of the event's details. */
@media (max-width: 760px) {
  .mps-next .tourn-pub > .tourn-mine { order: -1; }
}
/* The organizer's TOM tables sit inside the round's card: rows divided by a hairline, not boxed again. */
.mps-next .tm-tables { gap: 0 !important; }
.mps-next .tm-tables > li { border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important; padding-inline: 0 !important; }
.mps-next .tm-tables > li:first-child { border-top: 0 !important; }
/* Round history: each round's pairings table inside its disclosure is a plain block, and a form's
 * "this circuit is frozen" note is a tinted line inside the form card, not a second bordered box. */
.mps-next .tourn-card details > div > div { border: 0 !important; background: transparent !important; border-radius: 0 !important; }
.mps-next .tournament-form-card > p[style*="border"] { border: 0 !important; }

/* ---------- The bug button never covers a result button ----------
 * The Log composer's Win / Loss / Tie bar sticks to the bottom (above the phone tab bar), exactly
 * where the bug button floats while it is not out in the margin (under 1344px). The bar keeps a
 * 64px slot at its left and the button sits in it, centred on the bar's row (12px padding + the
 * 60px buttons: 18px up from the bar's bottom), instead of floating over the content above it.
 * Not in a sheet: an open sheet docks the button at the top (html[data-overlay-open]).
 * Phones only: on wider screens the bar is rarely stuck and the empty slot read as a misaligned row. */
@media (max-width: 767px) {
  .mps-next:not(.mps-tabbed) .bt:not(.bt-sheet) .bt-log-composer .bt-result-foot { padding-left: calc(var(--bt-bleed) + 64px); }
  html:not([data-overlay-open]) body.mps-next:not(.mps-tabbed):has(.bt:not(.bt-sheet) .bt-log-composer .bt-result-foot) .bug-fab { bottom: calc(var(--app-bottom-inset, 0px) + 18px); }
}

/* ---------- The bug button docks in the tab bar (fifth audit) ----------
 * On a phone it floated bottom-left over the content gutter, so mid-scroll it covered labels, ranks and
 * round numbers (and the frame's bottom room only cleared it at the very end). Where the tab bar shows, the
 * bar keeps a 52px slot at its left and the button sits in it, on the bar's row: always visible, its full
 * 48px, never over the page. The five tabs share the rest; "Log a game" (the longest label, ~62px) gets a
 * larger share so it is never cut (64px at 320, the others 49px). While a
 * sheet is open the button still docks above the panel (html[data-overlay-open], globals.css); while the bar
 * steps aside for typing, the button stays at the bottom-left. */
@media (max-width: 767px) {
  .mps-next.mps-tabbed .site-tabbar { padding-left: calc(52px + env(safe-area-inset-left, 0px)); }
  .mps-next.mps-tabbed .site-tabbar .tab-primary { flex-grow: 1.35; }
  html:not([data-overlay-open]) body.mps-next.mps-tabbed .bug-fab {
    left: calc(2px + env(safe-area-inset-left, 0px)) !important; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: none;
  }
}

/* ---------- Meta: Decks ----------
 * One Decks page with a Share · Tiers · Trends switch (app/next/meta). The switch sits right under the head
 * and above the filters, left-aligned like the sub-nav, with the same gap the sections below it use. */
.mps-next .decks-views { align-self: flex-start; }

/* ---------- Star Chip: join, RSVP, organizer (s1) ----------
 * The organizer pages (/sc/new, /sc/<slug>/organize) centred a 720px column; the invite landing and the RSVP
 * page already start at the frame's left edge (k1 section). Same left edge and gutter here (the organizer's
 * `<main>` is `main.sc-col.sc-col`, above), the 720px measure for the forms stays. The RSVP page's title has no
 * t-h1 class: the frame's 36px title. */
.mps-next main.sc-col.sc-col h1.sc-ld-title.sc-ld-title {
  font-size: var(--title-size); line-height: var(--title-lh); letter-spacing: var(--title-ls); font-weight: var(--title-weight);
}
/* A list of rows drawn inside a section card (Finals) is a plain block with hairlines, not a bordered box in a card. */
.mps-next .card .og-list.og-list { border: 0; border-radius: 0; overflow: visible; }
.mps-next .card .og-list.og-list > li > .og-row.og-row { padding-inline: 0; }
.mps-next .sc-ld-cliff.sc-ld-cliff li { text-wrap: pretty; }
/* Where to pay, inside the join panel's card: a hairline, not a second box. */
.mps-next .card .sc-ld-pay.sc-ld-pay { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 12px 0 0; }

/* ---------- Stats room (Log › Stats: My meta, Insights, Patterns as one page) ----------
 * One column; the sections are told apart by spacing and an h2, not by cards. The Labs sections
 * follow the first with extra air above their heading, and a section's own width is the page's. */
.mps-next .stats-room { row-gap: 40px; }
.mps-next .stats-room > .stats-section { display: flex; flex-direction: column; gap: 20px; min-width: 0; scroll-margin-top: 84px; }
.mps-next .stats-room > .stats-section + .stats-section { padding-top: 12px; border-top: 1px solid var(--border); }
.mps-next .stats-room .stats-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mps-next .stats-jump { display: flex; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-top: -8px; }
.mps-next .stats-jump::-webkit-scrollbar { display: none; }
.mps-next .stats-jump-label { flex: none; font-size: 0.8125rem; color: var(--text-muted); }
.mps-next .stats-jump .chip { flex: none; }
/* Patterns draws a centred 860px column of its own: here it is the page's column. */
.mps-next .stats-room .pt-column.pt-column { max-width: none; margin-inline: 0; }

/* ---------- Stats: the deck suggestion is a row, not a box in the card ----------
 * "Map your decks" suggests an archetype in a bordered box inside the card
 * (styled inline, hence !important). */
.mps-next #map-decks > div > div > div { border: 0 !important; background: none !important; padding: 0 !important; }

/* ---------- Type: one heading scale (ty) ----------
 * Section headings drew eight styles across the pages (22px display, 21px/650, 22px/650, 20px/600,
 * 18px/600, 16px/700 ...) because every page group carried its own copy of the scale (.rl-h2/.rl-h3,
 * .bt-h2/.bt-h3, the Meta and Events modules' .h2/.h3, .t-h2/.t-h3) and some h2s wore the card-title
 * class. One scale, the one mps.css already documents: page title 36px display (--title-*), section
 * heading = .t-h2 (22px display 600), sub-section / card title = .t-h3 (16px body 700). On a phone the
 * section heading steps to 20px, where the page title steps to 28px. The level is the element: an h2
 * wearing a card-title class is still a section heading.
 * Deliberately NOT in the scale: the uppercase group labels (Settings / Edit profile's group names,
 * "Playing next" on My decks: .t-eyebrow / module .eyebrow), and empty-state titles (h2.t-h3, the organizer's: h3 values).
 * The profile (/u/...) keeps its skin's type. */
.mps-next {
  --title-family: var(--font-display);
  --h2-family: var(--font-display); --h2-size: 1.375rem; --h2-lh: 1.2; --h2-ls: -0.01em; --h2-weight: 600;
  --h3-family: var(--font-body); --h3-size: 1rem; --h3-lh: 1.3; --h3-ls: normal; --h3-weight: 700;
}
@media (max-width: 599px) { .mps-next { --h2-size: 1.25rem; --h2-lh: 1.25; } }
.mps-next :is(h2.rl-h2, h2.rl-h3, h2.bt-h2, h2.bt-h3, h2.t-h2, h2.psec-title,
  h2[class*="mz-module"][class*="__h2"], h2[class*="mz-module"][class*="__h3"],
  h2[class*="evb-module"][class*="__h2"], h2[class*="evb-module"][class*="__h3"],
  h2.pm-title.pm-title, h2[class*="phone-module"][class*="__title"], h2.dp-shared-title.dp-shared-title,
  main h2:not([class])):not(.profile-page *, [class*="eyebrow"]) {
  font-family: var(--h2-family); font-size: var(--h2-size); line-height: var(--h2-lh);
  letter-spacing: var(--h2-ls); font-weight: var(--h2-weight); text-transform: none;
}
.mps-next :is(h3.rl-h3, h3.bt-h3, h3.t-h3, h3.psec-title,
  h3[class*="mz-module"][class*="__h3"], h3[class*="evb-module"][class*="__h3"],
  main h3:not([class])):not(.profile-page *, [class*="eyebrow"]) {
  font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh);
  letter-spacing: var(--h3-ls); font-weight: var(--h3-weight); text-transform: none;
}
/* A few headings set their size inline (a chart frame's 16px title, Find's empty state at 20px, the
 * new tournament's "Online today on Limitless", Home's setup checklist at 15px): the scale wins. */
.mps-next main h2[style*="font-size"]:not(.profile-page *, [class*="eyebrow"], .t-h3, .organize-empty__title) { font-size: var(--h2-size) !important; line-height: var(--h2-lh) !important; }
.mps-next main h3[style*="font-size"]:not(.profile-page *, [class*="eyebrow"]) { font-size: var(--h3-size) !important; line-height: var(--h3-lh) !important; }
/* The tournament page's card labels ("Round 1 of 5", "At Local game store") are uppercase labels on a
 * desktop; on a phone the section-title treatment (mps.css 8b) turns them into the section's heading,
 * so there they take the heading scale rather than a second 20px/700 style. */
@media (max-width: 640px) {
  .mps-next h2.psec-title[class*="eyebrow"]:not(.profile-page *) {
    font-family: var(--h2-family); font-size: var(--h2-size); line-height: var(--h2-lh); letter-spacing: var(--h2-ls); font-weight: var(--h2-weight);
  }
}
/* Empty-state titles keep the card-title values (Notifications' h2.t-h3 already does). */
.mps-next h2.organize-empty__title { font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh); font-weight: var(--h3-weight); }

/* Page titles: one face too. Feed, Charts and the organizer's dashboard set theirs in the body face. */
.mps-next body > main[style]:not([class]) h1,
  .mps-next h1.rl-h1:not(.np-pad):not(np-pad):not(np-pad),
  .mps-next h1.t-h1:not(.np-pad):not(np-pad):not(np-pad),
  .mps-next main.tm-page h1:not(.np-pad):not(np-pad),
  .mps-next h1.hp-pageTitle.hp-pageTitle:not(np-pad):not(np-pad) {
  font-family: var(--title-family);
}
/* Home on a phone drew a 34px title where every other page draws the phone's 28px. */
.mps-next h1.hp-pageTitle.hp-pageTitle {
  font-size: var(--title-size); line-height: var(--title-lh); letter-spacing: var(--title-ls); font-weight: var(--title-weight);
}
/* Home on a desktop had no visible title (the record was its head; "Home" was for screen readers),
 * while Home on a phone and every other page open with their name. The name goes on its own line
 * above the all-time record, which stays the biggest thing on the page. */
@media (min-width: 641px) {
  .mps-next .rl-home-head { flex-wrap: wrap; row-gap: 4px; }
  .mps-next .rl-home-head > h1.rl-sr {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; flex: 0 0 100%; margin: 0;
    font-family: var(--title-family); font-size: var(--title-size); line-height: var(--title-lh); letter-spacing: var(--title-ls); font-weight: var(--title-weight);
  }
}
/* A tournament's title sat inside its record card, 29px in from every other page's title. The record
 * card is the page head, not a box (as it already is on a phone): title, record and rounds start at
 * the column's edge; the opened round keeps its card beside it. */
.mps-next .bt .bt-record-card { border: 0; border-radius: 0; padding: 0; }

/* (Chart frames: no frame at all on this host, "no box by default" below.) */

/* ---------- Venue targets (ty) ----------
 * At a venue the Log composer and a tournament's round sheet are used one-handed on a phone. The
 * compact controls there (Paste log, Deck not revealed, previous / next round, Add round N, the
 * who-went-first Me / Them) were 30-36px tall. On touch screens the compact height is the full
 * control height; a mouse keeps the compact look. */
@media (pointer: coarse) {
  .mps-next .bt { --bt-control-h-sm: var(--bt-control-h); }
  /* A compact segment's buttons (who went first, a game's W / L) sit 3px inside its track: their
   * tap area covers the track, so a 44px track is a 44px target without a taller look. */
  .mps-next .bt :is(.bt-first-inline > .bt-seg, .bt-seg.bt-seg-sm) > button { position: relative; }
  .mps-next .bt :is(.bt-first-inline > .bt-seg, .bt-seg.bt-seg-sm) > button::after { content: ""; position: absolute; inset: -3px 0; }
  /* The tournament page's phone rows pin "Add round N" to 36px (TP_ROUND, TP_SLOT_ACTIONS in tournament-phone.ts: they skip a touch screen, so this wins there). */
  .mps-next .bt .tp-round.tp-round > .bt-btn.bt-btn-ghost,
  .mps-next .bt .tp-slot-actions.tp-slot-actions .bt-btn { min-height: var(--bt-control-h); }
}

/* ---------- Second audit (x2): native checks, the footer's clearance, the bug button ----------
 * Native checkboxes and radios were the browser's 13px squares next to 18px ones elsewhere in
 * Settings: all 18px in the accent. Zero specificity (:where), so any styled or visually hidden
 * one (Edit profile's skin radios) keeps its own rules. */
:where(.mps-next) :where(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; accent-color: var(--accent); }
/* The footer's 220px bottom margin clears the profile's fixed music player (Footer.tsx); every
 * other page needs only the frame's bottom room, which already clears the phone tab bar (body
 * padding) and the bug button. (Footer.tsx sets the margin inline, hence !important.) */
.mps-next .site-footer { margin-bottom: var(--page-pad-bottom) !important; }
.mps-next:has(.mpl) .site-footer { margin-bottom: 220px !important; }
/* The bug button floats bottom-left (always visible: it is never hidden or shrunk). Its 48px fit
 * left of the content from 1344px (the frame's margin plus its 32px gutter leave 64px): it sits
 * 16px left of the content's edge there, out of the page. Narrower it stays at 16px, over the
 * page's left edge while it scrolls; the frame's bottom room clears it at the end. (`100%` is the
 * window without its scrollbar; the left is inline, hence !important.) */
.mps-next .bug-fab { left: max(16px, calc((100% - 1280px) / 2 + var(--gutter) - 64px)) !important; }

/* ---------- Third audit (x3): sign-in titles, the bug button's place, scroll room ----------
 * Sign in / Create your account use the app's page-title size (36px, 28px on phones). */
.mps-next .auth-title { font-size: var(--title-size); line-height: var(--title-lh); }
/* A side rail taller than the window holds by its bottom 16px up (mps.css .sticky-rail); while the
 * bug button floats at the bottom-left (under 1344px) the rail's last links sat under it. It holds
 * 80px up instead, clear of the button. */
@media (min-width: 1024px) and (max-width: 1343px) {
  .mps-next .sticky-rail { top: min(calc(64px + env(safe-area-inset-top, 0px) + 16px), calc(100dvh - var(--rail-h, 0px) - var(--app-bottom-inset, 0px) - 80px)); }
}
/* Edit profile and Settings are a dozen long cards: their first layout was one ~275ms task at 4x
 * CPU (production build, /edit at 1280; ~150ms with this). A card off screen is skipped until it
 * nears the viewport; `auto` remembers its real height once drawn, and scroll anchoring holds what
 * is on screen. Their menus are portalled (beta/Select) or native; the clip margin keeps a focus
 * ring at a card's edge whole where the browser supports it. (Not on the card bodies: controls sit
 * flush with their edges.) Phones too since the fourth audit (DESIGN-33): /edit at 360 was one ~320ms
 * layout task at 4x, ~85ms with this. (Axe's target-size check may read a skipped card's stale boxes
 * as touching targets on a phone: a measurement artefact, not what a trainer gets.) */
.mps-next main .card.st-card.st-card { content-visibility: auto; contain-intrinsic-size: auto 400px; overflow-clip-margin: 8px; }
/* Except, on a phone, the Appearance card: its region select and skin buttons share rows, and a skipped
 * card's stale boxes overlap them (axe's target-size check then fails a 321x40 select). */
@media (max-width: 1023px) { .mps-next main .card.st-card.st-card:has(#region-select) { content-visibility: visible; } }

/* ===== Fourth audit (DESIGN-33) ===== */

/* Log sub-nav on a phone: all five tabs fit at 320 (they were 358px in a 281px strip: "Stats" clipped,
 * no hint it scrolled). Same 44px height; the spare width goes between the tabs. Raised specificity: the
 * underline-tab rules in the visual pass come later in this file. */
@media (max-width: 479px) {
  .mps-next .bt .bt-subnav.bt-seg { justify-content: space-between; gap: 0; }
  .mps-next .bt .bt-subnav.bt-seg > a { padding: 0 5px; }
  .mps-next .bt .bt-subnav.bt-seg > a:first-child { padding-left: 0; }
  .mps-next .bt .bt-subnav.bt-seg > a:last-child { padding-right: 0; }
  .mps-next .bt .bt-subnav.bt-seg > a:is([aria-current="page"], .on, [class*="segOn"])::after { left: 5px; right: 5px; }
  .mps-next .bt .bt-subnav.bt-seg > a:first-child::after { left: 0; }
  .mps-next .bt .bt-subnav.bt-seg > a:last-child::after { right: 0; }
}

/* Stats' "On this page" strip: fade the edge with more chips behind it (FadeStrip sets data-fade). */
.mps-next .stats-jump[data-fade="r"] { mask-image: linear-gradient(to right, black calc(100% - 32px), transparent); }
.mps-next .stats-jump[data-fade="l"] { mask-image: linear-gradient(to left, black calc(100% - 32px), transparent); }
.mps-next .stats-jump[data-fade="l r"] { mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent); }

/* Settings and Edit profile, desktop: the section menu follows the page. Settings' was 824px tall, so
 * the visual pass's "stick only if it fits" let it scroll away and left the column empty for 6,000px. Tighter
 * rows (26px links, still over the 24px target size) make it fit a 720px-tall window; a shorter window
 * still sticks it, and only then does it scroll on its own (max-height). Forms keep a readable measure
 * instead of a 976px column whose controls stopped at its left third. */
@media (min-width: 1024px) {
  .mps-next nav.sticky-rail.st-nav { gap: 8px; top: 80px; max-height: calc(100dvh - var(--app-bottom-inset, 0px) - 96px); overflow-y: auto; }
  .mps-next nav.sticky-rail.st-nav > .st-nav-group { gap: 1px; }
  .mps-next nav.sticky-rail.st-nav .st-nav-label { padding-bottom: 2px; }
  .mps-next nav.sticky-rail.st-nav a.st-nav-link { min-height: 26px; }
  .mps-next .st-body.st-body > .st-content.st-content { max-width: 46rem; }
}
/* Under 1400px the rail's left edge is under the bug button (fixed, bottom left, 72px tall with its
 * margin): the rail stops above it, so on a 720px-tall window its last links scroll in the rail
 * instead of hiding behind the button. */
@media (min-width: 1024px) and (max-width: 1399px) {
  .mps-next nav.sticky-rail.st-nav { max-height: calc(100dvh - var(--app-bottom-inset, 0px) - 80px - 72px); }
}

/* My decks, "Other lists": "Choose" sat 12px above the bottom of its row, so a row made taller by a
 * wrapped name or the CURRENT DECK badge pushed its button lower than the others. Now it is centred on
 * its row (DecksListBeta's whichRow), level with the row's "List saved" and chevron. */
@media (min-width: 900px) {
  .mps-next .dp-which-row.dp-which-row > .dp-prompt.dp-prompt:has(> section > div:only-child > span + button:last-child) { position: static; }
  .mps-next .dp-which-row.dp-which-row > .dp-prompt.dp-prompt:has(> section > div:only-child > span + button:last-child) > section {
    top: 50%; bottom: auto; transform: translateY(-50%);
  }
}

/* Meta's scope / filter bar on a phone: the visual pass fills it, but the phone layout (field.module.css)
 * zeroes its padding and radius, so the fill sat flush on its text and chips. Same inset as desktop. */
@media (max-width: 640px) {
  .mps-next section.scopeBar.scopeBar { padding: 12px 14px; border-radius: 14px; }
}

/* ######################################################################
 * THE VISUAL PASS (was public/beta/next-visual.css, a second render-blocking file; one file now, same
 * cascade order: everything below loads after the layout rules above).
 * ###################################################################### */
/* The redesign's visual pass: beta.mypoke.space only (merged into next.css, after its layout rules).
 *
 * THE RULE: a fill means you do something here; no box means you read.
 *   Filled (--surface, dark --surface-2): the Log's "Report a game" composer, a tournament's
 *   opened round, forms, a live status you act on. Everything you only read (recent games,
 *   stats, schedules, comparisons, lists) is a heading and its content, on the page.
 * SPACING: 8 inside a group, 16 between a heading and its content, 48 between sections in a
 *   column; at most a hairline (1px --border) between rows or between a column and its rail.
 * TYPE: section labels are sentence-case headings (h3 scale), never uppercase eyebrows; numbers
 *   in records, rates and tables are tabular.
 * NAV: sub-navs are underline tabs like the top bar; a view switch is a segmented control; filters
 *   stay chips. Three looks for three jobs.
 * Unknown deck: reserved space with a faint fill, never a dashed box.
 * Every selector starts with .mps-next (or :where(.mps-next)). Same colours, fonts and components. */

/* ---------- Browser surfaces ---------- */
/* Unprefixed on purpose (this sheet loads only on this host): ".mps-next ::selection" made every forced style
 * recalc match a highlight pseudo against each element's ancestors, about a quarter of a chart mount's cost. */
::selection { background: var(--accent-soft); color: var(--text); }
:where(.mps-next) :where(input, textarea, [contenteditable]) { caret-color: var(--accent); }
:where(.mps-next) :where(a, button, summary, select, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:where(.mps-next) a { text-underline-offset: 0.2em; text-decoration-thickness: from-font; }
:where(.mps-next) :where(h1, h2, h3) { text-wrap: balance; }
:where(.mps-next) :where(table, .rl-record, .bt-record, .bt-kv, .dash-stat-value, .rl-mono, .bt-mono, [class*="record"], [class*="mono"]) { font-variant-numeric: tabular-nums; }
:where(.mps-next) * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:where(.mps-next) ::-webkit-scrollbar { width: 8px; height: 8px; }
:where(.mps-next) ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
:where(.mps-next) ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Unknown deck: a quiet reserved slot ---------- */
.mps-next .sprite-slot,
.mps-next [class*="mz-module"][class*="dkSlot"] {
  border: 0; background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 500;
}
.mps-next .sprite-slot { width: 28px !important; height: 28px !important; border-radius: 8px; }
.mps-next [class*="mz-module"][class*="dkSlot"] { width: 36px; height: 36px; border-radius: 10px; }

/* ---------- Sub-navs: underline tabs, like the top bar ----------
 * The Log's (Games · Tournaments · Decks · Notes · Stats) and Meta's (Decks · Events · Cards ·
 * Lists) were a filled pill track that read as a filter. Now: plain tabs on one hairline, the
 * current one in text colour with a 2px accent underline. The gliding pill is not drawn. */
.mps-next .bt .bt-subnav,
.mps-next .page-head-nav > nav {
  display: flex; width: 100%; background: none; padding: 0; gap: 4px; border-radius: 0;
  box-shadow: inset 0 -1px 0 var(--border); min-height: 44px;
}
.mps-next .page-head-nav { width: 100%; }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > [data-nav-indicator] { display: none !important; }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a {
  position: relative; min-height: 44px; padding: 0 12px; border-radius: 0; background: none !important;
  box-shadow: none !important; color: var(--text-muted); font-size: 0.875rem; font-weight: 600;
  transition: color 120ms ease;
}
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:first-child { padding-left: 0; }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:hover { color: var(--text); }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:is([aria-current="page"], .on, [class*="segOn"]) { color: var(--text); }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:is([aria-current="page"], .on, [class*="segOn"])::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent);
}
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:first-child::after { left: 0; }
.mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a:focus-visible { outline-offset: -2px; }

/* A folded tab's views (My decks · Playtest, Notes · Groups): a segmented view switch, not chips
 * that look like the filters under them. */
.mps-next .subnav-views {
  display: inline-flex; width: fit-content; max-width: 100%; gap: 2px; padding: 3px; margin-top: 16px;
  background: var(--surface-2); border-radius: 10px;
}
.mps-next .subnav-views > .chip {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 600;
}
.mps-next .subnav-views > .chip.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
@media (prefers-reduced-motion: reduce) {
  .mps-next :is(.bt .bt-subnav, .page-head-nav > nav) > a { transition: none; }
}

/* ---------- Home ---------- */
/* Read-only sections are a heading and their rows (the "no box by default" rule at the end of this
 * file); the composer, an in-progress tournament and the event moment keep theirs. */
.mps-next .rl-page .rl-home-grid > .rl-col { gap: 48px; }
.mps-next .rl-page .rl-home-grid { row-gap: 48px; }
.mps-next .rl-page .rl-cardh { margin-bottom: 4px; }
/* Section headings: one size. Card titles on Home were 22px display in a box; on the page they
 * are section headings, so the same h2 scale as "The meta this week". */
.mps-next .rl-page .rl-home-grid h2.rl-h3 {
  font-family: var(--h2-family); font-size: var(--h2-size); line-height: var(--h2-lh); letter-spacing: var(--h2-ls); font-weight: var(--h2-weight);
}
/* The live Star Chip status: the one thing on Home you act on right now, so it is filled. */
.mps-next .rl-page > .rl-card.st-card { background: var(--surface); border-color: transparent; }
:root[data-theme="dark"] .mps-next .rl-page > .rl-card.st-card { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mps-next .rl-page > .rl-card.st-card { background: var(--surface-2); } }

/* The head: title and all-time record on the left, the window's four numbers as one unboxed
 * strip with hairline dividers. */
.mps-next .rl-home-top .rl-stats { gap: 0; }
.mps-next .rl-home-top .dash-stat { border: 0; border-radius: 0; background: none; padding: 2px 20px; }
.mps-next .rl-home-top .dash-stat + .dash-stat { border-left: 1px solid var(--border); }
@media (max-width: 720px) {
  .mps-next .rl-page .rl-stats.rl-stats { gap: 20px 0; }
  .mps-next .rl-stats .dash-stat { border: 0; border-radius: 0; padding: 0 16px; }
  .mps-next .rl-stats .dash-stat:nth-child(odd) { padding-left: 0; }
  .mps-next .rl-stats .dash-stat:nth-child(even) { border-left: 1px solid var(--border); }
}

/* "The meta this week" with no meta to show held only the home-spot prompt, so the heading named
 * something that was not under it. Then the prompt stands on its own heading. */
.mps-next .rl-home-meta:has(.rl-meta-cell:only-child > [data-home-module="events_near"]) > .rl-cardh { display: none; }
.mps-next .rl-home-meta [data-home-module="events_near"] h2.rl-h3 {
  font-family: var(--h2-family); font-size: var(--h2-size); line-height: var(--h2-lh); letter-spacing: var(--h2-ls); font-weight: var(--h2-weight);
}
.mps-next .rl-home-meta .rl-mod { gap: 8px; }

/* An empty module is its heading and one muted line: no chart frame, legend or table toggle. */
.mps-next .chart-frame:has(.chart-empty) > ul:not(.np-pad),
  .mps-next .chart-frame:has(.chart-empty) > details.chart-table { display: none !important; } /* the legend is styled inline */
.mps-next .chart-empty { margin: 0 !important; }
.mps-next .rl-vs:has(> p.rl-muted:last-child) > span.rl-xs { display: none; }
.mps-next .rl-card:has(> .rl-split):has(> p.rl-sm.rl-muted) > .rl-split:not(.np-pad):not(np-pad),
  .mps-next .rl-card:has(> .rl-split):has(> p.rl-sm.rl-muted) > p.rl-xs.rl-muted { display: none; }
.mps-next .rl-page .rl-split { border-color: var(--border); }

/* The setup checklist's items: rows divided by a hairline, not boxes. */
.mps-next .rl-checkitem { border-left: 0; border-right: 0; border-radius: 0; }

/* ---------- Log › Games ---------- */
/* The composer stays the one filled surface. The deck stats beside it and the Earlier list are
 * read: no box. */
@container bt (min-width: 1180px) {
  .mps-next .bt .bt-log-side.bt-card { border-left: 1px solid var(--border); padding-left: 24px; }
}
.mps-next .bt .bt-log-side .bt-asec { border-color: var(--border); }
.mps-next .bt [class*="log-phone-module"][class*="earlierCard"] { border: 0; border-radius: 0; background: none; }
.mps-next .bt [class*="log-phone-module"][class*="earlierCard"] > .bt-day { padding-inline: 0; }
.mps-next .bt [class*="log-phone-module"][class*="earlierCard"] .bt-dayhead { padding-inline: 0; }
.mps-next .bt [class*="log-phone-module"][class*="earlierCard"] .bt-li,
  .mps-next .bt [class*="log-phone-module"][class*="earlierCard"] .bt-li-wrap { padding-inline: 0; }
.mps-next .bt p.bt-empty { border: 0; padding: 0; background: none; }
.mps-next .bt .bt-grid-log > .bt-col { row-gap: 16px; }
.mps-next .bt .bt-grid-log > .bt-log-left { margin-top: 24px; }

/* ---------- Section labels: sentence-case headings, not uppercase eyebrows ---------- */
.mps-next .bt h2.bt-eyebrow,
  .mps-next .bt h3.bt-eyebrow,
  .mps-next [class*="mz-module"]:is(h2, h3)[class*="eyebrow"],
  .mps-next [data-testid="shared-event-panel"] > span:first-child {
  font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh);
  letter-spacing: normal; font-weight: var(--h3-weight); text-transform: none; color: var(--text);
}
/* (The shared-event label is styled inline.) */
.mps-next [data-testid="shared-event-panel"] > span:first-child {
  font-size: var(--h3-size) !important; letter-spacing: normal !important; text-transform: none !important; color: var(--text) !important;
}
/* The kicker above a tournament's title ("League Cup") joins the muted line under it. */
.mps-next .bt .bt-record-card > .bt-stack:has(> .bt-eyebrow + h1) { display: flex; flex-flow: row wrap; align-items: baseline; column-gap: 0; }
.mps-next .bt .bt-record-card > .bt-stack:has(> .bt-eyebrow + h1) > h1 { flex: 0 0 100%; order: 0; }
.mps-next .bt .bt-record-card > .bt-stack:has(> .bt-eyebrow + h1) > :not(h1, .bt-eyebrow) { order: 1; }
.mps-next .bt .bt-record-card > .bt-stack:has(> .bt-eyebrow + h1) > .bt-eyebrow {
  order: 2; font-size: 0.875rem; line-height: inherit; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text-muted);
}
.mps-next .bt .bt-record-card > .bt-stack:has(> .bt-eyebrow + h1) > .bt-eyebrow::before { content: "·\00a0"; margin-left: 0.25em; }

/* ---------- A tournament ---------- */
/* The opened round is the one filled panel; the comparison, the store record and the note are
 * read (no box); Sharing & privacy is a quiet row. */
@media (min-width: 641px) {
  /* (On a phone the opened round is a section of the page already: TP_DETAIL in tournament-phone.ts.) */
  .mps-next .bt .tp-detail.tp-detail.bt-card { background: var(--surface); border-color: transparent; }
  :root[data-theme="dark"] .mps-next .bt .tp-detail.tp-detail.bt-card { background: var(--surface-2); }
  .mps-next .bt .bt-col-side { gap: 40px; }
  .mps-next .bt .bt-col-side > .tp-section.tp-section:has(> details) { border-top: 1px solid var(--border); padding-top: 12px; }
  .mps-next .bt .bt-col-side > .tp-section.tp-section:has(> details) h2 { font-family: var(--h3-family); font-size: var(--h3-size); font-weight: var(--h3-weight); }
  .mps-next .bt .bt-grid-3 > .bt-col:first-child > .tp-section.tp-section { margin-top: 24px; }
}
@media (min-width: 641px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mps-next .bt .tp-detail.tp-detail.bt-card { background: var(--surface-2); }
}
/* On a phone the page's sections are text on the page, not boxes (was tournament-phone.module.css). Plain CSS, not utilities: the
 * hairline between stacked sections (above, `border-top` + `padding-top` with !important) must win over this, and a layered `!important`
 * utility would beat it. Same specificity as the module rule it replaces (.root.root .section.section). */
@media (max-width: 640px) {
  .tp-root.tp-root .tp-section.tp-section { border: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
}
.mps-next .bt .bt-sl-deck { align-self: center; }

/* ---------- Log › Decks (and the Meta pages' cards) ---------- */
/* A family / "other archetypes" on a phone: a section whose rows sit on the page (it was decks-phone.module.css's
 * `.group`; it has to be plain CSS so the hairline between cards, below, can still win). */
@media (max-width: 640px) {
  .dp-root .dp-group { border: 0; border-radius: 0; background: transparent; padding: 0; overflow: visible; }
}
@media (min-width: 641px) {
  .mps-next .dp-group.dp-group[class*="mz-module"],
  .mps-next section[class*="mz-module__"][class*="card"].dp-group,
  .mps-next section[class*="mz-module__"][class*="card"].dp-hero,
  .mps-next section[class*="mz-module__"][class*="card"].dp-section { border: 0; border-radius: 0; background: none; overflow: visible; }
  .mps-next .dp-group-head.dp-group-head { padding-inline: 0 !important; padding-top: 0 !important; }
  .mps-next .dp-group.dp-group [class*="mz-module"][class*="dkRow"] { padding-inline: 0; }
  .mps-next [class*="mz-module"][class*="dkHead"] { border-top: 0; color: var(--text-muted); padding-bottom: 4px !important; }
  .mps-next .dp-group.dp-group [class*="mz-module"][class*="dkHead"] + [class*="dkRow"] { border-top-color: var(--border); }
  .mps-next .dp-prompt.dp-prompt { padding-inline: 0; }
}
/* "Which deck is this?" asked on a second line under the row: on wide screens "Choose" sits on the
 * row itself, in the record column it leaves empty. The search it opens still drops in under. */
@media (min-width: 900px) {
  .mps-next .dp-prompt.dp-prompt:has(> section > div:only-child > span + button:last-child) {
    position: relative; z-index: 1; height: 0; pointer-events: none;
    padding-left: calc(80px + (100% - 132px) * 0.3404);
  }
  .mps-next .dp-prompt.dp-prompt:has(> section > div:only-child > span + button:last-child) > section {
    position: absolute; left: calc(80px + (100% - 132px) * 0.3404); bottom: 12px; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: none !important;
  }
  .mps-next .dp-prompt.dp-prompt > section > div:only-child > span:first-child {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .mps-next .dp-prompt.dp-prompt > section > div:only-child > button { pointer-events: auto; }
}

/* The side column (Playing next, Worth testing) is a rail with one hairline, like Home's. */
@media (min-width: 641px) {
  .mps-next .dp-aside.dp-aside { border-left: 1px solid var(--border); padding-left: 24px; }
  .mps-next .dp-aside.dp-aside h2[class*="eyebrow"] { margin-bottom: 4px; }
}

/* ---------- Meta ---------- */
/* The scope bar is where you set the view: a filled panel. */
.mps-next section.scopeBar.scopeBar { background: var(--surface); border-color: transparent; }
:root[data-theme="dark"] .mps-next section.scopeBar.scopeBar { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mps-next section.scopeBar.scopeBar { background: var(--surface-2); } }

/* ---------- One scroll on desktop: the page ----------
 * At 768px and up nothing inside a page scrolls on its own. Overlays (menus, listboxes, the
 * notifications panel, sheets), wide tables scrolling sideways, pasted game-log viewers and the
 * Playtest board are not page sections and keep theirs. Phones are unchanged. */
@media (min-width: 768px) {
  /* Log › Games: the deck stats / opened game column was a sticky box with its own scrollbar
   * (bt.css "bt-log-side", and BetaLog's fitPanelToScreen sets its max-height inline). */
  .mps-next .bt .bt-grid-log > .bt-log-side { position: static !important; max-height: none !important; overflow: visible !important; --reveal-top: 80px; }
  /* (log-detail-nav revealPanelTop reads --reveal-top: opening a game far down the list brings the panel's top into view.) */
  /* Home: Vs decks, opened to every deck, was a 360px scroller. */
  .mps-next .rl-vs-list.is-open { max-height: none; overflow: visible; }
  /* A saved decklist printed on a deck page: its full length. */
  .mps-next [class*="mz-module"][class*="decklist"] { max-height: none; overflow: visible; }
}
/* Sticky side rails (components/ui/StickyRail.tsx) stick only while they fit the window: one taller
 * than the window (--rail-h) gets a top so far up it never sticks, and simply scrolls with the page. */
@media (min-width: 1024px) {
  .mps-next .sticky-rail { top: calc(80px - max(0px, var(--rail-h, 0px) - 100dvh + 96px) * 1000); }
}

/* ---------- Events › My schedule ---------- */
@media (min-width: 641px) {
  /* "Where do you usually play?" is a form: filled. The side sections are read: on the page. */
  .mps-next section[class*="evb-module"][class*="__card"]:has(form) { background: var(--surface); border-color: transparent; }
  :root[data-theme="dark"] .mps-next section[class*="evb-module"][class*="__card"]:has(form) { background: var(--surface-2); }
}
@media (min-width: 641px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mps-next section[class*="evb-module"][class*="__card"]:has(form) { background: var(--surface-2); }
}

/* ---------- Log › Notes ---------- */
/* Each deck's notes are a section of the page, divided by a hairline; the labels inside are headings. */
.mps-next .bt section.bt-card.nts-deck.nts-deck { border: 0; border-radius: 0; background: none; padding: 24px 0 0; border-top: 1px solid var(--border); }
.mps-next .bt section.bt-card.nts-deck.nts-deck span.bt-eyebrow {
  font-size: 0.875rem; letter-spacing: normal; text-transform: none; color: var(--text); font-weight: 700;
}

/* Notes at phone width (notes.module.css's last block, DESIGN-127; docs/superpowers/specs/2026-10-21-ios-design-pass-design.md "Web at phone width"):
 * every section is a list on the page, not a box (a matchup's hero, `.pbox`, keeps its box). It styles every card under the page root,
 * including ones other components draw (patterns, lines from logs), so it can't be a utility on one element. `.nts-root` is the BtRoot
 * beside the Log's `.log`; no `.mps-next` prefix, so the specificity is what the module's was. */
@media (max-width: 640px) {
  .bt.nts-root .bt-card { border: 0; border-radius: 0; padding: 0; }
  .bt.nts-root .bt-card.pbox { border: 1px solid var(--border); border-radius: 14px; padding: var(--card-pad, 14px); }
}

/* ---------- Log › Stats ---------- */
/* Read-only: the charts and the battle-log panels are sections on the page, not boxes. The scope
 * bar (filters) stays filled; a stat tile you picked as a filter keeps its fill. */
.mps-next .stats-room div[class*="mz-module__"][class*="__stat"] { border-color: transparent; background: none; }
.mps-next .stats-room .bt-empty, .mps-next .stats-room div.bt-empty { border: 0; padding: 0; background: none; }

/* ---------- Friends ---------- */
/* Find trainers is a form (filled: data-surface="act" in FriendsView, so the ACT rule fills it in both
 * schemes; a rule here lost to READ's "no box" in light); Your friends is read (on the page). */

/* ======================================================================
 * SECOND PASS: balance and weight (desktop). The owner: "some pages still
 * feel heavy or lopsided". Measured with a probe of each two-column
 * container's column heights. Three moves, in this order: a short secondary
 * rail sticks beside the long column while it fits the window (.sticky-rail +
 * useStickyRail's --rail-h, never its own scroll); a rail that ends early
 * lets the sections under it span both columns; a page with one column sits
 * centred. Phones are unchanged except where noted.
 * ====================================================================== */

/* ---------- Single-column pages: a narrow column on the frame's left edge ----------
 * (r7: was centred, so the title jumped ~260px moving from Log to Friends.) Friends, Feed, Support,
 * Invites, Changelog and Charts carry their own max-width inline: the column keeps that measure, but starts
 * on the frame's left edge with the frame's gutter, so every page's title sits at the same x. */
body.mps-next > main[style*="max-width"],
.mps-next main.rl > .rl-page[style*="max-width"] {
  margin-left: max(0px, calc((100% - 1280px) / 2)) !important; margin-right: auto !important;
  padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; width: 100%; box-sizing: border-box;
}
/* Except a page that is one card (Reset your password, an invite code, an error), like Sign in: centred. */
body.mps-next > main[style*="12vh auto"] { margin-left: auto !important; margin-right: auto !important; }

/* ---------- Home: the numbers span ----------
 * Your games and the side rail (Finish setting up, Your schedule) sit side by side; the numbers (Before
 * you sleeve up, Vs decks, Win rate by week, Activity) then run under both, under a hairline and 48px,
 * as two balanced columns of sections from 1024px (one column below), instead of a 60% column beside
 * 900px of nothing. */
@media (min-width: 861px) {
  .mps-next .rl-home-grid > .rl-col:nth-child(3) { padding-top: 48px; border-top: 1px solid var(--border); }
}
@media (min-width: 1024px) {
  .mps-next .rl-home-grid > .rl-col:nth-child(3) { display: block; columns: 2; column-gap: 48px; }
  .mps-next .rl-home-grid > .rl-col:nth-child(3) > .rl-slot { break-inside: avoid; margin-bottom: 48px; }
  .mps-next .rl-home-grid > .rl-col:nth-child(3) > .rl-slot:last-child { margin-bottom: 0; }
}
/* Heavy: the activity hexes filled the column at 750px wide; a calendar of 12 weeks reads at 520. */
.mps-next .act-wrap.act-wrap { max-width: 520px; }
/* Heavy: the icon before every section heading, in heading colour. Quieter. */
.mps-next .rl-page .rl-secic { color: var(--text-muted); }
/* Heavy: the all-time record was a 40px headline over a 30px number strip: one step down. */
@media (min-width: 861px) {
  .mps-next .rl-home-record { font-size: 2rem !important; }
}

/* ---------- Log › Games ---------- */
/* Lopsided: the deck stats rail ended at 760px beside a 2600px list. It sticks under the bar
 * while it fits the window (BetaLog measures it into --rail-h); a taller one (an opened game)
 * scrolls with the page. */
@container bt (min-width: 1180px) {
  .mps-next .bt .bt-grid-log > .bt-log-side {
    position: sticky !important; align-self: start;
    top: calc(80px - max(0px, var(--rail-h, 100000px) - 100dvh + 96px) * 1000);
    --reveal-top: 80px; /* revealPanelTop: an opened game is brought to this line, stuck or not */
  }
}
/* Heavy: Win and Loss were two 345px full-colour slabs. On desktop: comfortable fixed widths,
 * still filled, still first. Phones keep the wide thumb buttons. */
@media (min-width: 768px) {
  .mps-next .bt .bt-results { grid-template-columns: repeat(2, 152px) 72px; justify-content: start; }
  .mps-next .bt .bt-results > .bt-btn { min-height: 44px; height: 44px; font-size: 0.9375rem; }
}

/* ---------- Meta: the filter tracks show on the filled scope bar (dark) ----------
 * The scope bar is --surface-2 in dark and so were the segmented tracks, so a row of options
 * floated with no edge. Tracks: one step down (--surface); the current option one step up. */
:root[data-theme="dark"] .mps-next section[class*="scopeBar"] [class*="mz-module"][class*="__seg"] { background: var(--surface); }
:root[data-theme="dark"] .mps-next section[class*="scopeBar"] [class*="__seg"] > [data-nav-indicator] { background: var(--surface-3) !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mps-next section[class*="scopeBar"] [class*="mz-module"][class*="__seg"] { background: var(--surface); }
  :root:not([data-theme="light"]) .mps-next section[class*="scopeBar"] [class*="__seg"] > [data-nav-indicator] { background: var(--surface-3) !important; }
}

/* ---------- Events › My schedule: the home-spot form joins the main column ----------
 * The form sat alone above the schedule grid (640px, nothing beside it) and the side column
 * started under it. Now the page is one grid: the form and Your schedule on the left, the side
 * column beside both. */
@media (min-width: 961px) {
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 24px; align-items: start; grid-auto-flow: row dense;
  }
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) > * { grid-column: 1 / -1; }
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) > section[class*="__card"]:has(+ [class*="scheduleGrid"]) { grid-column: 1; max-width: none !important; }
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) > [class*="scheduleGrid"] { display: contents; }
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) > [class*="scheduleGrid"] > :first-child { grid-column: 1; }
  .mps-next main[class*="schedRoot"]:has(> section[class*="__card"] + [class*="scheduleGrid"]) > [class*="scheduleGrid"] > aside { grid-column: 2; grid-row: span 2; }
}

/* ---------- Log › Tournaments ---------- */
/* Heavy: three outlined stat boxes over the list, and every side section in its own box with a
 * display-size title. Read, so on the page: the numbers are one strip with hairline dividers
 * (like Home's), the side sections are a rail with one hairline and h3 titles. */
@media (min-width: 641px) {
  .mps-next .bt .bt-summary { gap: 0; }
  .mps-next .bt .bt-summary > .bt-stat { border: 0; border-radius: 0; background: none; padding: 2px 24px; }
  .mps-next .bt .bt-summary > .bt-stat:first-child { padding-left: 0; }
  .mps-next .bt .bt-summary > .bt-stat + .bt-stat { border-left: 1px solid var(--border); }
  .mps-next .bt .lp-side-card.lp-side-card.bt-card { border: 0; border-radius: 0; background: none; padding: 0; }
  .mps-next .bt .bt-grid-side > details > aside.bt-col { gap: 32px; }
  .mps-next .bt .lp-side-card.lp-side-card h2 {
    font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh); letter-spacing: var(--h3-ls); font-weight: var(--h3-weight);
  }
}
@media (min-width: 961px) {
  .mps-next .bt .bt-grid-side > details:has(> aside.bt-col) { border-left: 1px solid var(--border); padding-left: 24px; }
}

/* ---------- Log › Decks ---------- */
/* Heavy: "Some games don't say what you played" was a 24px heading for a housekeeping prompt. */
.mps-next div[class*="mz-module"][class*="__empty"] h2[class*="__h3"],
  .mps-next div[class*="mz-module"][class*="__empty"] h3[class*="__h3"] { font-size: var(--h3-size); line-height: var(--h3-lh); }

/* ---------- A deck's page ---------- */
/* Heavy and uneven: Battle logs and the win-rate chart sat in outlined boxes while the sections
 * around them were unboxed but kept a 20px inset, so the left edge zig-zagged; the side column's
 * labels were uppercase eyebrows and its one tournament an outlined card. Read: all on the page,
 * one left edge, sentence-case labels, the tournament a plain row. */
@media (min-width: 641px) {
  .mps-next .dp-root.dp-root a.dp-list-row { border-width: 1px 0 0; border-radius: 0; padding-inline: 0; background: none; }
}
@media (min-width: 641px) {
  .mps-next .dp-root span[class*="mz-module"][class*="eyebrow"] {
    font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh);
    letter-spacing: normal; font-weight: var(--h3-weight); text-transform: none; color: var(--text);
  }
}

/* ---------- Events › Find ---------- */
/* Heavy: the filters were an outlined 1100px box, each picked type an accent-outlined chip, and
 * the home-spot prompt a dashed box. Filters are a column with one hairline (like the rails);
 * a picked chip is its soft fill without a second outline; the prompt holds a form, so it is
 * filled, not dashed. */
@media (min-width: 961px) {
  .mps-next aside[class*="evb-module"][class*="filtersCard"] {
    border: 0; border-right: 1px solid var(--border); border-radius: 0; background: none; padding: 0 24px 0 0;
  }
  .mps-next section[class*="evb-module"][class*="__empty"]:has(form) { border: 0; background: var(--surface); }
  :root[data-theme="dark"] .mps-next section[class*="evb-module"][class*="__empty"]:has(form) { background: var(--surface-2); }
}
@media (min-width: 961px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mps-next section[class*="evb-module"][class*="__empty"]:has(form) { background: var(--surface-2); }
}
.mps-next [class*="evb-module"][class*="tagOn"] { border-color: transparent; }
/* Heavy: "Save home spot" and "Subscribe to my schedule" were full-width solid slabs, and the side
 * column's headings were the main column's size. Desktop: the buttons fit their words (still
 * the filled primary), side headings one step down. */
@media (min-width: 961px) {
  .mps-next main[class*="schedRoot"] [class*="btnPrimary"][class*="btnBlock"] { width: fit-content; align-self: flex-start; padding-inline: 20px; }
  .mps-next main[class*="schedRoot"] [class*="scheduleGrid"] aside h2 {
    font-family: var(--h3-family); font-size: var(--h3-size); line-height: var(--h3-lh); letter-spacing: var(--h3-ls); font-weight: var(--h3-weight);
  }
}

/* ======================================================================
 * THIRD PASS (DESIGN-27): NO BOX BY DEFAULT. The owner, on /meta/cards:
 * "I don't get why things are still in containers ... these sections don't
 * need to be inside rounded label squares". The earlier passes unboxed page
 * by page from an allowlist, so every page nobody looked at kept its cards.
 * Now it is the other way round, on every page of this host:
 *
 *   READ   a section of content (the shared containers: mps .card, .rl-card,
 *          .bt-card, the Meta / Events modules' .card, <Card>, chart frames)
 *          has no border, radius, fill or inner padding. A heading, its
 *          content, 48px (40px on a phone) and a hairline between sections.
 *   ACT    a container holding a form with a field to type in or pick from
 *          (the composer, a settings form, the filter bar, an opened panel; a
 *          search or filter box over a list does not count) is a filled surface
 *          without a border: the rule of the first pass, "a fill means you
 *          act here".
 *   ITEM   a container that is itself a link (a deck tile, a result row)
 *          is an object, not a section: it keeps its quiet outline.
 *   NOTICE a callout keeps its tint; it never had a border to lose.
 *   Named in markup when the class cannot say it: data-surface="act" |
 *   "item" | "notice" (ui/Card adds data-ui-card so its inline box can be
 *   reached at all). The profile (/u/<handle>) keeps its skin.
 * ====================================================================== */
.mps-next .card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next .rl-card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next .bt .bt-card:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next [data-ui-card]:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next [class*="evb-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"],
  .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))) {
  border: 0; border-radius: 0; background: none; padding: 0; box-shadow: none;
}
/* <Card> draws its box inline. */
.mps-next [data-ui-card]:not([data-surface], .profile-page *, :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))) {
  border: 0 !important; border-radius: 0 !important; background: none !important; padding: 0 !important;
}
/* Charts: the plot is the content; its frame was a second box (ChartFrame sets it inline). */
.mps-next .chart-frame:not(.profile-page *) { border: 0 !important; border-radius: 0 !important; background: none !important; padding: 0 !important; }

/* ACT: a section you fill in is a filled surface, no outline. */
.mps-next .card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next .rl-card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next .bt .bt-card:not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next [data-ui-card]:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next [class*="evb-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  .mps-next [data-surface="act"] {
  border-color: transparent !important; background: var(--surface) !important;
}
:root[data-theme="dark"] .mps-next .card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next .rl-card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next .bt .bt-card:not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next [data-ui-card]:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next [class*="evb-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root[data-theme="dark"] .mps-next [data-surface="act"] { background: var(--surface-2) !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mps-next .card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next .rl-card:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next .bt .bt-card:not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next [data-ui-card]:not(.np-pad):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next [class*="evb-module__"]:is([class$="__card"], [class*="__card "]):not(a, [data-surface], .profile-page *, .prow, .st-card, .feed-card):has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)),
  :root:not([data-theme="light"]) .mps-next [data-surface="act"] { background: var(--surface-2) !important; }
}

/* Rhythm: with no box, a section is told from the next by space and one hairline above it. Two read
 * sections in a column: the column's gap (20px on a page, 24 in a stack) + 28px = about 48px, the
 * hairline at the top of the gap's far side; 40px on a phone. Side-by-side sections (a grid row) keep
 * their grid gap and no rule. */
.mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
  [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
  > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
  + .card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
  [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
  > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
  + .rl-card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
  [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
  > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
  + .bt-card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
  [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
  > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
  + [data-ui-card]:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
  [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
  > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
  + [class*="__card"]:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))) {
  border-top: 1px solid var(--border) !important; padding-top: 28px !important;
}
@media (max-width: 640px) {
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
    [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
    > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
    + .card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
    [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
    > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
    + .rl-card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
    [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
    > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
    + .bt-card:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
    [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
    > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
    + [data-ui-card]:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next :is([class*="mz-module__"][class*="__root"], [class*="mz-module__"][class*="__stack"]:not([class*="stackSm"]),
    [class*="evb-module__"][class*="__root"], .page, .rl-col, .bt .bt-col)
    > :is(.card, .rl-card, .bt-card, [data-ui-card], [class*="__card"]):not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)))
    + [class*="__card"]:not(a, [data-surface], .prow, [class*="scopeBar"], [class*="cardLink"], :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))) { padding-top: 24px !important; }
}
/* Two unboxed columns need more than a card's 24px gutter to read as two. */
@media (min-width: 1000px) {
  .mps-next [class*="mz-module__"][class*="__twoCol"] { column-gap: 48px; row-gap: 48px; }
}

/* ---------- Boxes inside sections (DESIGN-27) ----------
 * Stat tiles are figures in a row: no outline; on wider screens a hairline between neighbours. Read-only, so
 * the highlighted one (a deck's "Expected against this field", Battle logs' win rate) is a figure too (r7: it
 * kept a soft accent fill, a box you only read). */
.mps-next [class*="mz-module__"]:is([class$="__stat"], [class*="__stat "]):not(.profile-page *, a),
  .mps-next .bt .bt-stat:not(.profile-page *, a),
  .mps-next .stat:not(.np-pad):not(.profile-page *, a),
  .mps-next .dash-stat:not(.np-pad):not(.profile-page *, a) {
  border-color: transparent; background: none; border-radius: 0; padding-inline: 0;
}
@media (min-width: 641px) {
  .mps-next :is([class*="mz-module__"]:is([class$="__stat"], [class*="__stat "]), .bt .bt-stat, .stat, .dash-stat):not(.profile-page *, a)
    + :is([class*="mz-module__"]:is([class$="__stat"], [class*="__stat "]), .bt .bt-stat, .stat, .dash-stat):not(.profile-page *, a) {
    border-left: 1px solid var(--border); padding-left: 20px; border-radius: 0;
  }
}
/* Empty states: a heading and a muted line, never a dashed box (one holding a form keeps a fill). */
.mps-next .empty:not(.np-pad):not(.profile-page *, :has(form)),
  .mps-next .bt .bt-empty:not(.profile-page *, :has(form)),
  .mps-next .dash-empty:not(.np-pad):not(.profile-page *, :has(form)),
  .mps-next [class*="mz-module__"]:is([class$="__empty"], [class*="__empty "]):not(.profile-page *, :has(form)),
  .mps-next [class*="evb-module__"]:is([class$="__empty"], [class*="__empty "]):not(.profile-page *, :has(form)) {
  border: 0; border-radius: 0; background: none; padding: 0;
}
/* A table's wrapper: rows keep their hairlines, the outer outline goes. */
.mps-next .t16-scroll.t16-scroll { border: 0; border-radius: 0; }
/* Small read boxes inside a section: plain blocks. */
.mps-next .cmp-swing.cmp-swing { border: 0; border-radius: 0; padding-inline: 0; }
.mps-next .ti-disc.ti-disc { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
/* A status sentence (an event's "Round-by-round results … are still being imported", Find lists' scope note):
 * nothing to do there, so no fill: one muted line on the page (r6; it was a tinted box). */
.mps-next [class*="mz-module__"]:is([class$="__note"], [class*="__note "]) { border: 0; border-radius: 0; background: none; padding: 0; color: var(--text-muted); }
/* A list whose rows were each a box (best lists, list search results, Find lists): rows on the page,
 * a hairline between them, what phones already draw (mps.css .prow). The rows stay links. */
.mps-next .card:not(.np-pad).prow:not(.profile-page *),
  .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]).prow:not(.profile-page *),
  .mps-next [class*="mz-module__"][class*="__resultCard"].prow:not(.profile-page *) {
  border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important; background: none !important; padding-inline: 0 !important;
}
.mps-next .card:not(.np-pad).prow:not(.profile-page *):is(a:hover, :has(> a:hover)),
  .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "]).prow:not(.profile-page *):is(a:hover, :has(> a:hover)),
  .mps-next [class*="mz-module__"][class*="__resultCard"].prow:not(.profile-page *):is(a:hover, :has(> a:hover)) { background: none !important; }
.mps-next :is(.card, [class*="mz-module__"]:is([class$="__card"], [class*="__card "])).prow:not(.profile-page *):is(a, :has(> a)):hover :is(strong, [class*="name"]) { text-decoration: underline; }

/* ---------- Settings and Edit profile: a page of forms ----------
 * Every card there is a form, so a fill would mark nothing out: each card is a section (its heading,
 * its fields), a hairline between cards; the fields carry their own outlines. */
.mps-next .card.st-card.st-card {
  border: 0 !important; border-radius: 0 !important; background: none !important; padding: 0 !important; box-shadow: none !important;
}
.mps-next .card.st-card.st-card + .card.st-card.st-card {
  border-top: 1px solid var(--border) !important; padding-top: 24px !important; margin-top: 12px;
}
.mps-next .st-content.st-content { gap: 48px; }

/* ---------- The rest the sweep found (DESIGN-27, boxes.mjs) ----------
 * A card's own page: the card's art and numbers are read, not a panel. */
.mps-next aside[class*="mz-module__"]:is([class$="__detail"], [class*="__detail "]) { border: 0; border-radius: 0; background: none; padding: 0; }
/* Changelog: each release a row under a hairline, as phones draw it. */
.mps-next .cl-ol.cl-ol { gap: 0; }
.mps-next .cl-entry.cl-entry { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.mps-next .cl-ol.cl-ol > :first-child .cl-entry,
  .mps-next .cl-entry.cl-entry:first-child { border-top: 0; } /* the day title draws the first rule */
.mps-next .cl-summary.cl-summary { padding-inline: 0; }
.mps-next .cl-body.cl-body { padding-inline: 0; }
/* A new tournament: a page of form sections, like Settings (no box each). */
.mps-next .create-tournament-form__section { border: 0; border-radius: 0; background: none; padding-inline: 0; }
.mps-next .create-tournament-form__section + .create-tournament-form__section { border-top: 1px solid var(--border); }
/* "Map your decks", the organizer's empty dashboards, the invite tree: a heading, a line, a button. */
.mps-next #map-decks,
  .mps-next .organize-empty,
  .mps-next .organize-circuit-empty,
  .mps-next .organize-league-empty,
  .mps-next .inv-tree.inv-tree {
  border: 0 !important; border-radius: 0 !important; background: none !important; padding-inline: 0 !important;
}
/* Star Chip events list: rows under hairlines, no outer box. */
.mps-next ul.sc-events.sc-events { border: 0; border-radius: 0; border-top: 1px solid var(--border); }
.mps-next ul.sc-events.sc-events .sc-event-row { padding-inline: 0; }
/* A tournament's record on a phone and the Log's deck numbers are the page's head, not boxes. */
.mps-next .bt .bt-scoreline, .mps-next .lp-stats-hero.lp-stats-hero { border: 0; border-radius: 0; background: none; padding-inline: 0; }

/* ---------- One left edge, one right edge per column (DESIGN-27, owner on Home) ----------
 * "Headers should really be aligned on the same column." Out of their boxes, a section's own inline
 * padding (Friends' plans, Friends' activity set theirs in a style attribute) left its heading and rows
 * 20-40px in from the section above. Read sections have none, inline or not. And the small icon before
 * some section headings put their text ~24px right of the ones without: on this host section headings
 * carry no decorative leading icon, so every heading's text sits on the column edge. */
.mps-next .card:not(.np-pad)[style*="padding"]:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"], .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next .rl-card:not(.np-pad)[style*="padding"]:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"], .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next .bt .bt-card[style*="padding"]:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"], .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next [class*="mz-module__"]:is([class$="__card"], [class*="__card "])[style*="padding"]:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"], .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))),
  .mps-next [class*="evb-module__"]:is([class$="__card"], [class*="__card "])[style*="padding"]:not(a, [data-surface], .profile-page *, .prow, .rl-composer, .rl-is-resume, .rl-prep, .rl-recap,
  .st-card, [class*="scopeBar"], [class*="cardLink"], [class*="resultCard"], .tp-detail.tp-detail,
  :has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select))) {
  padding: 0 !important;
}
.mps-next .rl-secic,
  .mps-next main :is(h2, h3) > svg:not(.np-pad):first-child:not(.profile-page *),
  .mps-next main :is(h2, h3) > [aria-hidden="true"]:has(> svg):first-child:not(.profile-page *) { display: none; }
/* Log › Tournaments: the month headings sat 4px in from the list under them. */
.mps-next .bt .bt-month-head { padding-left: 0; padding-right: 0; }
/* Section heads that kept their box's inset once the box went (Star Chip standings, head to head). */
.mps-next .sc-table-head.sc-table-head,
  .mps-next .sc-h2h-head.sc-h2h-head { padding-left: 0; padding-right: 0; }
/* An empty dashboard's message reads from the column's edge, like every heading above it. */
.mps-next .organize-empty,
  .mps-next .organize-circuit-empty,
  .mps-next .organize-league-empty { text-align: left; align-items: flex-start; justify-items: start; }
/* Phones: the opened round's result line and Find's "Where should we look?" form sat 15px in. */
@media (max-width: 640px) {
  .mps-next .bt .tp-hero.tp-hero { border: 0; border-radius: 0; background: none; padding-left: 0; padding-right: 0; }
}
@media (max-width: 960px) {
  .mps-next section[class*="evb-module__"][class*="__empty"]:has(form) { border: 0; border-radius: 0; background: none; padding-left: 0; padding-right: 0; }
}
/* Home's "The meta this week" ran three summaries side by side (shown once meta data exists): two
 * columns at most on this host, with an unboxed gutter. */
@media (min-width: 861px) {
  .mps-next .rl-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; row-gap: 40px; }
  .mps-next .rl-meta-cell { grid-column: span var(--span2, 1); } /* the spans lib/home/layout.ts computes for two columns */
}
/* The same for an icon drawn beside a heading rather than in it (Cards' "Rising" / "Falling"), and that
 * head row's own 10px inset. */
.mps-next main svg:not(.np-pad):not(np-pad):first-child:has(+ :is(h2, h3)):not(.profile-page *),
  .mps-next main span:has(> svg:only-child):first-child:has(+ :is(h2, h3)):not(.profile-page *) { display: none; }
.mps-next .cp-mvh.cp-mvh { padding-left: 0 !important; padding-right: 0 !important; }

/* ===== Japan + region switch (DESIGN-33) ===== */
/* Global / Japan is a scope for the whole Meta section, so it sits at the right end of the Meta tab
 * row (MetaNav's .meta-region, drawn on this host only) instead of a second segmented control
 * stacked under the view switch. The hairline moves from the tabs to the row so both sit on it;
 * the tabs keep scrolling inside themselves and the control never shrinks or leaves the screen. */
.mps-next .page-head-nav:has(> .meta-region) {
  display: flex; align-items: center; gap: 8px; box-shadow: inset 0 -1px 0 var(--border);
}
.mps-next .page-head-nav:has(> .meta-region) > nav { flex: 1 1 auto; width: auto; min-width: 0; box-shadow: none; }
.mps-next .meta-region {
  flex: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2);
}
.mps-next .meta-region > a {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px;
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.mps-next .meta-region > a:hover { color: var(--text); }
.mps-next .meta-region .meta-flag { margin-left: 4px; }
.mps-next .meta-region > a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
@media (max-width: 420px) {
  .mps-next .page-head-nav:has(> .meta-region) { gap: 2px; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a { padding: 0 8px; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a:first-child { padding-left: 0; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a::after { left: 8px; right: 8px; }
  .mps-next .meta-region > a { padding: 0 6px; font-size: 0.75rem; }
  .mps-next .meta-region .meta-flag { display: none; }
}
/* What the region's data is: one muted line under the lede (MetaHead's note), not a boxed
 * paragraph between two controls. */
.mps.mps-next .page-lede .meta-note {
  display: block; margin-top: 4px; font-size: 0.8125rem; line-height: 1.45; color: var(--text-muted);
}

/* ===== Home: one grid (DESIGN-33) =====
 * With real data Home had three different column splits down the page, so second-column headings
 * started at three different x. One grid from 1024px: two equal columns, 48px apart; the rail is simply
 * the second column (no hairline, no inset, the same h2 as every section). */
@media (min-width: 1024px) {
  .mps-next .rl-page .rl-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
}

/* ======================================================================
 * FIFTH AUDIT (r5): the rules above, everywhere. Each block names the rule
 * it enforces; tests/unit/next-rules.test.ts keeps the cheap ones true.
 * ====================================================================== */

/* ---------- TYPE: no uppercase eyebrows, anywhere ----------
 * Section labels, group labels, table headers and badges were uppercase with wide tracking on ~180
 * rules across the app. On this host nothing is transformed: every label reads as written (sentence
 * case in the source; one- to four-letter codes like W / L stay as written). The profile keeps its skin. */
.mps-next *:not(.profile-page, .profile-page *) { text-transform: none !important; }
.mps-next :is(.t-eyebrow, [class*="eyebrow"], [class*="Eyebrow"], [class*="badge"], [class*="Badge"], .rl-th, th,
  .st-nav-label, .st-group-title, .dp-group-title, [class*="rowHead"], [class*="__head"], .rc-head, .rc-head-lead, .tp-head, [class*="__label"], .bt-label, .label):not(.profile-page *) {
  letter-spacing: normal !important;
}
/* Group labels: Settings / Edit profile's group names over their cards, and the side menu's. */
.mps-next h2.st-group-title.st-group-title {
  font-family: var(--font-body); font-size: 0.875rem; line-height: 1.3; font-weight: 600; color: var(--text-muted);
}
.mps-next .st-nav-label.st-nav-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
/* The Log rail's "All decks" label: a muted label, not a shout. */
.mps-next .bt span.bt-eyebrow { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }

/* ---------- Never a dashed box ----------
 * Thin-sample heat cells, empty slots, "testing" marks, the composer's "Add details", empty states and
 * Your field's "Unmapped" row were dashed. Same edge, solid: a low sample is a hairline outline on its
 * cell (the legend's swatch too); an empty slot is a quiet fill. Inline dashes ([style*="dashed"]) too.
 * Not the Playtest board / replays (a dashed card is game state there) and not the profile's skin. */
.mps-next [class*="heatThin"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .in-heat-thin:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="heatNone"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .in-heat-none:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .heat-thin:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .rl-heat.is-thin:not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="rateThin"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .rc-rate-thin:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .fc-round-thin:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .ar-you-thin:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .cmp-thin.cmp-thin:not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .tg-cell-empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="setChipOff"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="barDashed"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="itemDashed"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="emptyWeek"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="addCol"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="addSelect"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="addItem"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .fc-rest-badge:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="cardSlot"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="chartSlot"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [class*="dkSlot"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-badge-testing:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-row.slot:not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-row-pending:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-line-chip:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .line-chip:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-recovered:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-opp-suggest:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-disclose:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .bt-empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .dash-empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .tournament-empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .tournament-form-share:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .profile-theme-card--add:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .media-uploader__bg-frame--empty:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .ui-tag-input:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .sprite-slot:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next .st-register.st-register:not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *),
  .mps-next [style*="dashed"]:not(.np-pad):not(.profile-page *, [class*="replay-board-module"] *, [class*="sim-module"] *, .sim-sheet *) {
  border-style: solid !important;
}
.mps-next .bt .bt-badge-testing { border-color: var(--border); }
.mps-next [class*="heatNone"],
  .mps-next .in-heat-none,
  .mps-next .tg-cell-empty { border-color: transparent !important; background: var(--surface-2) !important; }
/* Empty slots you fill (Top 8 "+ slot N", "Save your first theme"): a quiet fill, no outline. */
.mps-next .top8-edit-grid > button[style*="dashed"],
  .mps-next .profile-theme-card--add:not(.np-pad):not(np-pad) { border-color: transparent !important; }

/* ---------- FILTERS ARE CHIPS ----------
 * Meta's scope panel (Source, Division, Event size, Window, Players), the Stats battle-log filters and the
 * Lists deck strip were drawn as filled segmented tracks: up to five look-alike controls under the view
 * switch. Here each option is a chip and the picked one is the app's one selected chip (text fill), in rows
 * that wrap. The links, their URLs and the gliding-pill script are unchanged; the pill just isn't drawn. */
.mps-next section[class*="scopeBar"] [class*="mz-module"][class*="__seg"],
  .mps-next nav.bl-chips.bl-chips:not(.np-pad) {
  background: none !important; padding: 0; gap: 6px; border-radius: 0; min-height: 0; box-shadow: none;
}
.mps-next section[class*="scopeBar"] [class*="mz-module"][class*="__seg"] { flex-wrap: wrap; overflow: visible; mask-image: none !important; }
.mps-next :is(section[class*="scopeBar"] [class*="__seg"], nav.bl-chips.bl-chips) > [data-nav-indicator] { display: none !important; }
.mps-next :is(section[class*="scopeBar"] [class*="__seg"], nav.bl-chips.bl-chips) > [class*="segItem"] {
  min-height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-muted); box-shadow: none !important; outline-offset: 2px;
}
.mps-next :is(section[class*="scopeBar"] [class*="__seg"], nav.bl-chips.bl-chips) > [class*="segItem"]:hover { color: var(--text); border-color: var(--border-strong); }
.mps-next :is(section[class*="scopeBar"] [class*="__seg"], nav.bl-chips.bl-chips) > [class*="segOn"] {
  background: var(--text) !important; border-color: var(--text); color: var(--bg) !important;
}
/* Each row's group name: a small muted label before its chips. */
.mps-next section[class*="scopeBar"] [class*="__field"] > [class*="mz-module"][class*="__label"] { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
/* A deck strip on desktop wraps (all its decks visible, nothing cut mid-word); phones keep the scroller and its edge fade. */
@media (min-width: 768px) {
  .mps-next nav.bl-chips.bl-chips { flex-wrap: wrap; overflow: visible; mask-image: none !important; max-width: 100%; }
}
/* Events › Find: the Type chips used an accent tint when picked, When / Stores / Cost the text fill.
 * One selected chip: the text fill, pill-shaped like the others. */
.mps-next [class*="evb-module"][class*="__tag"] { border-radius: 999px; padding-inline: 14px; }
.mps-next [class*="evb-module"][class*="tagOn"] { background: var(--text); border-color: var(--text); color: var(--bg); }
/* A toggle is not a filter: the Log's "Show testing" is on/off over whichever filter is picked, so its
 * on-state is a check mark and an outline, never the picked filter's fill. */
.mps-next .bt .bt-chip[title$="testing games"][aria-pressed="true"] {
  background: transparent; color: var(--text); border-color: var(--text);
}
.mps-next .bt .bt-chip[title$="testing games"][aria-pressed="true"]::before { content: "✓"; margin-right: 6px; font-weight: 700; }

/* ---------- A FILL HAS PADDING; A READ SECTION HAS NO BOX ---------- */
/* Notes you read are text, a hairline between entries; the editor keeps its fill. */
.mps-next .bt p.bt-line-note:not(:has(textarea, input)) { background: none; border-radius: 0; padding: 0; }
.mps-next .nts-written-item.nts-written-item + .nts-written-item.nts-written-item { border-top: 1px solid var(--border); padding-top: 12px; }
/* Stats › Your field: rows on the page with a hairline, like every list (the phone layout already is). */
.mps-next .pm-item.pm-item, .mps-next .pm-itemDashed.pm-itemDashed {
  border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important; background: none !important;
  padding-inline: 0 !important;
}
.mps-next .pm-list.pm-list { gap: 0 !important; }
.mps-next .pm-item.pm-item::before, .mps-next .pm-itemDashed.pm-itemDashed::before { display: none; }
/* Events › Find: the filters column is where you set the view: a filled panel with its inset (it was filled
 * with the text flush at its edge). */
@media (min-width: 961px) {
  .mps-next aside[class*="evb-module"][class*="filtersCard"] { padding: 16px !important; border: 0 !important; border-radius: 14px !important; }
}
/* While no spot is set, Find asks one question with one form (the main "Where should we look?"): the
 * filters' "Look somewhere else" form waits until a spot is set. */
.mps-next [class*="evb-module"][class*="findGrid"]:has(section[aria-labelledby="evb-where"] form) form[data-look-elsewhere] { display: none; }
/* Friends › Find trainers: a form, filled, with its inset. */
.mps-next section.rl-card.fv-section:has(form) { padding: 16px !important; border-radius: 14px !important; }
@media (max-width: 640px) { .mps-next section.rl-card.fv-section:has(form) { padding: 12px !important; } }
/* A tournament's "Shared event" and Settings' "Bug-report alerts" are a heading, a line and a button in a
 * section: no box (both are boxed inline). */
.mps-next [data-testid="shared-event-panel"],
  .mps-next .bug-alert-mute {
  background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important;
}

/* ---------- One right edge: Notes ----------
 * Notes' column stopped at 1040px under a tab hairline that runs to the frame's edge, and a deck's matchups
 * were 440px cards side by side, so one record sat mid-page. The column is the page's; matchups are rows. */
.mps-next .nts-column.nts-column { max-width: none; }
.mps-next .nts-matchups.nts-matchups { display: flex; flex-direction: column; gap: 0; }
.mps-next .nts-matchups.nts-matchups > .nts-mx.nts-mx { border-width: 1px 0 0; border-radius: 0; padding: 14px 0; }
.mps-next .nts-matchups.nts-matchups > .nts-mx.nts-mx:first-child { border-top: 0; padding-top: 0; }

/* ---------- Reading measure ----------
 * Ledes ran 110-130 characters on Japan's and Cards' heads. Ledes and paragraphs stop at ~75 characters.
 * (r6: "ch" is the width of a "0", wider than an average letter, so 75ch let 84-91 characters through on
 * Meta's, Settings' and Stats' paragraphs; 64ch is about 75 characters of running text.) */
.mps-next main :is(p, .page-lede, [class*="lede"], [class*="Lede"]):not(.profile-page *) { max-width: 64ch; }

/* ---------- Meta tab row on a phone ----------
 * At 320 (and 150% text) the four tabs and Global / Japan shared one row: the row auto-scrolled "Decks" to
 * "ks" and hid "Lists". Up to 420px the tabs get the whole row and Global / Japan sits right-aligned on its
 * own line just under it, above the title (beside a long title such as "Event standings" at 150% text it
 * broke the word). */
@media (max-width: 420px) {
  .mps-next .page-head:has(> .page-head-nav > .meta-region) { display: grid; grid-template-columns: minmax(0, 1fr); }
  .mps-next .page-head-nav:has(> .meta-region) { display: contents; }
  .mps-next .page-head-nav:has(> .meta-region) > nav { grid-row: 1; width: 100%; box-shadow: inset 0 -1px 0 var(--border); justify-content: space-between; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a { padding: 0 6px; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a:last-child { padding-right: 0; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a::after { left: 6px; right: 6px; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a:first-child::after { left: 0; }
  .mps-next .page-head-nav:has(> .meta-region) > nav > a:last-child::after { right: 0; }
  .mps-next .page-head-nav > .meta-region { grid-row: 2; justify-self: end; margin: -4px 0 -8px; }
  .mps-next .page-head:has(> .page-head-nav > .meta-region) > .page-head-row { grid-row: 3; }
}
/* The scope line beside its Filters button: at 150% text "Online + majors" ran under the button. The
 * button wraps under the words when they need the row. */
.mps-next .mf-scope-head.mf-scope-head { flex-wrap: wrap; }
.mps-next .mf-scope-text.mf-scope-text { flex: 1 1 12rem; }

/* ---------- Settings: sub-navs are underline tabs ----------
 * On a phone / tablet the section menu was a rail of outlined chips. Same strip as the Log and Meta sub-navs:
 * plain tabs on one hairline, the current one in text colour with the accent underline (the edge fade stays). */
@media (max-width: 1023px) {
  .mps-next nav.st-nav.st-nav { gap: 4px; padding-block: 0; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--border); }
  .mps-next nav.st-nav.st-nav a.st-nav-link {
    min-height: 44px; padding: 0 12px; border: 0; border-radius: 0; background: none; color: var(--text-muted); font-size: 0.875rem; font-weight: 600;
  }
  .mps-next nav.st-nav.st-nav a.st-nav-link:hover { background: none; color: var(--text); }
  .mps-next nav.st-nav.st-nav a.st-nav-link[aria-current] { background: none; color: var(--text); }
  .mps-next nav.st-nav.st-nav a.st-nav-link[aria-current]::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent);
  }
  .mps-next nav.st-nav.st-nav a.st-nav-link { outline-offset: -2px; }
}
/* Desktop: at the page's end the sticky menu ran out of room in its grid area (the content column ended
 * first) and slid up under the top bar. Its area runs on through an empty 128px row under the last card
 * (cancelled by a negative margin, so the footer doesn't move) and the menu holds its place to the end. */
@media (min-width: 1024px) {
  .mps-next .st-body.st-body:has(> nav.sticky-rail) { margin-bottom: -160px; }
  .mps-next .st-body.st-body:has(> nav.sticky-rail)::after { content: ""; grid-column: 2; grid-row: 2; height: 128px; }
  .mps-next .st-body.st-body > nav.sticky-rail { grid-row: 1 / span 2; }
}

/* ---------- One left edge: decks and notes heads ----------
 * My decks' table header started "Archetype" over the name (after the sprite column), 56px in from the
 * section headings; its first column label now starts on the edge over the sprite and the name. A deck's
 * head on Notes put the name after the sprite: the name is on the edge and the sprite follows it. The
 * "Some games don't say what you played" prompt led with a "?" slot: its heading starts on the edge. */
@media (min-width: 900px) {
  .mps-next [class*="mz-module"][class*="__dkHead"] > [class*="__dkSpr"] { display: none; }
  .mps-next [class*="mz-module"][class*="__dkHead"] > [class*="__dkMain"] { grid-column: 1 / span 2; }
}
.mps-next [class*="mz-module"]:is([class$="__empty"], [class*="__empty "]) > [class*="__dkSlot"]:first-child { display: none; }
.mps-next .nts-deck-head.nts-deck-head { grid-template-columns: minmax(0, max-content) auto minmax(0, 1fr); }
.mps-next .nts-deck-head.nts-deck-head > :first-child { order: 1; align-self: center; }
.mps-next .nts-deck-head.nts-deck-head > .nts-deck-title { order: 0; }
.mps-next .nts-deck-head.nts-deck-head > :last-child:not(:first-child, .nts-deck-title) { order: 2; justify-self: end; }

/* ---------- A strip that scrolls on a phone shows it ----------
 * The Log's filter chips scroll sideways on a phone with nothing to say more are behind the edge: the
 * edge it scrolls toward fades, and the strip's end room keeps the last chip clear of the fade. */
@media (max-width: 767px) {
  .mps-next .bt .bt-chips[class*="log-phone-module"][class*="__chipStrip"] {
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent); padding-right: 28px;
  }
}

/* Home on a phone: the setup checklist (a form, so filled) lost its inset with the phone layout and its
 * text sat flush on the fill's edge. A fill keeps its 12px inset. */
@media (max-width: 640px) {
  .mps-next .rl-page section.rl-card:has(form :is(input:not([type="hidden"], [type="search"], [type="checkbox"], [type="radio"]), textarea, select)) {
    padding: 12px !important; border-radius: 14px !important;
  }
}

/* 320px with 150% text: Cards' "5% → 38% · 1.0 copy" lines and Find's "Share an event that isn't listed"
 * would not wrap and pushed the page 7-22px sideways. On the narrowest phones they wrap. */
@media (max-width: 359px) {
  .mps-next main [class*="mz-module"][class*="__nowrap"], .mps-next main a[class*="evb-module"][class*="__btn"] { white-space: normal; }
}

/* ======================================================================
 * SIXTH AUDIT (r6)
 * ====================================================================== */

/* ---------- Cards: a mover row on a phone ----------
 * The decks moving a card ("Dragapult ex 30% → 48% · 2.0 copies") sat in the name's column, 120px wide
 * beside the sparkline: the numbers ran under the sparkline and the deck name shrank to a 2px sliver (the
 * stray "|"). On a phone the deck lines take the row's whole width under the name; the sparkline stays on
 * the name's line, and under 400px it goes (the share and its change carry the numbers). */
@media (max-width: 640px) {
  .mps-next .cp-mvr.cp-mvr {
    grid-template-columns: 32px minmax(0, 1fr) 56px auto; grid-template-rows: auto auto; row-gap: 4px;
  }
  .mps-next .cp-mvr.cp-mvr > :nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(2) { display: contents; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(2) > :first-child { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(2) > .cp-mvds { grid-column: 2 / -1; grid-row: 2; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(3) { grid-column: 3; grid-row: 1; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(4) { grid-column: 4; grid-row: 1; }
}
/* A deck line: its name keeps at least 8em; when the numbers don't fit beside it (320px, 150% text) they drop
 * under it, at the right, instead of running over the name. */
@media (max-width: 640px) {
  .mps-next .cp-mvd.cp-mvd { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 0; }
  .mps-next .cp-mvd.cp-mvd > :first-child { flex: none; }
  .mps-next .cp-mvd.cp-mvd > :nth-child(2) { flex: 1 1 8em; min-width: 0; }
  .mps-next .cp-mvd.cp-mvd > :nth-child(3) { flex: none; margin-left: auto; max-width: 100%; }
}
@media (max-width: 399px) {
  .mps-next .cp-mvr.cp-mvr { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .mps-next .cp-mvr.cp-mvr > :nth-child(3) { display: none !important; } /* the sparkline sets display inline */
  .mps-next .cp-mvr.cp-mvr > :nth-child(4) { grid-column: 3; }
}

/* ---------- Three looks for three jobs, everywhere ----------
 * FILTERS are chips. A short list (six options or fewer) is its options, one chip each, after a muted label
 * (PersonalMetaFilterBar draws .filter-chips on this host: Stats' Source / Window / Format / Category). A long
 * list (decks, opponents, tags, where a note was written) stays a compact select, drawn chip-shaped, and says
 * its label once something is picked ("Opponent  Gardevoir"); the default value names itself ("Every
 * opponent"). A date range is two fields inside one "Dates" chip that opens them (FilterDisclosure). */
.mps-next .filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.mps-next .filter-chips-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.mps-next .filter-chips > .chip { background: transparent; }
.mps-next .filter-chips > .chip.on { background: var(--text); }
.mps-next .pmf-bar.pmf-bar:has(> .filter-chips) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
@media (max-width: 640px) {
  .mps-next .pmf-bar.pmf-bar:has(> .filter-chips) { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mps-next .filter-chips > .filter-chips-label { flex-basis: 100%; margin: 0 0 2px; }
}
.mps-next :is(.pmf-bar.pmf-bar, form.nts-filters.nts-filters) .sel {
  width: auto; max-width: 100%; min-height: 36px; padding-inline: 14px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
}
.mps-next form.nts-filters.nts-filters .nts-filter-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mps-next form.nts-filters.nts-filters .sel:not(:has(+ input[type="hidden"][value=""]))::before {
  content: attr(aria-label); flex: none; color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
}
.mps-next .filter-disclosure > summary { list-style: none; cursor: pointer; min-height: 36px; color: var(--text); }
.mps-next .filter-disclosure > summary::-webkit-details-marker { display: none; }
.mps-next .filter-disclosure > summary::after {
  content: ""; width: 6px; height: 6px; margin: -3px 0 0 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.mps-next .filter-disclosure[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.mps-next .filter-disclosure[open] { flex-basis: 100%; }
.mps-next .filter-disclosure-body { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mps-next .filter-disclosure-body > * { flex: 0 1 180px; min-width: 130px; }
@media (max-width: 640px) { .mps-next .filter-disclosure-body > * { flex: 1 1 130px; } }

/* TIME WINDOWS are filters, so chips, like Meta's and Japan's windows: Home's period (30 / 90 / 180 days / All
 * time) and its sleeve's Online / Near you (both .rl-seg-sm), and Tournaments' Period. Same links and buttons,
 * same order; the picked one is the selected chip. On a phone Home's row stays right-aligned where it is. */
.mps-next .rl-seg.rl-seg-sm:not(.np-pad),
  .mps-next .bt .bt-seg[aria-label="Period"],
  .mps-next .dk-window.dk-window {
  display: flex !important; flex-wrap: wrap; gap: 6px; width: auto !important; min-height: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible;
}
.mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > [data-nav-indicator] { display: none !important; }
.mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > a,
  .mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > button {
  flex: none !important; display: inline-flex; align-items: center; justify-content: center; min-height: 32px !important; padding: 0 14px !important;
  border: 1px solid var(--border) !important; border-radius: 999px !important; background: transparent !important; box-shadow: none !important;
  color: var(--text-muted) !important; font-size: 0.8125rem !important; font-weight: 600 !important; text-decoration: none;
}
.mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > a:hover,
  .mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > button:hover { color: var(--text) !important; border-color: var(--border-strong) !important; }
.mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > [aria-pressed="true"],
  .mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > [aria-current="true"],
  .mps-next :is(.rl-seg.rl-seg-sm, .bt .bt-seg[aria-label="Period"], .dk-window) > [aria-current="page"] {
  background: var(--text) !important; border-color: var(--text) !important; color: var(--bg) !important;
}
@media (max-width: 640px) {
  .mps-next .rl-stats-head .rl-seg.rl-seg-sm { justify-content: flex-end; margin-left: auto; }
}

/* VIEW SWITCHES are segmented controls: Stats' "Decks | Matchups" and "Top % | Finish" (ChartFrame's
 * SegmentedToggle) were pill chips like the series pickers beside them. Now the track and raised segment of
 * Meta's Share / Tiers / Trends. They sit under their own chart headings, not under the page title. */
.mps-next .seg-toggle {
  display: inline-flex !important; flex-wrap: nowrap !important; gap: 2px !important; width: fit-content; max-width: 100%;
  padding: 3px; border-radius: 10px; background: var(--surface-2);
}
.mps-next .seg-toggle > button {
  min-height: 30px !important; padding: 0 12px !important; border: 0 !important; border-radius: 8px !important;
  background: transparent !important; color: var(--text-muted) !important; font-weight: 600 !important;
}
.mps-next .seg-toggle > button[aria-pressed="true"] { background: var(--surface) !important; color: var(--text) !important; box-shadow: var(--shadow-sm); }

/* A control with one option is not a control: Meta › Tiers with only "Online weeks" (no majors snapshot yet)
 * drew a one-segment track. Any glide control whose one item is the picked one reads as plain muted text. */
.mps-next [data-glide]:has(> :is([aria-current="page"], [aria-current="true"], [aria-pressed="true"])):not(:has(> :is(a, button) ~ :is(a, button))) {
  background: none !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important;
}
.mps-next [data-glide]:has(> :is([aria-current="page"], [aria-current="true"], [aria-pressed="true"])):not(:has(> :is(a, button) ~ :is(a, button))) > [data-nav-indicator] { display: none !important; }
.mps-next [data-glide]:has(> :is([aria-current="page"], [aria-current="true"], [aria-pressed="true"])):not(:has(> :is(a, button) ~ :is(a, button))) > a,
  .mps-next [data-glide]:has(> :is([aria-current="page"], [aria-current="true"], [aria-pressed="true"])):not(:has(> :is(a, button) ~ :is(a, button))) > button {
  min-height: 24px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  display: inline-flex; align-items: center; color: var(--text-muted) !important; font-size: 0.875rem; font-weight: 500 !important; text-decoration: none;
}

/* The same for Tiers' snapshot chips when there is one snapshot ("Last week · Nov 2 – 8"): muted text. */
.mps-next nav.ti-chips.ti-chips:has(> a[aria-current]:only-child) > a {
  min-height: 24px; padding: 0; border: 0; background: none !important; color: var(--text-muted) !important; font-size: 0.875rem; font-weight: 500;
}

/* ---------- A link to another page is a quiet row ----------
 * LinkCard ("Find lists", "Trends for these 8 decks", Japan's "Find Japan lists" / "Cards in Japan", a deck's
 * "Lists for this deck") was an outlined tile beside read sections. Each is one row on the page: a hairline
 * above, its title and line on the column's edge, a chevron at the right. One style everywhere: no icon well,
 * no "Open trends" words (the chevron says it). */
.mps-next a[class*="mz-module__"][class*="__cardLink"] {
  border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; padding: 14px 0 0 !important; min-height: 0; gap: 12px;
}
.mps-next a[class*="mz-module__"][class*="__cardLink"] > [class*="phone-module__"][class*="__linkIcon"],
.mps-next a[class*="mz-module__"][class*="__cardLink"] [class*="phone-module__"][class*="__cta"] { display: none; }
.mps-next a[class*="mz-module__"][class*="__cardLink"]:hover { background: none !important; }
.mps-next a[class*="mz-module__"][class*="__cardLink"]:hover [class*="__h3"] { text-decoration: underline; }

/* ---------- Home on a phone: read sections have no box (as at 1440) ----------
 * The sleeve's deck row, "Field odds into these" / "Your games into them" and Win rate by week's chart (or
 * its empty line) were 16px-radius outlined boxes on phones only. The deck row and the chart sit on the page;
 * the two figures are a strip with a hairline between them, like the record strip above. */
@media (max-width: 640px) {
  .mps-next.mps-next :is(.hp-box, .hp-figure, .hp-trendBody) {
    border: 0 !important; border-radius: 0 !important; background: none !important; padding-inline: 0 !important;
  }
  .mps-next.mps-next .hp-box { padding-block: 0 !important; }
  .mps-next.mps-next .hp-trendBody { padding-block: 0 !important; }
  .mps-next.mps-next .hp-figures { gap: 0; }
  .mps-next.mps-next .hp-figure { padding-block: 4px !important; }
  .mps-next.mps-next .hp-figure + .hp-figure { border-left: 1px solid var(--border) !important; padding-left: 16px !important; }
}

/* ---------- Feed: a post is an item, not a panel ----------
 * Each post was filled (it holds a comment form, so the ACT rule lit it): posts are rows on the page with a
 * hairline between them; the comment field keeps its own outline. (Excluded from the ACT fill above.) */
.mps-next li.feed-card.feed-card {
  border: 0 !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; padding: 20px 0 !important;
}

/* ---------- A tournament's head: one left edge ----------
 * With no deck set the scoreline's deck cell is empty, but its grid column and 20px gap stayed, so Record /
 * 5–0 / "Add your deck" started 20px right of the title, Finish and Rounds. An empty deck cell takes no
 * column. */
.mps-next .bt .bt-scoreline > .bt-sl-deck:empty { display: none; }
.mps-next .bt .bt-scoreline:has(> .bt-sl-deck:empty) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rec" "finish"; }
@container bt-rc (min-width: 620px) {
  .mps-next .bt .bt-scoreline:has(> .bt-sl-deck:empty) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rec finish"; }
}

/* ---------- Home: "The meta this week" balances its two columns ----------
 * With an odd number of summaries the layout (lib/home/layout.ts) gives the last one both columns, so the grid
 * row above it paired a long summary with a short one and left a ~300px hole under the short one (Majors beside
 * Cards on the move, then Events near you across both). Then the summaries flow as two balanced columns (CSS
 * columns: column one fills first, in DOM order, so reading order and Tab order stay the same) and the last
 * one takes its turn in a column instead of the full width. An even count keeps the grid's pairs. */
@media (min-width: 861px) {
  .mps-next .rl-meta-grid:has(> .rl-meta-cell:is([style*="--span2:2"], [style*="--span2: 2"])) { display: block; columns: 2; column-gap: 48px; }
  .mps-next .rl-meta-grid:has(> .rl-meta-cell:is([style*="--span2:2"], [style*="--span2: 2"])) > .rl-meta-cell { break-inside: avoid; margin-bottom: 40px; }
  .mps-next .rl-meta-grid:has(> .rl-meta-cell:is([style*="--span2:2"], [style*="--span2: 2"])) > .rl-meta-cell:last-child { margin-bottom: 0; }
}

/* ---------- Home on a phone: the record's figures stack ----------
 * Two figures side by side put "Win rate, 30 days" and "Going first, 4 months" on one line with no gap, so
 * they read as one sentence and interleaved at 150% text. On a phone each figure is its own row (caption,
 * number, line), 16px apart; the period chips fit one row at 360. */
@media (max-width: 640px) {
  .mps-next .rl-page .rl-stats.rl-stats { display: flex; flex-direction: column; gap: 16px; }
  .mps-next .rl-page .rl-stats.rl-stats > .dash-stat { border: 0 !important; padding: 0 !important; }
  .mps-next .rl-stats-head .rl-seg.rl-seg-sm > a,
  .mps-next .rl-stats-head .rl-seg.rl-seg-sm > button { padding: 0 10px !important; }
}

/* ---------- Edit profile › Top 8: the remove buttons stay on screen ----------
 * The trash dot is centred on a tile's top-right corner, but its transparent 44px target hung 22px past the
 * tile, so on the right-hand tiles it ran past the page edge at 320 (and at 360 with 150% text). The target
 * moves 10px in, the dot moves 10px back out: the dot still sits on the corner, the target reaches 12px out. */
@media (max-width: 560px) {
  .mps-next .top8-slot-remove { transform: translate(calc(50% - 10px), calc(-50% + 10px)); }
  .mps-next .top8-slot-remove__dot { transform: translate(10px, -10px); }
}

/* ---------- Charts: the last date on a bottom axis ends at its tick ----------
 * Centred on the plot's last point, a longer last label ("Nov 16") ran past the chart's right edge and was cut
 * ("Nov 1"). AxisTick marks the last bottom label; here it is anchored to its end. */
.mps-next text.axis-tick-last { text-anchor: end; }

/* ---------- One control family: native selects look like the app's select ----------
 * Feed's "No round", Friends', Settings' and a tournament's native <select>s drew the browser's own box,
 * height and arrow beside the app's .input / Select trigger. Here every native select has the trigger's
 * height, radius, border and a chevron drawn in the muted text colour (both themes). Several set their box
 * inline (Feed's thread form), hence !important; their font size stays (16px keeps iOS from zooming). */
.mps-next :where(main, dialog, [role="dialog"]) select:not([multiple], [size]:not([size="1"]), .profile-page *) {
  -webkit-appearance: none !important; appearance: none !important; box-sizing: border-box; min-height: var(--control-h-sm) !important; max-width: 100%;
  padding: 0 34px 0 12px !important; border: 1px solid var(--border-strong) !important; border-radius: var(--r-md) !important;
  background-color: var(--surface) !important;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%) !important;
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50% !important; background-size: 5px 5px, 5px 5px !important; background-repeat: no-repeat !important;
  color: var(--text) !important; font-family: inherit; line-height: 1.2; cursor: pointer;
}
.mps-next :where(main, dialog, [role="dialog"]) select:not([multiple], [size]:not([size="1"]), .profile-page *):hover { border-color: var(--text-muted) !important; }
.mps-next :where(main, dialog, [role="dialog"]) select:not([multiple], [size]:not([size="1"]), .profile-page *):disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- The signed-out landing (new markup on main): its chrome ----------
 * Its illustrations are media and keep their look. Two chrome fixes: the reading measure above made the hero's
 * centred "Free, for trainers 18 and older." (and the closing section's lines) narrower than the hero without
 * centring the block, so the line sat 40px left of the buttons; a centred section's paragraphs centre their
 * block. On a phone the "Most played decks" tabs wrapped one under another, each with its own underline and the
 * row's hairline under the last: they are one row that scrolls sideways, like the app's sub-navs. */
.mps-next .ld :is(.ld-hero > .ld-wrap, .ld-end .ld-wrap, .ld-end) > p { margin-inline: auto; }
@media (max-width: 639px) {
  .mps-next .ld .ld-tabs {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent); padding-right: 28px;
  }
  .mps-next .ld .ld-tabs::-webkit-scrollbar { display: none; }
  .mps-next .ld .ld-tabs button { flex: none; white-space: nowrap; }
  .mps-next .ld .ld-tabs button::after { bottom: 0; }
}

/* ---------- Friends: a status and a quiet Remove ----------
 * FriendButton / ProfileFriendAction now draw "Friends ✓" as a status (not a button) and Remove as its own
 * button. The status is muted text with the check in the success colour; Remove is a quiet ghost button with
 * a 44px touch height. */
.mps-next .fb-status,
  .mps-next .pfa-status { color: var(--text-muted); white-space: nowrap; }
.mps-next :is(.fb-status, .pfa-status) > span[aria-hidden] { color: var(--win-solid, var(--success, currentColor)); }
.mps-next .fb-remove {
  min-height: 44px; padding-inline: 12px; border-color: transparent !important; background: none !important;
  color: var(--text-muted); box-shadow: none !important;
}
.mps-next .fb-remove:hover:not(:disabled) { color: var(--text); background: var(--surface-2) !important; }

/* ---------- Meta: "No numbers for this window yet" offers its windows as filter chips ---------- */
.mps-next [class*="mz-module__"]:is([class$="__empty"], [class*="__empty "]) > [class*="__line"]:has(> a) { gap: 6px; margin-top: 4px; }
.mps-next [class*="mz-module__"]:is([class$="__empty"], [class*="__empty "]) > [class*="__line"] > a {
  min-height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 600; text-decoration: none;
}
.mps-next [class*="mz-module__"]:is([class$="__empty"], [class*="__empty "]) > [class*="__line"] > a:hover { color: var(--text); border-color: var(--border-strong); }

/* ======================================================================
 * SEVENTH AUDIT (r7)
 * ====================================================================== */

/* ---------- A deck's sections are a sub-nav: underline tabs ----------
 * Meta › a deck (Matchups · Cards · Report card · Field lists, ?tab= links) was drawn as a segmented control,
 * the look of a view switch. Same strip as the Log and Meta sub-navs: tabs on one hairline across the column,
 * the current one in text colour over the accent underline. It still scrolls inside itself on a phone, with the
 * edge fade (.seg[data-fade], mz.module.css). The Cards tab's number counted lists, not cards: the tab is "Cards". */
.mps-next nav.deck-tabs {
  display: flex; align-self: stretch !important; width: 100%; max-width: 100%; min-height: 44px; gap: 4px; padding: 0;
  border: 0; border-radius: 0; background: none !important; box-shadow: inset 0 -1px 0 var(--border);
}
.mps-next nav.deck-tabs > [data-nav-indicator] { display: none !important; }
.mps-next nav.deck-tabs > a {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 0; background: none !important; box-shadow: none !important;
  color: var(--text-muted) !important; font-size: 0.875rem; font-weight: 600; white-space: nowrap;
}
.mps-next nav.deck-tabs > a:first-child { padding-left: 0; }
.mps-next nav.deck-tabs > a:is(:hover, [aria-current="page"]) { color: var(--text) !important; }
.mps-next nav.deck-tabs > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent);
}
.mps-next nav.deck-tabs > a:first-child::after { left: 0; }
.mps-next nav.deck-tabs > a:focus-visible { outline-offset: -2px; }
.mps-next nav.deck-tabs [class*="__chipCount"] { display: none; }

/* ---------- Jump links are links ----------
 * Stats' "On this page" (Your decks · Battle logs · Patterns) were chips, the filters' look. A muted label, then
 * text links in the link colour, each a 44px touch target. */
.mps-next .stats-jump { gap: 4px 16px; }
.mps-next .stats-jump-link {
  flex: none; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--link); font-size: 0.875rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.mps-next .stats-jump-link:hover { text-decoration: underline; }

/* ---------- Settings and Edit profile: one right edge ----------
 * The head's buttons ended at the frame's edge (x=1320 at 1440) over a form column that ends at the rail +
 * 46rem (~1080). The head is as wide as the rail and the form together, so its buttons end on the form's edge. */
@media (min-width: 1024px) {
  .mps-next main > header.st-head.st-head { max-width: calc(208px + 32px + 46rem); }
}

/* ---------- Meta › Decks: the field table ----------
 * "Win" sat 8px after Share's right-aligned numbers, hard against them, then its 128px track (empty when a scope
 * has no win rates) before Top 32. The Win column's header and cells start 16px into it, so Share | Win reads as
 * two columns; the name keeps its width. A missing number is the app's one placeholder, the muted dash: in the
 * mono face it read as an underscore, so a lone placeholder in a number cell is set in the body face (any mono
 * cell, every table). */
@media (min-width: 700px) {
  .mps-next .mf-row.mf-row > .mf-win { padding-left: 16px; }
}
.mps-next [class*="__mono"] > [class*="__muted"]:only-child { font-family: var(--font-body); }

/* ---------- Reading measure: the note under a lede ----------
 * MetaHead's region note is a 13px line inside the 16px lede, so the lede's 64ch let it run ~100 characters.
 * Its own measure, in its own size. */
.mps-next main :is(p, .page-lede) :is(.meta-note, small) { max-width: 64ch; }

/* ---------- One left edge: rows in a divided list ----------
 * Japan's "Latest City Leagues" rows kept the row inset (14px) of their old outlined boxes, so the sprites and
 * the hairlines started 14px right of the heading. Rows in a divided list are flush with it. Home's "Vs decks":
 * the deck's slot sat centred in its 48px column (10px in); it starts on the edge. */
.mps-next :is(.list-divided, .plist) > [class*="mz-module__"][class*="__row"].prow { padding-left: 0; padding-right: 0; }
.mps-next .rl-vs-row > .sprite-pair { justify-content: flex-start; }

/* ---------- Find lists: a short choice is its options ----------
 * Events, Kind of major, Division, Players, Window and Event size were six look-alike dropdowns. Each is a row of
 * chips after its muted label (ScopeChoice: native radios, so the GET form submits the same params); the picked
 * one is the selected chip. Each choice gets its own row. */
.mps-next .chip-radios { flex: 1 1 100%; }
.mps-next .chip-radios > .chip { position: relative; background: transparent; }
.mps-next .chip-radios > .chip > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mps-next .chip-radios > .chip:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--bg); }
.mps-next .chip-radios > .chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- A deck's page: its action column is one width ----------
 * Beside the title (from 1100px) Copy list and Share filled the 232px column and the quieter row under them
 * (TCGplayer, Notes with this deck, Compare) fit their words: a ragged right edge. The quiet row stacks and each
 * of its buttons takes the column's width too; they stay ghost buttons. */
@media (min-width: 1100px) {
  .mps-next [class*="mz-module__"][class*="__dkHeroActions"] > [class*="__lineWrap"] { flex-direction: column; align-items: stretch; }
  .mps-next [class*="mz-module__"][class*="__dkHeroActions"] > [class*="__lineWrap"] > * { width: 100%; justify-content: center; }
  /* TCGplayer's button comes in a stack that starts its children inline (align-items: flex-start). */
  .mps-next [class*="mz-module__"][class*="__dkHeroActions"] > [class*="__lineWrap"] > [class*="__stackSm"] { align-items: stretch !important; }
}
/* A choice with a longer list (Window) stays a select, chip-shaped, on its label's row like the chips. */
.mps-next form[role="search"] [class*="mz-module__"][class*="__field"]:has(> .sel) { flex: 1 1 100%; flex-direction: row; align-items: center; gap: 6px 10px; }
.mps-next form[role="search"] [class*="mz-module__"][class*="__field"]:has(> .sel) > label { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.mps-next form[role="search"] [class*="mz-module__"][class*="__field"] > .sel {
  width: auto; min-height: var(--control-h-sm); padding-inline: 14px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
}
@media (pointer: coarse) { .mps-next form[role="search"] [class*="mz-module__"][class*="__field"] > .sel { min-height: var(--control-h); } }

/* ---------- A deck's "What you'll face": the mirror's words stay in their column ----------
 * The mirror row's "even by definition" (mono, nowrap) was 127px in a 112px track and ran under Effect's "0.0".
 * The range line under a track may wrap. */
.mps-next .ar-rng.ar-rng [class*="mz-module__"][class*="__mono"] { white-space: normal; }

/* ---------- A deck's page: its question sits in the page's stack ----------
 * "Which deck is this?" / "Link past games" between the head and the sections carried a 16px bottom margin
 * (set inline, for where they sit inside a card elsewhere) on top of the page stack's gap: 20px above, 36px
 * below. On the deck page the stack's gap is the only space around it. */
.mps-next .dp-root.dp-root > section[aria-label][style*="margin"] { margin: 0 !important; }

/* ---------- Events › Your schedule: rows and day heads on the column's edge ----------
 * A schedule row (now also the trainer's own tournaments, with their title link and "Event" badge) kept its old
 * card's 20px inset, and the day head ("Fri, Nov 13") a 2px one: the date tile started 20px right of "Your
 * schedule" and Joined ended 20px short of "Past events are on Tournaments". Rows and heads are flush. */
.mps-next article[class*="evb-module__"][class*="__eventRow"] { padding-left: 0; padding-right: 0; }
.mps-next [class*="evb-module__"][class*="__weekHead"] { padding-left: 0; padding-right: 0; }

/* ---------- A deck's list editor at 320 with 150% text ----------
 * Its view buttons (… Preview) sit in a no-wrap row and pushed the page 22px sideways: they wrap. */
.mps-next .competitive-main nav,
  .mps-next .competitive-main .seg-toggle { flex-wrap: wrap !important; }

/* ======================================================================
 * Eighth audit (DESIGN-37)
 * ====================================================================== */

/* ---------- Meta deck › Report card: figures, a sentence, one title ----------
 * Six filled read-only tiles (their verdict's gold / green / red fill), a filled "Middle of the pack" banner
 * and a second large deck-name title under the page's own h1. Here: the numbers are figures (label, number,
 * verdict) over a hairline; the call is a sentence; the report's heading is its week (the eyebrow says
 * "Report card"). The share IMAGE keeps its tiles. (The page's scope bar is no longer drawn on this tab at
 * all, for everyone: DeckBetaPage, ninth audit.) */
.mps-next .rc-call { background: none; padding: 0; border-radius: 0; }
.mps-next .rc-call > .rc-callword { font-size: 1rem; }
.mps-next .rc-deckname { display: none; }
.mps-next .rc-figure { background: none; border-radius: 0; padding: 10px 0 0; border-top: 1px solid var(--border); }
.mps-next .rc-tiles { column-gap: 24px; row-gap: 16px; }

/* ---------- Every disclosure shows it opens ----------
 * "Deck settings", "Pin, rename or delete versions", a chart's "Show as table" and Notes' "N notes" are
 * flex summaries, which drop the browser's triangle: they looked like plain text. The app's chevron
 * (Filters' marker) after the label, turned when open. */
.mps-next summary.disclosure-sum { list-style: none; gap: 8px; }
.mps-next summary.disclosure-sum::-webkit-details-marker { display: none; }
.mps-next summary.disclosure-sum::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.mps-next details[open] > summary.disclosure-sum::after { transform: rotate(225deg); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .mps-next summary.disclosure-sum::after { transition: none; } }

/* ---------- Meta deck › Field lists: Global / Japan in the tab row ----------
 * It stacked a second segmented control (Global | Japan) over By matchup | By cards. It is a scope, so it
 * sits at the right end of the deck's tab row, like every Meta page's tab row; the hairline moves to the row. */
.mps-next .deck-tabs-row {
  display: flex !important; align-items: center; gap: 8px; align-self: stretch; box-shadow: inset 0 -1px 0 var(--border);
}
.mps-next .deck-tabs-row > nav.deck-tabs { flex: 1 1 auto; width: auto; min-width: 0; box-shadow: none; }
.mps-next .deck-tabs-row > .ui-next { flex: none; }

/* ---------- Edit profile: the Shiny Charm and Ace Trainer banners are quiet notices ----------
 * Gold gradients with a running sheen and a gold border (the charm's had a zero-offset glow): a notice keeps
 * its tint and its padding, nothing else (see "NOTICE" above). The Ace one is a link, so its fill stays. */
.mps-next .mps-charm-banner,
  .mps-next .mps-ace-banner {
  background: color-mix(in srgb, var(--warning, #c99a2e) 14%, var(--surface)) !important; border-color: transparent !important;
  box-shadow: none !important; animation: none !important; filter: none !important; padding: 10px 14px !important;
  /* On the flat tint the faded second line fell under 4.5:1 in light: it takes the text colour. */
  --charm-text-dim: var(--charm-text); --ace-text-dim: var(--ace-text);
}

/* ---------- Meta › an event: "Decks here" is a side menu ----------
 * A vertical list of links with aria-current: it takes the side menus' current item (Settings: the soft
 * accent row, text colour, bold), not a look of its own in accent text. */
.mps-next a[class*="mz-module__"][class*="__deckLinkOn"] { background: var(--accent-soft); color: var(--text); padding: 4px 8px; }
.mps-next a[class*="mz-module__"][class*="__deckLinkOn"] > span { font-weight: 700; }

/* ---------- A deck page's title is never cut ----------
 * The h1 shared the names' two-line clamp (.name): at 150% text a long list name ("Charizard ex / Pidgeot
 * ex (sample)") ended in an ellipsis. A page title wraps as far as it needs. */
.mps-next h1[class*="mz-module__"][class*="__name"] { display: block; -webkit-line-clamp: unset; overflow: visible; }

/* ---------- Meta's search boxes: the standard focus ring ----------
 * The search box (the field's "Search by Pokémon or nickname") showed focus as a 1px accent ring on its
 * frame: the same 2px ring, 2px off, as every other control here. */
.mps-next [class*="mz-module__"][class*="__search"]:focus-within { box-shadow: none; }
.mps-next [class*="mz-module__"][class*="__search"]:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Changelog: the date sits above its updates ----------
 * In a 180px date column "Wednesday, November 11, 2026" broke over three lines at 1440 (and the reading
 * column is too narrow to give it more). The date heads its day, then the updates under it. */
.mps-next [class*="Timeline-module__"][class*="__item"]:has(.cl-day-title.cl-day-title) {
  grid-template-columns: minmax(0, 1fr); row-gap: 8px;
}

/* ======================================================================
 * Ninth audit (DESIGN-39)
 * ====================================================================== */

/* ---------- Meta deck › Report card: no win rate is one more muted figure ----------
 * With no decided rounds the win figure was a 64px "—" (a solid bar) alone in a far-right column beside
 * the hero. It joins the figure strip as its first figure, columns even; the event line keeps normal
 * tracking (0.08em uppercase read as a label, not the event). */
.mps-next [data-testid="report-win"][data-empty] { display: none; }
.mps-next .rc-win-tile { display: flex; }
@media (min-width: 900px) { .mps-next .rc-tiles:has(.rc-win-tile) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mps-next .rc-place { letter-spacing: normal; }

/* ---------- A saved list asks "Which deck is this?" once ----------
 * With no archetype yet the page asked at the top and again in Edit › Archetype: two pickers for one
 * answer. The top prompt is the one; the Edit row comes back (to change it) once an archetype is set. */
.mps-next .deck-arch-prompted { display: none !important; }

/* ---------- A card's page title is a page title ----------
 * /meta/cards/<card> drew its h1 at the section size (28px; 24 on a phone) where every other page's title
 * is 36 (28 on a phone). Only the h1: the same component as an h2 (a card inside another page) keeps it. */
.mps-next h1[class*="mz-module__"][class*="__h1"] {
  font-size: var(--title-size); line-height: var(--title-lh); letter-spacing: var(--title-ls); font-weight: var(--title-weight);
}

/* ---------- The landing's example schedule: a solid hairline ----------
 * Its events were split by a dashed rule, the last dashed line on the host. A plain hairline, like every
 * other list. (landing-styles.tsx serves both hosts, so the override is here.) */
.mps-next .ld .ld-e + .ld-e { border-top-style: solid; }
