/* PRIME // targeted visual + device-budget finishing pass, 2026-10-23.
   Non-destructive: viewport, scroll, 3D axes, native gallery interactions,
   gallery rail, payment dialogs, and skin materials remain with their owners. */
html[data-prime-canon="prime-creation"] body.prime-v2{
  --prime-finish-line:rgba(154,230,250,.42);
  --prime-finish-focus:#a0f0ff;
}
/* Page 02: intrinsic content rather than an empty artificial viewport floor.
   Keep description and storefront as independently bordered sibling panels. */
html[data-prime-viewport-authority] body.prime-v2
#main[data-app-shell]>#intro.is-prime-viewport-active:not([hidden])>.tab01-services{
  min-height:0!important;
}
html[data-prime-viewport-authority] body.prime-v2
#intro.is-prime-viewport-active>.tab01-continuity{
  margin-block:clamp(.4rem,1svh,.7rem)!important;
  padding-block:clamp(.42rem,.9svh,.64rem)!important;
  gap:clamp(.28rem,.65vw,.48rem)!important;
}
/* Page 04: artwork fills the existing canvas. Never create another toolbar,
   move the nav rail, touch the stage transforms, or crop image pixels. */
@media (min-width:761px) and (pointer:fine){
  html[data-prime-viewport-authority] body.prime-v2 #main[data-app-shell]
  #portfolio .page04-work[data-active="true"]{
    max-width:min(90vw,88rem)!important;
    max-height:calc(100svh - var(--prime-page-bottom-clearance,5rem) - 2.5rem)!important;
  }
  html[data-prime-viewport-authority] body.prime-v2 #main[data-app-shell]
  #portfolio .page04-work[data-active="true"] .page04-work-bezel{
    max-width:min(88vw,86rem)!important;
    max-height:calc(100svh - var(--prime-page-bottom-clearance,5rem) - 3rem)!important;
  }
  html[data-prime-viewport-authority] body.prime-v2 #main[data-app-shell]
  #portfolio .page04-work[data-active="true"] .page04-work-bezel>:is(img,video){
    max-width:min(87vw,85rem)!important;
    max-height:calc(100svh - var(--prime-page-bottom-clearance,5rem) - 3.5rem)!important;
    object-fit:contain!important;
  }
}
/* Avoid a giant non-content floor in Page 08's flat process sheet. */
html:not([data-prime-spatial-enabled="true"])[data-prime-viewport-authority] body.prime-v2
#main[data-app-shell]>#process.is-prime-viewport-active:not([hidden]) ol{
  min-height:0!important;
}
/* Price labels, links and input text use authored color/material but clear focus. */
html[data-prime-canon="prime-creation"] body.prime-v2
#main[data-app-shell]>.app-window.is-prime-viewport-active
:is(.prime-price-tab,.button,.prime-storefront-trigger,button,a[href],select):focus-visible{
  outline:2px solid var(--prime-finish-focus)!important;
  outline-offset:2px!important;
}
html[data-prime-canon="prime-creation"] body.prime-v2
#main[data-app-shell]>.app-window.is-prime-viewport-active
:is(img,video){image-rendering:auto}
/* The nine continuously animated Page 02 service sweeps need not repaint
   each mobile frame. Reveal states and user-triggered transitions stay intact. */
@media (hover:none) and (pointer:coarse){
  html[data-prime-viewport-authority] body.prime-v2 #intro
  .service-grid>.service-card:not([data-discipline-stage="reveal"])::before,
  html[data-prime-viewport-authority] body.prime-v2 #intro
  .service-grid>.service-card:not([data-discipline-stage="reveal"]) .service-orb::before{
    animation:none!important;
  }
}
/* Suppress ornament movement when a tab is backgrounded, without parking
   player transport, ambient audio, swipe animation, or Spatial pose. */
html[data-prime-finish-visibility="hidden"] body.prime-v2
:is(.tab01-atmosphere,.service-orb,.page04-atmosphere,.page04-orbit-ring,.ambient)::before,
html[data-prime-finish-visibility="hidden"] body.prime-v2
:is(.tab01-atmosphere,.service-orb,.page04-atmosphere,.page04-orbit-ring,.ambient)::after{
  animation-play-state:paused!important;
}
@media(prefers-reduced-motion:reduce){
  html[data-prime-viewport-authority] body.prime-v2 #intro
  .service-grid>.service-card::before,
  html[data-prime-viewport-authority] body.prime-v2 #intro .service-orb{
    animation:none!important;
  }
}
@media(forced-colors:active){
  html[data-prime-canon="prime-creation"] body.prime-v2
  #main[data-app-shell]>.app-window.is-prime-viewport-active :focus-visible{
    outline-color:Highlight!important;
  }
}
