/* ===== Skin pack base: layout, state toggles, a11y floor ===== */
* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--page-bg, #111); color: var(--page-ink, #f4f4f4);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.page { width: min(1120px, 100% - 24px); margin: 0 auto; padding: 24px 0 64px; }
.pack-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.pack-nav a {
  display: inline-block; padding: 6px 10px; min-height: 32px;
  font: 12px/20px system-ui, sans-serif; font-weight: 700;
  color: var(--page-ink, #fff); text-decoration: none;
  border: 2px solid currentColor; opacity: .75;
}
.pack-nav a[aria-current] { opacity: 1; background: var(--page-accent, #fff); color: var(--page-bg, #000); border-color: var(--page-accent, #fff); }
.pack-nav a:hover { opacity: 1; }
.pack-nav a:focus-visible { outline: 3px solid var(--page-accent, #fff); outline-offset: 2px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; line-height: .9; }
.page-head p { margin: 0; max-width: 38ch; font-size: 1.05rem; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 40px; margin-top: 44px; }
.notes h2 { font-size: 1.3rem; margin: 0 0 8px; color: var(--page-accent, #fff); }
.notes p { margin: 0 0 12px; max-width: 62ch; }
.keys { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.keys li { display: flex; gap: 12px; align-items: baseline; }
kbd { font: 12px/1 ui-monospace, monospace; font-weight: 700; min-width: 3.6em; text-align: center; padding: 6px; color: var(--page-bg, #000); background: var(--page-ink, #fff); border-radius: 3px; }
.credit { margin-top: 44px; font-size: .9rem; opacity: .85; }
.credit a { color: var(--page-accent, #fff); }

/* ===== Player shell ===== */
.sk {
  position: relative; display: block; width: 100%;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent; isolation: isolate;
  --sk-accent: var(--media-accent-color, #fff);
  --sk-radius: var(--media-border-radius, 0px);
}
.sk:focus { outline: none; }
.sk:focus-visible { outline: 3px solid #fff; outline-offset: -6px; box-shadow: inset 0 0 0 6px #000; }
.sk-screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.sk:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; }
.sk:fullscreen .sk-screen { flex: 1; aspect-ratio: auto; }
.sk video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.sk-poster { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .3s; }
.sk-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-poster:not([data-visible]) { opacity: 0; }

/* indicators and hidden parts take no space */
.sk [hidden], .sk [data-hidden] { display: none !important; }

/* icon state toggles (any skin) */
.sk .i-pause, .sk .i-replay, .sk .i-muted, .sk .i-shrink { display: none; }
.sk media-play-button:not([data-paused]) .i-play { display: none; }
.sk media-play-button:not([data-paused]) .i-pause { display: block; }
.sk media-play-button[data-ended] .i-play, .sk media-play-button[data-ended] .i-pause { display: none; }
.sk media-play-button[data-ended] .i-replay { display: block; }
.sk media-mute-button[data-muted] .i-sound, .sk media-mute-button[data-volume-level="off"] .i-sound { display: none; }
.sk media-mute-button[data-muted] .i-muted, .sk media-mute-button[data-volume-level="off"] .i-muted { display: block; }
.sk media-fullscreen-button[data-fullscreen] .i-grow { display: none; }
.sk media-fullscreen-button[data-fullscreen] .i-shrink { display: block; }
.sk svg.px { shape-rendering: crispEdges; }

/* state text toggles inside the center prompt */
.sk-prompt .when-idle, .sk-prompt .when-paused, .sk-prompt .when-ended { display: none; }
.sk-prompt:not([data-started]):not([data-ended]) .when-idle,
.sk-prompt[data-started]:not([data-ended]) .when-paused,
.sk-prompt[data-ended] .when-ended { display: grid; justify-items: center; gap: .55em; }
.sk-prompt { display: none; }
.sk-prompt[data-paused] { display: grid; }

/* auto-hide helper: any element with .sk-hide fades with idle controls */
.sk-hud:not([data-visible]):not(:has(:focus-visible)) .sk-hide { opacity: 0; pointer-events: none; }
.sk-hud { pointer-events: none; }
.sk-hud > *, .sk-hud .sk-hit { pointer-events: auto; }

/* sliders: keyboard focus ring shown on the track */
.sk media-time-slider, .sk media-volume-slider { outline: none; touch-action: none; cursor: pointer; }

/* error dialog default */
.sk-error-popup { position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; background: rgb(0 0 0 / .9); color: #fff; }
.sk-error-popup:not([data-open]) { display: none; }
.sk-error-close { min-height: 44px; padding: 0 20px; font: inherit; font-weight: 700; cursor: pointer; }
.sk-error-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* analyzer canvas fills its box */
canvas.sk-analyzer { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .sk *, .sk *::before, .sk *::after { animation: none !important; transition-duration: .01ms !important; }
}
video-player:not(:defined), media-container:not(:defined) { display: block; }

/* software volume (iPhone/iPad): engine overlays a real range input on each volume slider */
.sk[data-softvol] media-volume-slider, .sk[data-softvol] media-volume-slider[data-hidden], .sk[data-softvol] media-volume-slider[hidden] { display: flex !important; }
.sk .gmp-softvol { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 6; -webkit-appearance: none; appearance: none; touch-action: none; pointer-events: none; }
.sk[data-softvol] media-volume-slider { touch-action: none; }
.sk media-volume-slider:has(.gmp-softvol:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #000; }

/* status announcements are for screen readers, never drawn */
.sk media-status-announcer { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ===== Legibility floor for the centre prompt over any footage (audit fix) =====
   A soft dark halo sits behind every prompt and its small line gets a shadow, so the words hold
   over bright scenes as well as dark ones without changing each skin's own type. */
.sk-prompt { isolation: isolate; }
.sk-prompt::after { content: ""; position: absolute; inset: -18% -14%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .58), rgb(0 0 0 / .32) 60%, transparent); }
.sk-prompt .small, .sk-prompt small { text-shadow: 0 1px 2px rgb(0 0 0 / .95), 0 0 10px rgb(0 0 0 / .8); }
.sk-prompt .big { text-shadow: 0 1px 2px rgb(0 0 0 / .7), 0 0 18px rgb(0 0 0 / .45); }

/* ===== Hit areas of at least 44 x 44 px (audit fix, invisible) ===== */
hls-video { display: contents; }
/* persistent time readout for the rendered-device skins (audit fix: time is an essential control) */
.gmp-time { position: absolute; z-index: 6; top: clamp(6px, 3.5%, 14px); right: clamp(6px, 3%, 14px); display: flex; gap: .35em; align-items: baseline;
  padding: .32em .6em .28em; border-radius: 4px; background: rgb(0 0 0 / .62); color: #fff; pointer-events: none;
  font: 400 clamp(12px, 1.15vw + 7px, 16px)/1 var(--gmp-time-font, ui-monospace, monospace); font-variant-numeric: tabular-nums; letter-spacing: .04em;
  text-shadow: 0 1px 2px rgb(0 0 0 / .9); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.gmp-time .gmp-time-sep { color: var(--acc, #fff); opacity: .9; }
@container (max-width: 380px) { .gmp-time { font-size: 11px; } }
/* decorative glows may spill past the page edge; never let them create a sideways scroll */
html, body { overflow-x: clip; }
[data-gmp-rel] { position: relative; }
[data-gmp-hit="a"]::after, [data-gmp-hit="b"]::before, .gmp-hit {
  content: ""; position: absolute; pointer-events: auto; background: transparent;
  top: min(0px, calc((100% - 44px) / 2)); bottom: min(0px, calc((100% - 44px) / 2));
  left: min(0px, calc((100% - 44px) / 2)); right: min(0px, calc((100% - 44px) / 2));
}
