/* Copy-in of the madevisible-framework video player (styles). Verbatim section "mv-player (VPL-03)" of site/assets/css/components.css
   (lines 1499 to 2071) from framework main, commit 756db859b7026ed79c20cb778d8ed833b164853b (PR 491, MPC-02: all buttons in one
   centred row, hide when the mouse leaves). Previously framework v0.1.47, commit 6a069e17fe98b50ae46c3078dcdcd18fc247a8cb (MPC-01).
   Do not edit; DMA token mapping lives in mv-player-dma.css. */
/* ===== mv-player (VPL-03) ===============================================
 * .mv-player: a video with a poster, a fixed aspect ratio and its own
 * controls. Contract: site/lib/blocks/REGISTRY.md, entry "video-player".
 * Behaviour: site/assets/js/mv-player.js, which sets data-state (idle,
 * playing, paused, ended, error), data-controls (visible, hidden) and
 * data-fullscreen. data-mode is loop or player, data-ratio is 16x9, 9x16,
 * 4x5 or 1x1. Every --mv-player-* value is overridable in brand.css. The
 * controls sit on a moving picture, so by default they are solid navy with a
 * white edge in both themes (brand ink and brand surface tokens), not the
 * page theme; the letterbox follows the page theme. Buttons are solid,
 * at least 44px, disabled means opacity. There is no motion at all under
 * prefers-reduced-motion and no attention animation on the sound button.
 * Fullscreen is the wrapper, never the video: the background is black and the
 * video box is cut to the data-ratio (aspect-ratio plus a min() of the
 * container width and height), so a 9:16 clip keeps its side bars. This block
 * is self-contained: its forced-colors rules are at its end. */
.mv-player-figure { margin: 0; }
.mv-player {
  --_mv-p-bg: var(--mv-player-bg, var(--bg-2, #F2F5F6));
  --_mv-p-fs-bg: var(--mv-player-fullscreen-bg, #000);
  --_mv-p-radius: var(--mv-player-radius, var(--radius-lg, 14px));
  --_mv-p-cbg: var(--mv-player-control-bg, var(--brand-ink, #0A2540));
  --_mv-p-fg: var(--mv-player-control-fg, var(--brand-surface, #FFFFFF));
  --_mv-p-ring: var(--mv-player-control-ring, var(--brand-surface, #FFFFFF));
  --_mv-p-size: max(44px, var(--mv-player-control-size, 44px));
  --_mv-p-gap: var(--mv-player-control-gap, 10px);
  --_mv-p-scrim: var(--mv-player-scrim, linear-gradient(to top, color-mix(in srgb, var(--brand-ink, #0A2540) 72%, transparent), transparent));
  --_mv-p-w: 16;
  --_mv-p-h: 9;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: var(--_mv-p-w, 16) / var(--_mv-p-h, 9);
  border-radius: var(--_mv-p-radius, 14px);
  background: var(--_mv-p-bg, #F2F5F6);
}
/* No color-mix: a solid brand ink to transparent ramp, never no scrim at all. */
@supports not (background: color-mix(in srgb, red, blue)) {
  .mv-player {
    --_mv-p-scrim: var(--mv-player-scrim, linear-gradient(to top, var(--brand-ink, #0A2540), transparent));
  }
}
.mv-player[data-ratio="9x16"] { --_mv-p-w: 9; --_mv-p-h: 16; }
.mv-player[data-ratio="4x5"] { --_mv-p-w: 4; --_mv-p-h: 5; }
.mv-player[data-ratio="1x1"] { --_mv-p-w: 1; --_mv-p-h: 1; }
.mv-player[data-ratio="9x16"],
.mv-player[data-ratio="4x5"] {
  max-width: var(--mv-player-portrait-max, 26rem);
  margin-inline: auto;
}
/* The frame is a Tab stop (tabindex 0). Its focus ring is drawn INSIDE the frame (an ancestor with
 * overflow: hidden cannot clip it) as two rings, the light one (ring token) on the outside and the dark
 * one (control fill) inside it, so some ring clears 3:1 against any picture or page. A mouse click
 * focuses the frame without :focus-visible, so no ring shows then. */
.mv-player:focus,
.mv-player:focus-visible { outline: none; }
.mv-player:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  box-sizing: border-box;
  border: 3px solid var(--_mv-p-ring, #FFFFFF);
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--_mv-p-cbg, #0A2540);
  pointer-events: none;
}
.mv-player__poster,
.mv-player__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mv-player__video { opacity: 0; background: transparent; }
.mv-player[data-playing] .mv-player__video,
.mv-player[data-state="playing"] .mv-player__video,
.mv-player[data-state="paused"] .mv-player__video,
.mv-player[data-state="ended"] .mv-player__video { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .mv-player__video { transition: opacity 300ms ease; }
  .mv-player__controls { transition: opacity 200ms ease; }
  .mv-player__controls button { transition: background-color 150ms ease; }
}
/* Controls bar: bottom, on a scrim. The bar ignores the pointer so the picture
 * underneath stays clickable; the buttons take it back. */
.mv-player__controls {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--_mv-p-gap, 10px);
  padding: 32px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--_mv-p-scrim, none);
  pointer-events: none;
}
.mv-player[data-mode="loop"] .mv-player__controls {
  justify-content: flex-end;
  padding: 16px;
  background: none;
}
/* Hidden controls are invisible AND untouchable: on touch a tap on the invisible spot of a button
 * must land on the surface (first tap only shows the controls). Focus and the accessibility tree are
 * untouched, a focused button keeps the bar visible anyway (script). The loop bar is never hidden. */
.mv-player[data-controls="hidden"] .mv-player__controls { opacity: 0; }
.mv-player[data-controls="hidden"] .mv-player__controls button { pointer-events: none; }
.mv-player__controls button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: var(--_mv-p-size, 44px);
  min-height: var(--_mv-p-size, 44px);
  margin: 0;
  padding: 0;
  border: 2px solid var(--_mv-p-fg, #FFFFFF);
  border-radius: 999px;
  background: var(--_mv-p-cbg, #0A2540);
  color: var(--_mv-p-fg, #FFFFFF);
  font: 600 .9375rem/1 var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  pointer-events: auto;
}
.mv-player__controls button[hidden] { display: none; }
/* Player bar: every slot is reserved from the first paint (play, captions if the video has tracks, sound,
 * fullscreen), so nothing moves when the video starts and a click that lands on the play button's spot
 * never lands on another button. A button that is not available yet is hidden by the script (hidden
 * attribute) and drawn invisible with its box kept: visibility hidden takes it out of the tab order and the
 * accessibility tree and off the pointer, without losing the space. The replay button shares the slot of
 * play (it only exists at the end, where play is not offered), pulled back over it by one slot. Before the
 * script has run there is nothing to operate, so the bar (scrim included) is not drawn at all. */
/* tokens.css ends every [hidden] with display: none !important, so the override needs the same priority; its
 * higher specificity decides between the two important declarations. */
.mv-player[data-mode="player"] .mv-player__controls button[hidden]:not(.mv-player__replay) {
  display: inline-flex !important;
  visibility: hidden;
}
/* Centred row (MPC-02, Olli decision 12.11.2026, replaces the MPC-01 bottom bar): every player button sits in ONE
 * row in the middle of the picture, horizontally and vertically, all on the same centre line. The layer covers the
 * whole frame without a scrim (the buttons are solid) and still ignores the pointer, so the picture around the row
 * stays clickable. Play keeps the exact middle: three columns, the middle one as wide as play and the two outer ones
 * equal, sound right next to it on the left, fullscreen on the right, captions right of fullscreen (fullscreen is
 * always one button size wide, so its offset is known). Play therefore stands in the middle before the start too,
 * and every slot stays reserved (Olli decision 13): nothing moves when the video starts, and a second click at the
 * same spot still pauses. The replay button shares the play cell. */
.mv-player[data-mode="player"] .mv-player__controls {
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-auto-flow: row;
  align-content: center;
  align-items: center;
  column-gap: var(--_mv-p-gap, 10px);
  padding: 12px 8px;
  background: none;
}
.mv-player[data-mode="player"] .mv-player__controls button { grid-row: 1; }
.mv-player[data-mode="player"] .mv-player__play,
.mv-player[data-mode="player"] .mv-player__replay { grid-column: 2; }
.mv-player[data-mode="player"] .mv-player__controls .mv-player__sound { grid-column: 1; justify-self: end; }
.mv-player[data-mode="player"] .mv-player__controls .mv-player__fullscreen { grid-column: 3; justify-self: start; }
.mv-player[data-mode="player"] .mv-player__controls .mv-player__captions {
  grid-column: 3;
  justify-self: start;
  margin-inline-start: calc(var(--_mv-p-size, 44px) + var(--_mv-p-gap, 10px));
}
.mv-player[data-mode="player"]:not([data-mp-ready]) .mv-player__controls { display: none; }
/* The AI badge stays in its bottom left corner (tokens.css): the row is in the middle, the corner is free. */
/* Hover only where hover exists (no sticky hover colour after a touch). The solid declaration comes
 * first: an engine without color-mix drops the second one and keeps a solid button, never a
 * transparent one. :active gives touch and mouse a pressed state. */
@media (hover: hover) {
  .mv-player__controls button:hover {
    background: var(--_mv-p-cbg, #0A2540);
    background: color-mix(in srgb, var(--_mv-p-cbg, #0A2540) 82%, var(--_mv-p-fg, #FFFFFF));
  }
}
.mv-player__controls button:active {
  background: var(--_mv-p-cbg, #0A2540);
  background: color-mix(in srgb, var(--_mv-p-cbg, #0A2540) 70%, var(--_mv-p-fg, #FFFFFF));
}
.mv-player__controls button:disabled { opacity: .5; cursor: not-allowed; }
.mv-player__controls button:focus-visible {
  outline: 3px solid var(--_mv-p-ring, #FFFFFF);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--_mv-p-cbg, #0A2540);
}
/* Two classes, so this wins over `.mv-player__controls button { padding: 0 }`
 * (0,1,1) regardless of source order; a lone class (0,1,0) lost to it. */
.mv-player__controls .mv-player__sound { padding-inline: var(--_mv-p-pad, 16px); }
.mv-player__controls .mv-player__captions { padding-inline: var(--_mv-p-pad, 16px); }
/* Icons are drawn, no asset. Play button: aria-pressed="true" means paused or
 * not started (shows play), "false" means playing (shows pause). */
.mv-player__play::before,
.mv-player__replay::before,
.mv-player__sound::before,
.mv-player__sound::after,
.mv-player__captions::before,
.mv-player__fullscreen::before {
  content: "";
  box-sizing: border-box;
  flex: none;
}
.mv-player__play::before {
  width: 12px;
  height: 14px;
  border-inline: 4px solid currentColor;
}
.mv-player__play[aria-pressed="true"]::before {
  width: 0;
  height: 0;
  margin-inline-start: 4px;
  border-inline: 0;
  border-block: 8px solid transparent;
  border-inline-start: 13px solid currentColor;
}
/* Replay: an open ring with an arrowhead at the end of the arc (clockwise
 * "again"), so it does not read as a loading spinner. Ring is ::before, the
 * arrowhead ::after (a drawn triangle, no asset). */
.mv-player__replay::before {
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}
.mv-player__replay::after {
  content: "";
  position: absolute;
  top: calc(50% - 11px);
  left: calc(50% - 7px);
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  border-inline-start: 8px solid currentColor;
  transform: rotate(-45deg);
}
/* Sound: a drawn speaker (decoration only, the button keeps its fixed text "Ton" and aria-pressed).
 * ::before is the speaker body and cone (clip-path polygon). ::after is the state: sound on
 * (aria-pressed="true") draws two sound waves, sound off ("false") draws a slash across the icon, with a
 * halo in the fill colour that cuts it out of the speaker. The two states differ by shape, never by
 * colour alone. Everything is currentColor or the fill colour: no literal, no asset, no extra markup. */
.mv-player__sound::before {
  width: 24px;
  height: 20px;
  background: currentColor;
  clip-path: polygon(0 7px, 6px 7px, 13px 1px, 13px 19px, 6px 13px, 0 13px);
}
.mv-player__sound::after {
  position: absolute;
  inset-inline-start: calc(var(--_mv-p-pad, 16px) + 15px);
  top: calc(50% - 11px);
  pointer-events: none;
}
.mv-player__sound[aria-pressed="true"]::after {
  width: 11px;
  height: 22px;
  background: radial-gradient(circle at 0 50%, transparent 0 4px, currentColor 4px 6px, transparent 6px 9px, currentColor 9px 11px, transparent 11px);
}
.mv-player__sound[aria-pressed="false"]::after {
  inset-inline-start: calc(var(--_mv-p-pad, 16px) - 3px);
  top: calc(50% - 1.25px);
  width: 30px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 0 1.5px var(--_mv-p-cbg, #0A2540);
  transform: rotate(45deg);
}
/* Captions: a drawn caption box (a rounded rectangle with two text lines), decoration only; the button
 * keeps its fixed text and aria-pressed. Off (aria-pressed="false"): an outlined box with the lines in the
 * text colour. On ("true"): the same box filled solid, the lines cut out in the fill colour, so the two
 * states differ by area and shape, never by colour alone. No literal, no asset, no extra markup. */
.mv-player__captions::before {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(currentColor, currentColor) 2px 5px / 5px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 10px 5px / 6px 2px no-repeat;
}
.mv-player__captions[aria-pressed="true"]::before {
  background:
    linear-gradient(var(--_mv-p-cbg, #0A2540), var(--_mv-p-cbg, #0A2540)) 2px 5px / 5px 2px no-repeat,
    linear-gradient(var(--_mv-p-cbg, #0A2540), var(--_mv-p-cbg, #0A2540)) 10px 5px / 6px 2px no-repeat,
    currentColor;
}
/* Fullscreen: four corner brackets. Enter (aria-pressed="false") has the
 * corners at the box edges pointing outwards, exit (aria-pressed="true") has
 * them at the inner points pointing at the middle. Gradients draw the bars. */
.mv-player__fullscreen::before {
  width: 18px;
  height: 18px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 3px 7px no-repeat;
}
.mv-player__fullscreen[aria-pressed="true"]::before {
  background:
    linear-gradient(currentColor, currentColor) 0 4px / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 0 / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 4px / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) calc(100% - 4px) 0 / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 100% / 3px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 100% calc(100% - 4px) / 7px 3px no-repeat,
    linear-gradient(currentColor, currentColor) calc(100% - 4px) 100% / 3px 7px no-repeat;
}
.mv-player__caption { margin: 8px 0 0; }

/* Narrow frame (a phone column, up to 25rem wide): with all four player buttons the bar needs about 350px, which
 * would wrap into two rows and cover most of a 16:9 picture. The text buttons get a smaller label and padding and
 * the bar a smaller gap, so play, captions, sound and fullscreen stay in one row down to about 340px of frame
 * width. Every button stays 44px high and wide at least. The query follows the width of the frame, so a
 * fullscreen player on a phone (the frame is the screen) takes the same sizes; a wide screen takes the normal ones.
 * The gap is a custom property on the bar itself so the replay offset (one slot) follows it. */
@container (max-width: 25rem) {
  .mv-player__controls { --_mv-p-gap: 6px; padding-inline: 8px; }
  .mv-player__controls .mv-player__sound,
  .mv-player__controls .mv-player__captions { --_mv-p-pad: 10px; gap: 6px; font-size: .875rem; }
}
/* Below 340px of frame width even the compact text buttons no longer fit one row (VPL-10, Olli decision 15): the
 * captions and sound buttons show their drawn symbol only. The name stays in the DOM as visually hidden text (it is
 * not display none, so it is still the accessible name); the label leaves the flow, so the button is
 * border + padding + symbol = 2 + 8 + 24 + 8 + 2 = 44px wide for the speaker (the caption symbol is 22px wide and gets
 * the 44px minimum). 339.98px, not 340: a frame of exactly 340px keeps the text. */
@container (max-width: 339.98px) {
  .mv-player__controls .mv-player__sound,
  .mv-player__controls .mv-player__captions { --_mv-p-pad: 8px; gap: 0; }
  .mv-player__controls .mv-player__sound .mv-player__label,
  .mv-player__controls .mv-player__captions .mv-player__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* MPC-02: in the centred row captions share the right half with fullscreen; in a frame up to 25rem that half is too
 * narrow for its text (measured: it left a 358px frame), so captions shows its symbol only. The name stays as visually
 * hidden text, as below 340px. Own block: the compact block above touches no target size. */
@container (max-width: 25rem) {
  .mv-player[data-mode="player"] .mv-player__controls .mv-player__captions { --_mv-p-pad: 8px; gap: 0; }
  .mv-player[data-mode="player"] .mv-player__controls .mv-player__captions .mv-player__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Fullscreen on the wrapper (:fullscreen). Black ground, the video box cut to the ratio. */
.mv-player:fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 0;
  background: var(--mv-player-fullscreen-bg, #000);
  container-type: size;
}
.mv-player:fullscreen::backdrop { background: var(--mv-player-fullscreen-bg, #000); }
.mv-player:fullscreen .mv-player__poster,
.mv-player:fullscreen .mv-player__video {
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(100vw, calc(100vh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--_mv-p-w, 16) / var(--_mv-p-h, 9);
  transform: translate(-50%, -50%);
  object-fit: contain;
  background: var(--mv-player-fullscreen-bg, #000);
}
@supports (width: 1cqw) {
  .mv-player:fullscreen .mv-player__poster,
  .mv-player:fullscreen .mv-player__video {
    width: min(100cqw, calc(100cqh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  }
}

/* :fullscreen: everything that belongs to the picture is tied to the video rectangle, not to the wrapper:
 * --_mv-p-fs-w / --_mv-p-fs-h are that rectangle (the same box the poster and video get above).
 * The AI badge sits on its bottom left corner (Art. 50(4): on the medium, not on the black bar), and the
 * controls bar, with its scrim, is as wide as the picture and ends at its bottom edge, so the black
 * bars stay black. Where the picture fills the screen both reduce to the old corner and bottom edge. */
.mv-player:fullscreen {
  --_mv-p-fs-w: min(100vw, calc(100vh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  --_mv-p-fs-h: calc(var(--_mv-p-fs-w, 100vw) * var(--_mv-p-h, 9) / var(--_mv-p-w, 16));
}
@supports (width: 1cqw) {
  .mv-player:fullscreen {
    --_mv-p-fs-w: min(100cqw, calc(100cqh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  }
}
.mv-player:fullscreen .mv-player__controls {
  inset: auto auto max(0px, calc(50% - var(--_mv-p-fs-h, 100vh) / 2)) 50%;
  box-sizing: border-box;
  width: var(--_mv-p-fs-w, 100vw);
  transform: translateX(-50%);
}
/* Player mode (MPC-02): the centred row stays in the middle of the picture rectangle. */
.mv-player[data-mode="player"]:fullscreen .mv-player__controls {
  inset: 50% auto auto 50%;
  height: var(--_mv-p-fs-h, 100vh);
  max-height: 100%;
  transform: translate(-50%, -50%);
}
.mv-player:fullscreen > .ai-badge {
  bottom: calc(max(0px, 50% - var(--_mv-p-fs-h, 100vh) / 2) + var(--_mv-p-badge-bottom, 10px));
  left: calc(max(0px, 50% - var(--_mv-p-fs-w, 100vw) / 2) + 10px);
  width: max-content; /* shrink-to-fit would be cut at the left offset and wrap the label */
  max-width: calc(var(--_mv-p-fs-w, 100vw) - 20px); /* a long wording wraps inside the picture, never past its right edge */
  box-sizing: border-box;
}

/* Fullscreen on the wrapper (:-webkit-full-screen). Black ground, the video box cut to the ratio. */
.mv-player:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 0;
  background: var(--mv-player-fullscreen-bg, #000);
  container-type: size;
}
.mv-player:-webkit-full-screen::backdrop { background: var(--mv-player-fullscreen-bg, #000); }
.mv-player:-webkit-full-screen .mv-player__poster,
.mv-player:-webkit-full-screen .mv-player__video {
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(100vw, calc(100vh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--_mv-p-w, 16) / var(--_mv-p-h, 9);
  transform: translate(-50%, -50%);
  object-fit: contain;
  background: var(--mv-player-fullscreen-bg, #000);
}
@supports (width: 1cqw) {
  .mv-player:-webkit-full-screen .mv-player__poster,
  .mv-player:-webkit-full-screen .mv-player__video {
    width: min(100cqw, calc(100cqh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  }
}

/* :-webkit-full-screen: everything that belongs to the picture is tied to the video rectangle, not to the wrapper:
 * --_mv-p-fs-w / --_mv-p-fs-h are that rectangle (the same box the poster and video get above).
 * The AI badge sits on its bottom left corner (Art. 50(4): on the medium, not on the black bar), and the
 * controls bar, with its scrim, is as wide as the picture and ends at its bottom edge, so the black
 * bars stay black. Where the picture fills the screen both reduce to the old corner and bottom edge. */
.mv-player:-webkit-full-screen {
  --_mv-p-fs-w: min(100vw, calc(100vh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  --_mv-p-fs-h: calc(var(--_mv-p-fs-w, 100vw) * var(--_mv-p-h, 9) / var(--_mv-p-w, 16));
}
@supports (width: 1cqw) {
  .mv-player:-webkit-full-screen {
    --_mv-p-fs-w: min(100cqw, calc(100cqh * var(--_mv-p-w, 16) / var(--_mv-p-h, 9)));
  }
}
.mv-player:-webkit-full-screen .mv-player__controls {
  inset: auto auto max(0px, calc(50% - var(--_mv-p-fs-h, 100vh) / 2)) 50%;
  box-sizing: border-box;
  width: var(--_mv-p-fs-w, 100vw);
  transform: translateX(-50%);
}
/* Player mode (MPC-02): the centred row stays in the middle of the picture rectangle. */
.mv-player[data-mode="player"]:-webkit-full-screen .mv-player__controls {
  inset: 50% auto auto 50%;
  height: var(--_mv-p-fs-h, 100vh);
  max-height: 100%;
  transform: translate(-50%, -50%);
}
.mv-player:-webkit-full-screen > .ai-badge {
  bottom: calc(max(0px, 50% - var(--_mv-p-fs-h, 100vh) / 2) + var(--_mv-p-badge-bottom, 10px));
  left: calc(max(0px, 50% - var(--_mv-p-fs-w, 100vw) / 2) + 10px);
  width: max-content; /* shrink-to-fit would be cut at the left offset and wrap the label */
  max-width: calc(var(--_mv-p-fs-w, 100vw) - 20px); /* a long wording wraps inside the picture, never past its right edge */
  box-sizing: border-box;
}

/* Forced colors: the system repaints backgrounds, which would wipe every symbol that is drawn as a
 * background (the speaker, the sound waves, the slash, the fullscreen corners, the caption box). The symbols
 * therefore opt out of the adjustment and are painted with the system button text colour, their cut-outs
 * with the button face colour: sound on and off stay different by shape, as outside this mode. */
@media (forced-colors: active) {
  .mv-player__controls button { border-color: ButtonText; background: ButtonFace; color: ButtonText; }
  .mv-player__controls button:focus-visible { outline-color: Highlight; box-shadow: none; }
  .mv-player:focus-visible::after { border-color: Highlight; box-shadow: none; }
  .mv-player__play::before,
  .mv-player__replay::before,
  .mv-player__replay::after,
  .mv-player__sound::before,
  .mv-player__sound::after,
  .mv-player__captions::before,
  .mv-player__fullscreen::before { forced-color-adjust: none; }
  /* Play, pause and replay are drawn with borders, and a transparent border is part of the shape (the corners of
   * the triangle, the gap of the ring). Forced colors would repaint it solid: play became a square, replay a
   * closed ring. The opt-out above keeps the transparent sides; the visible sides stay currentColor, which is the
   * button text colour here. */
  .mv-player__sound::before { background: ButtonText; }
  .mv-player__sound[aria-pressed="true"]::after {
    background: radial-gradient(circle at 0 50%, transparent 0 4px, ButtonText 4px 6px, transparent 6px 9px, ButtonText 9px 11px, transparent 11px);
  }
  .mv-player__sound[aria-pressed="false"]::after { background: ButtonText; box-shadow: 0 0 0 1.5px ButtonFace; }
  .mv-player__captions::before {
    border-color: ButtonText;
    background:
      linear-gradient(ButtonText, ButtonText) 2px 5px / 5px 2px no-repeat,
      linear-gradient(ButtonText, ButtonText) 10px 5px / 6px 2px no-repeat;
  }
  .mv-player__captions[aria-pressed="true"]::before {
    background:
      linear-gradient(ButtonFace, ButtonFace) 2px 5px / 5px 2px no-repeat,
      linear-gradient(ButtonFace, ButtonFace) 10px 5px / 6px 2px no-repeat,
      ButtonText;
  }
  .mv-player__fullscreen::before {
    background:
      linear-gradient(ButtonText, ButtonText) 0 0 / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 0 0 / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% 0 / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% 0 / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 0 100% / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 0 100% / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% 100% / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% 100% / 3px 7px no-repeat;
  }
  .mv-player__fullscreen[aria-pressed="true"]::before {
    background:
      linear-gradient(ButtonText, ButtonText) 0 4px / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 4px 0 / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% 4px / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) calc(100% - 4px) 0 / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 0 calc(100% - 4px) / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) 4px 100% / 3px 7px no-repeat,
      linear-gradient(ButtonText, ButtonText) 100% calc(100% - 4px) / 7px 3px no-repeat,
      linear-gradient(ButtonText, ButtonText) calc(100% - 4px) 100% / 3px 7px no-repeat;
  }
}
/* ===== end mv-player ===================================================== */
