/* =========================================================================
   MACSTAR - HCI layer. Loads last. Refines, never redesigns.

   1. Colour system: contrast-checked tokens (WCAG 2.2 AA)
   2. Focus, hover, active: one visual language for everything you can press
   3. Touch targets and forms
   4. Motion: calm by default, none for reduced-motion users
   5. Home gallery + clean lightbox
   6. Swipe navigation feedback
   ========================================================================= */

/* ---------------------------------------------------------- 1. colour ----
   Measured on the dark ground (#121110) and the card ground (#1A1714):
     text        16.5 : 1     primary reading copy
     text-dim     7.1 : 1     secondary copy
     text-mute    5.4 : 1     was 4.4 : 1 on cards - failed AA for small text
     rust-text    5.6 : 1     rust used AS TEXT; the fill rust stays for buttons
     field-line   3.2 : 1     input borders, was 1.2 : 1 - fields were invisible
     gold (focus) 7.6 : 1     one focus colour everywhere, distinct from rust
   Primary button: white on rust 5.1 : 1, hover 4.6 : 1, pressed 5.8 : 1. */
:root{
	--ms-text-mute:#968C81;
	--ms-rust-text:#D27A4C;
	--ms-rust-hover:#B2582F;
	--ms-rust-press:#9A4A28;
	--ms-field-line:#72675C;
	--ms-focus:#C6A560;
	--ms-tap:44px;
	--ms-ease:cubic-bezier(.2,.8,.2,1);
}
::selection{background:#5A2E19;color:#FFF6F1}

/* ------------------------------------------- 2. focus / hover / active --- */
html body :focus-visible{
	outline:2px solid var(--ms-focus)!important;
	outline-offset:3px!important;
	box-shadow:none;
}
html body input:focus-visible,
html body textarea:focus-visible,
html body select:focus-visible{outline-offset:1px!important}

/* buttons share one press language */
.ms-b,.button,button.button,a.button,.single_add_to_cart_button,#place_order,
.ms-slides-open,.ms-lb-btn{transition:background-color .18s var(--ms-ease),border-color .18s var(--ms-ease),
	color .18s var(--ms-ease),transform .12s var(--ms-ease),box-shadow .18s var(--ms-ease)}
.ms-b:active,.button:active,.single_add_to_cart_button:active,#place_order:active{transform:translateY(1px)}
.ms-b--primary:hover,.single_add_to_cart_button:hover,
.macstar-checkout #place_order:hover{background:var(--ms-rust-hover)!important;border-color:var(--ms-rust-hover)!important;color:#FFF6F1!important}
.ms-b--primary:active,.single_add_to_cart_button:active,
.macstar-checkout #place_order:active{background:var(--ms-rust-press)!important;border-color:var(--ms-rust-press)!important}
.ms-b--ghost:hover{border-color:var(--ms-text-dim);background:rgba(244,239,231,.04)}
.ms-b[disabled],.button[disabled],button:disabled{opacity:.5;cursor:not-allowed;transform:none}

/* links inside running copy read as links */
.entry-content p a:not(.ms-b):not(.button),.ms-lede a,.ms-prose a{
	color:var(--ms-rust-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.entry-content p a:not(.ms-b):not(.button):hover,.ms-lede a:hover{text-decoration-thickness:2px}

/* cards: one hover language - a lifted edge, never a jump */
.ms-pcard,.ms-catcard{transition:border-color .2s var(--ms-ease),box-shadow .25s var(--ms-ease),transform .25s var(--ms-ease)}
@media (hover:hover){
	.ms-pcard:hover,.ms-catcard:hover{border-color:var(--ms-line-strong);box-shadow:var(--ms-shadow-md);transform:translateY(-2px)}
}

/* ------------------------------------------- 3. touch targets + forms --- */
.ms-b{min-height:var(--ms-tap)}
.single_add_to_cart_button,.ms-sp-summary .ms-b--primary,.macstar-single .ms-b--primary{min-height:48px}
@media (pointer:coarse){
	/* header icons, filter chips, tabs and footer links reach 44 px */
	#xpro-theme-builder-header a[aria-label],#xpro-theme-builder-header button,
	.xpro-theme-builder-header a[aria-label],.xpro-theme-builder-header button{
		min-width:var(--ms-tap);min-height:var(--ms-tap);display:inline-flex;align-items:center;justify-content:center}
	.ms-chip,.ms-rail a,.ms-sort,.ms-sp-tab,.ms-pcard .ms-b,.ms-pcard-wa{min-height:var(--ms-tap)}
	.ms-sp-tab{display:inline-flex;align-items:center;padding-bottom:10px}
	#xpro-theme-builder-footer .ms-flink a,#xpro-theme-builder-footer .ms-flink{display:block;padding-block:9px}
	.ms-breadcrumb a,.woocommerce-breadcrumb a{display:inline-block;padding-block:12px}
}

/* fields you can actually see, and that answer when you use them */
.wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.wpforms-container textarea,.wpforms-container select,
.macstar-checkout .ms-co-grid input,.macstar-checkout .ms-co-grid textarea,.macstar-checkout .ms-co-grid select,
.ms-modal input,.ms-modal textarea,.ms-modal select,
.ms-field input,.ms-field textarea,.ms-field select,
.woocommerce form .input-text,.search-form .search-field,.ms-search input{
	border-color:var(--ms-field-line)!important}
.wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]):hover,
.wpforms-container textarea:hover,.macstar-checkout .ms-co-grid input:hover,.macstar-checkout .ms-co-grid textarea:hover{
	border-color:var(--ms-text-mute)!important}
.wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]):focus,
.wpforms-container textarea:focus,.wpforms-container select:focus,
.macstar-checkout .ms-co-grid input:focus,.macstar-checkout .ms-co-grid textarea:focus,.macstar-checkout .ms-co-grid select:focus,
.ms-modal input:focus,.ms-modal textarea:focus,.ms-field input:focus,.ms-field textarea:focus{
	border-color:var(--ms-rust-text)!important;box-shadow:0 0 0 3px rgba(210,122,76,.22)!important}
.wpforms-container .ms-sel-open{border-color:var(--ms-field-line)!important}
.wpforms-container .ms-sel-open:hover{border-color:var(--ms-text-mute)!important}
.wpforms-container input::placeholder,.wpforms-container textarea::placeholder{color:var(--ms-text-mute)!important;opacity:1}
/* errors are named in words and colour, never colour alone */
.wpforms-container .wpforms-error,.wpforms-container label.wpforms-error,
.woocommerce-invalid .description,.ms-field-error{color:#F09A92!important;font-size:13px;font-weight:600}
.wpforms-container input.wpforms-error,.wpforms-container textarea.wpforms-error,
.woocommerce-invalid input{border-color:#E07A7A!important}
.wpforms-confirmation-container-full,.wpforms-confirmation-container{
	background:rgba(87,179,132,.10)!important;border:1px solid rgba(87,179,132,.45)!important;
	color:var(--ms-text)!important;border-radius:var(--ms-radius)}

/* the anchor lands below the header, not under it */
[id]{scroll-margin-top:96px}

/* ----------------------------------------------------------- 4. motion --- */
@media (prefers-reduced-motion:reduce){
	*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;
		transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* ------------------------------------------- 5. home gallery + lightbox --- */
.ms-gallery{padding-block:clamp(48px,6vw,96px)}
.ms-gallery-empty{padding:28px;border:1px dashed var(--ms-line-strong);border-radius:var(--ms-radius);color:var(--ms-text-dim)}
.ms-gallery-empty a{color:var(--ms-rust-text)}
.ms-slides{position:relative;margin-top:clamp(20px,3vw,36px);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;
	background:radial-gradient(120% 90% at 50% 30%,#221D19 0%,#141210 55%,#0B0A09 100%);
	border:1px solid var(--ms-line);outline-offset:4px;touch-action:pan-y}
.ms-slides-stage{position:relative;height:min(78vh,760px);min-height:320px}
.ms-slide{position:absolute;inset:0;margin:0;display:grid;place-items:center;
	padding:clamp(28px,5vw,72px) clamp(56px,8vw,120px) clamp(76px,8vw,104px);
	opacity:0;visibility:hidden;transform:scale(1.025);
	transition:opacity .7s var(--ms-ease),transform 1.1s var(--ms-ease),visibility 0s linear .7s;cursor:zoom-in}
.ms-slide.is-on{opacity:1;visibility:visible;transform:none;transition:opacity .7s var(--ms-ease),transform 1.1s var(--ms-ease),visibility 0s}
.ms-slide img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;
	filter:drop-shadow(0 30px 40px rgba(0,0,0,.55));user-select:none;-webkit-user-drag:none}
.ms-slides-nav{all:unset;box-sizing:border-box;position:absolute;top:calc(50% - 30px);width:52px;height:52px;border-radius:50%;
	display:grid;place-items:center;cursor:pointer;color:var(--ms-text);
	background:rgba(18,17,16,.62);border:1px solid rgba(244,239,231,.16);backdrop-filter:blur(6px);
	transition:background-color .18s,border-color .18s,transform .12s}
.ms-slides-nav:hover{background:rgba(18,17,16,.9);border-color:rgba(244,239,231,.36)}
.ms-slides-nav:active{transform:scale(.96)}
.ms-slides-prev{left:clamp(10px,2vw,24px)}
.ms-slides-next{right:clamp(10px,2vw,24px)}
.ms-slides-bar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:12px;
	padding:14px clamp(14px,2.4vw,28px) 18px;
	background:linear-gradient(to top,rgba(11,10,9,.86),rgba(11,10,9,0))}
.ms-slides-ctl{all:unset;box-sizing:border-box;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
	color:var(--ms-text);cursor:pointer;border:1px solid rgba(244,239,231,.16);background:rgba(18,17,16,.5)}
.ms-slides-ctl:hover{border-color:rgba(244,239,231,.4)}
.ms-slides-dots{display:flex;gap:2px;flex-wrap:wrap}
.ms-slides-dot{all:unset;box-sizing:border-box;width:32px;height:44px;display:grid;place-items:center;cursor:pointer}
.ms-slides-dot span{display:block;width:18px;height:3px;border-radius:2px;background:rgba(244,239,231,.3);transition:background-color .2s,width .25s var(--ms-ease)}
.ms-slides-dot:hover span{background:rgba(244,239,231,.6)}
.ms-slides-dot.is-on span{background:var(--ms-rust-text);width:26px}
.ms-slides-open{all:unset;box-sizing:border-box;margin-left:auto;display:inline-flex;align-items:center;gap:8px;
	min-height:44px;padding:0 16px;border-radius:999px;cursor:pointer;
	font-family:var(--ms-body);font-size:14px;font-weight:700;color:#121110;background:var(--ms-text);border:1px solid var(--ms-text)}
.ms-slides-open:hover{background:#FFFFFF}
.ms-slides-admin{flex:none;color:var(--ms-gold)}
.ms-slides-progress{position:absolute;left:0;right:0;bottom:0;height:2px;background:rgba(244,239,231,.08)}
.ms-slides-progress span{display:block;height:100%;background:var(--ms-rust-text);transform-origin:left;transform:scaleX(0)}
.ms-slides.is-paused .ms-slides-progress span{opacity:.35}
@media (max-width:640px){
	.ms-slides-stage{height:min(62vh,520px)}
	.ms-slide{padding:24px 16px 84px}
	.ms-slides-nav{width:44px;height:44px;top:auto;bottom:72px}
	.ms-slides-prev{left:12px}.ms-slides-next{right:12px}
	.ms-slides-open span{display:none}
	.ms-slides-open{padding:0;width:44px;justify-content:center;border-radius:50%}
	.ms-slides-dot{width:26px}
}

/* the clean preview: the image and its controls, nothing else */
html.ms-lb-open,html.ms-lb-open body{overflow:hidden!important}
.ms-lb{position:fixed;inset:0;z-index:2147483000;background:#050505;display:none;
	color:#F4EFE7;font-family:var(--ms-body);touch-action:none}
.ms-lb.is-open{display:block;animation:ms-lb-in .22s var(--ms-ease)}
@keyframes ms-lb-in{from{opacity:0}to{opacity:1}}
.ms-lb-stage{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;cursor:zoom-in;
	padding:clamp(56px,7vh,84px) clamp(12px,6vw,96px)}
.ms-lb.is-zoomed .ms-lb-stage{cursor:grab}
.ms-lb-stage.is-grab{cursor:grabbing}
.ms-lb-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;
	transform-origin:center;transition:transform .32s var(--ms-ease),opacity .3s;opacity:0;user-select:none;-webkit-user-drag:none}
.ms-lb-img.is-in{opacity:1}
.ms-lb-top{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;
	padding:max(10px,env(safe-area-inset-top)) clamp(10px,2vw,20px) 10px;
	background:linear-gradient(to bottom,rgba(5,5,5,.8),rgba(5,5,5,0))}
.ms-lb-count{font-family:var(--ms-mono);font-size:13px;letter-spacing:.08em;color:#BDB3A7}
.ms-lb-tools{display:flex;gap:8px}
.ms-lb-btn{all:unset;box-sizing:border-box;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;cursor:pointer;
	color:#F4EFE7;background:rgba(40,36,32,.72);border:1px solid rgba(244,239,231,.18)}
.ms-lb-btn:hover{background:rgba(60,54,48,.9);border-color:rgba(244,239,231,.4)}
.ms-lb-btn[hidden]{display:none}
.ms-lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:54px;height:54px}
.ms-lb-prev{left:clamp(8px,2vw,24px)}
.ms-lb-next{right:clamp(8px,2vw,24px)}
.ms-lb.is-zoomed .ms-lb-nav{opacity:0;pointer-events:none}
@media (max-width:640px){
	.ms-lb-nav{top:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:none}
}

/* --------------------------------------------------- 6. swipe feedback --- */
html.ms-swiping,html.ms-swiping body{user-select:none;-webkit-user-select:none}
#content{will-change:auto}
html.ms-swiping #content{will-change:transform}
.ms-swipe-hint{position:fixed;top:50%;z-index:9990;transform:translateY(-50%);pointer-events:none;
	padding:10px 16px;border-radius:999px;font-family:var(--ms-body);font-size:14px;font-weight:700;
	color:var(--ms-text);background:rgba(26,23,20,.92);border:1px solid var(--ms-line-strong);
	box-shadow:var(--ms-shadow-md);opacity:0;transition:opacity .12s linear,background-color .15s,border-color .15s}
.ms-swipe-hint.is-left{left:14px}
.ms-swipe-hint.is-right{right:14px}
.ms-swipe-hint.is-ready{background:var(--ms-rust);border-color:var(--ms-rust);color:#FFF6F1}
html.ms-in-right #content{animation:ms-in-from-left .34s var(--ms-ease) backwards}
html.ms-in-left #content{animation:ms-in-from-right .34s var(--ms-ease) backwards}
@keyframes ms-in-from-left{from{opacity:0;transform:translate3d(-40px,0,0)}}
@keyframes ms-in-from-right{from{opacity:0;transform:translate3d(40px,0,0)}}


/* rust used AS TEXT: 5.6 : 1 instead of 3.3 : 1. Fills keep the brand rust. */
:root{--ms-accent-text:#D27A4C}
html body a:hover,
html body a:focus,
html .ms-eyebrow,
html .ms-eyebrow .xpro-heading-title,
html .woocommerce ul.products li.product .price ins,
html .ms-pill:hover,
html .ms-sort.is-active,
html .ms-b--ghost:hover,
html .ms-catgo,
html .ms-brandcard:hover .ms-bc,
html .ms-pcard h3 a:hover,
html .macstar-checkout .woocommerce-breadcrumb a:hover,
html .ms-co-eyebrow,
html .macstar-checkout .ms-co-grid label .required{color:var(--ms-rust-text)}


/* 404: the store's own page, not the theme's white box */
.error404 .error-404,.error404 section.error-404,.error404 .ast-404-layout-1{background:transparent!important;padding:0!important;border:0!important;box-shadow:none!important}
.ms-404{max-width:760px;margin:clamp(40px,7vw,96px) auto clamp(56px,8vw,120px);padding:clamp(24px,4vw,48px);background:var(--ms-bg-raised);border:1px solid var(--ms-line);border-radius:var(--ms-radius);display:grid;gap:18px;text-align:left}
.ms-404 h1{margin:0;font-family:var(--ms-display);font-size:clamp(32px,5vw,56px);font-weight:800;letter-spacing:-.02em;line-height:1.05;color:var(--ms-text)}
.ms-404 .ms-lede{margin:0;color:var(--ms-text-dim);max-width:52ch}
.ms-404-cats{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.ms-404-search{display:grid;gap:8px;margin-top:8px}
.ms-404-search label{font-family:var(--ms-mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ms-text-mute)}
.ms-404-row{display:flex;gap:10px;flex-wrap:wrap}
.ms-404-row input[type=search]{flex:1 1 240px;min-height:44px;padding:10px 14px;background:var(--ms-bg);color:var(--ms-text);border:1px solid var(--ms-field-line);border-radius:var(--ms-radius);font:inherit}
.ms-404-row input[type=search]:focus{border-color:var(--ms-rust-text);box-shadow:0 0 0 3px rgba(210,122,76,.22);outline:none}
.ms-404-foot{margin:4px 0 0;color:var(--ms-text-mute);font-size:14px}
.ms-404-foot a{color:var(--ms-rust-text);text-decoration:underline;text-underline-offset:3px}

/* touch sizes for the real class names used by the shop filters and cards */
@media (pointer:coarse){
	.ms-pill,.ms-apply,.ms-sort{min-height:var(--ms-tap)}
	.ms-pill{display:inline-flex;align-items:center}
	.ms-pcard-actions .ms-iconsq{min-width:var(--ms-tap)}
	.ms-pcard-actions .ms-b{min-height:var(--ms-tap)}
}

/* uploaded product photos sit inside the card frame whole, never cropped or stretched */
.ms-tile > img{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain;padding:6% 8%;box-sizing:border-box}

/* the theme's scroll-to-top button sat on top of the WhatsApp button */
#ast-scroll-top{right:14px!important;bottom:calc(14px + 51px + 12px)!important;width:44px!important;height:44px!important;display:none;align-items:center;justify-content:center;border-radius:50%!important;background:var(--ms-bg-raised)!important;color:var(--ms-text)!important;border:1px solid var(--ms-line-strong)!important;box-shadow:var(--ms-shadow-md)}
#ast-scroll-top[style*='block']{display:flex!important}
#ast-scroll-top:hover{border-color:var(--ms-text-dim)!important}
@media (min-width:769px){#ast-scroll-top{right:76px!important;bottom:calc(18px + 47px + 12px)!important}}

@media (max-width:640px){.ms-slides-stage{height:min(58vh,460px)}}

/* the earlier dark pass pinned field borders to the near-invisible line colour with
   higher specificity; these win it back so every field edge reads at 3.2 : 1 */
html body.macstar-checkout .ms-co-grid input:not([type=checkbox]):not([type=radio]),
html body.macstar-checkout .ms-co-grid textarea:not([disabled]),
html body.macstar-checkout .ms-co-grid select:not([disabled]),
html body .wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]),
html body .wpforms-container textarea:not([disabled]),
html body .wpforms-container select:not([disabled]),
html body .ms-modal input:not([type=checkbox]):not([type=radio]),
html body .ms-modal textarea:not([disabled]),
html body .ms-modal select:not([disabled]),
html body .ms-field input:not([type=checkbox]):not([type=radio]),
html body .ms-field textarea:not([disabled]){border-color:var(--ms-field-line)!important}
html body.macstar-checkout .ms-co-grid input:not([type=checkbox]):not([type=radio]):hover,
html body.macstar-checkout .ms-co-grid textarea:not([disabled]):hover,
html body.macstar-checkout .ms-co-grid select:not([disabled]):hover,
html body .wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]):hover,
html body .wpforms-container textarea:not([disabled]):hover,
html body .wpforms-container select:not([disabled]):hover,
html body .ms-modal input:not([type=checkbox]):not([type=radio]):hover,
html body .ms-modal textarea:not([disabled]):hover,
html body .ms-modal select:not([disabled]):hover,
html body .ms-field input:not([type=checkbox]):not([type=radio]):hover,
html body .ms-field textarea:not([disabled]):hover{border-color:var(--ms-text-mute)!important}
html body.macstar-checkout .ms-co-grid input:not([type=checkbox]):not([type=radio]):focus,
html body.macstar-checkout .ms-co-grid textarea:not([disabled]):focus,
html body.macstar-checkout .ms-co-grid select:not([disabled]):focus,
html body .wpforms-container input:not([type=checkbox]):not([type=radio]):not([type=submit]):focus,
html body .wpforms-container textarea:not([disabled]):focus,
html body .wpforms-container select:not([disabled]):focus,
html body .ms-modal input:not([type=checkbox]):not([type=radio]):focus,
html body .ms-modal textarea:not([disabled]):focus,
html body .ms-modal select:not([disabled]):focus,
html body .ms-field input:not([type=checkbox]):not([type=radio]):focus,
html body .ms-field textarea:not([disabled]):focus{border-color:var(--ms-rust-text)!important;box-shadow:0 0 0 3px rgba(210,122,76,.22)!important;outline:none!important}

html body .wpforms-container .wpforms-submit{min-height:var(--ms-tap)}

/* --- mixed-media showcase: video slides + cinematic full-screen preview ----
   The preview shows the current image or clip and nothing else. Esc or the
   system back gesture ends it; there is deliberately no visible control. */
.ms-slide video.ms-slide-media{width:100%;height:100%;object-fit:contain;display:block;background:transparent}
.ms-slide[data-type="video"]{padding:0;cursor:zoom-in}
.ms-slide.ms-fit-cover{padding:0}
.ms-slide.ms-fit-cover img.ms-slide-media,.ms-slide.ms-fit-cover video.ms-slide-media{
	width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;filter:none}
.ms-slides-dot.is-video span{height:5px;border-radius:3px}
.ms-slides video::-webkit-media-controls,.ms-lb video::-webkit-media-controls{display:none!important}
.ms-slides video::-webkit-media-controls-start-playback-button,
.ms-lb video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}
.ms-slides video::-webkit-media-controls-overlay-play-button,
.ms-lb video::-webkit-media-controls-overlay-play-button{display:none!important}

.ms-lb{background:#000!important;cursor:default}
.ms-lb:focus,.ms-lb:focus-visible{outline:none!important}
.ms-lb .ms-lb-stage{position:absolute;inset:0;padding:0!important;display:block;overflow:hidden;cursor:default}
.ms-lb.is-idle,.ms-lb.is-idle .ms-lb-stage{cursor:none}
.ms-lb.is-zoomed .ms-lb-stage{cursor:grab}
.ms-lb .ms-lb-stage.is-grab{cursor:grabbing}
.ms-lb-layer{position:absolute;inset:0;display:grid;place-items:center;opacity:0;transition:opacity .7s var(--ms-ease)}
.ms-lb-layer.is-current{opacity:1}
.ms-lb-layer img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block;
	user-select:none;-webkit-user-drag:none;transform-origin:center;transition:transform .32s var(--ms-ease)}
.ms-lb-layer video{width:100%;height:100%;object-fit:contain;display:block;background:#000}
.ms-lb-layer.ms-fit-cover img,.ms-lb-layer.ms-fit-cover video{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
.ms-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
	overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.ms-lb .ms-sr:focus,.ms-lb .ms-sr:focus-visible{outline:none!important}
@media (prefers-reduced-motion:reduce){.ms-lb-layer{transition:none}}

/* flex, not grid: a percentage max-height only holds against a definite box,
   so tall (portrait) media now fit inside the frame instead of overflowing it */
.ms-slide{display:flex!important;align-items:center;justify-content:center}
.ms-slide img.ms-slide-media{max-width:100%;max-height:100%;width:auto;height:auto}
.ms-lb-layer{display:flex;align-items:center;justify-content:center}
.ms-lb-layer img{max-width:100vw;max-height:100vh;max-height:100dvh}
.ms-lb-layer video{position:absolute;inset:0;width:100%;height:100%}

/* in the preview every image is scaled to the whole screen, never cropped */
.ms-lb-layer img{width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;object-fit:contain}

/* ms-dots-fit */
/* many slides: the dot row shrinks to fit one line instead of wrapping over the arrows */
.ms-slides-ctl,.ms-slides-open{flex:0 0 auto}
.ms-slides-dots{flex:1 1 auto;min-width:0;flex-wrap:nowrap;gap:0}
.ms-slides-dot{flex:0 1 32px;min-width:0}
.ms-slides-dot span{width:min(18px,70%)}
.ms-slides-dot.is-on span{width:min(26px,100%)}
