.gacha-container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

#collectedRewardsBtn {
  background: transparent;
  border: 0;
  padding: 0;
}

@media (max-width: 700px) {
  #collectedRewardsBtn {
    width: 44px;
    height: 44px;
  }
}

[data-reward-detail] {
  cursor: pointer;
}

.give-button,
.quantity-control button {
  border: 1px solid rgba(215, 155, 66, .65);
  font-weight: 800;
}

.simulator-content {
  box-sizing: border-box;
  display: flex;
  min-height: 0;
  padding: 0;
}

.play-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #f7ead5;
  overflow: hidden;
}

.play-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.event-heading {
  align-items: center;
  background: var(--gf-navbar-bg);
  border-bottom: 1px solid rgba(215, 155, 66, .5);
  display: flex;
  justify-content: space-between;
  min-height: 52px;
  padding: 0;
  padding-inline-start: 12px;
}

.event-picker-group {
  flex: 1 1 auto;
  min-width: 0;
}

.event-picker-row {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.embedded-select-control {
  background: rgba(34, 23, 17, .2);
  border: 1px solid rgba(229, 184, 93, .22);
  border-radius: 3px;
  cursor: pointer;
  display: block;
  overflow: hidden;
  padding-block: 3px;
  padding-inline: 6px 18px;
  position: relative;
  transition: background-color .16s ease, border-color .16s ease;
}

.embedded-select-control::after {
  border-bottom: 2px solid rgba(243, 194, 74, .72);
  border-right: 2px solid rgba(243, 194, 74, .72);
  content: "";
  height: 6px;
  inset-inline-end: 7px;
  pointer-events: none;
  position: absolute;
  top: 45%;
  transform: translateY(-50%) rotate(45deg);
  width: 6px;
}

.embedded-select-control:hover,
.embedded-select-control:focus-within {
  background-color: rgba(96, 65, 44, .38);
  border-color: rgba(243, 194, 74, .5);
}

.embedded-native-select {
  appearance: none;
  background-color: var(--gf-input-bg);
  color: var(--gf-input-text);
  color-scheme: light;
  -webkit-appearance: none;
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}

.embedded-native-select option,
.embedded-native-select optgroup {
  background-color: var(--gf-input-bg);
  color: var(--gf-input-text);
  font-weight: 700;
}

.embedded-native-select option:checked {
  background: var(--gf-input-bg-focus) linear-gradient(0deg, var(--gf-input-bg-focus), var(--gf-input-bg-focus));
  color: var(--gf-input-text);
}

.embedded-native-select option:disabled {
  color: #806548;
}

.embedded-select-label {
  color: var(--gf-gold-strong);
  display: block;
  font-weight: 900;
  line-height: 1.05;
  pointer-events: none;
  text-transform: uppercase;
  transform-origin: left center;
  white-space: nowrap;
  width: max-content;
}

[dir="rtl"] .embedded-select-label {
  transform-origin: right center;
}

.event-select-control {
  flex: 0 0 auto;
  min-width: 0;
}

.event-title-label {
  font-size: clamp(18px, 2.5vw, 24px);
}

.version-select-control {
  flex: 0 0 auto;
}

.version-select-control[hidden] {
  display: none;
}

.event-version-label {
  font-size: clamp(14px, 2vw, 19px);
}

.embedded-native-select:disabled {
  cursor: default;
}

.balance-box {
  align-items: center;
  background: linear-gradient(135deg, rgba(75, 48, 31, .96), rgba(57, 37, 27, .96));
  border: 0;
  border-radius: 0;
  display: flex;
  flex: 0 0 142px;
  font-size: 19px;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  width: 142px;
}

.event-actions {
  align-items: stretch;
  align-self: stretch;
  background: rgba(72, 46, 30, .96);
  border: 0;
  border-inline-start: 1px solid rgba(215, 155, 66, .48);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  overflow: hidden;
}

/* Keep the balance and reset controls aligned to the right while event selectors load. */
.event-picker-group[hidden] + .event-actions {
  margin-inline-start: auto;
}

.header-reset-button {
  align-items: center;
  background: linear-gradient(145deg, #be493e, #982f29);
  border: 0;
  border-left: 1px solid rgba(255, 199, 163, .34);
  border-radius: 0;
  color: #fff;
  display: flex;
  font-size: 23px;
  justify-content: center;
  position: relative;
  transition: background .18s ease, box-shadow .18s ease;
  width: 46px;
}

.header-reset-button:hover {
  background: linear-gradient(145deg, #d05749, #aa352e);
  box-shadow: inset 0 0 0 1px rgba(255, 218, 190, .16);
}

.header-reset-button:active {
  background: linear-gradient(145deg, #9e342d, #84241f);
}

.header-reset-button i {
  font-weight: 900;
  -webkit-text-stroke: .65px currentColor;
}

.balance-box img {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4));
  height: 30px;
  object-fit: contain;
  width: 28px;
}

.balance-box strong {
  color: #fff3dc;
  flex: 1 1 auto;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  min-width: 0;
  transform-origin: left center;
  white-space: nowrap;
}

[dir="rtl"] .balance-box strong {
  transform-origin: right center;
}

.result-stage {
  background: rgba(14, 12, 10, .58);
  backdrop-filter: blur(3px) brightness(.82);
  -webkit-backdrop-filter: blur(3px) brightness(.82);
  display: grid;
  flex: 1 1 auto;
  min-height: 390px;
  overflow-y: auto;
  padding: 0;
}

.last-results {
  align-content: safe center;
  display: grid;
  gap: 10px;
  grid-area: 1 / 1;
  grid-template-columns: repeat(auto-fit, 150px);
  height: 100%;
  justify-content: center;
  overflow: visible;
  padding: 18px;
  place-self: stretch;
  width: 100%;
}

.last-results:empty {
  display: none;
}

.reward-card {
  animation: reward-card-reveal .52s cubic-bezier(.18, .86, .28, 1.22) both;
  aspect-ratio: 1 / 1;
  background: #efe5cb;
  border: 5px solid #f3ead3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 0 0 2px #9c8d70;
  color: #493523;
  overflow: hidden;
  padding: 4px;
  position: relative;
  text-align: center;
  width: 150px;
}

.reward-card::before {
  border: 1px dashed rgba(105, 90, 65, .55);
  content: "";
  inset: 2px;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.reward-card::after {
  animation: reward-card-sparkle .72s ease-out var(--sparkle-delay, 0ms) both;
  background:
    radial-gradient(circle, rgba(255, 250, 194, 1) 0 2px, transparent 3px) 12% 22% / 24px 24px no-repeat,
    radial-gradient(circle, rgba(255, 222, 102, .95) 0 2px, transparent 3px) 82% 18% / 28px 28px no-repeat,
    radial-gradient(circle, rgba(255, 250, 194, .95) 0 1px, transparent 3px) 90% 72% / 22px 22px no-repeat,
    radial-gradient(circle, rgba(255, 222, 102, .9) 0 2px, transparent 3px) 18% 84% / 26px 26px no-repeat,
    radial-gradient(circle at center, rgba(255, 230, 125, .62), transparent 58%);
  content: "";
  inset: -14px;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

@keyframes reward-card-reveal {
  0% {
    filter: brightness(1.8) saturate(.65);
    opacity: 0;
    transform: translateY(9px) rotate(-2deg) scale(.78);
  }
  58% {
    filter: brightness(1.32) saturate(1.12);
    opacity: 1;
    transform: translateY(-2px) rotate(.5deg) scale(1.035);
  }
  100% {
    filter: brightness(1) saturate(1);
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes reward-card-sparkle {
  0% {
    opacity: 0;
    transform: scale(.45) rotate(-8deg);
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.3) rotate(7deg);
  }
}

.reward-card.guaranteed {
  box-shadow: 0 0 16px rgba(243, 194, 74, .8), inset 0 0 0 2px #9c8d70;
}

.reward-card-image {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.reward-card-image img,
.reward-card-image canvas {
  height: 90% !important;
  max-width: 90%;
  object-fit: contain;
  width: 90% !important;
}

.reward-card.has-amount .reward-card-image img,
.reward-card.has-amount .reward-card-image canvas {
  height: 72% !important;
  max-width: 72%;
  transform: translateY(-8%);
  width: 72% !important;
}

.reward-card-amount {
  align-items: center;
  background: rgba(241, 224, 194, .94);
  bottom: 4px;
  color: #3f382f;
  display: none;
  font-size: 21px;
  font-weight: 400;
  height: 30px;
  justify-content: center;
  left: 4px;
  line-height: 1;
  position: absolute;
  right: 4px;
  z-index: 2;
}

.reward-card.has-amount .reward-card-amount {
  display: flex;
}

.reward-card-tag {
  background: #d79025;
  border: 1px solid #ffe28a;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  height: 23px;
  line-height: 20px;
  position: absolute;
  right: 4px;
  text-align: center;
  top: 4px;
  width: 23px;
  z-index: 4;
}

.level-strip {
  align-items: center;
  background: transparent;
  display: flex;
  gap: 0;
  justify-content: center;
  min-width: 220px;
  padding: 0;
}

.level-badge {
  align-items: center;
  background: #343847;
  border: 2px solid #4e5362;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  margin-right: -24px;
  position: relative;
  width: 48px;
  z-index: 2;
}

.level-progress-shell {
  background: linear-gradient(180deg, #e9dfcf, #cfc0aa);
  border: 1px solid rgba(195, 163, 119, .72);
  border-radius: 3px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .42);
  height: 30px;
  max-width: none;
  overflow: hidden;
  position: relative;
  width: calc(100% - 24px);
}

.level-progress-fill {
  background: #a9c63d;
  height: 100%;
  transition: width .25s ease;
  width: 0;
}

.level-progress-preview {
  background: #f3c443;
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  transition: left .25s ease, width .25s ease;
  width: 0;
}

.level-progress-text {
  color: #17130f;
  font-weight: 900;
  inset: 0;
  left: 24px;
  line-height: 28px;
  position: absolute;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

[dir="rtl"] .level-badge {
  margin-left: -24px;
  margin-right: 0;
}

[dir="rtl"] .level-progress-text {
  left: 0;
  right: 24px;
}

[dir="rtl"] .level-progress-fill {
  margin-left: auto;
}

[dir="rtl"] .level-progress-preview {
  left: auto !important;
  right: var(--level-current-width, 0%);
}

.spin-controls {
  align-items: stretch;
  background: linear-gradient(90deg, rgba(58, 39, 27, .98), rgba(86, 56, 36, .98), rgba(58, 39, 27, .98));
  border-top: 1px solid rgba(215, 155, 66, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  padding: 12px 18px;
}

.spin-controls .quantity-control {
  grid-column: 1;
  grid-row: 1;
}

.spin-controls .give-button {
  grid-column: 2;
  grid-row: 1;
}

.spin-controls .level-strip {
  grid-column: 3;
  grid-row: 1;
}

.quantity-control {
  align-items: center;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 52px;
  justify-content: center;
  min-width: 0;
}

.quantity-control button,
.pull-cost-display {
  background: #f3eadc;
  border: 1px solid #8f7b63;
  color: #3f352b;
  min-height: 45px;
}

.quantity-control button {
  background: linear-gradient(180deg, #fff8eb, #e4d6c3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -2px 0 rgba(104, 82, 60, .16);
  font-size: 22px;
  min-width: 0;
  transition: filter .15s ease, transform .1s ease;
  width: 100%;
}

.quantity-control button:hover:not(:disabled) {
  filter: brightness(1.07);
}

.quantity-control button:active:not(:disabled) {
  box-shadow: inset 0 2px 4px rgba(76, 55, 38, .24);
  transform: translateY(1px);
}

.quantity-control button i {
  display: inline-block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .75));
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.8px currentColor;
}

.pull-cost-display {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  font-size: 17px;
  font-weight: 800;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  width: auto;
}

.pull-cost-display span {
  display: inline-block;
  transform-origin: center;
  white-space: nowrap;
}

.quantity-control .max-button {
  background: linear-gradient(180deg, #d8cbb9, #bfae98);
  padding-inline: 8px;
}

.quantity-control .max-button i {
  font-size: 22px;
  -webkit-text-stroke-width: 1.25px;
}

.give-button {
  background: #477c08;
  border-radius: 5px;
  color: white;
  font-size: 20px;
  text-shadow: 0 1px 2px #213c04;
  transition: filter .18s ease, transform .12s ease;
}

.give-button:hover:not(:disabled) {
  filter: brightness(1.1);
}

.give-button:active:not(:disabled) {
  transform: translateY(1px);
}

.give-button:disabled {
  background: #737373;
  color: #d7d7d7;
  cursor: not-allowed;
}

#collectedRewardsModal {
  --gf-modal-width: min(680px, calc(100% - 20px));
  --collected-rewards-modal-height: min(680px, calc(100vh - 20px));
}

.collected-rewards-modal-card {
  display: flex;
  flex-direction: column;
  min-width: var(--gf-modal-width);
  max-width: var(--gf-modal-width);
  min-height: var(--collected-rewards-modal-height);
  max-height: var(--collected-rewards-modal-height);
}

.collected-rewards-modal-body {
  background: #3d2a1e;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.reward-totals {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 1px;
  width: 100%;
}

.total-row {
  align-items: center;
  background: rgba(96, 65, 44, .9);
  border: 1px solid rgba(215, 155, 66, .28);
  color: #f7ead5;
  display: grid;
  gap: 7px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  margin-bottom: 5px;
  padding: 5px;
}

.total-row img,
.total-row canvas {
  height: 34px !important;
  object-fit: contain;
  width: 34px !important;
}

.total-name {
  color: #fff3dc;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

.total-amount {
  color: #f3c24a;
  font-size: 15px;
  font-weight: 900;
}

.collected-rewards-modal-body .summary-empty {
  align-self: center;
  color: rgba(247, 234, 213, .78);
  width: 100%;
}

.summary-empty {
  color: rgba(247, 234, 213, .6);
  padding: 14px 4px;
  text-align: center;
}

@media (max-width: 768px) {
  #collectedRewardsModal {
    --collected-rewards-modal-height: min(600px, calc(100vh - 16px));
  }
}

@media (max-width: 520px) {
  #collectedRewardsModal {
    --gf-modal-width: calc(100% - 10px);
  }

  .collected-rewards-modal-body {
    padding: 6px;
  }
}

@media (max-width: 1100px) {
  .spin-controls {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .quantity-control {
    grid-template-columns: 36px minmax(0, 1fr) 36px 42px;
  }

  .spin-controls .quantity-control,
  .spin-controls .level-strip {
    width: 100%;
  }

  .spin-controls .pull-cost-display {
    flex: 1 1 auto;
    width: auto;
  }

  .spin-controls .level-progress-shell {
    max-width: none;
  }

  .spin-controls .give-button {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 44px;
  }

  .spin-controls .level-strip {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .play-panel {
    min-height: 0;
  }

  .result-stage {
    min-height: 300px;
  }

  .event-heading {
    gap: 8px;
    padding-inline: 8px 0;
  }

  .event-picker-row {
    gap: 9px;
  }

  .event-title-label {
    font-size: 17px;
  }

  .balance-box {
    flex-basis: 92px;
    font-size: 14px;
    gap: 5px;
    padding-inline: 6px;
    width: 92px;
  }

  .balance-box img {
    height: 20px;
    width: 20px;
  }

  .balance-box strong {
    font-size: 18px;
  }

  .header-reset-button {
    width: 38px;
  }

  .header-reset-button i {
    font-size: 20px;
    -webkit-text-stroke-width: .55px;
  }

  .last-results {
    grid-template-columns: repeat(auto-fit, 128px);
    padding: 12px;
  }

  .reward-card {
    width: 128px;
  }

  .spin-controls {
    column-gap: 6px;
    row-gap: 10px;
    padding: 10px 6px 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .spin-controls .level-strip {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .spin-controls .quantity-control {
    grid-column: 1;
    grid-row: 2;
  }

  .quantity-control {
    justify-content: center;
  }

  .quantity-control button {
    min-width: 0;
  }

  .quantity-control .max-button {
    min-width: 0;
    padding-inline: 4px;
  }

  .pull-cost-display {
    width: 68px;
  }

  .spin-controls .give-button {
    grid-column: 2;
    grid-row: 2;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reward-card,
  .reward-card::after {
    animation: none;
  }
}
