/* Original Pixalia sanctuary, native offers/results. Only two visible showcase
   rings rotate at rest. The bounded ceremony animates a received result only. */
#hwGachaWindow.pxc-gacha,
#wgGachaWindow.pxc-gacha {
  --pxc-gold: #d6b56d;
  --pxc-gold-edge: #a67d3d;
  --pxc-cream: #f5e6c7;
  --pxc-rail-w: 352px;
  --pxc-gacha-scenery: url('../assets/ui/gacha_hall.jpg');
  box-sizing: border-box;
  width: var(--ui-window-max-w, calc(100vw * var(--ui-inv, 1) - 16px));
  height: var(--ui-window-max-h, calc(100vh * var(--ui-inv, 1) - 16px));
  border: 1px solid var(--glass-edge, var(--pxc-gold-edge)); border-radius: var(--ui-r-panel,10px);
  background: linear-gradient(90deg, rgba(4,13,27,.06) 35%, rgba(4,12,24,.34) 66%, rgba(4,12,24,.6)), var(--pxc-gacha-scenery) center / cover no-repeat #101a2c;
  box-shadow: var(--glass-shadow,0 10px 35px rgba(0,0,0,.55));
  color: var(--pxc-cream);
}
#hwGachaWindow.pxc-gacha:not(.win-plate) > .win-title,
#wgGachaWindow.pxc-gacha:not(.win-plate) > .win-title {
  flex: 0 0 auto; min-height: 48px; padding: 11px 68px 11px 25px;
  border: 0; border-bottom: 1px solid rgba(214,181,109,.34);
  background: linear-gradient(90deg, rgba(9,20,36,.93), rgba(12,23,40,.56), rgba(9,20,36,.93));
  color: var(--pxc-cream); box-shadow: inset 0 2px 0 rgba(214,181,109,.18);
  font-weight: 800; font-size: 19px; letter-spacing: .02em;
}
.pxc-gacha > .win-title > span::before { content: '✦'; margin-right: 11px; color: var(--pxc-gold); }
/* Plate geometry and its short-screen fallback belong to the shared UI kit. */
.pxc-gacha.ui-frame.win-plate > .win-title .win-close { min-width: 44px; min-height: 44px; }
@media (min-height: 381px) {
  /* The kit's original right inset assumed a smaller desktop close control. */
  #hwGachaWindow.pxc-gacha.win-plate > .win-title,
  #wgGachaWindow.pxc-gacha.win-plate > .win-title { padding-right: calc(56px * var(--ui-inv,1)); }
  body:not(.touch) #hwGachaWindow.pxc-gacha.win-plate,
  body:not(.touch) #wgGachaWindow.pxc-gacha.win-plate { --ui-plate-h: 48px; }
}
#hwGachaWindow.pxc-gacha > .win-body,
#wgGachaWindow.pxc-gacha > .win-body {
  flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
  padding: 12px 22px 20px; background: none; overflow: hidden;
}
#hwGachaWindow.pxc-gacha .hw-tabs,
#wgGachaWindow.pxc-gacha .hw-tabs {
  flex: 0 0 auto; align-self: flex-end; width: var(--pxc-rail-w); max-width: 100%;
  box-sizing: border-box; margin: 0 0 10px; padding: 4px;
  border: 1px solid var(--ui-edge-soft,rgba(214,181,109,.5)); border-radius: var(--ui-r-box,8px);
  background: var(--glass-soft,rgba(9,20,34,.94)); box-shadow: var(--ui-lip,inset 0 1px 0 rgba(214,181,109,.14));
}
#hwGachaWindow.pxc-gacha .hw-tab,
#wgGachaWindow.pxc-gacha .hw-tab { font-size: 12px; min-height: 34px; padding: 7px 4px; border-radius: var(--ui-r-ctl,6px); color: var(--muted,#c2c9cb); }
#hwGachaWindow.pxc-gacha .hw-tab.on,
#wgGachaWindow.pxc-gacha .hw-tab.on {
  color: var(--brass-hi,#f9eac8); background: var(--ui-on-fill,linear-gradient(#3a5390,#24345e));
  border-color: var(--glass-edge,#8d764c); box-shadow: var(--ui-lip,inset 0 1px 0 rgba(214,181,109,.14));
}
.pxc-gacha .hw-pane { flex: 1 1 auto; min-height: 0; }
.pxc-gacha .pxg-draw-layout {
  height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr) var(--pxc-rail-w); gap: 22px;
}
.pxc-gacha .pxg-showcase {
  display: flex; flex-direction: column; min-height: 0; padding: 0 3% 4px 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; overflow: auto;
}
.pxc-gacha .pxg-feature {
  flex: 1 1 auto; min-height: 210px; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 12px 0 24px; position: relative; isolation: isolate;
}
.pxc-gacha .pxg-feature-art { flex: 0 0 auto; height: clamp(170px, 33vh, 338px); z-index: 1; }
.pxc-gacha .pxr-showcase-orbit {
  position: absolute; z-index: 0; left: 50%; bottom: clamp(12px, 2vh, 22px);
  width: min(100%, clamp(255px, 48vh, 490px)); aspect-ratio: 1;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(139,211,218,.14), rgba(139,211,218,.025) 48%, transparent 69%);
}
.pxr-orbit-outer, .pxr-orbit-inner {
  position: absolute; display: block; inset: 0; background: center / contain no-repeat;
  transform-origin: center; pointer-events: none;
}
.pxr-orbit-outer { background-image: url('../assets/ui/ritual/ritual-orbit-outer.svg'); }
.pxr-orbit-inner { background-image: url('../assets/ui/ritual/ritual-orbit-inner.svg'); }
.pxr-showcase-orbit > .pxr-orbit-outer { animation: pxr-orbit-turn 70s linear infinite paused; opacity: .83; }
.pxr-showcase-orbit > .pxr-orbit-inner { animation: pxr-orbit-turn 54s linear infinite reverse paused; opacity: .8; }
.pxc-gacha:not(.hidden):not([hidden])[data-pxg-tab="draw"] .pxr-showcase-orbit > i { animation-play-state: running; }
.pxc-gacha .pxg-feature-art::before { display: none; }
.pxc-gacha .pxg-feature-art::after {
  content: ''; position: absolute; z-index: -1; left: 26%; right: 26%; bottom: -6px;
  height: 20px; border-radius: 50%; background: rgba(1,7,15,.36);
}
.pxc-gacha .pxg-feature-art > .wg-pair { width: min(90%, 410px); height: 100%; filter: drop-shadow(0 5px 3px rgba(0,0,0,.5)); }
.pxc-gacha .pxg-feature-art > .hw-look { width: 220px; height: 100%; filter: drop-shadow(0 5px 3px rgba(0,0,0,.5)); }
.pxc-gacha .pxg-feature-name {
  align-self: center; min-height: 0; max-width: 90%; padding: 9px 28px; margin: 10px 0 0;
  border-top: 1px solid rgba(214,181,109,.75); border-bottom: 1px solid rgba(214,181,109,.35);
  color: var(--pxc-cream); background: linear-gradient(90deg, transparent, rgba(7,19,33,.9) 15%, rgba(7,19,33,.9) 85%, transparent);
  text-shadow: 0 2px 2px #06101a; font-size: 20px; position: relative; z-index: 1;
}
.pxc-gacha .hw-looks,
.pxc-gacha .wg-looks { flex: 0 0 auto; width: min(100%, 460px); align-self: center; margin: 0; gap: 7px; }
.pxc-gacha .hw-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pxc-gacha .wg-looks { flex-direction: column; }
.pxc-gacha .wg-looks .wg-row { width: 100%; gap: 7px; }
.pxc-gacha .pxg-art-option {
  min-height: 61px; padding: 5px; border-radius: 3px; border-color: rgba(171,144,89,.62);
  background: linear-gradient(rgba(19,33,49,.7), rgba(8,19,33,.92));
  box-shadow: inset 0 0 0 2px rgba(214,181,109,.07), 0 3px 7px rgba(0,0,0,.18);
}
.pxc-gacha .pxg-art-option.pxg-art-good { border-color: #b09253; }
.pxc-gacha .pxg-art-option.on { border-color: #e4c57b; box-shadow: inset 0 0 0 1px #e4c57b, inset 0 0 17px rgba(214,181,109,.15); }
.pxc-gacha .pxg-art-option .wg-pair { max-height: 52px; }
.pxc-gacha .pxg-art-option .hw-look { height: 50px; width: 38px; }
.pxc-gacha .pxg-action-rail {
  position: relative; box-sizing: border-box; padding: 17px 14px; overflow: auto;
  border: 1px solid #a67d3d; border-radius: 3px;
  background: linear-gradient(135deg, rgba(25,42,59,.96), rgba(7,19,32,.98));
  box-shadow: inset 0 0 0 3px #132031, inset 0 0 0 4px rgba(214,181,109,.43), 0 10px 24px rgba(0,0,0,.28);
  scrollbar-color: #8c7548 #142131;
}
.pxc-gacha .pxg-action-rail.ui-inset {
  border-color: var(--ui-edge-soft,rgba(201,146,63,.38)); border-radius: var(--ui-r-box,8px);
  background: var(--ui-sunk,linear-gradient(rgba(8,12,22,.58),rgba(8,12,22,.34))),rgba(9,20,35,.93);
  box-shadow: var(--ui-sunk-shadow,inset 0 2px 4px rgba(0,0,0,.45));
}
.pxc-gacha .pxg-action-rail::before,
.pxc-gacha .pxg-action-rail::after {
  content: '◆'; display: block; color: #d6b56d; text-align: center; font-size: 13px;
  line-height: 14px; letter-spacing: 5px; margin: -5px 0 8px;
  background: linear-gradient(90deg, transparent 6%, #a67d3d 42%, transparent 42%, transparent 58%, #a67d3d 58%, transparent 94%) center / 100% 1px no-repeat;
}
.pxc-gacha .pxg-action-rail::after { margin: 12px 0 -5px; }
.pxc-gacha .hw-when { margin: 0 0 12px; border: 0; padding: 4px 0 9px; border-bottom: 1px solid rgba(214,181,109,.24); color: #d9d7cf; }
.pxc-gacha .pxg-draw-group { margin: 0 0 12px; border: 0; border-radius: 0; padding: 0; background: none; }
.pxc-gacha .hw-row-h { color: #e0c28a; font-size: 12px; line-height: 1.55; font-weight: 700; }
.pxc-gacha .hw-buttons { grid-template-columns: minmax(0, 1fr); gap: 8px; }
#hwGachaWindow.pxc-gacha .hw-go,
#wgGachaWindow.pxc-gacha .hw-go {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  min-height: 55px; padding: 9px 18px; border-radius: var(--ui-r-box,8px); border: 1px solid var(--ui-gold-edge,#805028);
  background: var(--ui-gold,linear-gradient(#ffd66b,#e09a2c)); color: var(--ui-gold-ink,#1b1406);
  box-shadow: var(--ui-gold-drop,0 2px 0 #6b3f1c),inset 0 1px 0 rgba(255,255,255,.35); text-shadow: none;
}
.pxc-gacha .hw-go b { text-align: left; font-size: 17px; }
.pxc-gacha .hw-go small { text-align: right; font-size: 11px; }
.pxc-gacha .pxg-draw-boost { padding-top: 10px; border-top: 1px solid rgba(214,181,109,.23); }
.pxc-gacha .pxg-draw-boost .hw-buttons { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
#hwGachaWindow.pxc-gacha .hw-go.ruby,
#wgGachaWindow.pxc-gacha .hw-go.ruby {
  display: flex; flex-direction: column; justify-content: center; min-height: 69px; padding: 8px 3px;
  border-color: var(--ui-edge-soft,#827070); background: var(--glass-soft,linear-gradient(#343e61,#202b49)); color: var(--ui-ruby,#ff9ab0);
  box-shadow: var(--ui-drop,0 2px 0 rgba(10,14,26,.65)),var(--ui-lip,inset 0 1px 0 rgba(255,226,138,.14));
}
.pxc-gacha .hw-go.ruby b { font-size: 14px; text-align: center; }
.pxc-gacha .hw-go.ruby small { text-align: center; font-size: 10px; }
#hwGachaWindow.pxc-gacha .hw-go:disabled,
#wgGachaWindow.pxc-gacha .hw-go:disabled { color: #a8adb2; background: linear-gradient(#39414a,#252e39); border-color: #5f645f; opacity: .72; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.pxc-gacha .hw-lines { margin: 13px 0 0; color: #bcc6ca; font-size: 11px; gap: 7px; }
.pxc-gacha .hw-pity { padding: 9px; background: rgba(214,181,109,.07); border: 1px solid rgba(214,181,109,.23); border-radius: 3px; color: #e6c88c; }
.pxc-gacha .hw-note { color: #b8c3ca; font-size: 11px; line-height: 1.7; }
.pxc-gacha:not([data-pxg-tab="draw"]) .hw-pane {
  flex: 0 1 auto; align-self: center; box-sizing: border-box; width: min(1120px,100%);
  max-height: 100%; min-height: 0; overflow: auto; padding: 22px; margin: 8px 0 auto;
  border: 1px solid #a67d3d; border-radius: 4px; background: rgba(12,25,41,.96);
  box-shadow: inset 0 0 0 3px #152337, inset 0 0 0 4px rgba(214,181,109,.28), 0 12px 24px rgba(0,0,0,.3);
}
.pxc-gacha .hw-odds td, .pxc-gacha .hw-board td { border-bottom-color: rgba(214,181,109,.15); }
.pxc-gacha .hw-claim { border-color: #a67d3d; border-radius: 3px; }
.pxc-gacha .hw-trade-row { background: rgba(19,37,56,.88); border-color: #576052; border-radius: 4px; }
@media (max-width: 950px) {
  #hwGachaWindow.pxc-gacha, #wgGachaWindow.pxc-gacha { --pxc-rail-w: 300px; }
  #hwGachaWindow.pxc-gacha > .win-body, #wgGachaWindow.pxc-gacha > .win-body { padding: 10px 13px 13px; }
  .pxc-gacha .pxg-draw-layout { grid-template-columns: minmax(0,1fr) var(--pxc-rail-w); gap: 12px; }
  .pxc-gacha .pxg-feature-name { font-size: 17px; }
  .pxc-gacha .pxg-feature-art > .wg-pair { width: min(95%,340px); }
}
@media (max-width: 600px) and (orientation: portrait) {
  #hwGachaWindow.pxc-gacha, #wgGachaWindow.pxc-gacha { background-position: 35% top; }
  #hwGachaWindow.pxc-gacha:not(.win-plate) > .win-title, #wgGachaWindow.pxc-gacha:not(.win-plate) > .win-title { padding-left: 14px; font-size: 16px; }
  #hwGachaWindow.pxc-gacha > .win-body, #wgGachaWindow.pxc-gacha > .win-body { overflow: auto; }
  #hwGachaWindow.pxc-gacha .hw-tabs, #wgGachaWindow.pxc-gacha .hw-tabs { width: 100%; align-self: stretch; }
  .pxc-gacha .hw-pane { flex: 0 0 auto; }
  .pxc-gacha .pxg-draw-layout { display: flex; flex-direction: column; height: auto; }
  .pxc-gacha .pxg-showcase { min-height: 300px; overflow: visible; padding-right: 0; }
  .pxc-gacha .pxg-feature { min-height: 190px; padding: 10px 0 17px; }
  .pxc-gacha .pxg-feature-art { height: 175px; }
  .pxc-gacha .pxg-feature-art > .hw-look { width: 135px; }
  .pxc-gacha .pxg-feature-name { padding: 7px 18px; font-size: 16px; }
  .pxc-gacha .hw-looks { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; }
  .pxc-gacha .wg-looks { flex-direction: row; gap: 4px; }
  .pxc-gacha .wg-looks .wg-row { width: calc(50% - 2px); gap: 4px; }
  .pxc-gacha .pxg-art-option { min-height: 46px; padding: 3px; }
  .pxc-gacha .pxg-art-option .hw-look { height: 38px; width: 28px; }
  .pxc-gacha .pxg-art-option .wg-pair { max-height: 39px; }
  .pxc-gacha .pxg-action-rail { overflow: visible; padding: 14px; }
  .pxc-gacha:not([data-pxg-tab="draw"]) .hw-pane { padding: 13px 9px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  #hwGachaWindow.pxc-gacha, #wgGachaWindow.pxc-gacha { --pxc-rail-w: 310px; }
  #hwGachaWindow.pxc-gacha:not(.win-plate) > .win-title, #wgGachaWindow.pxc-gacha:not(.win-plate) > .win-title { min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 16px; }
  #hwGachaWindow.pxc-gacha > .win-body, #wgGachaWindow.pxc-gacha > .win-body { padding-top: 6px; padding-bottom: 8px; }
  #hwGachaWindow.pxc-gacha .hw-tabs, #wgGachaWindow.pxc-gacha .hw-tabs { margin-bottom: 6px; }
  .pxc-gacha .pxg-feature { padding: 0 0 8px; min-height: 130px; }
  .pxc-gacha .pxg-feature-art { height: 125px; }
  .pxc-gacha .pxg-feature-art > .hw-look { width: 90px; }
  .pxc-gacha .pxg-feature-art > .wg-pair { width: 210px; }
  .pxc-gacha .pxr-showcase-orbit { width: min(100%,205px); bottom: 4px; }
  .pxc-gacha .pxg-feature-name { font-size: 13px; padding: 4px 15px; margin-top: 3px; }
  .pxc-gacha .hw-looks { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; }
  .pxc-gacha .wg-looks { flex-direction: row; gap: 4px; }
  .pxc-gacha .wg-looks .wg-row { width: calc(50% - 2px); gap: 4px; }
  .pxc-gacha .pxg-art-option { min-height: 44px; padding: 2px; }
  .pxc-gacha .pxg-art-option .wg-pair { max-height: 37px; }
  .pxc-gacha .pxg-art-option .hw-look { width: 25px; height: 35px; }
}

/* Received-result ceremony. A full-area stage with an original faceted seal;
   closed windows do no ring work and every state-change effect is finite. */
.pxc-reveal-overlay { --pxr-light: #9bdce2; --pxr-light-rgb: 155,220,226; --pxr-gold: #dfc17d; }
#hwReveal.pxc-reveal-overlay,
#wgReveal.pxc-reveal-overlay {
  box-sizing: border-box; align-items: stretch; justify-content: stretch;
  padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  background: #071221;
}
.pxc-reveal-overlay[data-pxr-tone="good"] { --pxr-light: #f2d38b; --pxr-light-rgb: 242,211,139; }
.pxc-reveal-overlay[data-pxr-tone="normal"] { --pxr-light: #c4b6ee; --pxr-light-rgb: 196,182,238; }
#hwReveal .hw-pop.pxc-reveal-box,
#wgReveal .hw-pop.pxc-reveal-box {
  position: relative; isolation: isolate; width: 100%; height: 100%; max-width: none;
  max-height: 100%; min-width: 0; padding: clamp(16px,2.5vw,34px); overflow: hidden;
  border: 1px solid #ac884b; border-radius: 5px;
  background: linear-gradient(rgba(6,19,35,.78),rgba(6,15,28,.88)), url('../assets/ui/gacha_hall.jpg') 40% center / cover;
  box-shadow: inset 0 0 0 4px #0b1b2d,inset 0 0 0 5px rgba(214,181,109,.32);
  animation: pxc-result-enter .22s ease-out;
}
.pxc-reveal-box::before {
  content: ''; position: absolute; inset: 11px; z-index: -1; pointer-events: none;
  border: 1px solid rgba(214,181,109,.12);
  background: radial-gradient(ellipse at 50% 40%,rgba(112,196,210,.12),transparent 64%);
}
#hwReveal.pxc-reveal-overlay .hw-cards,
#wgReveal.pxc-reveal-overlay .hw-cards {
  position: relative; z-index: 1; flex: 1 1 auto; min-height: 85px;
  /* Center only content that fits; every card must remain reachable on overflow. */
  align-content: flex-start; align-content: safe center;
  gap: 16px; padding: 26px 8px; max-width: 1120px; width: 100%; box-sizing: border-box;
  align-self: center; transition: none;
}
.pxc-reveal-overlay:is([data-pxc-phase="intro"],[data-pxc-phase="charge"],[data-pxc-phase="burst"]) .hw-cards { visibility: hidden; }
.pxc-reveal-overlay .hw-card { --pxr-card-edge: #7387ad; --pxr-card-rgb: 115,135,173; }
#hwReveal.pxc-reveal-overlay .hw-card,
#wgReveal.pxc-reveal-overlay .hw-card { width: 134px; height: 178px; flex: 0 0 auto; }
.pxc-reveal-overlay .hw-card.r1 { --pxr-card-edge: #87c5e8; --pxr-card-rgb: 135,197,232; }
.pxc-reveal-overlay .hw-card.r2 { --pxr-card-edge: #77b7f3; --pxr-card-rgb: 119,183,243; }
.pxc-reveal-overlay .hw-card.normal { --pxr-card-edge: #bd9ce7; --pxr-card-rgb: 189,156,231; }
.pxc-reveal-overlay .hw-card.good { --pxr-card-edge: #edc36b; --pxr-card-rgb: 237,195,107; }
#hwReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards,
#wgReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards { max-width: 750px; }
#hwReveal.pxc-reveal-overlay[data-pxc-count="single"] .hw-card,
#wgReveal.pxc-reveal-overlay[data-pxc-count="single"] .hw-card { width: 194px; height: 258px; }
#hwReveal.pxc-reveal-overlay.many .hw-card,
#wgReveal.pxc-reveal-overlay.many .hw-card { width: 59px; height: 79px; }
.pxc-reveal-overlay[data-pxc-phase="arriving"] .hw-card.pxr-arrived {
  animation: pxr-card-arrive .36s cubic-bezier(.18,.72,.22,1) both;
  animation-delay: calc(var(--pxr-index,0) * 45ms);
}
.pxc-reveal-overlay .hw-face { border-radius: var(--ui-r-slot,7px); transition-duration: .32s; backface-visibility: hidden; }
#hwReveal.pxc-reveal-overlay .hw-back,
#wgReveal.pxc-reveal-overlay .hw-back {
  border: 0;
  background: url('../assets/ui/ritual/ritual-card-back.svg') center / 100% 100% no-repeat #102b48;
  box-shadow: 0 5px 12px rgba(0,0,0,.3);
}
.pxc-reveal-overlay .hw-back::after { content: none; }
#hwReveal.pxc-reveal-overlay .hw-front,
#wgReveal.pxc-reveal-overlay .hw-front {
  flex-direction: column; gap: 0; padding: 8px; box-sizing: border-box; overflow: hidden;
  border: 1px solid var(--pxr-card-edge);
  background: radial-gradient(ellipse at 50% 25%,rgba(var(--pxr-card-rgb),.32),transparent 65%),linear-gradient(#1b2e48,#0d1c31);
  box-shadow: inset 0 0 0 3px #0b1b2e,inset 0 0 0 4px rgba(var(--pxr-card-rgb),.44),var(--ui-lip,inset 0 1px 0 rgba(255,226,138,.14));
}
.pxc-reveal-overlay .hw-front > .hw-ico,
.pxc-reveal-overlay .hw-front > .hw-art { position: absolute; top: 34%; left: 50%; transform: translate(-50%,-50%) scale(1.45); margin: 0; }
.pxc-reveal-overlay .pxc-result-name {
  position: absolute; left: 7px; right: 7px; bottom: 10px; box-sizing: border-box;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 38px; padding: 5px 3px; border-top: 1px solid rgba(var(--pxr-card-rgb),.52);
  background: linear-gradient(rgba(6,16,29,.28),rgba(6,16,29,.8));
  text-align: center; font-size: 11px; line-height: 1.4; color: var(--paper,#f5e6c7); text-shadow: 0 1px 1px #05101c;
}
.pxc-reveal-overlay[data-pxc-count="single"] .pxc-result-name { left: 10px; right: 10px; bottom: 14px; min-height: 48px; padding: 7px 4px; font-size: 14px; }
.pxc-reveal-overlay[data-pxc-count="single"] .hw-front > .hw-ico,
.pxc-reveal-overlay[data-pxc-count="single"] .hw-front > .hw-art { transform: translate(-50%,-50%) scale(2.2); margin: 0; }
.pxc-reveal-overlay.many .hw-front > .hw-ico,
.pxc-reveal-overlay.many .hw-front > .hw-art { top: 50%; transform: translate(-50%,-50%); }
/* A single, local streak accompanies each native flip. Skip/complete never
   creates a simultaneous flash across an entire result batch. */
.pxc-reveal-overlay[data-pxc-phase="revealing"]:not(.pxc-reveal-instant) .hw-card.open::before {
  content: ''; position: absolute; z-index: 3; inset: 1px; border-radius: var(--ui-r-slot,7px); pointer-events: none;
  background: linear-gradient(90deg,transparent 5%,rgba(var(--pxr-card-rgb),.3) 35%,#f6f5d8 50%,rgba(var(--pxr-card-rgb),.3) 65%,transparent 95%);
  opacity: 0; transform-origin: center; animation: pxr-card-flash .5s ease-out 1 both;
}
#hwReveal.pxc-reveal-overlay .hw-card.pxc-rare-arrival.open,
#wgReveal.pxc-reveal-overlay .hw-card.pxc-rare-arrival.open { animation: pxc-rare-arrive .52s ease-out 1; }
.pxc-reveal-overlay .hw-card.pxc-rare-arrival::after {
  content: ''; position: absolute; inset: -5px; z-index: 2; border: 1px solid var(--pxr-light);
  border-radius: 7px; pointer-events: none; opacity: 0; animation: pxr-card-halo .6s ease-out 1;
}
.pxc-reveal-stage {
  position: absolute; z-index: 2; inset: 16px 16px 100px;
  display: grid; place-items: center; pointer-events: none;
}
.pxr-ritual-orbit {
  position: absolute; width: min(66vw,65vh,520px); aspect-ratio: 1; max-width: 94%;
  pointer-events: none; background: radial-gradient(circle,rgba(var(--pxr-light-rgb),.12),transparent 66%);
}
.pxr-ritual-orbit > .pxr-orbit-outer { animation: pxr-orbit-turn 28s linear infinite; opacity: .94; }
.pxr-ritual-orbit > .pxr-orbit-inner { animation: pxr-orbit-turn 19s linear infinite reverse; opacity: .9; }
.pxc-reveal-stage::before {
  content: ''; position: absolute; width: min(18vw,120px); height: 90%; pointer-events: none;
  background: linear-gradient(transparent,rgba(var(--pxr-light-rgb),.08) 35%,rgba(var(--pxr-light-rgb),.18) 53%,transparent 84%);
  transform: rotate(16deg); opacity: .8;
}
.pxc-reveal-stage::after {
  content: ''; position: absolute; width: min(42vw,320px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--pxr-light); background: radial-gradient(circle,rgba(var(--pxr-light-rgb),.18),transparent 67%);
  opacity: 0; pointer-events: none;
}
#hwReveal .pxr-ritual-trigger,
#wgReveal .pxr-ritual-trigger {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: min(360px,85%); min-height: 44px; padding: 12px 16px; border: 0; border-radius: 8px;
  background: transparent; box-shadow: none; color: #f4e4bc; font: inherit;
  pointer-events: auto; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pxr-ritual-core {
  display: block; flex: 0 0 auto; width: clamp(130px,19vw,225px); height: clamp(163px,24vw,282px);
  background: url('../assets/ui/ritual/ritual-crystal.svg') center / contain no-repeat;
  transform-origin: 50% 54%; pointer-events: none;
}
.pxr-ritual-label {
  display: block; padding: 9px 22px; margin-top: 8px; max-width: 100%; box-sizing: border-box;
  border-top: 1px solid rgba(223,193,125,.6); border-bottom: 1px solid rgba(223,193,125,.32);
  background: linear-gradient(90deg,transparent,rgba(7,19,33,.94) 15%,rgba(7,19,33,.94) 85%,transparent);
  color: #f4e4bc; font-size: clamp(13px,1.4vw,18px); font-weight: 700; line-height: 1.6;
  text-align: center; text-wrap: balance;
}
.pxr-ritual-status {
  position: absolute; z-index: 2; left: 5%; right: 5%; bottom: 8px;
  color: #c4d7dc; font-size: 12px; text-align: center; line-height: 1.6; pointer-events: none;
}
.pxc-reveal-overlay:not([data-pxc-phase="intro"]):not([data-pxc-phase="charge"]) .pxr-ritual-trigger { pointer-events: none; cursor: default; }
.pxc-reveal-overlay[data-pxc-phase="intro"] .pxr-ritual-core { animation: pxr-seal-enter .42s ease-out both; }
.pxc-reveal-overlay[data-pxc-phase="charge"] .pxr-ritual-core { animation: pxr-seal-charge 1.2s cubic-bezier(.26,.63,.48,1) both; }
.pxc-reveal-overlay[data-pxc-phase="charge"] .pxr-ritual-orbit { animation: pxr-ring-charge 1.2s ease-in both; }
.pxc-reveal-overlay[data-pxc-phase="charge"] .pxc-reveal-stage::after { animation: pxr-charge-light 1.2s ease-in both; }
.pxc-reveal-overlay[data-pxc-phase="burst"] .pxr-ritual-core { animation: pxr-seal-release .42s ease-out both; }
.pxc-reveal-overlay[data-pxc-phase="burst"] .pxr-ritual-orbit { animation: pxr-ring-release .65s ease-out both; }
.pxc-reveal-overlay[data-pxc-phase="burst"] .pxc-reveal-stage::after { animation: pxr-light-wave .65s ease-out both; }
.pxc-reveal-overlay:is([data-pxc-phase="burst"],[data-pxc-phase="arriving"],[data-pxc-phase="revealing"]) .pxr-ritual-label { visibility: hidden; }
.pxr-motes { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pxr-mote {
  position: absolute; left: 50%; top: 50%; display: block; width: 9px; height: 18px; margin: -9px 0 0 -4.5px;
  border-radius: 70% 70% 65% 65%; border: 1px solid rgba(255,248,219,.85); background: var(--pxr-light);
  box-shadow: 0 0 8px rgba(var(--pxr-light-rgb),.35); opacity: 0;
}
.pxr-mote::after { content: ''; position: absolute; width: 3px; height: 25px; left: 2px; top: 9px; background: linear-gradient(var(--pxr-light),transparent); opacity: .65; }
.pxc-reveal-overlay[data-pxc-phase="burst"] .pxr-mote {
  animation: pxr-mote-travel .62s cubic-bezier(.1,.54,.22,1) both; animation-delay: calc(var(--pxr-index,0) * 7ms);
}
.pxc-reveal-overlay:is([data-pxc-phase="arriving"],[data-pxc-phase="revealing"],[data-pxc-phase="complete"]) .pxc-reveal-stage { visibility: hidden; }
#hwReveal.pxc-reveal-overlay .hw-sum,
#wgReveal.pxc-reveal-overlay .hw-sum {
  position: relative; z-index: 3; width: min(100%,1000px); box-sizing: border-box; align-self: center;
  margin-top: 12px; max-height: min(150px,calc(24vh * var(--ui-inv,1))); padding: 12px 18px;
  border: 1px solid rgba(214,181,109,.34); border-radius: 3px; background: rgba(9,21,36,.94);
}
#hwReveal.pxc-reveal-overlay .hw-pop-btns,
#wgReveal.pxc-reveal-overlay .hw-pop-btns {
  position: relative; z-index: 4; min-height: 44px; flex-shrink: 0; padding-top: 14px; margin-top: 12px;
  border-top: 1px solid rgba(214,181,109,.3); background: linear-gradient(90deg,transparent,#0d1d30 18%,#0d1d30 82%,transparent);
}
#hwReveal.pxc-reveal-overlay .hw-pop-btns button,
#wgReveal.pxc-reveal-overlay .hw-pop-btns button {
  min-width: 130px; min-height: 44px; padding: 9px 20px; border-radius: var(--ui-r-box,8px); border-color: var(--glass-edge,#a48b58);
  color: var(--paper,#f5e6c7); background: var(--glass-soft,linear-gradient(#34445b,#1e2c42)); box-shadow: var(--ui-drop,0 2px 0 rgba(10,14,26,.65)),var(--ui-lip,inset 0 1px 0 rgba(255,226,138,.14));
  font: inherit; font-size: 13px; line-height: 1.5;
}
#hwReveal.pxc-reveal-overlay .hw-pop-btns .hw-again,
#wgReveal.pxc-reveal-overlay .hw-pop-btns .hw-again { color: var(--ui-gold-ink,#1b1406); background: var(--ui-gold,linear-gradient(#ffd66b,#e09a2c)); border-color: var(--ui-gold-edge,#805028); box-shadow: var(--ui-gold-drop,0 2px 0 #6b3f1c),inset 0 1px 0 rgba(255,255,255,.35); text-shadow: none; }
.pxc-reveal-overlay:not([data-pxc-phase="complete"]) .hw-again { display: none; }
.pxc-reveal-overlay button:focus-visible { outline: 2px solid #f7e1a5; outline-offset: 3px; }
#hwReveal .pxr-ritual-trigger:focus-visible,
#wgReveal .pxr-ritual-trigger:focus-visible { outline: none; }
.pxr-ritual-trigger:focus-visible .pxr-ritual-label { outline: 2px solid #f7e1a5; outline-offset: 4px; border-radius: 2px; }
@media (hover: hover) {
  .pxc-reveal-overlay[data-pxc-phase="intro"] .pxr-ritual-trigger:hover .pxr-ritual-label { background-color: rgba(48,74,92,.65); }
}
@keyframes pxr-orbit-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pxc-result-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes pxr-seal-enter { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pxr-seal-charge { 0% { transform: scale(1); } 65% { transform: scale(.94); } 85% { transform: scale(1.02); } 100% { transform: scale(.98); } }
@keyframes pxr-ring-charge { from { transform: scale(1); opacity: 1; } to { transform: scale(.88); opacity: .65; } }
@keyframes pxr-charge-light { from { transform: scale(.45); opacity: 0; } to { transform: scale(.72); opacity: .9; } }
@keyframes pxr-seal-release { 0% { opacity: 1; transform: scale(.98); } 30% { opacity: 1; transform: scale(1.08); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes pxr-ring-release { from { transform: scale(.88); opacity: .65; } to { transform: scale(1.16); opacity: 0; } }
@keyframes pxr-light-wave { 0% { transform: scale(.7); opacity: .8; } 40% { opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pxr-mote-travel { 0% { transform: translate(0,0) scale(.4); opacity: 0; } 16% { opacity: 1; } 78% { opacity: 1; } 100% { transform: translate(var(--pxr-x,0px),var(--pxr-y,-100px)) scale(.75); opacity: 0; } }
@keyframes pxr-card-arrive { from { opacity: 0; transform: translateY(35px) scale(.86); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pxc-rare-arrive { 0% { transform: translateY(-5px) scale(1.055); } 70%,100% { transform: translateY(0) scale(1); } }
@keyframes pxr-card-halo { 0% { opacity: .85; transform: scale(.98); } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes pxr-card-flash { 0% { opacity: 0; transform: scaleX(.05); } 30% { opacity: .8; transform: scaleX(.18); } 65% { opacity: .35; transform: scaleX(.7); } 100% { opacity: 0; transform: scaleX(1.1); } }
@media (max-width: 900px) {
  #hwReveal.pxc-reveal-overlay .hw-card, #wgReveal.pxc-reveal-overlay .hw-card { width: 108px; height: 145px; }
  #hwReveal.pxc-reveal-overlay .hw-cards, #wgReveal.pxc-reveal-overlay .hw-cards { gap: 11px; }
  #hwReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards, #wgReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards { max-width: 600px; }
}
@media (max-height: 480px), (max-width: 600px) {
  #hwReveal.pxc-reveal-overlay, #wgReveal.pxc-reveal-overlay { padding: max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); }
  #hwReveal .hw-pop.pxc-reveal-box, #wgReveal .hw-pop.pxc-reveal-box { padding: 14px; }
  #hwReveal.pxc-reveal-overlay .hw-card, #wgReveal.pxc-reveal-overlay .hw-card { width: 77px; height: 106px; }
  #hwReveal.pxc-reveal-overlay.many .hw-card, #wgReveal.pxc-reveal-overlay.many .hw-card { width: 42px; height: 58px; }
  #hwReveal.pxc-reveal-overlay[data-pxc-count="single"] .hw-card, #wgReveal.pxc-reveal-overlay[data-pxc-count="single"] .hw-card { width: 126px; height: 162px; }
  #hwReveal.pxc-reveal-overlay .hw-cards, #wgReveal.pxc-reveal-overlay .hw-cards {
    gap: 8px; padding: 14px 3px;
  }
  .pxc-reveal-overlay .pxc-result-name { left: 5px; right: 5px; bottom: 6px; min-height: 28px; padding: 3px 1px; font-size: 9px; }
  .pxc-reveal-overlay .hw-front > .hw-ico, .pxc-reveal-overlay .hw-front > .hw-art { transform: translate(-50%,-50%) scale(1.05); }
  .pxc-reveal-overlay[data-pxc-count="single"] .hw-front > .hw-ico, .pxc-reveal-overlay[data-pxc-count="single"] .hw-front > .hw-art { transform: translate(-50%,-50%) scale(1.45); margin: 0; }
  .pxc-reveal-overlay[data-pxc-count="single"] .pxc-result-name { bottom: 9px; min-height: 38px; font-size: 12px; }
  .pxc-reveal-overlay.many .hw-front > .hw-ico, .pxc-reveal-overlay.many .hw-front > .hw-art { transform: translate(-50%,-50%); }
  .pxc-reveal-stage { inset: 8px 8px 86px; }
  .pxr-ritual-orbit { width: min(80vw,63vh,340px); }
  .pxr-ritual-core { width: 150px; height: 187px; }
  .pxr-ritual-label { font-size: 13px; padding: 7px 12px; margin-top: 2px; }
  .pxr-ritual-status { font-size: 11px; bottom: 3px; }
  #hwReveal.pxc-reveal-overlay .hw-pop-btns, #wgReveal.pxc-reveal-overlay .hw-pop-btns { padding-top: 8px; margin-top: 8px; gap: 7px; }
  #hwReveal.pxc-reveal-overlay .hw-pop-btns button, #wgReveal.pxc-reveal-overlay .hw-pop-btns button { min-width: 105px; padding: 8px 12px; }
  #hwReveal.pxc-reveal-overlay .hw-sum, #wgReveal.pxc-reveal-overlay .hw-sum { padding: 8px 10px; margin-top: 7px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  #hwReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards, #wgReveal.pxc-reveal-overlay[data-pxc-count="several"] .hw-cards { max-width: 1120px; }
  .pxr-ritual-core { width: 112px; height: 140px; }
  .pxr-ritual-orbit { width: min(46vw,71vh,260px); }
  .pxr-ritual-label { margin-top: -4px; padding: 4px 14px; }
  .pxr-ritual-status { left: auto; right: 12px; bottom: 10px; max-width: 25%; text-align: right; }
}
.pxr-page-hidden .pxr-orbit-outer,
.pxr-page-hidden .pxr-orbit-inner,
#hud:has(> .pxc-reveal-overlay) .pxr-showcase-orbit > i,
.pxc-gacha.hidden .pxr-orbit-outer,
.pxc-gacha.hidden .pxr-orbit-inner,
.pxc-gacha[hidden] .pxr-orbit-outer,
.pxc-gacha[hidden] .pxr-orbit-inner { animation-play-state: paused !important; }
.pxc-reveal-instant .hw-card,
.pxc-reveal-instant .hw-card::before,
.pxc-reveal-instant .hw-card::after,
.pxc-reveal-instant .hw-face,
.pxc-reveal-instant .pxc-reveal-box { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .pxr-showcase-orbit > i,
  .pxc-reveal-overlay *, .pxc-reveal-overlay *::before, .pxc-reveal-overlay *::after { animation: none !important; transition: none !important; }
}
