/* r94 interaction polish: tactile without changing the established Court. */

/* Shared control motion: every actionable button receives the same restrained
   lift and press response. Independent translate/scale properties preserve
   screen-specific transforms and keep the work on the compositor. */
:where(button,[role="button"]):not(:disabled):not([aria-disabled="true"]){
  transition-property:color,border-color,background-color,box-shadow,filter,opacity,translate,scale;
  transition-duration:.14s;
  transition-timing-function:cubic-bezier(.2,.72,.2,1);
}
@media (hover:hover) and (pointer:fine){
  :where(button,[role="button"]):not(:disabled):not([aria-disabled="true"]):hover{translate:0 -1px}
}
:where(button,[role="button"]):not(:disabled):not([aria-disabled="true"]):active{translate:0 1px;scale:.985}
:where(button,[role="button"]).interaction-confirm{animation:stq-control-confirm .16s cubic-bezier(.2,.72,.2,1)}
@keyframes stq-control-confirm{0%{scale:1}45%{scale:.975}100%{scale:1}}

/* Cards use one consistent physical response. Pointer tilt values are supplied by
   final-ux-r92.js and remain zero for keyboard/touch/reduced-motion input. */
#solo-selection-board .selection-hand,
#tutorial-production-board .selection-hand,
.hand{perspective:900px}

#solo-selection-board .card,
#tutorial-production-board .selection-hand .card,
.hand .card{
  --card-tilt-x:0deg;
  --card-tilt-y:0deg;
  --card-hover-lift:0px;
  --card-hover-scale:1;
  will-change:transform;
  backface-visibility:hidden;
  transform-style:preserve-3d;
  transition:transform .18s cubic-bezier(.2,.72,.2,1),box-shadow .18s ease,filter .18s ease!important;
}

#solo-selection-board .card,
#tutorial-production-board .selection-hand .card{
  transform:perspective(760px) translateY(var(--card-hover-lift)) rotateX(var(--card-tilt-y)) rotateY(var(--card-tilt-x)) scale(var(--card-hover-scale))!important;
}
#solo-selection-board .card:is(:hover,:focus-visible),
#tutorial-production-board .selection-hand .card:is(:hover,:focus-visible){
  --card-hover-lift:calc(var(--u)*-6);
  --card-hover-scale:1.018;
  z-index:12!important;
  filter:brightness(1.045) saturate(1.035)!important;
  box-shadow:inset 0 0 0 1px #fff2c9aa,0 11px 20px #000b,0 0 0 2px #b565cd99,0 0 16px #a940c866!important;
}
#solo-selection-board .card.selected-in-hand,
#tutorial-production-board .selection-hand .card.selected-in-hand{
  --card-hover-lift:calc(var(--u)*-10);
  --card-hover-scale:1.022;
}
#solo-selection-board .card.selected-in-hand:is(:hover,:focus-visible),
#tutorial-production-board .selection-hand .card.selected-in-hand:is(:hover,:focus-visible){--card-hover-lift:calc(var(--u)*-12)}
#solo-selection-board .card.discard-selected{--card-hover-lift:calc(var(--u)*-8);--card-hover-scale:1.01}

.hand .card{
  transform:perspective(760px) translateY(var(--fan-y,0px)) rotate(var(--fan-rot,0deg)) rotateX(var(--card-tilt-y)) rotateY(var(--card-tilt-x)) scale(var(--card-hover-scale))!important;
}
.hand .card:is(:hover,:focus-visible),
body[data-input-mode="gamepad"] .hand .card:focus{
  --card-hover-scale:1.055;
  transform:perspective(760px) translateY(-18px) rotate(0deg) rotateX(var(--card-tilt-y)) rotateY(var(--card-tilt-x)) scale(var(--card-hover-scale))!important;
  z-index:55!important;
  filter:brightness(1.045) saturate(1.04)!important;
  box-shadow:inset 0 0 0 1px #fff2c9aa,0 14px 24px #000c,0 0 0 2px #a858c5aa,0 0 18px #a740c86b!important;
}
.hand .card:active,#solo-selection-board .card:active{scale:.985}

/* The Watermelon card-stack pattern is adapted here as a short, staged reward
   reveal: shared origin, restrained spring settle, and readable sequencing. */
.campaign-result-unlocks:not(.hidden){overflow:hidden}
.campaign-result-unlocks:not(.hidden)>header{animation:reward-header-in .34s ease-out both}
.campaign-result-unlocks .reward-reveal-item{
  transform-origin:20% 100%;
  animation:reward-card-reveal .52s cubic-bezier(.2,.82,.24,1) both;
  animation-delay:calc(90ms + var(--reward-index,0)*90ms);
}
.campaign-result-unlocks .reward-reveal-item>i{position:relative;overflow:hidden}
.campaign-result-unlocks .reward-reveal-item>i::after{
  content:"";position:absolute;inset:-35%;
  background:linear-gradient(110deg,transparent 35%,#fff2bd99 48%,transparent 61%);
  transform:translateX(-130%);
  animation:reward-sheen .72s ease-out calc(240ms + var(--reward-index,0)*90ms) both;
}
@keyframes reward-header-in{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
@keyframes reward-card-reveal{0%{opacity:0;translate:0 14px;scale:.96;rotate:-1.2deg}68%{opacity:1;translate:0 -2px;scale:1.012;rotate:.25deg}100%{opacity:1;translate:0 0;scale:1;rotate:0}}
@keyframes reward-sheen{0%{transform:translateX(-130%)}100%{transform:translateX(130%)}}

/* Waiting and seating retain their existing triggers while landing with less
   bounce and a clearer material glow. */
.waiting-arrival{animation:tactile-waiting-arrival .64s cubic-bezier(.2,.78,.2,1) both!important}
.queen-seat.seat-arrival,.queen-seat.final-seat-arrival{animation:tactile-throne-seat .82s cubic-bezier(.18,.82,.22,1) both!important}
.queen-seat.seat-arrival::after,.queen-seat.final-seat-arrival::after{animation-duration:.82s!important}
@keyframes tactile-waiting-arrival{0%{opacity:0;translate:0 -13px;scale:.9;filter:brightness(1.45)}65%{opacity:1;translate:0 1px;scale:1.025;filter:brightness(1.18)}100%{translate:0 0;scale:1;filter:none}}
@keyframes tactile-throne-seat{0%{filter:brightness(.7);scale:.965}52%{filter:brightness(1.5) saturate(1.14);scale:1.022;box-shadow:0 0 22px #ebbe5369}100%{filter:none;scale:1}}

/* Menus gain the same compact physical feedback as the cards. */
.v0732-nav-row{overflow:hidden;transition:transform .18s cubic-bezier(.2,.72,.2,1),border-color .16s ease,background .16s ease,box-shadow .16s ease!important}
.v0732-nav-row::before{content:"";position:absolute;left:0;top:10%;bottom:10%;width:2px;background:linear-gradient(transparent,#efd27d,transparent);opacity:0;transform:scaleY(.45);transition:opacity .16s ease,transform .2s ease;pointer-events:none}
.v0732-nav-row:is(:hover,:focus-visible,[aria-expanded="true"])::before{opacity:1;transform:scaleY(1)}
.v0732-nav-row:is(:hover,:focus-visible,[aria-expanded="true"]) .v0732-arrow{transform:translateX(2px);color:#f3d681}
.v0732-arrow{transition:transform .18s ease,color .18s ease}
.match-menu-actions button,.campaign-result-actions button,.victory-actions button{transition:translate .16s ease,filter .16s ease,box-shadow .16s ease!important}
.match-menu-actions button:hover:not(:disabled),.campaign-result-actions button:hover:not(:disabled),.victory-actions button:hover:not(:disabled){translate:0 -1px;filter:brightness(1.12)}
.match-menu-actions button:active:not(:disabled),.campaign-result-actions button:active:not(:disabled),.victory-actions button:active:not(:disabled){translate:0 1px}

@media (prefers-reduced-motion:reduce){
  :where(button,[role="button"]):not(:disabled):not([aria-disabled="true"]){translate:none!important;scale:1!important}
  :where(button,[role="button"]).interaction-confirm{animation:none!important}
  #solo-selection-board .card,#tutorial-production-board .selection-hand .card,.hand .card{--card-tilt-x:0deg!important;--card-tilt-y:0deg!important;transition:none!important}
  .campaign-result-unlocks:not(.hidden)>header,.campaign-result-unlocks .reward-reveal-item,.campaign-result-unlocks .reward-reveal-item>i::after,.waiting-arrival,.queen-seat.seat-arrival,.queen-seat.final-seat-arrival{animation:none!important}
  .match-menu-actions button,.campaign-result-actions button,.victory-actions button,.v0732-nav-row,.v0732-arrow{transition:none!important}
}
body.reduce-motion :where(button,[role="button"]):not(:disabled):not([aria-disabled="true"]){translate:none!important;scale:1!important}
body.reduce-motion :where(button,[role="button"]).interaction-confirm{animation:none!important}
body.reduce-motion #solo-selection-board .card,body.reduce-motion #tutorial-production-board .selection-hand .card,body.reduce-motion .hand .card{--card-tilt-x:0deg!important;--card-tilt-y:0deg!important;transition:none!important}
body.reduce-motion .campaign-result-unlocks:not(.hidden)>header,body.reduce-motion .campaign-result-unlocks .reward-reveal-item,body.reduce-motion .campaign-result-unlocks .reward-reveal-item>i::after,body.reduce-motion .waiting-arrival,body.reduce-motion .queen-seat.seat-arrival,body.reduce-motion .queen-seat.final-seat-arrival{animation:none!important}

@media (hover:none),(pointer:coarse){
  #solo-selection-board .card,#tutorial-production-board .selection-hand .card,.hand .card{--card-tilt-x:0deg!important;--card-tilt-y:0deg!important}
}
