/* One compact emblem in the header, Ask, scanner and progress surfaces.
   Mode classes may size the SVG, but never change its card arrangement. */
.stashy-logo.brand-breathing { overflow:visible; transform-origin:center; }
.stashy-logo.brand-breathing .brand-card { animation:none; transform-origin:64px 96px; transform-box:view-box; transform:translate(var(--tx),0) rotate(var(--r)); }
.stashy-logo.brand-breathing .brand-left { --tx:-3px; --r:-14deg; }
.stashy-logo.brand-breathing .brand-right { --tx:3px; --r:14deg; }
.stashy-logo.brand-breathing .brand-center { --tx:0px; --r:0deg; }
/* The assistant has an aurora shell; the emblem itself is transparent everywhere. */
:is(.ask-launch,.home-ai-submit),:root[data-theme="light"] :is(.ask-launch,.home-ai-submit) {
  color:#29243a;
  background:linear-gradient(115deg,#dfF3ff,#ede4ff,#fff1ce,#dff3ff);
  background-size:300% 100%;
  border:1px solid #e4c78e;
  box-shadow:inset 0 1px 0 #fff9,0 0 12px #c4b2ef30;
}
:is(.ask-launch,.home-ai-submit):hover { color:#29243a; border-color:#fff1ce; }
:is(.ask-launch,.home-ai-submit):focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media (prefers-reduced-motion:no-preference) {
  :is(.ask-launch,.home-ai-submit) { animation:ask-shimmer 7s ease-in-out infinite; }
  .stashy-logo.brand-breathing { animation:stashy-breathe 4.8s ease-in-out infinite; }
  /* The shuffle: each card in turn lifts out of the fan, straightens a little and settles back into its
     own slot, a third of a cycle after the card before it. The fan's order never changes, so nothing
     pops or doubles up. */
  .stashy-logo.brand-breathing .brand-card { animation:brand-lift 6s cubic-bezier(.45,.05,.55,.95) infinite; }
  .stashy-logo.brand-breathing .brand-left { animation-delay:0s; }
  .stashy-logo.brand-breathing .brand-center { animation-delay:-4s; }
  .stashy-logo.brand-breathing .brand-right { animation-delay:-2s; }
  /* Each card's own foil: one light moves over the fan, so a 45° sheen cascades across the three cards,
     the gems' and the ball's highlights slide with it, the Pokémon rainbow wave drifts along its 30°
     bands with sparkles lighting in turn, and the embossed swirl's raised edge catches the glint. */
  .stashy-logo.brand-breathing .brand-sheen { animation:brand-sheen 7.5s cubic-bezier(.4,0,.2,1) var(--d,0s) infinite; }
  .stashy-logo.brand-breathing .brand-glint { animation:brand-glint 3.75s ease-in-out infinite alternate; }
  .stashy-logo.brand-breathing .brand-wave { animation:brand-wave 5s linear infinite; }
  .stashy-logo.brand-breathing .brand-spark { transform-box:fill-box; transform-origin:center; animation:brand-spark 2.8s ease-in-out var(--d,0s) infinite; }
  .stashy-logo.brand-breathing .brand-emboss { animation:brand-emboss 3.75s ease-in-out infinite alternate; }
}
@keyframes brand-sheen { 0%,55% {transform:translateX(0)} 85%,100% {transform:translateX(78px)} }
@keyframes brand-glint { from {transform:translate(-.7px,-.6px)} to {transform:translate(.8px,.7px)} }
@keyframes brand-wave { to {transform:translate(20.78px,12px)} }
@keyframes brand-spark { 0%,62%,100% {opacity:0;transform:scale(.3)} 76% {opacity:1;transform:scale(1)} }
@keyframes brand-emboss { from {opacity:.35} to {opacity:1} }
@keyframes ask-shimmer { 0%,100% {background-position:0% 50%} 50% {background-position:100% 50%} }
@keyframes stashy-breathe {
  0%,100% { transform:translateY(0) scale(.98); }
  50% { transform:translateY(-1px) scale(1.025); }
}
@keyframes brand-lift {
  0%,36%,100% { transform:translate(var(--tx),0) rotate(var(--r)); }
  14% { transform:translate(calc(var(--tx) * .8),-10px) rotate(calc(var(--r) * .55)); }
  22% { transform:translate(calc(var(--tx) * .8),-10px) rotate(calc(var(--r) * .55)); }
}
@media (prefers-reduced-motion:reduce) {
  :is(.ask-launch,.home-ai-submit) {animation:none!important;}
  .stashy-logo.brand-breathing,.stashy-logo.brand-breathing .brand-card {animation:none!important;}
  .stashy-logo.brand-breathing .brand-card {opacity:1;}
}
@media (forced-colors:active) {
  :is(.ask-launch,.home-ai-submit) {color:ButtonText!important;background:ButtonFace!important;border-color:ButtonText!important;animation:none!important;}
}
/* The first "Loading…" line breathes so a slow start never looks frozen (app-motion.js does page moves). */
@media (prefers-reduced-motion:no-preference) {
  #content > p.muted.center.pad:only-child { animation:cs-load-breathe 1.4s ease-in-out infinite; }
}
@keyframes cs-load-breathe { 50% { opacity:.45 } }

/* Smooth scrolling on phones (2 Nov): while a finger is on the screen or the page is scrolling, the
   decorative loops (logo shuffle, Ask and search shimmer, Play seams, value-tier strips) hold still,
   so every frame goes to the scroll. They carry on from where they stopped once the page settles.
   Foil and holo finishes are not in this list and never pause. app-motion.js sets the class. */
html.cs-hands-on :is(.stashy-logo.brand-breathing, .stashy-logo.brand-breathing *, .ask-launch, .home-ai-submit),
html.cs-hands-on :is(.home-search-pill, .pl-seam)::before,
html.cs-hands-on :is(.home-search-pill, .pl-seam)::after,
html.cs-hands-on :is(.display-list > .lot[data-tier], .card-grid > .grid-card[data-tier])::before,
html.cs-hands-on .display-list > .lot[data-tier] .lot-art:not([class*=finish]),
html.cs-hands-on .card-grid > .grid-card[data-tier] > img.card-img:not([class*=finish]) { animation-play-state: paused !important; }
/* Long lists: tiles scrolled well off screen skip style, layout and paint until they come near again;
   each remembers its own height, so the scrollbar and the page never jump. The clip margin lets the
   value-tier glow spill past the tile exactly as before. */
.display-list > .lot, .card-grid > .grid-card { content-visibility: auto; contain-intrinsic-size: auto 120px; overflow-clip-margin: 40px; }
.view-gallery .display-list > .lot, .card-grid > .grid-card { contain-intrinsic-size: auto 420px; }
