/* GACHAMON V15 | exact single-orbit presentation layer.
   Live positions and reward logic remain entirely in spin-gacha.js / app.js. */
body.gs13-active,html:has(body.gs13-active){background:#080425!important;overflow:hidden!important}
#gs13-root{inset:0 auto 0 50%!important;transform:translateX(-50%);width:min(100vw,500px)!important;max-width:500px;background:#10043a url('/sources/approved-v15/spin_host_cosmic.webp') center center/100% 100% no-repeat!important;overflow:hidden!important;isolation:isolate}
#gs13-root .gs13-sky{display:none!important}
#gs13-root .gs13-header{position:absolute;z-index:10;left:0;right:0;top:0;min-height:0;max-height:none;padding:calc(env(safe-area-inset-top,0px) + 12px) 14px 2px;display:grid;grid-template-columns:43px minmax(0,1fr) 100px;align-items:center;gap:7px;background:transparent;border:0;box-shadow:none}
#gs13-root .gs13-icon{width:41px;height:41px;font-size:27px;border:2px solid #e7b7ff;box-shadow:inset 0 2px #fff8,0 0 13px #bb61ffb5;background:linear-gradient(135deg,#703bc9,#241058)}
#gs13-root .gs13-wallet{width:100%;min-width:0;height:40px;border:1.7px solid #f5d982;border-radius:99px;font-size:clamp(9px,2.8vw,13px);line-height:1.1;padding:2px 4px;color:#fff0ac;background:linear-gradient(#341c83,#1e0d50);text-shadow:0 0 7px #dfb9ff}
#gs13-root .gs13-brand{gap:1px}
#gs13-root .gs13-brand img{width:min(100%,210px);height:38px;object-fit:contain;filter:drop-shadow(0 0 7px #b45dff)}
#gs13-root .gs13-brand strong{display:none!important}
#gs13-root .gs13-brand small{letter-spacing:.10em;color:#fff7f3;font-size:clamp(9px,2.6vw,12px);font-style:italic;opacity:.92}
#gs13-root .gs15-title{position:absolute;top:31.4%;right:3%;width:94%;z-index:7;text-align:center;pointer-events:none;text-shadow:0 0 14px #ad4dff,0 4px #361073}
#gs13-root .gs15-title strong{display:inline-block;font-weight:1000;font-style:italic;font-size:clamp(28px,7.6vw,39px);line-height:.93;letter-spacing:-.035em;color:#fff1c9;background:linear-gradient(#fffef2,#ffd873 32%,#ff9b19 61%,#fff1ac 80%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 2px 1px #4d125e)}
#gs13-root .gs15-title strong+strong{color:#fff;-webkit-text-fill-color:#f5f3ff;filter:drop-shadow(0 0 5px #a149ff);margin-top:0;margin-left:6px}
#gs13-root .gs15-title small{display:block;margin-top:3px;font-size:clamp(9px,2.6vw,13px);font-weight:900;letter-spacing:.055em;color:#f4eaff;white-space:nowrap}
#gs13-root .gs13-stage{position:absolute!important;left:0;right:0;top:35.9%;height:25.7%;min-height:0!important;max-height:none;flex:none;margin:0!important;width:100%;background:none!important;overflow:visible!important;pointer-events:none}
#gs13-root .gs13-halo,#gs13-root .gs13-portal,#gs13-root .gs13-glow,#gs13-root .gs13-winning{display:none!important}
#gs13-root #gs13-canvas{inset:0!important;width:100%!important;height:100%!important;display:block!important;z-index:3!important}
#gs13-root .gs13-stage-tag{position:absolute!important;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;width:1px;padding:0;border:0;left:-9999px;top:0}
#gs13-root .gs13-panel{position:absolute!important;z-index:8;left:0;right:0;top:62.1%;bottom:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;border:0;border-radius:0;box-shadow:none;background:none!important;padding:0 max(15px,4.5%) calc(env(safe-area-inset-bottom,0px) + 10px)!important;width:100%}
#gs13-root .gs13-info{height:46px;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px;border:2px solid #c07aff;border-radius:999px;background:linear-gradient(100deg,#331267e5,#251253d9);box-shadow:inset 0 2px #ffffff66,0 0 18px #9a39fac4;text-shadow:0 1px #471267;color:#ffe59a;font-size:clamp(10px,3.1vw,14px);font-style:italic;white-space:nowrap}
#gs13-root .gs13-info span:last-child{color:#fff7d7}
#gs13-root .gs13-info b{font-size:1.15em;color:#fff8c5}
#gs13-root .gs13-prompt{position:absolute;left:6%;right:6%;top:calc(100% + 2px);height:auto;min-height:0!important;margin:0!important;font-size:clamp(9px,2.5vw,11px);color:#e8d3ff;text-shadow:0 0 8px #36147c;pointer-events:none}
#gs13-root .gs13-spin{height:clamp(57px,8.2vh,77px);min-height:57px;margin-top:15px;border-radius:999px;border:3px solid #fff5b9;font-weight:1000;font-size:clamp(24px,7.0vw,33px);line-height:1;background:linear-gradient(#fff9bf 0%,#ffdb66 28%,#ffae1b 70%,#f09d25 100%);box-shadow:inset 0 3px #ffffffdb,inset 0 -4px #b96823a8,0 0 19px #ffc74dd6;color:#35105f;text-shadow:0 1px #ffefae}
#gs13-root .gs13-spin-symbol{font-size:26px;color:#56208c}
#gs13-root .gs13-config{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(60px,.64fr) minmax(0,1fr);gap:8px;margin-top:13px}
#gs13-root .gs13-action,#gs13-root .gs13-count{height:50px;min-height:50px;border-radius:999px;border:2px solid #daa5ff;box-shadow:inset 0 2px #fff7,0 0 13px #bc4dffb8;background:linear-gradient(#6c28cc,#3f168b 55%,#240e69);color:#fff8f9;padding:3px 7px;gap:4px;line-height:1.05}
#gs13-root .gs13-action{font-size:clamp(10px,2.9vw,14px)}
#gs13-root .gs13-action span{font-size:clamp(17px,5vw,22px);color:#fff}
#gs13-root #gs13-auto::after,#gs13-root #gs13-turbo::after{content:'';display:block;width:17px;height:17px;min-width:17px;border-radius:50%;border:1px solid #f0e7fa;background:#fff;box-shadow:0 1px 4px #180c54;transform:translateX(-2px);transition:transform .15s}
#gs13-root #gs13-auto[aria-pressed="true"]::after,#gs13-root #gs13-turbo[aria-pressed="true"]::after{background:#ffec99;transform:translateX(2px)}
#gs13-root .gs13-action[aria-pressed="true"]{background:linear-gradient(#863bf2,#4916af);color:#fff;border-color:#ffde91}
#gs13-root .gs13-count{font-size:8px;flex-direction:column;color:#f7e9ff;gap:1px}
#gs13-root .gs13-count select{color:#fff8ca;font-size:19px;line-height:1.05;min-width:44px}
#gs13-root .gs13-links{display:none!important}
#gs13-root .gs13-disclaimer{display:block;margin:29px auto 0;font-size:clamp(9px,2.6vw,11px);line-height:1.25;letter-spacing:.01em;color:#ffe8b5;background:#23105090;border:1px solid #9e58f6a8;border-radius:99px;padding:6px 12px;text-align:center;text-transform:none}
#gs13-root .gs13-stop{margin-top:7px;min-height:29px;padding:3px 10px;align-self:center;width:auto;max-width:95%;font-size:10px}
#gs13-root button:active:not(:disabled){filter:brightness(1.06);transform:scale(.98)}
#gs13-root .gs13-spin:disabled{opacity:.8;filter:saturate(.62)}
@media (max-height:750px){
 #gs13-root .gs15-title{top:31.2%}
 #gs13-root .gs13-stage{top:35%;height:25.5%}
 #gs13-root .gs13-panel{top:60.1%}
 #gs13-root .gs13-spin{height:53px;min-height:53px;margin-top:10px}
 #gs13-root .gs13-info{height:39px;min-height:39px}
 #gs13-root .gs13-config{margin-top:9px}
 #gs13-root .gs13-action,#gs13-root .gs13-count{height:43px;min-height:43px}
 #gs13-root .gs13-disclaimer{margin-top:19px}
}
@media(max-width:350px){
 #gs13-root .gs13-header{grid-template-columns:37px minmax(0,1fr) 82px;padding-left:8px;padding-right:8px}
 #gs13-root .gs13-icon{width:35px;height:35px}
 #gs13-root .gs13-wallet{font-size:9px;height:36px}
 #gs13-root .gs15-title{right:1%;width:48%}
 #gs13-root .gs13-panel{padding-left:9px!important;padding-right:9px!important}
 #gs13-root .gs13-info{padding:0 9px;font-size:10px}
 #gs13-root .gs13-config{gap:4px;grid-template-columns:minmax(0,1.18fr) minmax(49px,.55fr) minmax(0,1fr)}
 #gs13-root .gs13-action{font-size:9px;padding:2px 4px}
 #gs13-root .gs13-action span{font-size:16px}
 #gs13-root #gs13-auto::after,#gs13-root #gs13-turbo::after{width:12px;height:12px;min-width:12px}
}
@media(prefers-reduced-motion:reduce){#gs13-root .gs13-action::after{transition:none!important}}

/* V16: Clockwise sphere roll is rendered from the actual rollingAngle in JS.
   This one-time winner transition sits above Spin and the original reward page
   so the switch never exposes a blank frame or creates a second gift result. */
#gs16-ceremony[hidden]{display:none!important}
#gs16-ceremony{
  position:fixed;inset:0;z-index:2147483400;overflow:hidden;
  pointer-events:none;opacity:1;isolation:isolate;
  font-family:Inter,system-ui,sans-serif;
}
#gs16-ceremony .gs16-shade{
  position:absolute;inset:0;
  background:radial-gradient(ellipse at 50% 53%,#7839ad22 0%,#07072875 72%);
  opacity:0;transition:opacity .28s ease;
}
#gs16-ceremony.is-focusing .gs16-shade{opacity:.34}
#gs16-ceremony.is-opening .gs16-shade{opacity:.67}
#gs16-ceremony .gs16-orb{
  position:absolute;left:var(--gs16-x,50vw);top:var(--gs16-y,50vh);
  width:var(--gs16-size,108px);height:var(--gs16-size,108px);
  transform:translate(-50%,-50%) scale(1);
  transform-origin:center;will-change:transform,filter;
  transition:transform .29s cubic-bezier(.2,.9,.25,1),filter .27s ease;
  filter:drop-shadow(0 0 15px #bc69ff);
}
#gs16-ceremony.is-settling .gs16-orb{animation:gs16-land .18s ease-out both}
#gs16-ceremony.is-focusing .gs16-orb{
  transform:translate(-50%,-50%) scale(1.43);
  filter:drop-shadow(0 0 26px #febc65);
}
#gs16-ceremony.is-opening .gs16-orb{
  transform:translate(-50%,-50%) scale(1.69);
  filter:drop-shadow(0 0 32px #fff5c6);
}
#gs16-ceremony .gs16-top,
#gs16-ceremony .gs16-bottom{
  position:absolute;inset:0;border-radius:50%;
  background-image:var(--gs16-art);
  background-position:50% 50%;background-size:100% 100%;background-repeat:no-repeat;
  filter:drop-shadow(0 0 9px #a45bff);
  will-change:transform;
  transition:transform .35s cubic-bezier(.2,.8,.28,1),opacity .30s ease;
}
#gs16-ceremony .gs16-top{z-index:3;clip-path:inset(0 0 49.4% 0);transform-origin:48% 51%}
#gs16-ceremony .gs16-bottom{z-index:3;clip-path:inset(49.3% 0 0 0);transform-origin:52% 51%}
#gs16-ceremony.is-opening .gs16-top{transform:translate(-3%,-24%) rotate(-17deg)}
#gs16-ceremony.is-opening .gs16-bottom{transform:translate(3%,13%) rotate(8deg)}
#gs16-ceremony .gs16-core{
  position:absolute;z-index:2;inset:25%;border-radius:50%;
  background:radial-gradient(circle,#fff 4%,#fff5a4 21%,#ffe169bb 42%,#9f64ed77 68%,transparent 76%);
  box-shadow:0 0 22px #fff5ba,0 0 47px #bf65ed;
  opacity:0;transform:scale(.2);
  transition:opacity .25s ease,transform .35s cubic-bezier(.2,.9,.3,1);
}
#gs16-ceremony.is-opening .gs16-core{opacity:1;transform:scale(2.05)}
#gs16-ceremony .gs16-shimmer{
  position:absolute;z-index:4;left:19%;top:13%;width:27%;height:16%;
  border-radius:50%;
  background:radial-gradient(ellipse,#fff9ddbb,transparent 70%);
  transform:rotate(-36deg);opacity:.38;
  transition:opacity .24s ease;
}
#gs16-ceremony.is-opening .gs16-shimmer{opacity:0}
#gs16-ceremony .gs16-spark{
  position:absolute;z-index:5;left:50%;top:50%;
  width:5%;aspect-ratio:1;transform:translate(-50%,-50%) scale(.2);
  border-radius:50%;background:#fff3c3;box-shadow:0 0 8px #ffeb79,0 0 17px #a74aff;
  opacity:0;
}
#gs16-ceremony .gs16-spark-1{--gs16-dx:-95px;--gs16-dy:-83px}
#gs16-ceremony .gs16-spark-2{--gs16-dx:95px;--gs16-dy:-70px}
#gs16-ceremony .gs16-spark-3{--gs16-dx:114px;--gs16-dy:12px}
#gs16-ceremony .gs16-spark-4{--gs16-dx:-107px;--gs16-dy:31px}
#gs16-ceremony .gs16-spark-5{--gs16-dx:52px;--gs16-dy:-109px}
#gs16-ceremony .gs16-spark-6{--gs16-dx:-56px;--gs16-dy:98px}
#gs16-ceremony.is-opening .gs16-spark{animation:gs16-spark-burst .54s ease-out both}
#gs16-ceremony.is-revealing,#gs16-ceremony.is-dismissing{
  opacity:0;transition:opacity .36s cubic-bezier(.4,0,1,1);
}
body.gs13-active #gx7-reveal{animation:gs16-prize-enter .34s ease-out both}
@keyframes gs16-land{
  0%{transform:translate(-50%,-50%) scale(1)}
  52%{transform:translate(-50%,-50%) scale(1.055)}
  100%{transform:translate(-50%,-50%) scale(1)}
}
@keyframes gs16-spark-burst{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}
  26%{opacity:1}
  100%{opacity:0;transform:translate(calc(-50% + var(--gs16-dx)),calc(-50% + var(--gs16-dy))) scale(.3)}
}
@keyframes gs16-prize-enter{
  from{opacity:.6;transform:translateY(9px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(prefers-reduced-motion:reduce){
  #gs16-ceremony .gs16-orb,#gs16-ceremony .gs16-top,#gs16-ceremony .gs16-bottom,
  #gs16-ceremony .gs16-core,#gs16-ceremony .gs16-shade{transition-duration:.07s!important;animation:none!important}
  #gs16-ceremony.is-opening .gs16-spark{animation:none!important}
  #gs16-ceremony.is-revealing,#gs16-ceremony.is-dismissing{transition-duration:.07s!important}
  body.gs13-active #gx7-reveal{animation:none!important}
}

/* V16.1: do not show TA-DAAA underneath a half-open capsule. The cosmic
   cover becomes almost opaque during the opening, then gently reveals V7. */
#gs16-ceremony .gs16-shade{
  background:
    radial-gradient(ellipse at 50% 51%,#7331b9d0 0%,#170b46ed 48%,#090523 78%),
    linear-gradient(155deg,#100a3e,#060522);
}
#gs16-ceremony.is-focusing .gs16-shade{opacity:.40}
#gs16-ceremony.is-opening .gs16-shade{opacity:.96}
#gs16-ceremony.is-opening .gs16-top{transform:translate(-7%,-31%) rotate(-21deg)}
#gs16-ceremony.is-opening .gs16-bottom{transform:translate(3%,16%) rotate(7deg)}
