.player {
  display: flex;
  flex-direction: column;
  --identity-bg: #fff;
  --identity-ink: #123553;
}
.game-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.player.player-immersive {
  position: fixed;
  z-index: 12000;
  inset: var(--play-top, 0px) 0 auto;
  width: 100%;
  max-width: none;
  height: var(--play-height, 100dvh);
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 0 0;
  box-sizing: border-box;
  background: #141126;
}
body.game-immersive {
  overscroll-behavior: none;
}
.game-immersive .player-bar {
  visibility: hidden;
}
.game-float-controls {
  position: absolute;
  inset: env(safe-area-inset-top, 0px) 0 auto;
  height: 52px;
  padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.game-float-controls button {
  pointer-events: auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid #a89aea55;
  border-radius: 24px;
  color: #fff;
  background: #322752;
  box-shadow: 0 3px 10px #0004;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.game-rules-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(85dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  margin: auto;
  padding: 24px;
  border: 1px solid #a89aea66;
  border-radius: 22px;
  background: #211b37;
  color: #f5f2ff;
  box-shadow: 0 16px 60px #0008;
}
.game-rules-dialog::backdrop {
  background: #080515b8;
}
.game-rules-dialog h2 {
  margin: 0 0 12px;
  font-size: 24px;
}
.game-rules-dialog p,
.game-rules-dialog li {
  font-size: 15px;
  line-height: 1.65;
}
.game-rules-dialog ol {
  padding-left: 22px;
}
.game-rules-dialog button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 0;
  color: #fff;
  background: #7656e9;
  font-weight: 800;
}
.game-identity {
  flex: none;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  padding: 12px 20px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--identity-bg);
  color: var(--identity-ink);
  border-top: 1px solid #e7eaf1;
}
.game-identity img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 12px;
  flex: none;
}
.game-identity strong {
  display: block;
  font-size: 23px;
  font-weight: 1000;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.game-identity small {
  display: block;
  color: #62728c;
  font-size: 13px;
  margin-top: 4px;
}
.game-banner {
  flex: none;
  width: 100%;
  height: 86px;
  padding: 7px 16px max(7px, env(safe-area-inset-bottom));
  background: linear-gradient(110deg, #211a38, #171b30);
  color: #b9b5ce;
  border-top: 1px solid #44365f;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.game-banner-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 12px;
}
.game-banner-body {
  width: min(100%, 728px);
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #514572;
  border-radius: 12px;
  font-size: 12px;
  padding: 7px 14px;
  background: #151326;
  text-align: left;
  overflow: hidden;
}
.game-banner[data-state='demo'] .game-banner-body {
  background: #201b36;
  border-color: #685494;
  color: #d8c8ff;
}
.ad-banner-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #7452d7, #392c68);
  box-shadow:
    inset 0 1px #ffffff30,
    0 5px 14px #08051570;
}
.ad-banner-art i {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid #b8a1ff;
  border-radius: 3px;
  transform: rotate(45deg);
}
.ad-banner-art i:nth-child(1) {
  translate: -7px 0;
  background: #b5f0d7;
  border-color: #b5f0d7;
}
.ad-banner-art i:nth-child(2) {
  translate: 4px -5px;
}
.ad-banner-art i:nth-child(3) {
  translate: 5px 7px;
  border-color: #ffc880;
}
.ad-banner-copy {
  display: block;
  min-width: 0;
  flex: 1;
}
.ad-banner-copy strong,
.ad-banner-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-banner-copy strong {
  color: #eee9ff;
  font-size: 12px;
  font-weight: 800;
}
.ad-banner-copy span {
  margin-top: 3px;
  color: #a7a0bc;
  font-size: 10px;
}
.ad-banner-spinner {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff25;
  border-top-color: #c4a9ff;
  border-radius: 50%;
  animation: banner-spin 0.85s linear infinite;
}
.game-banner-body[data-state='demo'] .ad-banner-spinner,
.game-banner-body[data-state='unavailable'] .ad-banner-spinner,
.game-banner-body[data-state='failed'] .ad-banner-spinner,
.game-banner-body[data-state='timeout'] .ad-banner-spinner {
  display: none;
}
@keyframes banner-spin {
  to {
    transform: rotate(360deg);
  }
}
.home-banner {
  height: 92px;
  margin: 14px 0 0;
  padding: 9px 14px;
  border: 1px solid #342b50;
  border-radius: 16px;
  box-shadow: 0 12px 35px #06051036;
}
.home-banner .game-banner-label {
  color: #c1acd9;
}
.home-banner .game-banner-body {
  width: 100%;
  max-width: none;
}
@media (max-width: 680px), (max-height: 550px) {
  .game-banner {
    height: 68px;
    padding: 4px 10px max(4px, env(safe-area-inset-bottom));
    gap: 3px;
  }
  .game-banner-body {
    font-size: 11px;
  }
  .home-banner {
    height: 84px;
    margin-top: 10px;
    padding: 6px 9px;
  }
  .home-banner .ad-banner-art {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .home-banner .game-banner-body {
    gap: 9px;
    padding-inline: 9px;
  }
}
.game-viewport .startup-ad-slot {
  position: absolute;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at top, #29355a, #10182b 70%);
  color: #f3f5ff;
  padding: 24px;
}
.startup-ad-slot .ad-slot-label {
  align-self: center;
  font-size: 12px;
  letter-spacing: 2px;
  color: #a6b4d0;
  border: 1px solid #394767;
  border-radius: 20px;
  padding: 7px 14px;
}
.startup-ad-slot .ad-slot-content {
  margin: auto;
  text-align: center;
  width: min(100%, 420px);
  padding: 28px 20px;
  border: 1px dashed #56618a;
  border-radius: 20px;
  background: #1b254080;
}
.startup-ad-slot h2 {
  font-size: 24px;
  margin: 20px 0 12px;
}
.startup-ad-slot p {
  font-size: 15px;
  line-height: 1.7;
  color: #bdc8e0;
}
.startup-ad-slot button {
  margin-top: 12px;
}
.startup-ad-slot .ad-spinner {
  width: 38px;
  height: 38px;
  margin: auto;
  border: 3px solid #ffffff24;
  border-top-color: #a99aff;
  border-radius: 50%;
  animation: ad-spin 1s linear infinite;
}
.startup-ad-slot.is-fallback .ad-spinner {
  display: none;
}
.startup-ad-slot.is-showing {
  visibility: hidden;
}
@keyframes ad-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .startup-ad-slot .ad-spinner {
    animation: none;
  }
}
@media (max-width: 680px), (max-height: 550px) {
  .game-identity {
    min-height: 62px;
    padding: 9px 14px;
    padding-bottom: max(9px, env(safe-area-inset-bottom));
    gap: 10px;
  }
  .game-identity img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }
  .game-identity strong {
    font-size: 19px;
  }
  .game-identity small {
    font-size: 11px;
  }
}
