:root {
  --s37-slash-lead: #fff;
  --s37-slash-border: #2e9368;
  --s37-slash-muted: #809f92;
  --s37-slash-green: #04be02;
  --s37-slash-red: #ff0900;
  --s37-slash-gold: #fedf58;
  --s37-slash-bg: #072e25;
  --s37-slash-bg-soft: #16543a;
}

.s37-slash-overlay,
.s37-slash-overlay * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.s37-slash-overlay {
  position: fixed;
  z-index: 100000020;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 8, 24, 0.74);
  color: var(--s37-slash-lead);
  font-family: Arial, Helvetica, sans-serif;
  padding: 12px 12px calc(44px + env(safe-area-inset-bottom));
  backdrop-filter: blur(4px);
}

.s37-slash-dialog {
  position: relative;
  width: min(100%, 315px);
  height: min(470px, calc(100dvh - 92px));
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--s37-slash-border);
  border-radius: 9px;
  background: var(--s37-slash-bg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.s37-slash-scroll {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.s37-slash-scroll::-webkit-scrollbar {
  display: none;
}

.s37-slash-content {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--s37-slash-bg) url("/assets/local/invite-roulette/kyd/zpzy01/onlinegreen/xkyd_bg.png") center -34px / 100% auto no-repeat;
  padding: 2px 8px 16px;
}

.s37-slash-progress {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  align-items: start;
  gap: 0;
  height: 31px;
  min-height: 31px;
  margin: 0 -6px 0 -7px;
  padding: 0 9px;
}

.s37-slash-progress button {
  display: inline-flex;
  width: 14px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.s37-slash-progress button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.s37-slash-progress > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.s37-slash-progress strong {
  color: var(--s37-slash-gold);
  font-size: 22px;
  font-weight: 700;
  line-height: 22px;
}

.s37-slash-progress span {
  display: block;
  width: min(100%, 204px);
  height: 3px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.38);
  transform: translateX(1px);
}

.s37-slash-progress span i {
  display: block;
  height: 100%;
  background: var(--s37-slash-green);
  transition: width 420ms ease;
}

.s37-slash-wheel-stage {
  position: relative;
  width: min(100%, 276px);
  aspect-ratio: 1;
  margin: -4px auto -3px;
}

.s37-slash-wheel-rotor,
.s37-slash-wheel-disk,
.s37-slash-wheel-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.s37-slash-wheel-disk {
  transform: scale(0.79);
}

.s37-slash-wheel-rotor {
  z-index: 1;
  transition: transform 2.8s cubic-bezier(0.12, 0.68, 0.18, 1);
}

.s37-slash-wheel-disk,
.s37-slash-wheel-ring {
  object-fit: contain;
  pointer-events: none;
}

.s37-slash-wheel-ring {
  z-index: 2;
}

.s37-slash-wheel-ring-b {
  opacity: 0;
  animation: s37-slash-flash 1s steps(1) infinite;
}

.s37-slash-award {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  width: 56px;
  height: 214px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: -107px 0 0 -28px;
  padding-top: 4px;
  color: #075729;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: rotate(var(--award-angle));
  transform-origin: 50% 50%;
}

.s37-slash-award span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s37-slash-award img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.s37-slash-spin {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: flex;
  width: 112px;
  height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent url("/assets/local/invite-roulette/kyd/zpzy01/onlinegreen/xkyd_zp_04.avif") center / contain no-repeat;
  color: #fff;
  cursor: pointer;
  padding: 0 9px 2px;
  transform: translate(-50%, calc(-50% - 1px));
}

.s37-slash-spin strong {
  color: #ffffa8;
  font-size: 17px;
  line-height: 1;
}

.s37-slash-spin small {
  margin-top: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
}

.s37-slash-spin:disabled {
  cursor: not-allowed;
}

.s37-slash-remaining {
  position: relative;
  z-index: 3;
  width: 160px;
  height: 13px;
  min-height: 13px;
  margin: -6px auto -3px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 9, 0, 0.12), var(--s37-slash-red), rgba(255, 9, 0, 0.12));
  color: #fff;
  font-size: 8px;
  font-weight: 400;
  line-height: 13px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(19px);
}

.s37-slash-invite {
  position: relative;
  z-index: 3;
  display: block;
  width: 189px;
  height: 34px;
  margin: 0 auto 4px;
  border: 1px solid #e2e231;
  border-radius: 5px;
  background: linear-gradient(#ffffa8, #f7e45b);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.32);
  color: #005729;
  cursor: pointer;
  font-size: 11px;
  font-weight: 400;
  line-height: 13px;
  white-space: nowrap;
}

.s37-slash-invite img {
  position: absolute;
  top: 17px;
  right: -2px;
  width: 40px;
  animation: s37-slash-hand 1s ease-in-out infinite;
  pointer-events: none;
}

.s37-slash-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 202px;
  min-height: 18px;
  margin: 0 auto 9px;
  color: #fff;
  font-size: 8px;
}

.s37-slash-countdown b {
  min-width: 23px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  background: var(--s37-slash-bg);
  line-height: 16px;
  text-align: center;
}

.s37-slash-countdown em {
  margin-left: 3px;
  color: #fff;
  font-style: normal;
}

.s37-slash-subordinates > p {
  width: 274px;
  margin: 0 auto 5px;
  color: #fff;
  font-size: 10px;
  text-align: right;
  transform: translateX(-1px);
}

.s37-slash-task-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  width: 274px;
  min-height: 33px;
  margin: 9px auto 0;
  font-size: 11px;
  text-align: center;
  transform: translateX(-1px);
}

.s37-slash-task-title i {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76));
}

.s37-slash-task-title i:last-child {
  transform: rotate(180deg);
}

.s37-slash-task-row {
  display: grid;
  width: 274px;
  min-height: 45px;
  grid-template-columns: 22px minmax(0, 1fr) 45px 55px;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(1, 63, 37, 0.88);
  margin: 0 auto;
  padding: 4px 5px;
  font-size: 10px;
  transform: translateX(-1px);
}

.s37-slash-task-row > div {
  min-width: 0;
}

.s37-slash-task-row strong,
.s37-slash-task-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s37-slash-task-row small {
  margin-top: 3px;
  color: var(--s37-slash-muted);
  font-size: 8px;
}

.s37-slash-task-row > b {
  color: var(--s37-slash-gold);
  font-size: 9px;
  text-align: center;
}

.s37-slash-task-row button {
  min-width: 0;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: var(--s37-slash-green);
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  padding: 0 4px;
}

.s37-slash-task-row button:disabled {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
}

.s37-slash-task-coin {
  color: var(--s37-slash-gold);
  font-size: 14px;
  text-align: center;
}

.s37-slash-records-preview {
  padding: 12px 5px 20px;
  text-align: center;
}

.s37-slash-records-preview h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 12px;
}

.s37-slash-records-preview p {
  margin: 0;
  color: var(--s37-slash-muted);
  font-size: 10px;
}

.s37-slash-close {
  position: absolute;
  z-index: 4;
  bottom: calc(42px + env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0d4774;
  color: #fff;
  cursor: pointer;
  padding: 5px;
  transform: translateX(-50%);
}

.s37-slash-close svg {
  width: 100%;
  height: 100%;
}

.s37-slash-first-layer,
.s37-slash-sheet-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 8, 18, 0.69);
  backdrop-filter: blur(6px);
}

.s37-slash-first-dialog {
  width: min(100%, 360px);
  color: #fff;
  text-align: center;
}

.s37-slash-first-dialog header h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 6px;
  color: var(--s37-slash-gold);
  font-size: 19px;
  line-height: 1.35;
}

.s37-slash-first-dialog header h2 i {
  position: relative;
  width: 28px;
  height: 8px;
  background: linear-gradient(90deg, transparent, var(--s37-slash-gold));
  clip-path: polygon(0 43%, 75% 43%, 82% 0, 88% 43%, 100% 50%, 88% 57%, 82% 100%, 75% 57%, 0 57%);
}

.s37-slash-first-dialog header h2 i.is-right {
  transform: rotate(180deg);
}

.s37-slash-first-dialog header p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.s37-slash-first-dialog header p strong {
  margin-left: 2px;
  color: var(--s37-slash-gold);
}

.s37-slash-chests {
  display: grid;
  width: min(100%, 300px);
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 6px auto 0;
}

.s37-slash-chest {
  position: relative;
  display: flex;
  height: 145px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.s37-slash-chest > div {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -56%);
}

.s37-slash-chest span {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 1px 3px #012f21;
  transition: opacity 160ms ease;
}

.s37-slash-chest span.is-hidden {
  opacity: 0;
}

.s37-slash-chest span.is-award {
  z-index: 5;
  color: #fff;
  font-size: 14px;
}

.s37-slash-chest span b {
  display: inline-block;
  border: 1px solid var(--s37-slash-border);
  border-radius: 14px;
  background: var(--s37-slash-bg);
  color: var(--s37-slash-gold);
  padding: 3px 9px;
}

.s37-slash-hand {
  position: absolute;
  z-index: 4;
  right: 28px;
  bottom: 30px;
  display: none;
  width: 42px;
  pointer-events: none;
}

.s37-slash-hand.is-visible {
  display: block;
  animation: s37-slash-hand 1s ease-in-out infinite;
}

.s37-slash-chest.is-selected {
  filter: brightness(1.12);
}

.s37-slash-sheet-layer {
  z-index: 9;
  padding: 16px;
}

.s37-slash-sheet {
  width: min(100%, 330px);
  max-height: min(520px, calc(100dvh - 70px));
  overflow: hidden;
  border: 1px solid var(--s37-slash-border);
  border-radius: 8px;
  background: var(--s37-slash-bg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.s37-slash-sheet > header {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 12px;
}

.s37-slash-sheet h3 {
  margin: 0;
  color: var(--s37-slash-gold);
  font-size: 14px;
}

.s37-slash-sheet > header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
}

.s37-slash-sheet > div {
  max-height: 430px;
  overflow-y: auto;
  color: #dcece5;
  font-size: 12px;
  line-height: 1.5;
  padding: 14px;
}

.s37-slash-sheet h4 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 12px;
}

.s37-slash-sheet p {
  margin: 0 0 14px;
}

.s37-slash-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 0;
}

.s37-slash-record strong {
  color: var(--s37-slash-gold);
}

.s37-slash-empty {
  color: var(--s37-slash-muted);
  text-align: center;
}

.s37-slash-share-layer {
  position: absolute;
  z-index: 11;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  padding: 12px 12px calc(44px + env(safe-area-inset-bottom));
}

.s37-slash-share-dialog {
  width: min(100%, 315px);
  height: min(508px, calc(100dvh - 92px));
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--s37-slash-border);
  border-radius: 9px;
  background: var(--s37-slash-bg) url("/assets/local/invite-roulette/kyd/zpzy01/onlinegreen/xkyd_bg.png") center -34px / 100% auto no-repeat;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 9px 9px 10px;
  text-align: center;
}

.s37-slash-share-dialog > header h3 {
  margin: 0;
  color: var(--s37-slash-gold);
  font-size: 15px;
  line-height: 20px;
}

.s37-slash-share-dialog > header p {
  margin: 0 0 5px;
  color: #d8eee4;
  font-size: 9px;
  line-height: 14px;
}

.s37-slash-share-carousel {
  position: relative;
  display: flex;
  height: 292px;
  align-items: center;
  justify-content: center;
}

.s37-slash-share-poster {
  position: relative;
  width: 158px;
  height: 290px;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.46);
}

.s37-slash-share-poster > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s37-slash-share-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 55px;
  background: #fff;
  color: #073d2c;
  padding: 12px 48px 0 8px;
  text-align: left;
}

.s37-slash-share-layer[data-poster-index="1"] .s37-slash-share-copy {
  background: #042d18;
  color: #fff;
}

.s37-slash-share-layer[data-poster-index="2"] .s37-slash-share-copy {
  background: #3a0754;
  color: #fff;
}

.s37-slash-share-copy strong,
.s37-slash-share-copy span {
  display: block;
  white-space: nowrap;
}

.s37-slash-share-copy strong {
  font-size: 8px;
  line-height: 11px;
}

.s37-slash-share-copy span {
  font-size: 6px;
  line-height: 9px;
}

.s37-slash-share-qr {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 41px;
  height: 41px;
  overflow: hidden;
  background: #fff;
  padding: 2px;
}

.s37-slash-share-qr canvas,
.s37-slash-share-qr img {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.s37-slash-share-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 25px;
  height: 39px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 44, 32, 0.84);
  color: #fff;
  cursor: pointer;
  font-size: 30px;
  line-height: 34px;
  padding: 0;
  transform: translateY(-50%);
}

.s37-slash-share-arrow.is-prev { left: 14px; }
.s37-slash-share-arrow.is-next { right: 14px; }

.s37-slash-share-dots {
  display: flex;
  height: 16px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.s37-slash-share-dots button {
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  padding: 0;
}

.s37-slash-share-dots button.is-active {
  width: 13px;
  border-radius: 3px;
  background: var(--s37-slash-gold);
}

.s37-slash-share-url {
  display: grid;
  height: 30px;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(0, 35, 27, 0.88);
  text-align: left;
}

.s37-slash-share-url span {
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  padding-left: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s37-slash-share-url button {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--s37-slash-gold);
  cursor: pointer;
  padding: 7px;
}

.s37-slash-share-url svg { width: 100%; height: 100%; }

.s37-slash-share-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-top: 8px;
}

.s37-slash-share-actions button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 8px;
  padding: 0;
  white-space: nowrap;
}

.s37-slash-share-actions i {
  display: flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--s37-slash-gold);
  padding: 5px;
}

.s37-slash-share-actions svg,
.s37-slash-share-actions img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.s37-slash-share-close {
  position: absolute;
  bottom: calc(42px + env(safe-area-inset-bottom));
  left: 50%;
  width: 31px;
  height: 31px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0d4774;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 25px;
  padding: 0;
  transform: translateX(-50%);
}

.s37-slash-overlay.is-sharing > .s37-slash-close {
  visibility: hidden;
}

.s37-slash-loading,
.s37-slash-error {
  display: grid;
  min-height: 100%;
  place-content: center;
  gap: 12px;
  background: var(--s37-slash-bg);
  color: var(--s37-slash-muted);
  font-size: 12px;
  text-align: center;
  padding: 24px;
}

.s37-slash-error strong {
  color: var(--s37-slash-gold);
  font-size: 18px;
}

.s37-slash-error button {
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: var(--s37-slash-green);
  color: #fff;
  cursor: pointer;
}

.s37-slash-toast {
  position: absolute;
  z-index: 12;
  right: 24px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 24px;
  display: none;
  max-width: 330px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(0, 35, 27, 0.96);
  color: #fff;
  font-size: 11px;
  padding: 10px 12px;
  text-align: center;
}

.s37-slash-toast.is-visible {
  display: block;
}

@keyframes s37-slash-flash {
  50% { opacity: 1; }
}

@keyframes s37-slash-hand {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, -5px); }
}

@media (max-width: 360px) {
  .s37-slash-dialog { height: min(470px, calc(100dvh - 86px)); }
  .s37-slash-wheel-stage { width: 262px; }
  .s37-slash-award { height: 204px; margin-top: -102px; }
  .s37-slash-chest { height: 138px; }
  .s37-slash-chest > div { width: 152px; height: 152px; }
}

@media (prefers-reduced-motion: reduce) {
  .s37-slash-wheel-ring-b,
  .s37-slash-hand,
  .s37-slash-invite img { animation: none; }
  .s37-slash-wheel-rotor { transition-duration: 1s; }
}
