/* The site's finish (2026-11-14): one icon family, real cards where drawings stood, a lobby whose Start button is on
   the first screen. Loaded on every page with polish.js; see that file for the icons' source and licence (Lucide, ISC). */

/* ---- icons: 24-grid, 2px round strokes, the text's own colour; sized by the text they sit in */
.rp-i { display:inline-block; width:1.15em; height:1.15em; flex:none; vertical-align:-.2em; stroke-width:2; pointer-events:none; }
.rp-i.rp-l, .rp-dot.rp-l { margin-inline-end:.4em; }
.rp-i.rp-r { margin-inline-start:.35em; }
.rp-i.rp-solo { width:1.25em; height:1.25em; vertical-align:-.25em; }
.rp-i.rp-fill { fill:currentColor; }
.rp-i.rp-play, .rp-i.rp-pause, .rp-i.rp-skip-back, .rp-i.rp-skip-forward { fill:currentColor; width:1em; height:1em; vertical-align:-.14em; }
.rp-i.rp-arrow-up-right { width:1em; height:1em; vertical-align:-.12em; }
/* inside a flex button the gap is the spacing; the margin would double it */
:is(.drawerhead, .matchbar .tools, .tp-menu-pop, .rp-prog-pill, .endscreen .row button, .cpanel .act, .winpath .wp-btns button) > .rp-i.rp-l { margin-inline-end:0; }
:is(.drawerhead, .matchbar .tools, .tp-menu-pop) button > .rp-i.rp-l { margin-inline-end:0; }
.rp-dot { display:inline-block; width:.55em; height:.55em; border-radius:50%; background:#E5484D; vertical-align:.08em; }
rp-t { display:inline; }
/* a button that is only an icon keeps a square, centred face */
button > .rp-i.rp-solo:only-child { display:block; margin:auto; }

/* the chevrons and the tick that stylesheets wrote as characters */
.workspace-more > summary::after, .portal-more > summary::after {
  content:'' !important; display:inline-block; width:1em; height:1em; vertical-align:-.15em; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mk-nav-game-option[aria-checked=true]::after {
  content:'' !important; width:1em; height:1em; background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- the lobby: the page is a working screen, so its heading is a heading, not a poster. The matchup and the Start
   button are on the first screen of a laptop (Start game sat at 915px on a 900px-tall window). The drawn fish and its
   caption go; the logo in the navigation is the brand here, and the two decks' cards are the picture. */
body.workspace .workspace-lobby-header { min-height:0; padding:4px 0 20px; margin-bottom:0; display:flex; flex-wrap:wrap; align-items:baseline; column-gap:20px; row-gap:6px; }
body.workspace .workspace-lobby-header h1 { font-size:clamp(30px,2.8vw,40px); letter-spacing:-.035em; line-height:1.1; max-width:none; }
body.workspace .workspace-lobby-header .workspace-lede { margin:0; max-width:none; font-size:16px; flex:1 1 240px; }
body.workspace .workspace-lobby-header .workspace-eyebrow { flex-basis:100%; margin-bottom:4px; }
body.workspace .workspace-lobby-header .quicktour { position:static; margin:0; min-height:0; }
body.workspace .workspace-lobby-header :is(.upstream-lobby-art, .upstream-signature) { display:none; }
@media (max-width:700px) {
  body.workspace .workspace-lobby-header { padding:4px 0 14px; }
  body.workspace .workspace-lobby-header h1 { font-size:32px; flex-basis:100%; }
  body.workspace .workspace-lobby-header .workspace-lede { font-size:14px; flex-basis:100%; }
}

/* ---- the table's menu on a phone: a grid of equal buttons under one close button, not a bag of wrapped chips */
body.focus .drawerhead { display:grid; grid-template-columns:1fr 1fr; gap:8px; position:relative; padding-top:48px; margin-bottom:14px; }
body.focus .drawerhead button { justify-content:flex-start; min-height:44px; padding:8px 12px; margin:0; text-align:left; white-space:normal; line-height:1.2; border-radius:var(--mk-radius-control,4px); }
body.focus .drawerhead button .rp-i { width:18px; height:18px; color:var(--muted, currentColor); }
body.focus .drawerhead button.primary { grid-column:1 / -1; justify-content:center; }
body.focus .drawerhead button.primary .rp-i { color:inherit; }
body.focus .drawerhead .x { position:absolute; top:0; right:0; width:40px; min-height:40px; height:40px; margin:0; padding:0; justify-content:center; font-size:24px; line-height:1; }
body.focus .drawerhead > :not(button) { grid-column:1 / -1; }

/* ---- the Learn page: real cards in each tile */
.mk-card-art.rp-art { display:flex; align-items:flex-end; justify-content:center; gap:10px; height:156px; padding:18px 12px 0; overflow:hidden; box-sizing:border-box; --rp-w:96px; }
.rp-art .rp-c { position:relative; flex:none; width:var(--rp-w); margin-bottom:-34px; }
.rp-art .rp-c > :is(img, .rp-back) { display:block; width:100%; aspect-ratio:63 / 88; height:auto; border-radius:4px; box-shadow:0 6px 18px #0008; object-fit:cover; }
.rp-art .rp-back { background:linear-gradient(160deg, #2A3238, #171B1F); border:1px solid #ffffff24; box-sizing:border-box; position:relative; }
.rp-art .rp-back::after { content:''; position:absolute; inset:6px; border:1px solid #ffffff1c; border-radius:4px; }
.rp-art .rp-badge { position:absolute; top:-9px; left:50%; transform:translateX(-50%); min-width:22px; height:22px; padding:0 7px; box-sizing:border-box; display:grid; place-items:center; border-radius:11px; background:#0C0E10; border:1px solid #ffffff38; color:#F4F6F7; font:600 12px/1 MKDisplay, 'Space Grotesk', system-ui, sans-serif; letter-spacing:.02em; font-variant-numeric:tabular-nums; z-index:2; white-space:nowrap; }
.rp-art .rp-mark { align-self:center; flex:none; font:600 16px/1 MKDisplay, 'Space Grotesk', system-ui, sans-serif; letter-spacing: .08em; text-transform:uppercase; color:var(--nav-muted, #9AA3A9); }
.rp-art .rp-mark.rp-arrow { color:var(--nav-accent, #FF5A1F); font-size:24px; }
.rp-art .rp-glow > img { box-shadow:0 0 0 2px var(--nav-accent, #FF5A1F), 0 6px 22px #000a; }
/* Puzzles: a hand of three, and the knock-out to find */
.rp-art .rp-hand { display:flex; align-items:flex-end; flex:none; }
.rp-art .rp-hand .rp-c { --rp-w:80px; margin-inline:-13px; }
.rp-art .rp-hand .rp-c:nth-child(1) { transform:rotate(-9deg) translateY(7px); }
.rp-art .rp-hand .rp-c:nth-child(2) { z-index:1; }
.rp-art .rp-hand .rp-c:nth-child(3) { transform:rotate(9deg) translateY(7px); }
.rp-art .rp-hand { margin-inline:13px 15px; }
.rp-art .rp-target { --rp-w:84px; }
.rp-art .rp-target > img { filter:saturate(.55) brightness(.8); }
.rp-art .rp-target .rp-badge { top:34px; height:30px; min-width:44px; border-radius:15px; background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; font-size:16px; transform:translateX(-50%) rotate(-10deg); }
/* Lessons: basic + Rare Candy -> the evolved Pokémon */
.mk-card-art[data-rp-art="learn"] { --rp-w:84px; gap:8px; }
/* Prize check: six Prize cards, one turned over */
.mk-card-art[data-rp-art="prizes"] { --rp-w:62px; gap:0; align-items:center; padding-top:10px; }
.mk-card-art[data-rp-art="prizes"] .rp-c { margin:0 3px; }
.mk-card-art[data-rp-art="prizes"] .rp-up { transform:translateY(-10px) rotate(4deg); z-index:1; }
.mk-card-art[data-rp-art="prizes"] .rp-up .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; }
/* Drills: one matchup with its run of results; League: two rated players */
.rp-art .rp-mid { align-self:center; display:grid; justify-items:center; gap:10px; margin:0 12px; flex:none; }
.rp-art .rp-pips { display:flex; gap:5px; }
.rp-art .rp-pip { width:10px; height:10px; border-radius:50%; background:#5FD08A; }
.rp-art .rp-pip.lost { background:transparent; box-shadow:inset 0 0 0 2px #E06C6C; }
.mk-card-art[data-rp-art="league"] { --rp-w:104px; }
.mk-card-art[data-rp-art="league"] .rp-mark { margin:0 14px; }
.mk-card-art[data-rp-art="league"] .rp-c:last-child .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; }
/* Tournament Prep: four rounds, climbing */
.mk-card-art[data-rp-art="prep"] { --rp-w:88px; gap:10px; }
.rp-art .rp-step1 { margin-bottom:-66px; } .rp-art .rp-step2 { margin-bottom:-46px; } .rp-art .rp-step3 { margin-bottom:-26px; } .rp-art .rp-step4 { margin-bottom:-6px; }
.rp-art .rp-step4 .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; }
/* Leaderboard: a podium */
.mk-card-art[data-rp-art="leaderboard"] { --rp-w:96px; gap:12px; }
.rp-art .rp-p1 { margin-bottom:-12px; } .rp-art .rp-p2 { margin-bottom:-44px; } .rp-art .rp-p3 { margin-bottom:-68px; }
.rp-art .rp-p1 .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; min-width:26px; height:26px; border-radius:13px; font-size:14px; top:-11px; }
/* Records: a record holder between the page's own charts */
.mk-card-art[data-rp-art="records"] { gap:26px; }
.rp-art .rp-best .rp-badge { background:#F2C14E; border-color:transparent; color:#0C0E10; font-size:14px; min-width:28px; height:28px; border-radius:14px; top:-12px; }
.rp-art .rp-best > img { box-shadow:0 0 0 2px #F2C14E, 0 6px 22px #000a; }
.rp-art .rp-bars { display:flex; align-items:flex-end; gap:6px; height:92px; align-self:flex-end; margin-bottom:14px; flex:none; }
.rp-art .rp-bars i { width:13px; border-radius:4px 4px 0 0; background:color-mix(in srgb, var(--nav-text, #F4F6F7) 26%, transparent); }
.rp-art .rp-bars i:last-child { background:#F2C14E; }
.rp-art .rp-grid { display:grid; grid-template-columns:repeat(3, 22px); gap:4px; align-self:flex-end; margin-bottom:14px; flex:none; }
.rp-art .rp-grid i { height:22px; border-radius:4px; background:var(--nav-accent, #FF5A1F); }
/* Decks' own page (2026-11-16): eight smaller cards in three groups */
.mk-three .mk-card-art.rp-art { --rp-w:78px; height:132px; gap:8px; }
.mk-three .rp-art .rp-hand .rp-c { --rp-w:66px; }
.rp-art .rp-count .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; top:30px; }
.rp-art .rp-mark.rp-small { font-size:12px; letter-spacing:.02em; }
.mk-card-art[data-rp-art="meta"] .rp-bars i:last-child { background:color-mix(in srgb, var(--nav-text, #F4F6F7) 26%, transparent); }
.mk-card-art[data-rp-art="meta"] .rp-bars i:first-child { background:var(--nav-accent, #FF5A1F); }
.mk-card-art[data-rp-art="meta"] { gap:20px; }
.mk-card-art[data-rp-art="duel"] .rp-c:first-child .rp-badge { background:var(--nav-accent, #FF5A1F); border-color:transparent; color:#0C0E10; }
.mk-card-art[data-rp-art="decks"], .mk-card-art[data-rp-art="games"] { gap:6px; }
.rp-art .rp-won .rp-badge { background:#5FD08A; border-color:transparent; color:#0C0E10; }
.mk-card-art[data-rp-art="stats"] { gap:20px; } .mk-card-art[data-rp-art="stats"] .rp-bars i:last-child { background:var(--nav-accent, #FF5A1F); }
@media (max-width:420px) { .mk-card-art.rp-art, .mk-card-art[data-rp-art="league"], .mk-card-art[data-rp-art="leaderboard"] { --rp-w:84px; } .mk-card-art[data-rp-art="learn"] { --rp-w:70px; gap:5px; } .mk-card-art[data-rp-art="prizes"] { --rp-w:48px; } .mk-card-art[data-rp-art="prep"] { --rp-w:70px; gap:7px; } .rp-art .rp-hand .rp-c { --rp-w:70px; } .rp-art .rp-target { --rp-w:74px; } .mk-card-art[data-rp-art="records"] { gap:16px; } .rp-art .rp-mid { margin:0 8px; } }
@media (prefers-reduced-motion:reduce) { .mk-art-card:hover .rp-art > * { transition:none; } }

/* ---- Decks, My games and the other library pages: the same heading scale as the lobby and Compete (their titles
   were 60px posters over a page of lists), and less empty space above the first thing to use */
body.upstream-portal main#main { padding-top:28px; }
body.upstream-portal main#main > header { min-height:0; margin-top:20px; margin-bottom:16px; align-items:center; }
body.upstream-portal main#main > header h1 { font-size:clamp(30px,2.8vw,40px); letter-spacing:-.035em; line-height:1.1; }
body.upstream-portal main#main > .lede { margin:0 0 14px; font-size:16px; }

/* ---- small things */
.search-box > span > .rp-i { display:block; width:18px; height:18px; }
.toast .rp-i.rp-l { margin-inline-end:.35em; }

/* 16 November 2026 ("it feels cluttered"): the home page's display keeps its name line and Pause out of the way until
   the pointer or the keyboard is on it; on a touch screen, where nothing hovers, they stay. */
@media (hover: hover) {
  .mk-hub-wireframe .mk-wireframe-caption { opacity: 0; transition: opacity .2s; }
  .mk-hub-wireframe:hover .mk-wireframe-caption, .mk-hub-wireframe:focus-within .mk-wireframe-caption { opacity: 1; }
}

/* ---- the design review of 2026-11-16 (ten points, in its order) ---------------------------------------------------
   1. Play setup: decks, difficulty, Start game, then the other ways to play. The challenge panel is a column whose
      order puts the kind of game and Start game straight after the difficulty; what the opponent is like follows. */
body[data-shared-navigation="true"] #hub-account { display: none; }
body.workspace .workspace-challenge { display: flex; flex-direction: column; }
body.workspace .workspace-challenge > * { order: 30; }
body.workspace .workspace-challenge > #rp-prog-strip { order: 0; margin-bottom: 12px; }
body.workspace .workspace-challenge > .workspace-eyebrow { order: 1; }
body.workspace .workspace-challenge > :is(#opplbl, #opp) { order: 2; }
body.workspace .workspace-challenge > :is(#diff, #tp-settling) { order: 3; }
body.workspace .workspace-challenge > .tp-rated { order: 4; margin-top: 16px; }
body.workspace .workspace-challenge > #startbar { order: 5; }
body.workspace .workspace-challenge > #oppcard { order: 6; margin-top: 18px; }
body.workspace .workspace-challenge > :is(#mode, #matchup) { order: 7; }
body.workspace .workspace-challenge > .mk-more-label { order: 8; }
body.workspace .workspace-challenge > .mk-more-ways { order: 9; }
body.workspace .workspace-setup-grid > .workspace-deck-stage { grid-column: 1; grid-row: 1; }
body.workspace .workspace-setup-grid > .workspace-challenge { grid-column: 2; grid-row: 1 / span 2; }
body.workspace .workspace-setup-grid > .tp-modes-wrap { grid-column: 1; grid-row: 2; min-width: 0; }
@media (max-width: 1000px) { body.workspace .workspace-setup-grid > :is(.workspace-deck-stage, .workspace-challenge, .tp-modes-wrap) { grid-column: 1; grid-row: auto; } }
body.workspace .workspace-challenge > #matchup:empty { display: none; }
.tp-modes-title { margin: 0; font: 600 20px/1.3 'Upstream Display', 'Space Grotesk', system-ui, sans-serif; color: var(--mk-text, #F4F6F7); }
.league-entry.tp-modes { margin: 14px 0 0; }
/* 2. supporting text is not fine print: labels 12px, explanations 15px, metadata 13px (same families) */
body.workspace .workspace-eyebrow { font-size: 12px; line-height: 1.4; letter-spacing: .06em; }
.league-eyebrow { font-size: 12px; line-height: 1.4; letter-spacing: .06em; }
.league-line, .league-rules { font-size: 16px; line-height: 1.5; }
.league-card a { font-size: 14px; }
.mk-way-text small { font-size: 13px; }
body.workspace .workspace-challenge .tp-rated { font-size: 14px; }
/* 3. one filled button a screen. Home: the two Play buttons at the top are the filled ones, their copies lower down
      are plain. Play: Start game is the filled one; the league's is an outline like the other modes'. */
.mk-hub a.mk-hero-link { background: var(--mk-action, #ff5a16); border-color: var(--mk-action, #ff5a16); color: var(--mk-on-action, #0c0e10) !important; font-weight: 700; }
.mk-hub a.mk-hero-link:hover { background: color-mix(in srgb, var(--mk-action, #ff5a16) 86%, var(--mk-on-action, #ffffff)); border-color: color-mix(in srgb, var(--mk-action, #ff5a16) 86%, var(--mk-on-action, #ffffff)); }
.mk-hub #hub-game-choices a.mk-primary-link { background: transparent; border-color: var(--mk-control, #737d85); color: var(--mk-text, #F4F6F7) !important; }
.mk-hub #hub-game-choices a.mk-primary-link:hover { background: var(--mk-raised, #23272A); border-color: var(--mk-text, #F4F6F7); }
.league-card button.primary { background: transparent !important; border: 1px solid var(--mk-control, #737d85) !important; color: var(--mk-text, #F4F6F7) !important; box-shadow: none !important; }
.league-card button.primary:hover { border-color: var(--mk-text, #F4F6F7) !important; background: var(--mk-raised, #23272A) !important; }
.league-card .league-open { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; margin-top: 6px; border: 1px solid var(--mk-control, #737d85); border-radius: 4px; color: var(--mk-text, #F4F6F7); font-weight: 650; text-decoration: none; }
/* 4. fewer outlines: panels that only hold things are quiet, controls keep the stronger line, orange is for what is
      chosen. The opponent's description sits under one divider instead of in a box of its own. */
body.workspace :is(.workspace-deck-stage, .workspace-challenge) { border-color: var(--mk-line, #30363b); }
.league-card, .league-card-main { border-color: var(--mk-line, #30363b); background: var(--panel-2, rgba(255, 255, 255, .03)); }
body.workspace .workspace-challenge > #oppcard { border: 0; border-top: 1px solid var(--mk-line, #30363b); border-radius: 0; background: none; padding: 16px 0 0; box-shadow: none; }
/* 5. the announcement strip: one height on every page, and a close button no page's own button rules can enlarge */
.mk-announcement { min-height: 44px; box-sizing: border-box; padding-top: 6px; padding-bottom: 6px; }
.mk-announcement .mk-announcement-close { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 4px; color: inherit; font: 600 12px/1 MKUI, Inter, system-ui, sans-serif; cursor: pointer; flex: none; }
.mk-announcement .mk-announcement-close:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.mk-announcement .mk-announcement-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* 6. a phone: the home page's artwork takes less of the screen and its caption stays visible */
@media (max-width: 600px) {
  .mk-hub .mk-wireframe-surface { height: 180px; }
  .mk-hub-wireframe .mk-wireframe-caption { opacity: 1; padding: 8px 0; }
}
/* 8. a recent game's title is two lines at most (a tournament list's name carries its event), and the cards' last
      lines sit level */
.workspace-game-copy h3 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
/* 10. one content edge: the home page's content takes the same 24px gutter as the section pages and the footer */
@media (min-width: 1001px) { .mk-hub { box-sizing: border-box; padding-left: 24px; padding-right: 24px; } }
/* 9. the Rayquaza playmat is the table, not the game: its artwork sits under a wash so that cards, damage and
      conditions are the strongest layer (the artwork itself is unchanged; nothing above it is dimmed) */
/* (the user, 2026-11-16: "also add the opacity that we added to rayquaza mat to all mats": every playmat's artwork,
   its picture and its moving parts alike, sits under the same wash; cards and markers are above it) */
.mat .matfx::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .34); pointer-events: none; }
body .mat[data-mat]:not([data-mat="felt"]) .field, :root[data-theme="light"] body .mat[data-mat]:not([data-mat="felt"]) .field { background: linear-gradient(rgba(0, 0, 0, .34), rgba(0, 0, 0, .34)), var(--matimg) center / 100% 100% no-repeat, #06080a; }

/* ---- the visual backlog of 2026-11-16, third batch ----------------------------------------------------------------
   P03: the two chosen decks are prominent without taking most of the setup's height (were 330px tall) */
@media (min-width: 701px) {
  body.workspace .workspace-deck-stage .deckcur { min-height: 248px; padding: 18px 14px 16px; gap: 10px; }
  body.workspace .workspace-deck-stage .deckcur img { width: 104px; }
  body.workspace .workspace-deck-stage .deckcur .dn { font-size: 20px; }
}
/* L01: the puzzles page opens on the puzzles: an application-sized title on one line, one sentence, the proof badges */
.puzzle-home { padding-top: 28px; }
.puzzle-home .puzzle-hero { padding-bottom: 24px; }
.puzzle-home .puzzle-hero h1 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 10px; }
.puzzle-home .puzzle-hero h1 br, .lesson-hero h1 br { display: none; }
.puzzle-home .puzzle-hero h1 span::before, .lesson-hero h1 span::before { content: " "; }
.puzzle-home .puzzle-kicker { margin-bottom: 8px; }
.puzzle-home .puzzle-intro { font-size: 16px; line-height: 1.5; max-width: 72ch; margin: 0; }
.puzzle-home .puzzle-badges { margin-top: 14px; }
.puzzle-home .lesson-collection-link { margin-bottom: 2px; }
.puzzle-home .puzzle-section-title { margin-top: 24px; }
/* L05: the lessons page likewise: its first lesson is on the first screen */
.lesson-hero { padding: 4px 0 16px; }
.lesson-hero h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.03em; margin: 8px 0 10px; }
.lesson-hero > p { margin: 0 0 6px; }
#lesson-grid { margin-top: 18px; }
/* L02 (in part): a puzzle's place in the list is a small label; its matchup and difficulty lead */
.puzzle-home .puzzle-number { font-size: 16px; line-height: 1.4; letter-spacing: .06em; margin: 0 0 6px; }
.puzzle-home .puzzle-number::before { content: "No. "; }
/* G03, G04: the review's side panel says where it is once (move and turn, under the slider) and groups what can be
   done there: before or after, play on from here, then the three quieter keepsakes in one row */
body.workspace #preview-replay > div:first-child > strong { display: none; }
body.workspace #rv-pos { font-size: 16px; font-weight: 600; color: var(--text, #F4F6F7); letter-spacing: 0; }
body.workspace .preview-replay-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 6px; margin-top: 12px; }
body.workspace .preview-replay-foot #rv-branch { grid-column: 1 / -1; order: -2; }
body.workspace .preview-replay-foot > span { grid-column: 1 / -1; order: -1; margin-bottom: 6px; }
body.workspace .preview-replay-foot > button:not(#rv-branch) { min-height: 44px; padding: 4px 6px; font-size: 13px; line-height: 1.25; font-weight: 500; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
body.workspace .preview-replay-foot > button:not(#rv-branch):hover { color: var(--text, #F4F6F7); border-color: var(--border, #2a3037); }

/* ---- the visual backlog, fifth batch -------------------------------------------------------------------------------
   D03, D04: the preset catalogue scrolls with the page (it was a 300px window with a scrollbar of its own), and its
   header is about the decks: Prize Check is a quiet link, not the page's filled button */
.decktiles { max-height: none !important; overflow: visible !important; }
header > a.btn.primary[href="/prizes"] { background: none !important; border-color: transparent !important; color: var(--mk-muted, #B6BBBF) !important; font-weight: 500 !important; padding: 8px 0 !important; text-decoration: underline; text-underline-offset: 4px; box-shadow: none !important; }
header > a.btn.primary[href="/prizes"]:hover { color: var(--mk-text, #F4F6F7) !important; }
/* P04: the three other ways to play are one group: same layout, their buttons on one line at the bottom */
.league-entry.tp-modes .league-card { display: flex; flex-direction: column; align-items: flex-start; }
.league-entry.tp-modes .league-card > button, .league-entry.tp-modes .league-card > .league-foot, .league-entry.tp-modes .league-card > .league-open { margin-top: auto; }
.league-entry.tp-modes .league-card > .league-line { margin-bottom: 10px; }
/* P06: rated or practice is a status line under the difficulty, not another box */
body.workspace .workspace-challenge > .tp-rated { border: 0; background: none; padding: 0; border-radius: 0; }

/* ---- the visual backlog, sixth batch -------------------------------------------------------------------------------
   F09, R03: a game's result is one badge with one wording (Won, Lost, Drawn, In progress) on the home page, the
   Play page and My games: the same pill, coloured and worded, never colour alone */
.mk-game-chip, body.workspace .workspace-game-status { display: inline-flex; align-items: center; font: 600 12px/1.4 MKUI, Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--mk-line, #41474b); background: none; color: var(--mk-muted, #B6BBBF); white-space: nowrap; }
.mk-game-chip.win, body.workspace .workspace-game-status[data-outcome="win"] { color: var(--mk-win, #7ED8A4); border-color: color-mix(in srgb, var(--mk-win, #7ED8A4) 55%, transparent); background: color-mix(in srgb, var(--mk-win, #7ED8A4) 10%, transparent); }
.mk-game-chip.loss, body.workspace .workspace-game-status[data-outcome="loss"] { color: var(--mk-loss, #FF9DAB); border-color: color-mix(in srgb, var(--mk-loss, #FF9DAB) 55%, transparent); background: color-mix(in srgb, var(--mk-loss, #FF9DAB) 9%, transparent); }
.mk-game-chip.live, body.workspace .workspace-game-status[data-outcome="live"] { color: var(--mk-accent, #FF5A16); border-color: color-mix(in srgb, var(--mk-accent, #FF5A16) 55%, transparent); background: none; }
/* L06: a lesson says what to do with it: its reading is a button-sized disclosure, its check a badge */
.lesson-card .lesson-progress { display: inline-block; margin: 4px 0 0; padding: 2px 10px; border: 1px solid var(--mk-line, #41474b); border-radius: 999px; font-size: 12px; line-height: 1.5; color: var(--mk-muted, #B6BBBF); }
.lesson-card > details > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--mk-control, #737d85); border-radius: 4px; font-weight: 600; cursor: pointer; }
.lesson-card > details[open] > summary { margin-bottom: 12px; border-color: var(--mk-action, #FF5A16); }

/* ---- the visual backlog, seventh batch: G06, the phone review tray: stepping through the game is the first row; saving,
   analysis and playing on are a quieter second row; a button that cannot be pressed looks it */
@media (max-width: 700px) {
  body.workspace #preview-dock .preview-dock-buttons:has([data-preview-key="timeline"]) button:nth-child(n+4) { background: none; border-color: transparent; color: var(--mk-muted, #B6BBBF); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
  body.workspace #preview-dock .preview-dock-buttons button:disabled { opacity: .38; text-decoration: none; }
}

/* ---- the visual backlog, eighth batch ------------------------------------------------------------------------------
   L02-L04: a puzzle card is its name, what it asks, one difficulty badge and one step count; where it came from is a
   quiet label, and the second count (plays, repetitions grouped) is left to the puzzle itself */
.puzzle-home .puzzle-card { padding: 20px 22px; }
.puzzle-home .puzzle-card h3 { font-size: 24px; line-height: 1.2; margin: 8px 0; }
.puzzle-home .puzzle-card > p { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.puzzle-home .puzzle-card > small { font-size: 12px; letter-spacing: .06em; opacity: .7; }
.puzzle-home .puzzle-difficulty > span:first-of-type { display: none; }
.puzzle-home .puzzle-difficulty > span:last-of-type { display: inline-block; margin-top: 6px; padding: 2px 10px; border: 1px solid var(--mk-line, #41474b); border-radius: 999px; font: 600 12px/1.4 MKUI, Inter, system-ui, sans-serif; letter-spacing: 0; color: var(--mk-text, #F4F6F7); }
/* P05: the difficulty reads from the chosen level outwards: the other steps are quieter */
body.workspace #lobby #diffticks span:not(.on) { opacity: .55; }
body.workspace #lobby #diffticks span.on { font-size: 12px; }
/* P07: a phone's Start bar is the matchup on one line and the button (was 118px tall) */
@media (max-width: 700px) {
  body.workspace .workspace-challenge .startbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 8px 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  body.workspace .workspace-challenge .startbar #new { width: auto; min-height: 48px; padding: 0 22px; grid-column: 2; grid-row: 1 / span 2; }
  body.workspace .workspace-challenge .startbar .startwhat { min-width: 0; font-size: 13px; line-height: 1.35; }
  body.workspace .workspace-challenge .startbar .startwhat b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.workspace .pane[data-pane="play"] { padding-bottom: 96px; }
}
/* G02: a condition on a Pokémon has the same dark backing whatever it is; its colour is the stripe at its edge */
.mat .cond { background: rgba(10, 12, 16, .92) !important; color: #F4F6F7 !important; border: 1px solid rgba(255, 255, 255, .22) !important; box-shadow: inset 3px 0 0 var(--cond, #9AA3A9); }
.mat .cond.poisoned { --cond: #a78bfa; } .mat .cond.burned { --cond: #fb923c; } .mat .cond.asleep { --cond: #60a5fa; } .mat .cond.paralyzed { --cond: #facc15; } .mat .cond.confused { --cond: #f472b6; } .mat .cond.tera { --cond: #5eead4; }
/* M04: the lower home page: a phone's recent games are short rows, and sections keep one 32px gap */
@media (max-width: 600px) {
  .mk-hub .mk-saved-grid { gap: 10px; }
  .mk-hub .mk-saved-grid .mk-saved-game { padding: 14px 16px; }
  .mk-hub .mk-saved-grid .mk-saved-game h3 { font-size: 16px; margin: 6px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mk-hub .mk-saved-grid .mk-saved-game .mk-primary-link, .mk-hub .mk-saved-grid .mk-saved-game a { margin-top: 8px; min-height: 40px; }
  .mk-hub section + section { margin-top: 32px; }
}
/* F06: one corner scale: controls 6px, panels 8px, pills only for status */
.league-card, .mk-more-ways .mk-way, .tp-counter-tray, body.workspace .workspace-game-card { border-radius: 8px; }
.league-card button, .league-card a.league-open, .mk-watch-button { border-radius: 4px; }
/* D09: a deck looks the same where it is chosen (the Play picker) and where it is browsed (Preset decks): the same name
   size and the same mark on the one that is chosen */
.decktiles [data-deck] b, .decksheet .dtile b, .decksheet .dtile .dn { font: 600 16px/1.25 MKDisplay, 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.01em; }
.decksheet .dtile.on, .decksheet .dtile[aria-pressed="true"], .decktiles [data-deck].on { border-color: var(--mk-accent, #FF5A16) !important; box-shadow: inset 0 -3px 0 var(--mk-accent, #FF5A16); }
.workspace-game-source, .mk-game-source { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--mk-muted, #B6BBBF); display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rp-grid-fold { margin: 10px 0; } .rp-grid-fold > summary { cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; font-weight: 600; color: var(--mk-muted, #B6BBBF); }
/* the user, 2026-11-16: "About this opponent · rating 1566 this feels a bit redundant given there is discussion above
   it, remove it please": the opponent's rating and how it plays are the lines above; the fold under them is not shown */
body.workspace #oppcard details.opponentdetails { display: none !important; }

/* ---- the verification pass (Q07): on a touch screen a link or fold that stands alone is 44px tall to the finger */
@media (pointer: coarse), (max-width: 700px) {
  body.workspace .quicktour, .league-card a:not(.league-open), .workspace-text-button, .mk-hub-section-heading > a, .mk-hub-account a, .mk-library a.mk-text-link, .mk-library-summary a, .puzzle-home summary, .mk-text-button { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse), (max-width: 700px) { body.workspace .workspace-lobby-header .quicktour { min-height: 44px !important; display: inline-flex; align-items: center; } }

/* ---- one title size for the site's working pages (the visual backlog, F03): 36px on a desktop, 28px on a phone. The
   home page, the four hubs and the public notes keep their display titles. Text under 12px on those pages is 12px. */
html[data-rp-path="/settings"] main h1,html[data-rp-path="/leaderboard"] main h1,html[data-rp-path="/tournament-decks"] main h1,html[data-rp-path="/drills"] main h1,html[data-rp-path="/records"] main h1,html[data-rp-path="/prizes"] main h1,html[data-rp-path="/stats"] main h1,html[data-rp-path="/weak-spots"] main h1,html[data-rp-path="/coach"] main h1,html[data-rp-path="/league"] main h1,html[data-rp-path="/prep"] main h1,html[data-rp-path="/meta"] main h1,html[data-rp-path="/my-decks"] main h1,html[data-rp-path="/matchup"] main h1,html[data-rp-path="/duel"] main h1,html[data-rp-path="/decks"] main h1,html[data-rp-path="/games"] main h1,html[data-rp-path="/inspect"] main h1 { font-size: clamp(28px, 2.7vw, 36px) !important; line-height: 1.15 !important; letter-spacing: -.02em; }
html[data-rp-path="/drills"] main :is(.eyebrow, .vs), html[data-rp-path="/prizes"] main small, html[data-rp-path="/settings"] main span.none { font-size: 12px !important; }

/* the hub scenes' bars are real lengths or nothing (navigation.js sets --b1..--b5 from the report's shares or the
   player's own weeks); "again" beside vs is the drill's repeat */
.rp-art .rp-bars i { min-width: 12px; transition: height .3s; }
.mk-card-art[data-rp-art="prep"] .rp-mark.rp-arrow { margin: 0 2px; font-size: 18px; }

/* ---- Start game: the page's main action, to the owner's handoff of 17 November 2026 (the sidebar replacement: the
   button alone, where it stands). A larger dark label, the matchup under it, and a dark square with an orange arrow
   in place of the small ringed one. The whole orange shape is one button; the square is drawing, not a control. Flat
   fills only: no glow, gradient, shadow or movement (the owner, of the version before the last: "garish").
   The page writes the button's words itself (play.html sets its text, and the translator rewrites it), so the label
   stays the button's own text and the second line and the square are drawn from it: the line from data-sub
   (table-polish.js keeps it to the chosen matchup), the square as a generated box. */
body.workspace .workspace-challenge .startbar #new { --start-fill: var(--mk-action, #ff5a16); --start-ink: var(--mk-on-action, #17120e); --start-box: var(--mk-surface, #171b1c);
  --start-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff5a16' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5l7 7-7 7'/%3E%3C/svg%3E");
  box-sizing: border-box; appearance: none; display: grid; grid-template-columns: minmax(0, 1fr) 56px; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 5px 16px;
  width: 100%; min-width: 0; min-height: 84px; margin: 0; padding: 8px 8px 8px 24px; border: 0 !important; border-radius: 8px !important;
  background: var(--start-fill) !important; color: var(--start-ink) !important; box-shadow: none !important; text-align: left; text-transform: none;
  font-size: 24px; font-weight: 750; line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; cursor: pointer; touch-action: manipulation; transform: none; transition: none; filter: none; }
body.workspace .workspace-challenge .startbar #new::after { content: attr(data-sub); grid-column: 1; grid-row: 2; align-self: start; min-width: 0;
  font-size: 13px; font-weight: 550; line-height: 1.35; letter-spacing: 0; overflow-wrap: anywhere; white-space: normal; }
body.workspace .workspace-challenge .startbar #new:not([data-sub])::after { content: none; }
body.workspace .workspace-challenge .startbar #new::before { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 4px; pointer-events: none;
  background: var(--start-box) var(--start-arrow) center / 28px 28px no-repeat; }
@media (hover: hover) { body.workspace .workspace-challenge .startbar #new:hover:not(:disabled):not([aria-busy="true"]) { --start-fill: color-mix(in srgb, var(--mk-action, #ff5a16) 86%, var(--mk-on-action, #ffffff)); } }
body.workspace .workspace-challenge .startbar #new:active:not(:disabled):not([aria-busy="true"]) { --start-fill: color-mix(in srgb, var(--mk-action, #ff5a16) 90%, #000000); }
body.workspace .workspace-challenge .startbar #new:focus-visible { outline: 2px solid var(--mk-focus, var(--mk-accent, #ff5a16)); outline-offset: 4px; }
body.workspace .workspace-challenge .startbar #new:disabled:not([aria-busy="true"]) { --start-fill: var(--mk-raised, #363d40); --start-ink: var(--mk-muted, #b8c2c6); --start-box: var(--mk-surface, #282f32); opacity: 1; cursor: not-allowed;
  --start-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8c2c6' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5l7 7-7 7'/%3E%3C/svg%3E"); }
body.workspace .workspace-challenge .startbar #new[aria-busy="true"] { opacity: 1; cursor: progress; }
/* a phone keeps its one bar at the foot of the screen, which already names the matchup beside the button */
@media (max-width: 700px) { body.workspace .workspace-challenge .startbar #new { grid-template-columns: minmax(0, 1fr) 36px; gap: 0 10px; min-height: 52px; padding: 6px 8px 6px 16px; font-size: 16px; width: auto; }
  body.workspace .workspace-challenge .startbar #new::after { content: none; }
  body.workspace .workspace-challenge .startbar #new::before { width: 36px; height: 36px; background-size: 20px 20px; } }

/* ---- one scale for corners (the visual backlog's F06, finished 17 November 2026). A survey of 22 pages found panels
   and cards at 6, 8, 10 and 12px and controls at 4, 5, 6, 7, 8 and 10px. The scale: 8px for a panel or card, 6px for a
   control, a pill for a chip, and 12px kept for the hub's destination cards alone. These are the ones that were off it. */
html[data-rp-path="/weak-spots"] main .card, html[data-rp-path="/matchup"] main .card, html[data-rp-path="/prep"] main .card, html[data-rp-path="/prep"] .how li,
html[data-rp-path="/my-decks"] main .deck, .mk-game-choice, .puzzle-card, html[data-rp-path="/account"] main li { border-radius: 8px !important; }
html[data-rp-path="/account"] main button, html[data-rp-path="/account"] main input, html[data-rp-path="/account"] main select, html[data-rp-path="/account"] main a.button,
html[data-rp-path="/learn"] main button, html[data-rp-path="/meta"] main button:not(.sortby), html[data-rp-path="/tournament-decks"] main button, html[data-rp-path="/tournament-decks"] main input,
html[data-rp-path="/games"] main select, html[data-rp-path="/puzzles"] main select, html[data-rp-path="/puzzles"] main button, .puzzle-start, .mk-primary-link, .decktile, .fam,
.mk-watch-button, .community-practice-start { border-radius: 4px !important; }

/* ---- one game card (the visual backlog's R01, finished 17 November 2026): the home page's latest games and the
   lobby's are the same card, built by portal.js sharedCard and workspace.js gameCard under the same names. */
.rp-game-grid, body.workspace .workspace-game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
body .rp-game-card { display: flex; align-items: flex-start; gap: 16px; min-width: 0; padding: 18px 20px; border: 1px solid var(--mk-line, #41474B); border-radius: 8px; background: var(--mk-surface, #171B1E); }
body .rp-game-card .rp-gc-art { position: relative; flex: 0 0 76px; width: 76px; height: 96px; margin: 4px 0 0; }
body .rp-game-card .rp-gc-art img { position: absolute; top: 0; left: 0; width: 48px; aspect-ratio: .714; object-fit: cover; border-radius: 4px; transform: rotate(-8deg); box-shadow: 0 7px 14px #0007; }
body .rp-game-card .rp-gc-art img + img { top: 24px; left: 26px; transform: rotate(8deg); }
body .rp-game-card .rp-gc-art > span { display: grid; place-items: center; width: 60px; height: 84px; border: 1px solid var(--mk-line, #41474B); border-radius: 4px; color: var(--mk-muted, #B6BBBF); font: 600 12px/1 ui-monospace, monospace; letter-spacing: .08em; }
body .rp-game-card .rp-gc-copy { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; }
body .rp-game-card .rp-gc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
body .rp-game-card .mk-game-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
body .rp-game-card .rp-gc-date { float: none; margin: 0; font-size: 12px; color: var(--mk-muted, #B6BBBF); white-space: nowrap; font-variant-numeric: tabular-nums; }
body .rp-game-card h3 { margin: 6px 0 0; font: 600 16px/1.35 'Upstream Display', 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.01em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body .rp-game-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mk-muted, #B6BBBF); overflow-wrap: anywhere; }
body .rp-game-card p:empty { display: none; }
body .rp-game-card .rp-gc-opp { color: var(--mk-text, #F4F6F7); }
body .rp-game-card .rp-gc-link { display: inline-flex; align-items: center; min-height: 32px; margin: 6px 0 0; padding: 0; border: 0; background: none; border-radius: 0 !important;
  color: var(--mk-accent, #FF5A16) !important; font-size: 14px; font-weight: 650; text-decoration: none; justify-self: start; }
body .rp-game-card .rp-gc-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .rp-game-grid, body.workspace .workspace-game-grid { grid-template-columns: 1fr; } body .rp-game-card { padding: 16px; gap: 14px; } }
/* Preset decks on a phone: two tiles to a row (L8: one to a row was 5,300 px of scrolling before anything else) */
@media (max-width: 600px) {
  body[data-mk-page="/decks"] .decktiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 8px !important; }
  body[data-mk-page="/decks"] .decktiles > * { min-width: 0; flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; padding: 10px !important; }
  body[data-mk-page="/decks"] .decktiles > * :is(b, strong, h3, .name) { font-size: 16px !important; line-height: 1.2 !important; overflow-wrap: anywhere; }
  body[data-mk-page="/decks"] .decktiles > * :is(small, .muted, span) { font-size: 12px !important; }
}
/* audit V10 (2026-11-18): the second half of a page's headline was orange on Puzzles and Lessons, grey on the Deck
   builder, orange for one word on Records and plain everywhere else. One treatment: the headline in one colour. */
h1 > span:not([class]), h1 > em { color: inherit !important; font-style: normal; }
