/* Media viewer (3 November 2026): css for js/ux/media-viewer.js. Self-contained, every rule under .mvw. A black full-screen layer; the picture is object-fit contain edge to edge;
   the chrome (.mvw-ui and the two shades) rests after 2.5 s: opacity only, the Mirai Feel duration in --mvw-t, the quint-out / fade curves, no overshoot, no scale.
   Under reduced motion the same fade runs in 120ms. Buttons are 44px (the TV scales with --ui-scale). */
.mvw {
  position: fixed; inset: 0; z-index: 100000; background: #000; color: #f5f5f7; font-family: var(--sans, system-ui, sans-serif); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  --mvw-s: var(--ui-scale, 1); --mvw-pad: calc(16px * var(--mvw-s)); --mvw-fade: cubic-bezier(.4, 0, .6, 1); -webkit-tap-highlight-color: transparent;
}
.mvw-stage { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
.mvw-img, .mvw-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; max-width: none; max-height: none; background: #000; pointer-events: none; -webkit-user-drag: none; }
/* the layers are animated from the script (js/ux/media-viewer.js reveal): the bloom, the slide, the fade; the CSS only holds the resting states */
.mvw-img { opacity: 0; z-index: 2; will-change: transform, opacity; }
.mvw-img.on { opacity: 1; }
.mvw-vid { z-index: 1; transition: opacity 240ms var(--mvw-fade); }
.mvw-vid.mvw-pend { opacity: 0; }
.mvw-vid[hidden] { display: none; }

/* the soft gradients that let white type read on any picture; they rest with the chrome */
.mvw-shade { position: absolute; left: 0; right: 0; pointer-events: none; transition: opacity var(--mvw-t, 240ms) var(--mvw-fade), visibility 0s linear 0s; }
.mvw-st { top: 0; height: calc(120px * var(--mvw-s)); background: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }
.mvw-sb { bottom: 0; height: calc(220px * var(--mvw-s)); background: linear-gradient(to top, rgba(0, 0, 0, .66), rgba(0, 0, 0, 0)); }
.mvw .mvw-ui { transition: opacity var(--mvw-t, 240ms) var(--mvw-fade), transform var(--mvw-t, 240ms) cubic-bezier(.22, 1, .36, 1), visibility 0s linear 0s, background-color 160ms var(--mvw-fade); }
.mvw.mvw-idle .mvw-ui, .mvw.mvw-idle .mvw-shade { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--mvw-t, 240ms) var(--mvw-fade), transform var(--mvw-t, 240ms) cubic-bezier(.22, 1, .36, 1), visibility 0s linear var(--mvw-t, 240ms), background-color 160ms var(--mvw-fade); }
.mvw.mvw-idle .mvw-bot { transform: translateY(6px); }
.mvw.mvw-idle .mvw-top { transform: translateY(-6px); }
.mvw.mvw-pre .mvw-ui, .mvw.mvw-pre .mvw-shade { opacity: 0; }
.mvw-rm.mvw-idle .mvw-bot, .mvw-rm.mvw-idle .mvw-top { transform: none; }
.mvw-rm { --mvw-t: 120ms; }

.mvw-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--mvw-pad); padding: calc(var(--mvw-pad) + env(safe-area-inset-top, 0px)) calc(var(--mvw-pad) + env(safe-area-inset-right, 0px)) 0 calc(var(--mvw-pad) + env(safe-area-inset-left, 0px)); box-sizing: border-box; pointer-events: none; }
.mvw-top > * { pointer-events: auto; }
.mvw .mvw-x, .mvw .mvw-fsb, .mvw .mvw-nav, .mvw .mvw-big, .mvw .mvw-b1 {
  display: grid; place-items: center; padding: 0; margin: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(24, 24, 28, .56); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  cursor: pointer; font: inherit; -webkit-appearance: none; appearance: none;
}
.mvw .mvw-x, .mvw .mvw-fsb, .mvw .mvw-b1, .mvw .mvw-back { transition: background-color 160ms var(--mvw-fade); }
.mvw .mvw-x, .mvw .mvw-fsb { width: calc(44px * var(--mvw-s)); height: calc(44px * var(--mvw-s)); flex: none; }
.mvw .mvw-b1 { width: calc(44px * var(--mvw-s)); height: calc(44px * var(--mvw-s)); flex: none; }
.mvw .mvw-nav { position: absolute; top: calc(50% - 22px * var(--mvw-s)); width: calc(44px * var(--mvw-s)); height: calc(44px * var(--mvw-s)); }
.mvw .mvw-prev { left: calc(var(--mvw-pad) + env(safe-area-inset-left, 0px)); } .mvw .mvw-next { right: calc(var(--mvw-pad) + env(safe-area-inset-right, 0px)); }
.mvw .mvw-big { position: absolute; left: calc(50% - 36px * var(--mvw-s)); top: calc(50% - 36px * var(--mvw-s)); width: calc(72px * var(--mvw-s)); height: calc(72px * var(--mvw-s)); }
.mvw .mvw-big[hidden], .mvw .mvw-nav[hidden], .mvw .mvw-b1[hidden], .mvw .mvw-sp[hidden] { display: none; }
.mvw svg { width: calc(22px * var(--mvw-s)); height: calc(22px * var(--mvw-s)); display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mvw .mvw-big svg { width: calc(32px * var(--mvw-s)); height: calc(32px * var(--mvw-s)); fill: currentColor; stroke-width: 1; }
.mvw .mvw-b1 svg { width: calc(20px * var(--mvw-s)); height: calc(20px * var(--mvw-s)); }
.mvw-b1[data-mvw-play] svg path[d^="M8.5"] { fill: currentColor; }
@media (hover: hover) { .mvw .mvw-x:hover, .mvw .mvw-fsb:hover, .mvw .mvw-back:hover, .mvw .mvw-nav:hover, .mvw .mvw-big:hover, .mvw .mvw-b1:hover { background: rgba(24, 24, 28, .74); } }
.mvw button:focus-visible, .mvw input:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 2px; }

/* the Renders / Walkthrough switch: a quiet two-segment pill at the top left */
.mvw-seg { display: inline-flex; padding: calc(3px * var(--mvw-s)); border-radius: 999px; background: rgba(24, 24, 28, .56); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.mvw-seg button { min-height: calc(38px * var(--mvw-s)); padding: 0 calc(16px * var(--mvw-s)); border: 0; border-radius: 999px; background: transparent; color: rgba(245, 245, 247, .8); font: 500 calc(15px * var(--mvw-s))/1.2 var(--sans, system-ui, sans-serif); cursor: pointer; -webkit-appearance: none; appearance: none; transition: background-color 160ms var(--mvw-fade), color 160ms var(--mvw-fade); }
.mvw-seg button.on { background: rgba(255, 255, 255, .22); color: #fff; }

/* the foot: caption and counter, light and tucked, then the thumbnails or the video controls */
.mvw-bot { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: calc(10px * var(--mvw-s)); padding: 0 calc(var(--mvw-pad) + env(safe-area-inset-right, 0px)) calc(var(--mvw-pad) + env(safe-area-inset-bottom, 0px)) calc(var(--mvw-pad) + env(safe-area-inset-left, 0px)); box-sizing: border-box; pointer-events: none; }
.mvw-bot > * { pointer-events: auto; }
.mvw-meta { display: flex; align-items: flex-end; gap: calc(12px * var(--mvw-s)); min-width: 0; }
.mvw-cap { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); pointer-events: none; }
.mvw-title { font: 600 calc(16px * var(--mvw-s))/1.25 var(--sans, system-ui, sans-serif); }
.mvw-text { font: 400 calc(13px * var(--mvw-s))/1.35 var(--sans, system-ui, sans-serif); color: rgba(245, 245, 247, .86); }
.mvw-count { flex: none; font: 500 calc(13px * var(--mvw-s))/1 var(--sans, system-ui, sans-serif); color: rgba(245, 245, 247, .86); font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.mvw-rail { display: flex; gap: calc(8px * var(--mvw-s)); overflow-x: auto; overflow-y: hidden; padding: 3px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.mvw-rail::-webkit-scrollbar { display: none; }
.mvw-rail[hidden] { display: none; }
.mvw-th { flex: none; position: relative; width: calc(72px * var(--mvw-s)); height: calc(48px * var(--mvw-s)); padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #26262c; opacity: .62; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: opacity 180ms var(--mvw-fade), outline-color 180ms var(--mvw-fade); }
.mvw-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.mvw-th[aria-current="true"] { opacity: 1; }
.mvw-rail { position: relative; }
.mvw-hl { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 8px; box-shadow: 0 0 0 2px #fff; pointer-events: none; z-index: 2; transition: transform var(--mvw-img, 320ms) cubic-bezier(.22, 1, .36, 1), width var(--mvw-img, 320ms) cubic-bezier(.22, 1, .36, 1); }
.mvw-rm .mvw-hl { transition: none; }
@media (hover: hover) { .mvw-th:hover { opacity: .9; } }

.mvw-vbar { display: flex; align-items: center; gap: calc(12px * var(--mvw-s)); }
.mvw-vbar[hidden] { display: none; }
.mvw-time, .mvw-dur { flex: none; min-width: 3ch; font: 500 calc(13px * var(--mvw-s))/1 var(--sans, system-ui, sans-serif); color: rgba(245, 245, 247, .86); font-variant-numeric: tabular-nums; }
.mvw-scrub { flex: 1 1 auto; min-width: 0; height: calc(44px * var(--mvw-s)); margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: none; }
.mvw-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.mvw-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: calc(16px * var(--mvw-s)); height: calc(16px * var(--mvw-s)); margin-top: calc(-6px * var(--mvw-s) + 0px); border-radius: 50%; background: #fff; border: 0; }
.mvw-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.mvw-scrub::-moz-range-thumb { width: calc(16px * var(--mvw-s)); height: calc(16px * var(--mvw-s)); border-radius: 50%; background: #fff; border: 0; }

/* the sample mark: the one thing that does not rest (the app flags stand-in content wherever it shows). Tiny, no pill, no box */
.mvw-sample { position: absolute; right: calc(var(--mvw-pad) + env(safe-area-inset-right, 0px)); top: calc(var(--mvw-pad) + env(safe-area-inset-top, 0px) + 56px * var(--mvw-s)); font: 500 calc(11px * var(--mvw-s))/1 var(--sans, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: rgba(245, 245, 247, .78); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); pointer-events: none; }
.mvw-sample[hidden] { display: none; }
.mvw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* a narrow portrait screen: the arrows leave the picture's edge for the foot, the thumbnails keep one row */
@media (max-width: 720px) { .mvw-full .mvw-nav { top: auto; bottom: calc(110px * var(--mvw-s)); } .mvw-text { display: none; } }
@media (prefers-reduced-motion: reduce) { .mvw-seg button, .mvw-th { transition-duration: 120ms; } }

/* ---------- the gallery (class mvw-framed, the way it opens): a graphite panel, the picture in a rounded frame, the foot under it; full screen (mvw-full) is everything above ---------- */
.mvw-tl, .mvw-tr { display: flex; align-items: center; gap: calc(8px * var(--mvw-s)); min-width: 0; }
.mvw.mvw-full .mvw-back, .mvw.mvw-full .mvw-x { display: none; }
.mvw .mvw-back { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: calc(44px * var(--mvw-s)); min-width: calc(44px * var(--mvw-s)); margin: 0; padding: 0 calc(16px * var(--mvw-s)) 0 calc(10px * var(--mvw-s)); border: 0; border-radius: 999px; background: rgba(40, 40, 46, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); color: #fff; font: 500 calc(15px * var(--mvw-s))/1 var(--sans, system-ui, sans-serif); cursor: pointer; -webkit-appearance: none; appearance: none; }
.mvw-framed { background: #121216; }
.mvw-framed .mvw-stage { inset: calc(76px * var(--mvw-s)) calc(20px * var(--mvw-s)) var(--mvw-sb, 98px) calc(20px * var(--mvw-s)); border-radius: calc(18px * var(--mvw-s)); overflow: hidden; background: #202026; }
.mvw-framed .mvw-img { object-fit: cover; background: #202026; }
.mvw-framed .mvw-vid { object-fit: contain; background: #000; }
.mvw-framed .mvw-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: 4; pointer-events: none; background: linear-gradient(to top, rgba(8, 8, 12, .66), rgba(8, 8, 12, 0)); }
.mvw-framed .mvw-isvid .mvw-stage::after, .mvw-framed.mvw-isvid .mvw-stage::after { display: none; }
.mvw-framed .mvw-shade { display: none; }
.mvw-framed .mvw-top { padding-top: calc(16px * var(--mvw-s)); }
.mvw-framed .mvw-bot { left: calc(20px * var(--mvw-s)); right: calc(20px * var(--mvw-s)); bottom: calc(16px * var(--mvw-s)); padding: 0; }
.mvw-framed .mvw-meta { position: absolute; left: calc(16px * var(--mvw-s)); right: calc(16px * var(--mvw-s)); bottom: calc(100% + 24px * var(--mvw-s)); pointer-events: none; }
.mvw-framed .mvw-meta > .mvw-b1 { pointer-events: auto; }
.mvw-framed .mvw-title { font-size: calc(18px * var(--mvw-s)); }
.mvw-framed .mvw-nav { top: calc(76px * var(--mvw-s) + (100% - 76px * var(--mvw-s) - var(--mvw-sb, 98px)) / 2 - 22px * var(--mvw-s)); }
.mvw-framed .mvw-prev { left: calc(32px * var(--mvw-s)); } .mvw-framed .mvw-next { right: calc(32px * var(--mvw-s)); }
.mvw-framed .mvw-big { top: calc(76px * var(--mvw-s) + (100% - 76px * var(--mvw-s) - var(--mvw-sb, 98px)) / 2 - 36px * var(--mvw-s)); }
.mvw-framed .mvw-sample { right: auto; left: calc(34px * var(--mvw-s)); top: calc(76px * var(--mvw-s) + 14px * var(--mvw-s)); }
.mvw .mvw-fly { position: absolute; z-index: 6; margin: 0; max-width: none; max-height: none; object-fit: contain; pointer-events: none; transform-origin: 50% 50%; will-change: transform, clip-path; -webkit-user-drag: none; }

/* the Ink Bloom's host (js/ux/bloom.js): the gallery's stage (cover, as the old gallery) or, in full screen, the picture's own box on black (sized from the script) */
.mvw .mvw-bh { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: transparent; }
.mvw-framed .mvw-bh { background: #202026; }
