/* Optional, quiet motion: no flashing or layout movement; the carousel manages media playback. */
.motion-picker { display:inline-flex;align-items:center;gap:7px;white-space:nowrap;color:var(--muted);font-size:12px;min-width:0; }
.motion-picker svg { width:15px;height:15px;flex:0 0 auto;color:var(--store-accent,var(--focus)); }
.motion-picker select { font:inherit;cursor:pointer;min-width:0;max-width:155px;line-height:1.4;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink); }
.motion-picker select:hover { border-color:var(--focus); }
.motion-picker select:focus-visible { outline:2px solid var(--focus);outline-offset:3px; }
.market-store .topbar .topbar-right { flex-wrap:wrap; }
.hero-carousel-pause:disabled { cursor:default;opacity:.55; }

:root[data-motion="on"] .market-store .showcase,
:root[data-motion="on"] .admin-login .login-view { animation:cufe-soft-enter .75s cubic-bezier(.2,.7,.25,1) both; }
:root[data-motion="on"] .market-store .service-strip { animation:cufe-soft-enter .8s .12s cubic-bezier(.2,.7,.25,1) both; }
:root[data-motion="on"] :is(.market-store,.admin-workspace) .reveal { animation:cufe-soft-enter .7s cubic-bezier(.2,.7,.25,1) both; }
:root[data-motion="on"] :is(.market-store,.admin-workspace) dialog[open] { animation:cufe-dialog-enter .32s cubic-bezier(.2,.7,.25,1) both; }
:root[data-motion="on"] .market-store .announcement:not([hidden]),
:root[data-motion="on"] .admin-workspace .management-panel:not([hidden]) { animation:cufe-soft-enter .45s cubic-bezier(.2,.7,.25,1) both; }
:root[data-motion="on"] :is(.market-store,.admin-workspace) .toast { transition:opacity .28s ease,transform .35s cubic-bezier(.2,.7,.25,1); }
:root[data-motion="on"] .market-store .service-strip>div,
:root[data-motion="on"] .admin-workspace .stats>div { transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease; }
@media (hover:hover) {
  :root[data-motion="on"] .market-store .service-strip>div:hover,
  :root[data-motion="on"] .admin-workspace .stats>div:hover { transform:translateY(-2px); }
}
@keyframes cufe-soft-enter { from { opacity:0;transform:translateY(9px); } to { opacity:1;transform:none; } }
@keyframes cufe-dialog-enter { from { opacity:0;transform:translateY(8px) scale(.992); } to { opacity:1;transform:none; } }

/* Blue-and-silver edge lights are four thin, clipped background tracks. They
   never cover a control, move a border, or require masks / registered properties.
   Only the first row of products is continuously animated to bound paint work. */
:root {
  --cufe-edge-blue:#347dd0;
  --cufe-edge-silver:#adcff4;
  --cufe-edge-track:140px;
  --cufe-edge-width:1.5px;
}
:root[data-theme="dark"] {
  --cufe-edge-blue:#5b9ee8;
  --cufe-edge-silver:#d0e7ff;
}
.market-store :is(#search,.filter-bar),
.admin-workspace .settings-card { position:relative; }
.market-store .campaign::before,
.market-store .product-card:nth-child(-n+4)::before,
.market-store :is(#search,.filter-bar,.announcement)::after,
.admin-login .login-card::after,
.admin-workspace .settings-card::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:4;
  pointer-events:none;
  border-radius:inherit;
  opacity:0;
  background-image:
    linear-gradient(90deg,transparent,var(--cufe-edge-blue) 32%,var(--cufe-edge-silver) 50%,var(--cufe-edge-blue) 68%,transparent),
    linear-gradient(180deg,transparent,var(--cufe-edge-blue) 32%,var(--cufe-edge-silver) 50%,var(--cufe-edge-blue) 68%,transparent),
    linear-gradient(270deg,transparent,var(--cufe-edge-blue) 32%,var(--cufe-edge-silver) 50%,var(--cufe-edge-blue) 68%,transparent),
    linear-gradient(0deg,transparent,var(--cufe-edge-blue) 32%,var(--cufe-edge-silver) 50%,var(--cufe-edge-blue) 68%,transparent);
  background-size:
    var(--cufe-edge-track) var(--cufe-edge-width),var(--cufe-edge-width) var(--cufe-edge-track),
    var(--cufe-edge-track) var(--cufe-edge-width),var(--cufe-edge-width) var(--cufe-edge-track);
  background-repeat:no-repeat;
}
:root[data-motion="on"] .market-store .campaign::before,
:root[data-motion="on"] .market-store .product-card:nth-child(-n+4)::before,
:root[data-motion="on"] .market-store :is(#search,.filter-bar,.announcement)::after,
:root[data-motion="on"] .admin-login .login-card::after,
:root[data-motion="on"] .admin-workspace .settings-card::after {
  opacity:.85;
  animation:cufe-border-lights 9s linear infinite;
}
:root[data-motion="on"] .market-store #search::after { animation-duration:7s;animation-delay:-3s; }
:root[data-motion="on"] .market-store .campaign::before { --cufe-edge-width:2px;animation-delay:-2s; }
:root[data-motion="on"] .market-store .filter-bar::after { animation-delay:-6s; }
:root[data-motion="on"] .market-store .product-card:nth-child(even)::before { animation-delay:-4.5s; }
:root[data-motion="on"] .admin-workspace .settings-card:nth-child(even)::after { animation-delay:-4.5s; }
@keyframes cufe-border-lights {
  from {
    background-position:
      calc(0px - var(--cufe-edge-track)) 0,
      100% calc(0px - var(--cufe-edge-track)),
      calc(100% + var(--cufe-edge-track)) 100%,
      0 calc(100% + var(--cufe-edge-track));
  }
  to {
    background-position:
      calc(100% + var(--cufe-edge-track)) 0,
      100% calc(100% + var(--cufe-edge-track)),
      calc(0px - var(--cufe-edge-track)) 100%,
      0 calc(0px - var(--cufe-edge-track));
  }
}

/* Disabling motion is immediate across existing and future components. Content
   stays visible; functional controls, stock clocks and video controls still work. */
:root[data-motion="off"],
:root[data-motion="off"] *,
:root[data-motion="off"] *::before,
:root[data-motion="off"] *::after { animation:none!important;transition:none!important;scroll-behavior:auto!important; }
:root[data-motion="off"] .market-store .product-card:hover,
:root[data-motion="off"] .market-store .product-card:hover .product-image img,
:root[data-motion="off"] .market-store .add-cart:hover,
:root[data-motion="off"] .header-main .brand-cufe:hover>img,
:root[data-motion="off"] .header-main .brand-cufe:hover .brand-energy,
:root[data-motion="off"] .header-main .brand-cufe:focus-visible .brand-energy { transform:none; }
@media (prefers-reduced-motion:reduce) {
  :root:not([data-motion="on"]),
  :root:not([data-motion="on"]) *,
  :root:not([data-motion="on"]) *::before,
  :root:not([data-motion="on"]) *::after { animation:none!important;transition:none!important;scroll-behavior:auto!important; }
}
@media (max-width:760px) {
  :root { --cufe-edge-track:85px; }
  :root[data-motion="on"] .market-store .product-card:nth-child(n+3)::before { display:none; }
  .motion-picker { font-size:11px;gap:5px; }
  .motion-picker select { font-size:11px;padding:5px 6px;max-width:125px; }
  .motion-picker .motion-label { display:none; }
  .market-store .topbar .topbar-right { justify-content:flex-start;gap:7px 10px; }
  .admin-login .login-appearance { position:relative;inset:auto;padding:16px 16px 0;justify-content:center;gap:8px; }
  .admin-login .login-view { min-height:calc(100dvh - 65px); }
  .admin-workspace .workspace-actions { gap:8px; }
}
@media (forced-colors:active) {
  .market-store .campaign::before,
  .market-store .product-card:nth-child(-n+4)::before,
  .market-store :is(#search,.filter-bar,.announcement)::after,
  .admin-login .login-card::after,
  .admin-workspace .settings-card::after { display:none; }
}
