/* Media is a dark canvas in both page themes. White controls and the site's blue accent
   remain legible over arbitrary footage. Deliberately scoped away from page layout. */
html body.light-theme .rp-video-player {
    --rp-player-accent:#a6c4ff; --rp-player-ink:#f8faff;
    --rp-progress:0%; --rp-buffer:0%; --rp-volume:60%;
    isolation:isolate; color:var(--rp-player-ink); background:#090c11;
    font-family:var(--editorial-font,Manrope,sans-serif); -webkit-tap-highlight-color:transparent;
}
html[data-theme="light"] body.light-theme .rp-video-player { --rp-player-accent:#b8d0ff; }
html body.light-theme .rp-video-player:focus-visible { outline:2px solid var(--theme-accent,#285cc4)!important;outline-offset:5px; }
html body.light-theme .rp-video-player > .rp-full-video { display:block;width:100%;height:100%;pointer-events:auto; }
html body.light-theme .rp-video-player.rp-has-started > .rp-full-video { object-fit:contain!important;transform:none!important;opacity:1!important; }
html body.light-theme .rp-video-player > .rp-preview-video,
html body.light-theme .external-preview > .rp-preview-video {
    position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;
    opacity:0!important;pointer-events:none;transition:opacity 200ms ease!important;
}
html body.light-theme .rp-video-player.rp-previewing > .rp-preview-video,
html body.light-theme .external-preview.rp-previewing > .rp-preview-video { opacity:1!important; }
html body.light-theme .rp-player-shade { position:absolute;inset:35% 0 0;z-index:2;pointer-events:none;background:linear-gradient(transparent,rgba(7,11,18,.15) 40%,rgba(7,11,18,.82));opacity:0;transition:opacity 200ms ease; }
html body.light-theme .rp-has-started .rp-player-shade { opacity:1; }
html body.light-theme .rp-video-player .rp-player-center,
html body.light-theme .external-preview .external-play,
html body.light-theme .external-preview:hover .external-play,
html body.light-theme .external-preview:focus-visible .external-play {
    position:absolute;left:50%;top:50%;z-index:4;display:grid!important;place-items:center;
    width:58px!important;height:58px!important;min-width:44px;min-height:44px;padding:0;
    background:#fff!important;color:#191c20!important;opacity:1!important;
    border:1px solid #fff!important;border-radius:50%!important;
    box-shadow:0 4px 24px #00000029!important;filter:none!important;backdrop-filter:none!important;
    transform:translate(-50%,-50%)!important;translate:none!important;
    transition:scale 180ms ease,box-shadow 180ms ease!important;cursor:pointer;
}
html body.light-theme .rp-video-player .rp-player-center::before,
html body.light-theme .external-preview .external-play::before {
    content:"";position:absolute;inset:-6px!important;border:1px solid #ffffff73!important;border-radius:50%!important;pointer-events:none;
}
html body.light-theme .rp-video-player .rp-player-center:hover,
html body.light-theme .external-preview:hover .external-play { scale:1.045;box-shadow:0 5px 28px #00000040!important; }
html body.light-theme .rp-player-center svg,
html body.light-theme .external-preview .external-play svg { width:23px!important;height:23px!important;color:#191c20!important;fill:currentColor!important;transform:translateX(1px)!important; }
html body.light-theme .rp-video-player .rp-player-center[hidden] { display:none!important; }
html body.light-theme .rp-player-dock {
    position:absolute;left:10px;right:10px;bottom:10px;z-index:5;
    padding:0 7px 3px;min-width:0;max-width:calc(100% - 20px);
    color:var(--rp-player-ink);background:rgba(16,22,32,.88);
    border:1px solid #ffffff26;border-radius:8px!important;
    backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
    box-shadow:0 4px 18px #0000001f;
    opacity:0;visibility:hidden;transform:translateY(5px);
    transition:opacity 180ms ease,transform 180ms ease,visibility 180ms;
}
html body.light-theme .rp-has-started .rp-player-dock {opacity:1;visibility:visible;transform:none;}
html body.light-theme .rp-video-player.rp-controls-idle .rp-player-dock {opacity:0;visibility:hidden;transform:translateY(5px);pointer-events:none;}
html body.light-theme .rp-video-player.rp-controls-idle .rp-player-shade {opacity:0;}
html body.light-theme .rp-player-scrub {position:relative;display:block;height:26px;margin:0 6px;cursor:pointer;}
html body.light-theme .rp-player-track {position:absolute;top:12px;left:0;right:0;height:3px;overflow:hidden;border-radius:2px!important;background:#ffffff30;pointer-events:none;}
html body.light-theme .rp-player-buffer {position:absolute;inset:0 auto 0 0;width:var(--rp-buffer);background:#ffffff4d;}
html body.light-theme .rp-player-progress {position:absolute;inset:0 auto 0 0;width:var(--rp-progress);background:var(--rp-player-accent);}
html body.light-theme .rp-video-player .rp-player-seek {
    -webkit-appearance:none;appearance:none;position:relative;display:block;width:100%;height:26px;
    margin:0;padding:0;outline:none;background:transparent!important;border:0;box-shadow:none;cursor:pointer;touch-action:none;
}
html body.light-theme .rp-player-seek::-webkit-slider-runnable-track {height:3px;background:transparent;border:0;}
html body.light-theme .rp-player-seek::-moz-range-track {height:3px;background:transparent;border:0;}
html body.light-theme .rp-player-seek::-webkit-slider-thumb {-webkit-appearance:none;appearance:none;width:11px;height:11px;margin-top:-4px;border:0;border-radius:50%!important;background:#fff;box-shadow:0 1px 5px #0006;}
html body.light-theme .rp-player-seek::-moz-range-thumb {width:11px;height:11px;border:0;border-radius:50%!important;background:#fff;box-shadow:0 1px 5px #0006;}
html body.light-theme .rp-player-seek:disabled {opacity:.4;cursor:default;}
html body.light-theme .rp-player-row {display:flex;align-items:center;gap:2px;min-width:0;height:40px;}
html body.light-theme .rp-video-player .rp-player-button,
html body.light-theme .rp-video-player .rp-player-speed > summary {
    display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;
    border:0;border-radius:5px!important;padding:0;margin:0;background:transparent;color:var(--rp-player-ink)!important;
    line-height:1;font-size:12px;letter-spacing:0;cursor:pointer;box-shadow:none;
    transition:background 150ms ease,color 150ms ease;
}
html body.light-theme .rp-video-player .rp-player-button:hover,
html body.light-theme .rp-video-player .rp-player-speed > summary:hover {background:#ffffff15;color:var(--rp-player-accent)!important;}
html body.light-theme .rp-video-player .rp-player-button svg {display:block;width:19px;height:19px;pointer-events:none;}
html body.light-theme .rp-video-player :is(button,input,summary,a):focus-visible {outline:2px solid #a6c4ff!important;outline-offset:1px!important;}
html body.light-theme .rp-player-time {flex:0 0 auto;white-space:nowrap!important;font-size:11px!important;font-weight:500;line-height:1.3;letter-spacing:.01em;color:#fff!important;font-variant-numeric:tabular-nums;}
html body.light-theme .rp-time-duration {color:#c4cfdf!important;}
html body.light-theme .rp-player-spacer {flex:1 1 4px;min-width:0;}
html body.light-theme .rp-player-volume {display:flex;align-items:center;flex:0 0 auto;gap:2px;}
html body.light-theme .rp-video-player .rp-player-volume-range {
    -webkit-appearance:none;appearance:none;width:56px;height:32px;margin:0 9px 0 0;padding:0;background:transparent;border:0;cursor:pointer;accent-color:var(--rp-player-accent);touch-action:none;
}
html body.light-theme .rp-player-volume-range::-webkit-slider-runnable-track {height:3px;border-radius:2px;background:linear-gradient(to right,var(--rp-player-accent) var(--rp-volume),#ffffff40 var(--rp-volume));}
html body.light-theme .rp-player-volume-range::-moz-range-track {height:3px;background:#ffffff40;}
html body.light-theme .rp-player-volume-range::-moz-range-progress {height:3px;background:var(--rp-player-accent);}
html body.light-theme .rp-player-volume-range::-webkit-slider-thumb {-webkit-appearance:none;width:9px;height:9px;margin-top:-3px;border-radius:50%;background:#fff;border:0;}
html body.light-theme .rp-player-volume-range::-moz-range-thumb {width:9px;height:9px;border-radius:50%;background:#fff;border:0;}
html body.light-theme .rp-player-speed {position:relative;flex:0 0 auto;margin:0;padding:0;border:0;background:none;}
html body.light-theme .rp-player-speed > summary {list-style:none;font-variant-numeric:tabular-nums;}
html body.light-theme .rp-player-speed > summary::-webkit-details-marker {display:none;}
html body.light-theme .rp-player-speed-options {position:absolute;right:0;bottom:calc(100% + 8px);width:80px;display:grid;gap:2px;padding:5px;background:#171f2d;border:1px solid #ffffff30;border-radius:7px!important;box-shadow:0 8px 28px #0005;}
html body.light-theme .rp-player-speed:not([open]) .rp-player-speed-options {display:none;}
html body.light-theme .rp-player-speed-options button {height:36px;width:100%;padding:0;border:0;background:none;color:#f3f6fb;font:500 12px/1 var(--editorial-font);border-radius:4px!important;cursor:pointer;}
html body.light-theme .rp-player-speed-options button[aria-pressed="true"],html body.light-theme .rp-player-speed-options button:hover {background:#ffffff12;color:var(--rp-player-accent);}
html body.light-theme .rp-player-error-message {position:absolute;left:12px;right:12px;top:12px;z-index:7;padding:12px;background:#152133f2;border:1px solid #b4c9e76b;border-radius:6px!important;font:500 12px/1.6 var(--editorial-font);color:#fff;}
html body.light-theme .rp-player-error-message[hidden] {display:none!important;}
html body.light-theme .rp-player-error-message > div {display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:8px;}
html body.light-theme .rp-player-error-message :is(button,a) {color:#c5daff;border:0;background:transparent;padding:4px 0;text-decoration:underline;cursor:pointer;font-size:12px;}
html body.light-theme .rp-player-loading {position:absolute;left:50%;top:50%;margin:-15px 0 0 -15px;z-index:4;width:30px;height:30px;border:2px solid #ffffff40;border-top-color:#fff;border-radius:50%!important;animation:rp-player-spin 900ms linear infinite;pointer-events:none;}
html body.light-theme .rp-player-loading[hidden] {display:none!important;}
@keyframes rp-player-spin {to{transform:rotate(1turn)}}
html body.light-theme .rp-player-small .rp-player-volume-range {display:none;}
html body.light-theme .rp-player-tiny .rp-player-volume,
html body.light-theme .rp-player-tiny .rp-player-speed,
html body.light-theme .rp-player-tiny .rp-time-duration {display:none;}
html body.light-theme .rp-player-tiny .rp-player-dock {left:5px;right:5px;bottom:6px;max-width:calc(100% - 10px);padding-inline:2px;}
html body.light-theme .rp-player-tiny .rp-player-time {font-size:10px!important;}
html body.light-theme .rp-player-tiny .rp-player-center {width:48px!important;height:48px!important;}
html body.light-theme .rp-native-fallback .rp-player-dock,
html body.light-theme .rp-native-fallback .rp-player-shade,
html body.light-theme .rp-native-fallback .rp-player-center {display:none!important;}
/* Fullscreen targets the media frame, never the card's caption. */
html body.light-theme .rp-video-player:fullscreen {position:fixed!important;inset:0!important;display:block!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;border-radius:0!important;background:#05070b!important;}
html body.light-theme .rp-video-player:-webkit-full-screen {position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;background:#05070b!important;}
html body.light-theme .rp-video-player:fullscreen > .rp-full-video {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;}
html body.light-theme .rp-video-player:fullscreen .rp-player-dock {left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));margin-inline:auto;max-width:900px;}
/* The dialog remains proportional to the clip on short mobile screens. */
html body.light-theme .rp-dialog-player {position:relative;display:block;width:min(440px,calc((100dvh - 165px)*9/16),calc(100vw - 56px));max-width:100%;aspect-ratio:9/16;margin-inline:auto;border-radius:4px;overflow:hidden;}
html body.light-theme .reel-dialog .rp-dialog-player > video {display:block;position:absolute;inset:0;width:100%;height:100%;min-width:0;max-width:100%;max-height:none;aspect-ratio:auto;object-fit:contain;}
html body.light-theme .reel-dialog-heading {max-width:440px;}
html body.light-theme .reel-dialog-heading h2 {overflow-wrap:anywhere;}
html body.light-theme .reel-dialog-close {min-width:40px;min-height:40px;border-radius:4px!important;}
html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,clamp(225px,19vw,306px));}
@media(max-width:980px) {
    html body.light-theme .rp-player-button,html body.light-theme .rp-player-speed > summary {width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;flex-basis:44px!important;}
    html body.light-theme .rp-player-row {height:44px;gap:0;}
    html body.light-theme .rp-player-scrub,html body.light-theme .rp-video-player .rp-player-seek {height:30px;}
    html body.light-theme .rp-player-track {top:14px;}
    html body.light-theme .rp-player-small .rp-time-duration {display:none;}
    html body.light-theme .rp-player-dock {left:7px;right:7px;bottom:7px;max-width:calc(100% - 14px);padding:0 3px 2px;}
    html body.light-theme .rp-player-speed-options button {min-height:40px;}
    html body.light-theme .rp-player-center {width:54px!important;height:54px!important;}
    html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,238px);}
}
@media(max-width:620px) {html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,210px);}}
@media(prefers-reduced-motion:reduce) {
    html body.light-theme :is(.rp-player-dock,.rp-player-shade,.rp-player-center,.rp-preview-video,.external-play) {transition:none!important;}
    html body.light-theme .rp-player-loading {animation:none;}
}
@media(min-width:1700px) {html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,clamp(19rem,14vw,24rem));}}
@media(min-width:981px) and (max-width:1000px) {html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,238px);}}
@media(min-width:621px) and (max-width:700px) {html body.light-theme [data-reel-showcase="portfolio"] .reel-card {width:var(--rp-home-reel-width,210px);}}
html body.light-theme .rp-player-volume-range::-webkit-slider-thumb {border-radius:50%!important;}
html body.light-theme .rp-player-volume-range::-moz-range-thumb {border-radius:50%!important;}
/* A real pause/play control is essential when motion starts disabled by system settings. */
@media(max-height:560px) and (orientation:landscape) {html body.light-theme .rp-dialog-player {width:min(640px,calc(100vw - 56px));height:calc(100dvh - 142px);aspect-ratio:auto;}}
/* Very small two-column thumbnails still keep two 44px targets and a usable scrub bar. */
html body.light-theme .rp-player-tiny .rp-player-dock {padding-inline:0;}
html body.light-theme .rp-player-tiny .rp-player-row {gap:0;}
