/* Movimento ambiente do site.
   Tudo aqui anima só transform/opacity (ou propriedades individuais translate/rotate/scale), então o navegador
   faz o trabalho na placa de vídeo. ambient-motion.js insere as camadas extras e pausa quando a aba está oculta
   ou quando a abertura de pacote ocupa a tela. As cores vêm das variáveis do tema, então funciona em todos. */

/* ---------- Céu do site: luzes que derivam devagar, estrelas que piscam e um meteoro de vez em quando ---------- */
body::before { inset: -8%; animation: amb-sky 26s ease-in-out infinite alternate; will-change: transform; }
body::after { inset: -36px; animation: amb-stars 36s ease-in-out infinite alternate, amb-twinkle 4.8s ease-in-out infinite; }
.amb-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.amb-sky i { position: absolute; display: block; width: 78vmax; height: 78vmax; border-radius: 50%; will-change: transform; }
.amb-sky .b1 { left: -24vmax; top: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--violet, #a996ff) 30%, transparent) 0%, transparent 62%); animation: amb-blob-1 22s ease-in-out infinite alternate; }
.amb-sky .b2 { right: -30vmax; top: 4vmax; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 60%); animation: amb-blob-2 27s ease-in-out infinite alternate; }
.amb-sky .b3 { left: 10vmax; bottom: -46vmax; background: radial-gradient(circle, color-mix(in srgb, var(--rose, #ff7d6e) 22%, transparent) 0%, transparent 60%); animation: amb-blob-3 31s ease-in-out infinite alternate; }
/* Faixa de aurora: uma fita larga e muito suave que ondula no alto da página. */
.amb-sky .aur { left: -20vw; top: -14vh; width: 140vw; height: 48vh; border-radius: 0; opacity: .72;
  background: linear-gradient(100deg, transparent 8%, color-mix(in srgb, var(--accent) 16%, transparent) 30%, color-mix(in srgb, var(--violet, #a996ff) 22%, transparent) 52%, color-mix(in srgb, var(--accent) 14%, transparent) 72%, transparent 92%);
  -webkit-mask: radial-gradient(ellipse 50% 46% at 50% 50%, #000 32%, transparent 100%); mask: radial-gradient(ellipse 50% 46% at 50% 50%, #000 32%, transparent 100%);
  animation: amb-aurora 18s ease-in-out infinite alternate; }
.amb-sky .met { width: 170px; height: 1.8px; border-radius: 99px; top: 12vh; left: 72vw; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .92) 82%, #fff); box-shadow: 0 0 10px rgba(255, 255, 255, .68);
  rotate: -24deg; animation: amb-meteor 12s linear 1.5s infinite; }
.amb-sky .met.m2 { top: 26vh; left: 38vw; width: 130px; rotate: -18deg; animation-duration: 17s; animation-delay: 7s; }

@keyframes amb-sky { from { transform: translate3d(-2.2%, -1.4%, 0) scale(1.03); } to { transform: translate3d(2.2%, 1.6%, 0) scale(1.09); } }
@keyframes amb-stars { from { transform: translate3d(-22px, 14px, 0); } to { transform: translate3d(24px, -18px, 0); } }
@keyframes amb-twinkle { 0%, 100% { opacity: .42; } 50% { opacity: .98; } }
@keyframes amb-blob-1 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(18vw, 11vh, 0) scale(1.14); } 100% { transform: translate3d(7vw, 24vh, 0) scale(.94); } }
@keyframes amb-blob-2 { 0% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-20vw, 15vh, 0) scale(.92); } 100% { transform: translate3d(-9vw, -7vh, 0) scale(1.12); } }
@keyframes amb-blob-3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(26vw, -12vh, 0) scale(1.16); } 100% { transform: translate3d(46vw, 2vh, 0) scale(.95); } }
@keyframes amb-aurora { 0% { transform: translate3d(-7vw, 0, 0) skewY(-3.5deg) scaleY(.92); } 50% { transform: translate3d(5vw, 3.5vh, 0) skewY(2.5deg) scaleY(1.18); } 100% { transform: translate3d(9vw, -2vh, 0) skewY(-1deg) scaleY(1.02); } }
@keyframes amb-meteor { 0% { opacity: 0; translate: 0 0; } 1% { opacity: 1; } 7% { opacity: 0; translate: -48vw 22vw; } 100% { opacity: 0; translate: -48vw 22vw; } }

/* ---------- Painel de boas-vindas: névoa que flutua, um feixe de luz que atravessa e poeira subindo ---------- */
.hero-card::before { transform-origin: center bottom; animation: amb-hills 16s ease-in-out infinite alternate; }
.hero-card::after { content: ''; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 42% 52% at 28% 42%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 72%), radial-gradient(ellipse 42% 52% at 76% 60%, color-mix(in srgb, var(--violet, #a996ff) 26%, transparent), transparent 72%);
  animation: amb-mist 14s ease-in-out infinite alternate; }
.hero-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.hero-fx .beam { position: absolute; top: -40%; bottom: -40%; left: 0; width: 24%; rotate: 18deg;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08) 40%, rgba(255, 255, 255, .14) 50%, rgba(255, 255, 255, .08) 60%, transparent);
  translate: -60% 0; animation: amb-beam 8.5s ease-in-out .4s infinite; }
.hero-fx .mote { position: absolute; bottom: -8px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 74%, white); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 85%, transparent);
  opacity: 0; animation: amb-mote var(--d) linear var(--dl) infinite; }
@keyframes amb-hills { from { transform: translate3d(-1.4%, .5%, 0) scale(1.03); } to { transform: translate3d(1.4%, -.5%, 0) scale(1.08); } }
@keyframes amb-mist { from { transform: translate3d(-8%, 4%, 0) rotate(-7deg); opacity: .55; } to { transform: translate3d(9%, -4%, 0) rotate(7deg); opacity: 1; } }
@keyframes amb-beam { 0% { translate: -60% 0; opacity: 0; } 10% { opacity: 1; } 46% { translate: 560% 0; opacity: 1; } 55%, 100% { translate: 560% 0; opacity: 0; } }
@keyframes amb-mote { 0% { opacity: 0; translate: 0 0; } 12% { opacity: .9; } 70% { opacity: .58; } 100% { opacity: 0; translate: var(--w) calc(var(--h) * -1); } }
.showcase-slot.empty { animation: sc-empty-breathe 4.2s ease-in-out infinite; }
.showcase-slot.empty:nth-child(2) { animation-delay: -1.4s; }
.showcase-slot.empty:nth-child(3) { animation-delay: -2.8s; }
@keyframes sc-empty-breathe { 0%, 100% { translate: 0 1px; } 50% { translate: 0 -4px; } }
/* Botão principal do painel: um brilho passa por ele de tempos em tempos. */
.hero-copy .primary { position: relative; overflow: hidden; isolation: isolate; }
.hero-copy .primary::after { content: ''; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) no-repeat; background-size: 250% 100%;
  animation: amb-btn 6s ease-in-out 2s infinite; }
@keyframes amb-btn { 0%, 70% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

/* ---------- Vitrine: as três cartas flutuam e balançam, com brilho e partículas conforme a raridade ---------- */
.showcase-slot:not(.empty) {
  container-type: inline-size; isolation: isolate; filter: none;
  --fd: 6.2s; --fdl: 0s; --fy: -10px; --aura: .16; --ab: 18px; --o: 1;
  animation: sc-float var(--fd) ease-in-out var(--fdl) infinite;
}
.showcase-slot:nth-child(2):not(.empty) { --fd: 7.1s; --fdl: -2.6s; --fy: -13px; }
.showcase-slot:nth-child(3):not(.empty) { --fd: 6.6s; --fdl: -4.4s; --fy: -9px; }
.showcase-slot:not(.empty) > .card-visual { z-index: 1; animation: sc-sway calc(var(--fd) * 1.3) ease-in-out var(--fdl) infinite; }
.showcase-slot .showcase-power { z-index: 4; }
.showcase-slot:not(.empty):hover { filter: none; }
.showcase-slot:not(.empty):hover > .card-visual { filter: drop-shadow(0 18px 24px #000b) drop-shadow(0 0 18px color-mix(in srgb, var(--rarity) 60%, transparent)); }
/* Aura atrás da carta, pulsando */
.showcase-slot:not(.empty)::before { content: ''; position: absolute; inset: -6% -12% -4%; z-index: 0; pointer-events: none; border-radius: 22%;
  background: var(--rarity); filter: blur(var(--ab)); opacity: var(--aura); animation: sc-aura 3.6s ease-in-out var(--fdl) infinite; }
.showcase-slot[data-rarity="1"] { --aura: .28; }
.showcase-slot[data-rarity="2"] { --aura: .45; --ab: 22px; }
.showcase-slot[data-rarity="3"] { --aura: .62; --ab: 24px; }
.showcase-slot[data-rarity="4"] { --aura: .8; --ab: 26px; }
.showcase-slot[data-rarity="5"] { --aura: .85; --ab: 28px; }
.showcase-slot[data-rarity="5"]::before { background: radial-gradient(closest-side, #fff4dc 10%, #ffd98a 45%, #a98cff 90%); }
/* Raios girando atrás das cartas SSR e UR */
.sc-rays { position: absolute; inset: -40% -78%; z-index: -1; pointer-events: none; border-radius: 50%; opacity: .85;
  background: var(--rarity);
  -webkit-mask: radial-gradient(closest-side, #000 14%, rgba(0, 0, 0, .45) 45%, transparent 74%), repeating-conic-gradient(from 0deg, transparent 0deg, #000 3deg, transparent 7deg, transparent 18deg);
  -webkit-mask-composite: source-in; mask: radial-gradient(closest-side, #000 14%, rgba(0, 0, 0, .45) 45%, transparent 74%), repeating-conic-gradient(from 0deg, transparent 0deg, #000 3deg, transparent 7deg, transparent 18deg);
  mask-composite: intersect; filter: blur(1px); animation: sc-rays 24s linear infinite; }
.showcase-slot[data-rarity="5"] .sc-rays { background: radial-gradient(closest-side, #fff4dc, #ffd98a 40%, #b594ff 75%); opacity: 1; animation-duration: 18s; }
/* Reflexo que atravessa a carta (recortado no formato da moldura) */
.sc-sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; -webkit-mask: var(--shape) center / 100% 100% no-repeat; mask: var(--shape) center / 100% 100% no-repeat;
  --sc-light: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%); overflow: hidden; }
.showcase-slot[data-rarity="4"] .sc-sheen { --sh: 5s; --sc-light: linear-gradient(112deg, transparent 37%, color-mix(in srgb, var(--rarity) 50%, transparent) 46%, rgba(255, 255, 255, .7) 50%, color-mix(in srgb, var(--rarity) 50%, transparent) 54%, transparent 63%); }
.showcase-slot[data-rarity="5"] .sc-sheen { --sh: 4.4s; --sc-light: linear-gradient(112deg, transparent 35%, #ffe2a888 44%, rgba(255, 255, 255, .8) 50%, #b594ff88 56%, transparent 65%); }
.sc-sheen::before {content:"";position:absolute;inset:0 auto 0 0;width:300%;pointer-events:none;background-image:var(--sc-light);animation:sc-sheen-slide var(--sh,7s) ease-in-out var(--fdl) infinite;}
@keyframes sc-sheen-slide{0%,55%{transform:translate3d(-86.6666667%,0,0)}85%,100%{transform:translate3d(20%,0,0)}}
/* Partículas em órbita: a metade de trás da volta passa por trás da carta */
.sc-dot { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 30%, color-mix(in srgb, var(--rarity) 60%, white) 55%, transparent 72%);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--rarity) 70%, transparent);
  animation:var(--orb) var(--od,5s) linear var(--odl,0s) infinite,var(--depth,none) var(--od,5s) steps(1,end) var(--odl,0s) infinite; }
.sc-dot.t1 { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; --o: .7; box-shadow: 0 0 7px 1px color-mix(in srgb, var(--rarity) 60%, transparent); }
.sc-dot.t2 { width: 4px; height: 4px; margin: -2px 0 0 -2px; --o: .45; box-shadow: none; }
.sc-dot.t3 { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; --o: .25; box-shadow: none; }
.showcase-slot[data-rarity="5"] .sc-dot { background: radial-gradient(circle, #fff 0 30%, #ffe2a8 55%, transparent 72%); box-shadow: 0 0 10px 2px rgba(190, 160, 255, .7); }
/* Cintilações fixas em volta das cartas R ou acima */
.sc-tw { position: absolute; z-index: 3; width: var(--s, 10px); height: var(--s, 10px); left: var(--x); top: var(--y); pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--rarity) 35%, white); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 4px var(--rarity)); animation: sc-tw var(--d, 2.6s) ease-in-out var(--dl, 0s) infinite; }

@keyframes sc-float { 0%, 100% { translate: 0 2px; rotate: -.8deg; } 50% { translate: 0 var(--fy); rotate: .8deg; } }
@keyframes sc-sway { 0%, 100% { transform: perspective(700px) rotateY(-7deg) rotateX(2deg); } 50% { transform: perspective(700px) rotateY(7deg) rotateX(-2deg); } }
@keyframes sc-aura { 0%, 100% { opacity: calc(var(--aura) * .6); transform: scale(.96); } 50% { opacity: var(--aura); transform: scale(1.05); } }
@keyframes sc-rays { to { rotate: 1turn; } }
@keyframes sc-sheen { 0%, 55% { background-position: 130% 0; } 85%, 100% { background-position: -30% 0; } }
@keyframes sc-tw { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* ---------- Coleção: cartas SSR e UR obtidas brilham sozinhas ---------- */
.tile:not(.locked) .tile-art:has(.card-visual[data-visual-tier="4"])::before,
.tile:not(.locked) .tile-art:has(.card-visual[data-visual-tier="5"])::before { opacity: .3; animation: tile-aura 3.4s ease-in-out infinite; }
.tile:not(.locked) .tile-art:has(.card-visual[data-visual-tier="5"])::before { background: radial-gradient(closest-side, #fff4dc, #ffd98a 45%, #a98cff 90%); }
.tile:not(.locked):hover .tile-art::before { animation: none; }
.tile .sc-sheen { --fdl: 0s; }
@keyframes tile-aura { 0%, 100% { opacity: .16; } 50% { opacity: .38; } }

/* ---------- Pausas ---------- */
html:is(.ambient-paused, .opening-active) :is(body, .hero-card, .showcase-slot, .hero-copy .primary, .tile-art)::before,
html:is(.ambient-paused, .opening-active) :is(body, .hero-card, .hero-copy .primary)::after,
html:is(.ambient-paused, .opening-active) :is(.amb-sky i, .hero-fx *, .showcase-slot, .showcase-slot > *) { animation-play-state: paused; }
@media (max-width: 640px) {
  .showcase-slot:not(.empty) { --fy: -7px; --ab: 14px; }
  .sc-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
  .amb-sky .met { display: none; }
}
@media print { .amb-sky, .hero-fx { display: none; } }

@keyframes sc-orbit-a {
  0.000% { transform:translate(72.52cqw,-28.70cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
  2.778% { transform:translate(72.08cqw,-25.24cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  5.556% { transform:translate(69.44cqw,-21.45cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  8.333% { transform:translate(64.70cqw,-17.42cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  11.111% { transform:translate(57.98cqw,-13.29cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  13.889% { transform:translate(49.51cqw,-9.19cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  16.667% { transform:translate(39.53cqw,-5.22cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  19.444% { transform:translate(28.35cqw,-1.53cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  22.222% { transform:translate(16.31cqw,1.79cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  25.000% { transform:translate(3.77cqw,4.62cqw) scale(1.320); opacity:calc(var(--o, 1) * 1.00); }
  27.778% { transform:translate(-8.88cqw,6.89cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  30.556% { transform:translate(-21.26cqw,8.53cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  33.333% { transform:translate(-32.99cqw,9.48cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  36.111% { transform:translate(-43.73cqw,9.71cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  38.889% { transform:translate(-53.13cqw,9.23cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  41.667% { transform:translate(-60.92cqw,8.04cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  44.444% { transform:translate(-66.86cqw,6.18cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  47.222% { transform:translate(-70.77cqw,3.71cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  50.000% { transform:translate(-72.52cqw,0.70cqw) scale(1.000); opacity:calc(var(--o, 1) * 1.00); }
  52.778% { transform:translate(-72.08cqw,-2.76cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  55.556% { transform:translate(-69.44cqw,-6.55cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  58.333% { transform:translate(-64.70cqw,-10.58cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  61.111% { transform:translate(-57.98cqw,-14.71cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  63.889% { transform:translate(-49.51cqw,-18.81cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  66.667% { transform:translate(-39.53cqw,-22.78cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  69.444% { transform:translate(-28.35cqw,-26.47cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  72.222% { transform:translate(-16.31cqw,-29.79cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  75.000% { transform:translate(-3.77cqw,-32.62cqw) scale(0.680); opacity:calc(var(--o, 1) * 0.42); }
  77.778% { transform:translate(8.88cqw,-34.89cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  80.556% { transform:translate(21.26cqw,-36.53cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  83.333% { transform:translate(32.99cqw,-37.48cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  86.111% { transform:translate(43.73cqw,-37.71cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  88.889% { transform:translate(53.13cqw,-37.23cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  91.667% { transform:translate(60.92cqw,-36.04cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  94.444% { transform:translate(66.86cqw,-34.18cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  97.222% { transform:translate(70.77cqw,-31.71cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  100.000% { transform:translate(72.52cqw,-28.70cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
}
@keyframes sc-orbit-a-depth {
  0% {z-index:0}
  0.46300% {z-index:1}
  1.38900% {z-index:2}
  2.31500% {z-index:3}
  50.46300% {z-index:2}
  51.38900% {z-index:1}
  52.31500% {z-index:0}
  100% {z-index:0}
}
@keyframes sc-orbit-b {
  0.000% { transform:translate(67.65cqw,44.00cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
  2.778% { transform:translate(65.91cqw,46.41cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  5.556% { transform:translate(62.16cqw,48.20cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  8.333% { transform:translate(56.53cqw,49.32cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  11.111% { transform:translate(49.18cqw,49.72cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  13.889% { transform:translate(40.33cqw,49.41cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  16.667% { transform:translate(30.26cqw,48.39cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  19.444% { transform:translate(19.27cqw,46.68cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  22.222% { transform:translate(7.70cqw,44.35cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  25.000% { transform:translate(-4.11cqw,41.46cqw) scale(1.320); opacity:calc(var(--o, 1) * 1.00); }
  27.778% { transform:translate(-15.80cqw,38.10cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  30.556% { transform:translate(-27.00cqw,34.37cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  33.333% { transform:translate(-37.39cqw,30.39cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  36.111% { transform:translate(-46.63cqw,26.28cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  38.889% { transform:translate(-54.46cqw,22.15cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  41.667% { transform:translate(-60.64cqw,18.15cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  44.444% { transform:translate(-64.97cqw,14.38cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  47.222% { transform:translate(-67.33cqw,10.96cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  50.000% { transform:translate(-67.65cqw,8.00cqw) scale(1.000); opacity:calc(var(--o, 1) * 1.00); }
  52.778% { transform:translate(-65.91cqw,5.59cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  55.556% { transform:translate(-62.16cqw,3.80cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  58.333% { transform:translate(-56.53cqw,2.68cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  61.111% { transform:translate(-49.18cqw,2.28cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  63.889% { transform:translate(-40.33cqw,2.59cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  66.667% { transform:translate(-30.26cqw,3.61cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  69.444% { transform:translate(-19.27cqw,5.32cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  72.222% { transform:translate(-7.70cqw,7.65cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  75.000% { transform:translate(4.11cqw,10.54cqw) scale(0.680); opacity:calc(var(--o, 1) * 0.42); }
  77.778% { transform:translate(15.80cqw,13.90cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  80.556% { transform:translate(27.00cqw,17.63cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  83.333% { transform:translate(37.39cqw,21.61cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  86.111% { transform:translate(46.63cqw,25.72cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  88.889% { transform:translate(54.46cqw,29.85cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  91.667% { transform:translate(60.64cqw,33.85cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  94.444% { transform:translate(64.97cqw,37.62cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  97.222% { transform:translate(67.33cqw,41.04cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  100.000% { transform:translate(67.65cqw,44.00cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
}
@keyframes sc-orbit-b-depth {
  0% {z-index:0}
  0.46300% {z-index:1}
  1.38900% {z-index:2}
  2.31500% {z-index:3}
  50.46300% {z-index:2}
  51.38900% {z-index:1}
  52.31500% {z-index:0}
  100% {z-index:0}
}
@keyframes sc-orbit-c {
  0.000% { transform:translate(81.90cqw,10.10cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
  2.778% { transform:translate(80.46cqw,13.85cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  5.556% { transform:translate(76.58cqw,17.37cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  8.333% { transform:translate(70.38cqw,20.54cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  11.111% { transform:translate(62.03cqw,23.26cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  13.889% { transform:translate(51.80cqw,25.47cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  16.667% { transform:translate(40.00cqw,27.08cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  19.444% { transform:translate(26.98cqw,28.05cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  22.222% { transform:translate(13.14cqw,28.35cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  25.000% { transform:translate(-1.10cqw,27.97cqw) scale(1.320); opacity:calc(var(--o, 1) * 1.00); }
  27.778% { transform:translate(-15.30cqw,26.93cqw) scale(1.315); opacity:calc(var(--o, 1) * 1.00); }
  30.556% { transform:translate(-29.04cqw,25.25cqw) scale(1.301); opacity:calc(var(--o, 1) * 1.00); }
  33.333% { transform:translate(-41.90cqw,22.98cqw) scale(1.277); opacity:calc(var(--o, 1) * 1.00); }
  36.111% { transform:translate(-53.49cqw,20.20cqw) scale(1.245); opacity:calc(var(--o, 1) * 1.00); }
  38.889% { transform:translate(-63.44cqw,16.98cqw) scale(1.206); opacity:calc(var(--o, 1) * 1.00); }
  41.667% { transform:translate(-71.48cqw,13.44cqw) scale(1.160); opacity:calc(var(--o, 1) * 1.00); }
  44.444% { transform:translate(-77.33cqw,9.66cqw) scale(1.109); opacity:calc(var(--o, 1) * 1.00); }
  47.222% { transform:translate(-80.84cqw,5.78cqw) scale(1.056); opacity:calc(var(--o, 1) * 1.00); }
  50.000% { transform:translate(-81.90cqw,1.90cqw) scale(1.000); opacity:calc(var(--o, 1) * 1.00); }
  52.778% { transform:translate(-80.46cqw,-1.85cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  55.556% { transform:translate(-76.58cqw,-5.37cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  58.333% { transform:translate(-70.38cqw,-8.54cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  61.111% { transform:translate(-62.03cqw,-11.26cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  63.889% { transform:translate(-51.80cqw,-13.47cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  66.667% { transform:translate(-40.00cqw,-15.08cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  69.444% { transform:translate(-26.98cqw,-16.05cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  72.222% { transform:translate(-13.14cqw,-16.35cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  75.000% { transform:translate(1.10cqw,-15.97cqw) scale(0.680); opacity:calc(var(--o, 1) * 0.42); }
  77.778% { transform:translate(15.30cqw,-14.93cqw) scale(0.685); opacity:calc(var(--o, 1) * 0.42); }
  80.556% { transform:translate(29.04cqw,-13.25cqw) scale(0.699); opacity:calc(var(--o, 1) * 0.44); }
  83.333% { transform:translate(41.90cqw,-10.98cqw) scale(0.723); opacity:calc(var(--o, 1) * 0.46); }
  86.111% { transform:translate(53.49cqw,-8.20cqw) scale(0.755); opacity:calc(var(--o, 1) * 0.49); }
  88.889% { transform:translate(63.44cqw,-4.98cqw) scale(0.794); opacity:calc(var(--o, 1) * 0.53); }
  91.667% { transform:translate(71.48cqw,-1.44cqw) scale(0.840); opacity:calc(var(--o, 1) * 0.57); }
  94.444% { transform:translate(77.33cqw,2.34cqw) scale(0.891); opacity:calc(var(--o, 1) * 0.62); }
  97.222% { transform:translate(80.84cqw,6.22cqw) scale(0.944); opacity:calc(var(--o, 1) * 0.67); }
  100.000% { transform:translate(81.90cqw,10.10cqw) scale(1.000); opacity:calc(var(--o, 1) * 0.72); }
}
@keyframes sc-orbit-c-depth {
  0% {z-index:0}
  0.46300% {z-index:1}
  1.38900% {z-index:2}
  2.31500% {z-index:3}
  50.46300% {z-index:2}
  51.38900% {z-index:1}
  52.31500% {z-index:0}
  100% {z-index:0}
}

/* Salão vivo — atmosfera e superfícies. Apenas transform/opacity nos novos loops. */
/* Isola as camadas negativas acima do fundo do documento, sem cobrir controles. */
body { isolation: isolate; }
.amb-sky { z-index: -1; }
.amb-sky .b1 { top: -24vmax; animation-duration: 16s; background: radial-gradient(circle, color-mix(in srgb, var(--violet, #a996ff) 36%, transparent), transparent 64%); }
.amb-sky .b2 { right: -24vmax; top: 14vh; animation-duration: 19s; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 64%); }
.amb-sky .b3 { bottom: -37vmax; animation-duration: 23s; background: radial-gradient(circle, color-mix(in srgb, var(--theme-icon, var(--rose, #ff7d6e)) 22%, transparent), transparent 65%); }
.amb-sky .aur { opacity: .76; animation-duration: 14s; }
.amb-sky .ribbon {
  left: -25%; top: 18%; width: 150%; height: 48%; border-radius: 50%;
  background: radial-gradient(ellipse at center, transparent 42%, color-mix(in srgb, var(--violet, #a996ff) 16%, transparent) 55%, transparent 69%);
  animation: salon-ribbon 13s ease-in-out -5s infinite alternate;
}
.amb-sky .ribbon-b {
  top: 46%; height: 50%; opacity: .74;
  background: radial-gradient(ellipse at center, transparent 38%, color-mix(in srgb, var(--accent) 16%, transparent) 53%, transparent 69%);
  animation-duration: 17s; animation-delay: -11s; animation-direction: alternate-reverse;
}
.amb-sky .sky-dust {
  left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%;
  background: color-mix(in srgb, var(--theme-icon, var(--accent)) 42%, white);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 65%, transparent);
  opacity: 0; animation: salon-dust var(--duration) ease-in-out var(--delay) infinite;
}
@keyframes salon-ribbon {
  from { transform: translate3d(-6%, -9%, 0) rotate(-15deg) scaleY(.82); }
  to { transform: translate3d(7%, 13%, 0) rotate(10deg) scaleY(1.18); }
}
@keyframes salon-dust {
  0% { opacity: 0; transform: translate3d(0, 36px, 0); }
  22% { opacity: .78; }
  72% { opacity: .36; }
  100% { opacity: 0; transform: translate3d(var(--drift), -110px, 0); }
}

/* A luz fica atrás do conteúdo; nenhuma sobreposição recebe cliques. */
.ambient-surface { position: relative; isolation: isolate; transition: border-color .35s ease, box-shadow .35s ease; }
.surface-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.surface-glow {
  position: absolute; inset: -45%;
  background: radial-gradient(ellipse 34% 48% at 25% 32%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 78%),
    radial-gradient(ellipse 34% 45% at 70% 70%, color-mix(in srgb, var(--violet, #a996ff) 13%, transparent), transparent 78%);
  animation: salon-surface 9.5s ease-in-out var(--ambient-phase, 0s) infinite alternate;
}
.surface-trace {
  position: absolute; top: 0; left: -40%; width: 38%; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-icon, var(--accent)) 82%, white), transparent);
  box-shadow: 0 1px 12px 1px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: salon-trace 5.8s ease-in-out var(--ambient-phase, 0s) infinite;
}
@keyframes salon-surface {
  from { transform: translate3d(-11%, -7%, 0) rotate(-9deg); opacity: .52; }
  to { transform: translate3d(16%, 10%, 0) rotate(11deg); opacity: 1; }
}
@keyframes salon-trace {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: .92; }
  80%, 100% { transform: translateX(380%); opacity: 0; }
}
.ambient-arrive { animation: salon-arrive .5s cubic-bezier(.2,.7,.2,1) var(--arrival-delay, 0s) backwards; }
@keyframes salon-arrive { from { opacity: .55; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
.ambient-surface > .panel-head > svg {
  transform-origin: center; animation: salon-icon 5.2s ease-in-out var(--ambient-phase, 0s) infinite;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--theme-icon, var(--accent)) 28%, transparent));
}
@keyframes salon-icon { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }

/* Reflete a luz sobre o preenchimento real, sem simular progresso. */
.ambient-surface .meter i { position: relative; overflow: hidden; }
.ambient-surface .meter i::after, .ambient-surface .windows .on::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 15%, #ffffff8a 50%, transparent 85%);
  animation: salon-meter 4.8s ease-in-out var(--ambient-phase, 0s) infinite;
}
.ambient-surface .windows .on { position: relative; overflow: hidden; }
@keyframes salon-meter { 0%, 30% { transform: translateX(-120%); opacity: 0; } 45% { opacity: .68; } 75%,100% { transform: translateX(120%); opacity: 0; } }
.streak .now { position: relative; isolation: isolate; }
.streak .now::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid var(--theme-icon, var(--accent));
  box-shadow: 0 0 16px color-mix(in srgb, var(--theme-icon, var(--accent)) 24%, transparent);
  animation: salon-day 3.6s ease-in-out infinite;
}
@keyframes salon-day { 0%,100% { opacity: .32; } 50% { opacity: .95; } }

/* Respostas curtas de interação, mantendo os alvos de leitura e toque estáveis. */
.side-nav a, .mobile-tabs a, .work-rows a, .todo .link, .chip, .chip-btn, .seg button, .segmented button {
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease, translate .22s ease;
}
.side-nav a > svg, .primary > svg, .secondary > svg { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) and (pointer: fine) {
  .ambient-surface:hover, .ambient-surface:focus-within {
    border-color: color-mix(in srgb, var(--theme-icon, var(--accent)) 38%, var(--edge));
    box-shadow: var(--lift), 0 0 30px -18px color-mix(in srgb, var(--accent) 50%, transparent);
  }
  .side-nav a:hover > svg { transform: translateX(2px) scale(1.09); }
  :is(.primary, .secondary):not(:disabled):hover > svg { transform: translateY(-1px) scale(1.07); }
  .work-rows a:hover, .todo .link:hover { translate: 2px 0; }
  :is(.chip, .chip-btn, .seg button, .segmented button):not(:disabled):hover { translate: 0 -1px; }
}

/* Pausa fora da tela, em outra aba e durante a abertura de pacotes. */
.ambient-surface:not(.ambient-in-view) :is(.surface-fx *, .panel-head > svg),
.ambient-surface:not(.ambient-in-view) :is(.meter i, .windows .on, .streak .now)::after,
html:is(.ambient-paused, .opening-active) :is(.surface-fx *, .ambient-arrive, .ambient-surface > .panel-head > svg, .tile .sc-sheen),
html:is(.ambient-paused, .opening-active) :is(.meter i, .windows .on, .streak .now)::after { animation-play-state: paused; }
html.opening-active .amb-sky { opacity: 0; }
@media (max-width: 640px) {
  .amb-sky .b3, .amb-sky .ribbon-b, .amb-sky .sky-dust:nth-of-type(n+20) { display: none; }
  .amb-sky .b1, .amb-sky .b2 { width: 100vmax; height: 100vmax; }
  .amb-sky .ribbon-a { opacity: .64; }
  .ambient-surface > .panel-head > svg { animation-name: none; }
}
/* O modo reduzido só se aplica quando o jogador ativa redução explícita. */
html.reduce-motion :is(.amb-sky .met, .amb-sky .sky-dust, .surface-fx) { display: none; }
@media print { .surface-fx { display: none; } }

/* Keep the same artwork and timing on entry; suspend decorative descendants well outside the viewport. */
.amb-art-outside,.amb-art-outside::before,.amb-art-outside::after,
.amb-art-outside *,.amb-art-outside *::before,.amb-art-outside *::after {animation-play-state:paused!important;}
html:is(.ambient-paused,.opening-active) .sc-sheen::before {animation-play-state:paused!important;}
html.pf-has-wallpaper body:has(#pf-page-wallpaper.is-active:not([data-bg="theme"])) > .amb-sky {display:none;}
.pf-name-styled[data-name-color="prisma"] {will-change:transform;}
.pm-moving-lens {will-change:transform;}
