* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: Roboto, "Helvetica Neue", Arial, Helvetica, sans-serif;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  outline: none
}

img {
  display: block;
  -webkit-user-drag: none
}

.hidden {
  display: none !important
}

/* ---------- page background (letterbox on desktop / tablet) ---------- */

#bgblur {
  display: none
}

#sidebg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000
}

#sidebg i {
  position: absolute;
  left: -40px;
  right: -40px;
  display: block
}

#sidebg .sr {
  background: linear-gradient(rgba(40, 8, 70, .35), rgba(40, 8, 70, .35)), url(../assets/ring_init.png) center/cover;
  filter: blur(16px)
}

#sidebg .sb {
  background: linear-gradient(180deg, #5f0d8b 0, #610f8d 5%, #4f0688 14%, #400078 26%, #400078 100%)
}

#sidebg .sb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bar, 0px);
  background: #6a1ab8
}

/* ---------- loading ---------- */

#loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  overflow: hidden;
  transition: opacity .4s
}

#loading.out {
  opacity: 0;
  pointer-events: none
}

.ldp {
  position: absolute;
  left: 0;
  top: 0;
  width: 720px;
  height: 1141px;
  transform-origin: 0 0;
  background: linear-gradient(180deg, #4a45a6 0%, #5256b0 22%, #5f72c2 50%, #6f93d8 78%, #76a8e8 100%)
}

.ldp .sq {
  position: absolute;
  background: rgba(95, 135, 235, .38)
}

.ld-bar {
  position: absolute;
  left: 120px;
  top: 540px;
  width: 480px;
  height: 54px;
  border-radius: 30px;
  background: #1a1e3a;
  border: 3px solid #98a2b8;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .2), 0 3px 8px rgba(0, 0, 0, .35), inset 0 2px 6px #000a;
  overflow: hidden
}

.ld-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 30px;
  background: repeating-linear-gradient(115deg, #f69a1e 0 14px, #ee7f0a 14px 28px);
  box-shadow: inset 0 5px 4px #ffd78aaa, inset 0 -4px 4px #c3580033;
  transition: width .15s linear
}

.ld-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  color: #fff;
  text-shadow: 0 1px 2px #0006;
  letter-spacing: .2px
}

/* ---------- game root (scaled by JS) ---------- */

#game {
  position: absolute;
  left: 0;
  top: 0;
  width: 720px;
  height: 1141px;
  transform-origin: 0 0;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, #5f0d8b 0, #5f0d8b 548px, #610f8d 575px, #4f0688 615px, #400078 690px, #400078 1141px);
}

/* ---------- ring ---------- */

#ring {
  position: absolute;
  left: 0;
  top: -2px;
  width: 720px;
  height: 548px;
  overflow: hidden
}

#ring .rimg {
  position: absolute;
  left: 0;
  top: 0;
  width: 720px;
  height: 548px;
  opacity: 0;
  transition: opacity .22s
}

#fightCv {
  position: absolute;
  left: 0;
  top: 240px;
  width: 720px;
  height: 292px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s
}

#fightCv.on {
  opacity: 1;
  transition: none
}

#ring[data-s=fight] .r-idle,
#ring[data-s=emerge] .r-idle {
  opacity: 1;
  transition: none
}

#ring[data-s=init] .r-init,
#ring[data-s=idle] .r-idle,
#ring[data-s=wd] .r-wd,
#ring[data-s=wt] .r-wt {
  opacity: 1
}

#ring .rimg {
  transform-origin: 50% 80%
}

@keyframes cloudin {
  0% {
    transform: scale(.55);
    opacity: 0
  }
  60% {
    transform: scale(1.07);
    opacity: 1
  }
  100% {
    transform: scale(1);
    opacity: 1
  }
}

@keyframes cloudpulse {
  from {
    transform: scale(1)
  }
  to {
    transform: scale(1.025)
  }
}

@keyframes popin {
  0% {
    transform: scale(1.06)
  }
  100% {
    transform: scale(1)
  }
}

#ring.shake {
  animation: none
}

/* icons (back, history/help/settings, wifi, trophy) are a static layer above the fight frames: only the fighters move */

.keep {
  position: absolute;
  pointer-events: none;
  background: url(../assets/ring_idle_clean.png) no-repeat;
  background-position: calc(-1 * var(--kx, 0px)) calc(-1 * var(--ky, 0px))
}

@keyframes poof {
  0% {
    transform: scale(1.06)
  }
  100% {
    transform: scale(1)
  }
}

@keyframes cheer {
  from {
    transform: translateY(0)
  }
  to {
    transform: translateY(-3px)
  }
}

/* punch rings that appear on the fighters when a bet is placed */

.fx {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  border: 6px solid transparent
}

.fx-t {
  left: 172px;
  top: 332px;
  border-top-color: #ffd23a;
  border-right-color: #ffd23a;
  filter: drop-shadow(0 0 6px #ffb800)
}

.fx-d {
  left: 410px;
  top: 332px;
  border-bottom-color: #ff3a4a;
  border-left-color: #ff3a4a;
  filter: drop-shadow(0 0 6px #ff1a3a)
}

.bst {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0;
  pointer-events: none;
  top: 332px
}

.bst.t {
  left: 165px;
  background: radial-gradient(circle, #fff 0, #fff6b0 30%, #ffd21f 62%, #ffa800 100%)
}

.bst.d {
  left: 392px;
  background: radial-gradient(circle, #fff 0, #fff 28%, #ffa0a8 58%, #ff2f3f 100%)
}

.bst.go {
  animation: bst .55s ease-out
}

@keyframes bst {
  0% {
    opacity: 0;
    transform: scale(.3) rotate(0)
  }
  22% {
    opacity: 1;
    transform: scale(1) rotate(12deg)
  }
  100% {
    opacity: 0;
    transform: scale(1.3) rotate(34deg)
  }
}

.fx.go {
  animation: fxgo .8s ease-out
}

@keyframes fxgo {
  0% {
    opacity: 0;
    transform: scale(.5) rotate(0)
  }
  25% {
    opacity: 1
  }
  100% {
    opacity: 0;
    transform: scale(1.15) rotate(260deg)
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0)
  }
  20% {
    transform: translate(-4px, 2px)
  }
  40% {
    transform: translate(5px, -2px)
  }
  60% {
    transform: translate(-3px, -3px)
  }
  80% {
    transform: translate(3px, 3px)
  }
}

#platePatch {
  position: absolute;
  left: 276px;
  top: 299px;
  width: 169px;
  height: 30px;
  pointer-events: none
}

#roundTxt {
  position: absolute;
  left: 260px;
  top: 297px;
  width: 200px;
  height: 30px;
  text-align: center;
  font-size: 25px;
  line-height: 30px;
  color: #e9dffb;
  letter-spacing: .2px;
  word-spacing: 5px;
  text-shadow: none
}

#ping {
  position: absolute;
  left: 21px;
  top: 320px;
  width: 48px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #ff9a1e;
  text-shadow: 0 0 2px #000
}

.hit {
  position: absolute;
  border-radius: 50%
}

.hit:active {
  background: #fff2
}

#trophy {
  position: absolute;
  left: 626px;
  top: 292px;
  width: 84px;
  height: 70px;
  background: url(../assets/trophy.png) no-repeat 0 0/84px 70px
}

#trophy .tm {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 49px;
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 1px #5a0a0a
}

.keep2 {
  position: absolute;
  pointer-events: none;
  background: url(../assets/trophy_bg.png) no-repeat
}

#status {
  position: absolute;
  left: 0;
  top: 535px;
  width: 720px;
  text-align: center;
  font-size: 25px;
  line-height: 32px;
  color: #fff;
  text-shadow: 0 1px 2px #0008;
  white-space: nowrap
}

/* ---------- tiles (artwork baked, numbers live) ---------- */

.tile {
  position: absolute;
  top: 605px;
  width: 215px;
  height: 202px;
  cursor: pointer;
  border-radius: 28px;
  transition: filter .2s
}

.tile .tbg {
  position: absolute;
  left: -4px;
  top: -31px;
  width: 222px;
  height: 236px;
  pointer-events: none;
  border-radius: 42px;
}

.tile:active .tbg {
  transform: scale(.97);
  transform-origin: 50% 60%
}

.tile.has {
  filter: brightness(1.06)
}

.tile.win {
  animation: tw .45s ease-in-out infinite alternate
}

@keyframes tw {
  from {
    filter: brightness(1)
  }
  to {
    filter: brightness(1.4) drop-shadow(0 0 12px #ffe27a)
  }
}

.potv {
  position: absolute;
  left: 0;
  right: 0;
  top: 81px;
  text-align: center;
  font-size: 30px;
  line-height: 38px;
  font-weight: 400;
  color: #fff;
  pointer-events: none
}

.mev {
  position: absolute;
  right: 19px;
  top: 136px;
  font-size: 32px;
  line-height: 36px;
  color: #ffd21f;
  font-weight: 400;
  pointer-events: none;
  text-align: right
}

/* ---------- bottom controls (artwork baked) ---------- */

#ctrlBg {
  position: absolute;
  left: 0;
  top: 820px;
  width: 720px;
  height: 115px;
  pointer-events: none
}

#revenue {
  position: absolute;
  left: 142px;
  top: 841px;
  font-size: 20px;
  line-height: 24px;
  color: #ffd21f;
  white-space: nowrap
}

#revenue #revVal.neg {
  color: #ff1f1f
}

#balVal {
  position: absolute;
  left: 100px;
  top: 883px;
  width: 114px;
  height: 34px;
  text-align: center;
  font-size: 26px;
  line-height: 34px;
  font-weight: 400
}

#chipVal {
  position: absolute;
  left: 330px;
  top: 859px;
  width: 108px;
  text-align: center;
  font-size: 30px;
  line-height: 40px;
  font-weight: 400
}

#chipVal.pop {
  animation: pop .2s
}

@keyframes pop {
  50% {
    transform: scale(1.2)
  }
}

.cb {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%
}

.cb::after {
  content: "";
  position: absolute;
  display: none;
  pointer-events: none;
  background-size: 100% 100%
}

#btnMinus::after {
  left: -12px;
  top: -14px;
  width: 92px;
  height: 92px;
  background-image: url(../assets/bp_minus.png)
}

#btnPlus::after {
  left: -14px;
  top: -14px;
  width: 92px;
  height: 92px;
  background-image: url(../assets/bp_plus.png)
}

#btnAgain::after {
  left: -14px;
  top: -14px;
  width: 104px;
  height: 112px;
  background-image: url(../assets/bp_again.png)
}

.cb.down::after {
  display: block
}

/* connecting state (first screen, as in the reference): no controls yet */

#game.init #btnHistory,
#game.init #btnRule,
#game.init #btnSetting,
#game.init #trophy,
#game.init #status,
#game.init #btnMinus,
#game.init #btnPlus,
#game.init #btnAgain,
#game.init #chipVal,
#game.init #chat,
#game.init #gift,
#game.init #bar>* {
  display: none
}

#game.init .tile {
  pointer-events: none
}

/* ---------- chat ---------- */

#chat {
  position: absolute;
  left: 30px;
  right: 100px;
  bottom: 104px;
  height: 112px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  pointer-events: none
}

.msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 34px;
  height: 34px;
  flex: none;
  font-style: italic;
  color: rgba(255, 255, 255, .22);
  white-space: nowrap;
  overflow: hidden;
  animation: fin .4s
}

.msg .tag {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(20, 10, 90, .8);
  color: rgba(255, 255, 255, .35)
}

.msg .tag.b {
  background: rgba(70, 30, 160, .7)
}

.msg b {
  font-weight: 900;
  color: rgba(255, 255, 255, .28)
}

@keyframes fin {
  from {
    opacity: 0;
    transform: translateY(12px)
  }
}

#gift {
  position: absolute;
  right: 26px;
  bottom: 108px;
  font-size: 72px;
  opacity: .25;
  filter: grayscale(.2) hue-rotate(250deg)
}

#bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 101px;
  background: #6a1ab8;
  display: flex;
  align-items: center;
  padding: 0 24px 0 36px;
  gap: 0
}

#bar .bubble {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(40, 12, 110, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  position: relative;
  left: 2px
}

#bar input {
  flex: none;
  width: 228px;
  height: 62px;
  margin-left: -16px;
  padding-left: 26px;
  border-radius: 0 30px 30px 0;
  background: rgba(40, 12, 110, .35);
  color: #fff;
  font-size: 22px;
  border: 0;
  outline: 0
}

#bar input::placeholder {
  color: rgba(255, 255, 255, .25)
}

#bar .mute {
  margin-left: auto;
  margin-right: 38px;
  opacity: .55
}

#bar .giftbtn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(40, 12, 110, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  opacity: .7
}

#bar .more {
  margin-left: 20px;
  width: 60px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .45)
}

/* ---------- dim + result popup ---------- */

#dim {
  position: absolute;
  inset: 0;
  background: rgba(24, 4, 48, .7);
  z-index: 20
}

#result {
  position: absolute;
  left: 0;
  top: 206px;
  width: 720px;
  height: 728px;
  z-index: 30;
  animation: rise .45s cubic-bezier(.2, .9, .3, 1.05)
}

#result.out {
  animation: sink .38s ease-in forwards
}

@keyframes sink {
  to {
    transform: translateY(520px);
    opacity: .2
  }
}

@keyframes rise {
  from {
    transform: translateY(520px);
    opacity: .2
  }
}

#result>img {
  position: absolute;
  inset: 0;
  width: 720px;
  height: 728px
}

#resTimer {
  position: absolute;
  left: 560px;
  top: 41px;
  width: 94px;
  text-align: center;
  font-size: 27px;
  font-weight: 500;
  text-shadow: 0 2px 3px #0008
}

#resClose {
  position: absolute;
  left: 660px;
  top: 42px;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 2px #0007)
}

#resPanel {
  display: none;
  position: absolute;
  left: 30px;
  top: 100px;
  width: 148px
}

#result.tie #resPanel {
  display: block
}

#result.tie #resNums {
  display: block
}

#result.tie .rbody {
  display: none
}

#resNums {
  position: absolute;
  left: 30px;
  top: 100px;
  width: 148px
}

#resNums i {
  position: absolute;
  left: 20px;
  width: 112px;
  text-align: center;
  font-style: normal;
  font-size: 19px;
  line-height: 24px;
  color: #e7edff
}

#resNums .n1 {
  top: 127px
}

#resNums .n2 {
  top: 199px;
  color: #ff9a1e
}

.rtab {
  width: 152px;
  height: 50px;
  margin: 0 0 -4px -2px;
  position: relative;
  z-index: 1;
  background-repeat: no-repeat;
  background-size: 152px 50px;
  background-position: 0 0
}

.rtab.r-tiger {
  background-image: url(../assets/tab_tiger.png)
}

.rtab.r-dragon {
  background-image: url(../assets/tab_dragon.png)
}

.rtab.r-tie {
  background-image: url(../assets/tile_tie.png);
  background-size: 178px 189px;
  background-position: -15px -6px;
  width: 147px;
  height: 46px;
  margin: 0
}

.rbody {
  margin: 0 6px;
  height: 206px;
  background: linear-gradient(180deg, rgba(40, 90, 220, .55), rgba(40, 70, 200, .35));
  border-radius: 0 0 10px 10px;
  padding-top: 12px;
  text-align: center;
  font-size: 20px;
  line-height: 30px;
  color: #e7edff;
  box-shadow: inset 0 0 0 2px rgba(110, 160, 255, .4)
}

.rbody div:nth-child(1) {
  margin-bottom: 2px
}

.rbody .or {
  color: #ff9a1e
}

.rbody div:nth-child(4) {
  margin-top: 10px
}

#podium .pp {
  position: absolute;
  width: 150px;
  height: 130px
}

#podium .p2 {
  left: 115px;
  top: 545px
}

#podium .p1 {
  left: 286px;
  top: 545px
}

#podium .p3 {
  left: 463px;
  top: 545px
}

#podium .av {
  display: none;
  position: absolute;
  left: 28px;
  top: 18px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  font-size: 42px;
  font-weight: 700;
  color: #fff
}

#podium .av.on {
  display: block;
  background-color: #c9c3f0;
  background-size: cover;
  background-position: center;
  box-shadow: none
}
#podium .av.me {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Crect width='96' height='96' fill='%23c9c3f0'/%3E%3Ccircle cx='48' cy='38' r='17' fill='%23fff'/%3E%3Cpath d='M12 96c2-24 18-36 36-36s34 12 36 36z' fill='%23fff'/%3E%3C/svg%3E")
}

#podium .nm {
  position: absolute;
  left: 0;
  top: 96px;
  width: 150px;
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: #3d2f00;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden
}

#podium .cn {
  position: absolute;
  left: 82px;
  top: 136px;
  font-size: 24px;
  font-weight: 500;
  white-space: nowrap
}

#podium .p1 .cn {
  left: 82px
}

#podium .p2 .cn {
  left: 82px
}

#podium .p3 .cn {
  left: 85px
}

/* winner character: looping victory animation cut from the video, feathered into the stage */

#winCv {
  position: absolute;
  left: 190px;
  top: 64px;
  width: 350px;
  height: 422px;
  pointer-events: none;
  display: none;
  clip-path: inset(0 0 16px 0);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent), linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 22px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent), linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 22px), transparent);
  mask-composite: intersect
}

#result.win-t #winCv,
#result.win-d #winCv {
  display: block
}

#tieStage {
  position: absolute;
  inset: 0;
  display: none
}

#result.tie #tieStage {
  display: block
}

/* TIE popup: same arena as the win popups (tiger stage with the boxer removed) + tiger / tie / dragon medallions */
.tieRow {
  position: absolute;
  left: 0;
  right: 0;
  top: 238px;
  height: 130px
}

.tieRow img {
  position: absolute;
  top: 9px;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 4px 6px rgba(10, 0, 60, .55))
}

.tieRow img:nth-child(1) {
  left: 150px
}

.tieRow img:nth-child(2) {
  left: 270px;
  top: 0;
  width: 130px;
  height: 130px
}

.tieRow img:nth-child(3) {
  left: 458px
}

.tieTxt {
  position: absolute;
  left: 0;
  right: 0;
  top: 372px;
  text-align: center;
  font-size: 58px;
  line-height: 66px;
  font-weight: 900;
  font-style: italic;
  color: #ffe27a;
  -webkit-text-stroke: 3px #7a3a10;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #a0541a, 0 0 20px rgba(255, 154, 30, .8)
}
/* ---------- modals ---------- */

.modal {
  position: absolute;
  left: 50%;
  top: 590px;
  transform: translate(-50%, -50%);
  z-index: 40;
  animation: mpop .25s ease-out
}

@keyframes mpop {
  from {
    transform: translate(-50%, -46%) scale(.9);
    opacity: 0
  }
}

@keyframes mpop2 {
  from {
    transform: scale(.92);
    opacity: 0
  }
}

.mh {
  position: relative;
  height: 83px;
  margin: 14px 0 -19px;
  z-index: 2;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(180deg, #4470d5 0, #598af7 3px, #598af7 10px, #577ff1 18px, #5976f1 22px, #576aef 30px, #5762e9 38px, #5454e3 46px, #5045dc 54px, #4e3ad9 62px, #4d31d3 70px, #4729c5 78px, #4023a1 82px);
  box-shadow: inset 0 2px 0 #7fb2fb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0
}

.mh::before,
.mh::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 24px;
  height: 42px;
  pointer-events: none;
  background: linear-gradient(#6fa8fa, #5a88f5) 6px 0/12px 34px no-repeat, radial-gradient(circle at 12px 28px, #3d39c6 0 10.5px, transparent 11.5px)
}

.mh::before {
  left: 67px
}

.mh::after {
  right: 68px
}

.mh b {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
  position: relative;
  top: 0;
  -webkit-text-stroke: 3px #3f2fb5;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 #3a2a9a
}

.mx {
  position: absolute;
  right: 12px;
  top: 15px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: url(../assets/hx.png) center/56px 56px no-repeat
}

.mb {
  position: relative;
  background: #fff7ec;
  border: 6px solid #543eb8;
  border-top: 0;
  border-radius: 0 0 38px 38px;
  box-shadow: inset 0 0 0 3px #e9dfd2, 0 8px 30px #0008;
  color: #4a3d8f
}

/* ---- History: every value measured from the reference screenshot (page px == game px) ---- */

#mHistory {
  left: 76px;
  top: 290px;
  width: 568px;
  transform: none;
  animation: mpop2 .25s ease-out
}

#mHistory .mh {
  margin: 14px 0 0;
  display: block;
  padding: 0
}

#mHistory .mh b {
  position: absolute;
  left: 2px;
  right: 0;
  top: 23px;
  text-align: center;
  line-height: 30px
}

#mHistory .mb {
  height: 484px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 8px 30px #0008;
  background: #543eb8
}

#mHistory .mb::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 8px;
  top: 0;
  bottom: 10px;
  border-radius: 0 0 31px 31px;
  background: #fff7ec;
  box-shadow: inset -4px -4px 0 #f3dbb0
}

.hist {
  padding: 0
}

.hhead {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0
}

.hhead img {
  position: absolute;
  top: 18px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: none
}

.hhead img:nth-child(1) {
  left: 69px
}

.hhead img:nth-child(2) {
  left: 231px
}

.hhead img:nth-child(3) {
  left: 394px
}

.hline {
  position: absolute;
  left: 44px;
  top: 124px;
  width: 480px;
  height: 2px;
  margin: 0;
  background: #7c7090
}

.hscroll {
  position: absolute;
  left: 7px;
  right: 8px;
  top: 131.6px;
  bottom: 14px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none
}

.hscroll::-webkit-scrollbar {
  display: none
}

.hrow {
  position: relative;
  height: 78.7px
}

.hrow>div {
  position: absolute;
  top: 5.35px;
  width: 68px;
  height: 68px
}

.hrow>div:nth-child(1) {
  left: 79px
}

.hrow>div:nth-child(2) {
  left: 239px
}

.hrow>div:nth-child(3) {
  left: 399px
}

.hrow img {
  width: 68px;
  height: 68px;
  display: block
}

#mRule {
  width: 528px
}

.rule {
  height: 308px;
  padding: 28px 0 0 25px;
  font-size: 18px;
  line-height: 26.6px;
  color: #4a3d8f;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff6e8, #fff2e2 60%, #f9e8da)
}

.rule p {
  margin: 0;
  display: inline-block
}

#mRule .mh b {
  font-size: 25px
}

#mSetting {
  width: 500px
}

.set {
  position: relative;
  height: 275px
}

.set .mic {
  position: absolute;
  left: 76px;
  top: 97px;
  width: 56px;
  height: 56px
}

.set .sw {
  position: absolute;
  left: 152px;
  top: 99px;
  width: 232px;
  height: 56px;
  padding: 0;
  border-radius: 28px
}

.set .sw img {
  display: block;
  width: 232px;
  height: 56px
}

#mRank {
  width: 520px
}

.rank {
  padding: 14px 26px 22px;
  min-height: 300px
}

.rk {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
  border-bottom: 1px solid #e6d6bf;
  font-size: 22px
}

.rk i {
  width: 36px;
  font-style: normal;
  font-weight: 900;
  color: #c7881a;
  text-align: center
}

.rk .a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(160deg, #c9b5ff, #6a4fd8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700
}

.rk span {
  flex: 1
}

.rk em {
  font-style: normal;
  color: #c26a00;
  font-weight: 700
}

/* ---------- ranking board (trophy) : measured from the reference frame ---------- */

#rank {
  position: absolute;
  left: 30px;
  top: 210px;
  width: 688px;
  height: 688px;
  z-index: 45
}

#rank .rkload {
  position: absolute;
  left: 0;
  right: 0;
  top: 300px;
  text-align: center;
  font-size: 44px;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 2px 6px #000a
}

#rank.ready .rkload {
  display: none
}

.rk-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .3s, transform .3s
}

#rank.ready .rk-wrap {
  opacity: 1;
  transform: none
}

.rk-board {
  position: absolute;
  left: 8px;
  top: 37px;
  width: 644px;
  height: 645px;
  border-radius: 30px;
  border: 3px solid #f0d58f;
  background: linear-gradient(180deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 35%), linear-gradient(90deg, #2a0610 0%, #6e1230 9%, #9c1d48 28%, #a8204c 50%, #9c1d48 72%, #6e1230 91%, #2a0610 100%);
  box-shadow: 0 0 0 2px #7a5a30, 0 8px 30px #000a
}

.rk-x {
  position: absolute;
  left: 618px;
  top: 2px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #ff6a78, #d81e3a 62%, #9a1028);
  border: 4px solid #f4d9a0;
  box-shadow: 0 3px 8px #0009
}

.rk-x svg path {
  stroke: #f6dfa4
}

.rk-tabs {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 84px
}

.rk-tabs .hx {
  position: absolute;
  top: 19px;
  width: 56px;
  height: 48px;
  margin-left: -28px;
  cursor: pointer;
  clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%);
  background: linear-gradient(#f9e3a0, #b8862e)
}

.rk-tabs .hx b {
  position: absolute;
  inset: 3px;
  clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #8c0d35, #6c0828);
  font: 700 27px/1 Georgia, "Times New Roman", serif;
  color: #ffe27a;
  text-shadow: 0 2px 0 #3a0414
}

.rk-tabs .hx.g1 b {
  background: linear-gradient(180deg, #e12a58, #9c0e3a)
}

.rk-tabs .hx.on {
  background: linear-gradient(#fff2e8, #e8a890)
}

.rk-tabs .hx.on b {
  background: linear-gradient(180deg, #ffc7b4, #e0603c);
  color: #7a2208;
  text-shadow: 0 1px 0 #ffd8c8
}

.rk-tabs .dm {
  position: absolute;
  top: 42px;
  width: 9px;
  height: 9px;
  margin-left: -4px;
  background: #d84a6c;
  transform: rotate(45deg)
}

.rk-tabs .hx.big {
  width: 64px;
  height: 56px;
  margin-left: -32px;
  top: 14px
}

.rk-tabs .hx.big b {
  background: linear-gradient(180deg, #8c0d35, #5e0622)
}

.rk-tabs .hx.big svg.fl {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 42px;
  margin: -21px 0 0 -17px
}

.rk-tabs svg.crown {
  position: absolute;
  left: 546px;
  top: -14px;
  width: 56px;
  height: 38px;
  filter: drop-shadow(0 2px 2px #0008)
}

.rk-table {
  position: absolute;
  left: 14px;
  top: 107px;
  width: 614px;
  height: 523px;
  border-radius: 12px 12px 6px 6px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 2px #4a4a4a
}

.rk-head {
  display: flex;
  height: 46px;
  background: linear-gradient(#333, #1b1b1b);
  color: #cfcfd8;
  font-size: 24px;
  line-height: 46px;
  text-align: center;
  border-bottom: 2px solid #0a0a0a
}

.rk-head span {
  border-right: 2px solid #555
}

.rk-head span:last-child {
  border: 0
}

.rk-head em {
  font-style: normal;
  display: inline-block;
  width: 23px;
  height: 23px;
  line-height: 21px;
  border: 2px solid #aaa;
  border-radius: 50%;
  font-size: 15px;
  vertical-align: 3px;
  margin-left: 5px;
  color: #aaa
}

.rk-head span:nth-child(1),
.rk-row .c1 {
  width: 108px
}

.rk-head span:nth-child(2),
.rk-row .c2 {
  width: 197px
}

.rk-head span:nth-child(3),
.rk-row .c3 {
  width: 157px
}

.rk-head span:nth-child(4),
.rk-row .c4 {
  width: 152px
}

.rk-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  bottom: 0;
  overflow-y: auto;
  scrollbar-width: none
}

.rk-body::-webkit-scrollbar {
  display: none
}

.rk-row {
  display: flex;
  align-items: center;
  height: 57px;
  margin-bottom: 2px;
  color: #e2e2e8;
  font-size: 24px
}

.rk-row.r1 {
  background: linear-gradient(180deg, #fff2b4 0%, #f7d466 20%, #e9b53a 58%, #fbe08a 88%, #e6b23a 100%);
  color: #2e1a02
}

.rk-row.r2 {
  background: linear-gradient(180deg, #f7f7fd 0%, #d6d6e6 25%, #b4b4cc 62%, #e6e6f2 90%, #b8b8d0 100%);
  color: #2e2410
}

.rk-row.r3 {
  background: linear-gradient(180deg, #f8b88e 0%, #ee9468 25%, #da7a48 62%, #f0a074 90%, #d88050 100%);
  color: #2c2a0e
}

.rk-row.n {
  height: 45px;
  margin: 0;
  background: #000;
  border-bottom: 2px solid #555
}

.rk-row.n>div {
  height: 100%;
  border-right: 2px solid #555
}

.rk-row.n>div:last-child {
  border: 0
}

.rk-row .c1 {
  flex: none;
  text-align: center
}

.rk-row.n .c1 {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd
}

.rk-row.r1 .c1,
.rk-row.r2 .c1,
.rk-row.r3 .c1 {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 114px;
  clip-path: polygon(0 0, 84% 0, 100% 100%, 0 100%);
  position: relative
}

.rk-row.r1 .c1 {
  background: linear-gradient(180deg, #f0488c, #d3246e 55%, #b4155a)
}

.rk-row.r2 .c1 {
  background: linear-gradient(180deg, #8678dc, #5a4ab4 55%, #463a98)
}

.rk-row.r3 .c1 {
  background: linear-gradient(180deg, #f08a50, #d8602c 55%, #bd4a1c)
}

.rk-row .c1 b {
  margin-left: -16px;
  font: 900 66px/1 Georgia, "Times New Roman", serif;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px rgba(60, 20, 0, .55);
  filter: drop-shadow(0 3px 0 rgba(60, 20, 0, .45))
}

.rk-row.r1 .c1 b {
  background-image: linear-gradient(180deg, #fff3b0, #f2c23a 55%, #c88a14)
}

.rk-row.r2 .c1 b {
  background-image: linear-gradient(180deg, #ffffff, #d6d0f2 55%, #a8a0d8);
  -webkit-text-stroke-color: rgba(40, 20, 100, .5)
}

.rk-row.r3 .c1 b {
  background-image: linear-gradient(180deg, #ffd8b0, #f0a06a 55%, #d07030)
}

.rk-row .c1 sup {
  position: absolute;
  left: 68px;
  top: 6px;
  font: italic 900 24px/1 Georgia, serif;
  color: #ffe48a;
  text-shadow: 0 2px 0 rgba(70, 20, 0, .6)
}

.rk-row.r2 .c1 sup {
  color: #e8e4ff
}

.rk-row.r3 .c1 sup {
  color: #ffc890
}

.rk-row .c2 {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 6px;
  flex: none;
  overflow: hidden
}

.rk-row .av {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .45)
}

.rk-row.n .av {
  width: 40px;
  height: 40px;
  box-shadow: none
}

.rk-row .nm {
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  font-size: 21px;
  line-height: 23px;
  max-height: 46px;
  font-weight: 400
}

.rk-row.r1 .nm,
.rk-row.r2 .nm,
.rk-row.r3 .nm {
  font-size: 24px;
  line-height: 26px;
  color: #2f1c02;
  white-space: nowrap;
  text-overflow: ellipsis
}

.rk-row.n .nm {
  color: #fff
}

.rk-row .c3 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 26px
}

.rk-row.r1 .c3,
.rk-row.r2 .c3,
.rk-row.r3 .c3 {
  font-weight: 700;
  font-size: 26px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 0 3px rgba(255, 255, 255, .5)
}

.rk-row.n .c3 {
  font-weight: 300;
  color: #d4d4d8
}

.rk-row .c4 {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center
}

.rk-row .pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 136px;
  height: 40px;
  padding: 0 20px 0 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3d1f00, #170a00);
  box-shadow: inset 0 0 0 2px #f0c860;
  color: #fff;
  font-weight: 500;
  font-size: 24px
}

.rk-row.r2 .pill {
  background: linear-gradient(180deg, #2c3044, #12141f)
}

.rk-row.r3 .pill {
  background: linear-gradient(180deg, #4c1c08, #1e0a02)
}

.rk-row.n .pill {
  background: none;
  box-shadow: none;
  width: 132px;
  padding: 0 12px 0 8px;
  font-weight: 700;
  font-size: 25px
}

.rk-row .cn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffe98a, #f6b81c 62%, #d88a08);
  box-shadow: inset 0 0 0 3px #ffd048, inset 0 0 0 5px #f09a10;
  position: relative
}

.rk-row .cn::after {
  content: "★";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff0a0;
  text-shadow: 0 0 2px #d07a00
}

.rk-row.n .cn {
  width: 32px;
  height: 32px
}

#dim {
  animation: fadein .3s
}

@keyframes fadein {
  from {
    opacity: 0
  }
}

#toast {
  position: absolute;
  left: 50%;
  top: 662px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: 640px;
  padding: 12px 28px;
  border-radius: 14px;
  background: rgba(10, 6, 30, .5);
  color: #fff;
  font-size: 24px;
  line-height: 30px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  white-space: nowrap
}

#toast.show {
  opacity: 1
}

/* flying chip */

.coin {
  position: absolute;
  z-index: 15;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb0e6, #ff3fb0 60%, #b0007a);
  box-shadow: 0 0 0 3px #ffd0f0 inset, 0 2px 4px #0008;
  pointer-events: none
}

/* rows 1-3 use the supplied row artwork (ribbon with 1st/2nd/3rd, divider, dark awards slot + coin) */

.rk-row.r1,
.rk-row.r2,
.rk-row.r3 {
  height: 55px;
  margin-bottom: 1px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: transparent
}

.rk-row.r1 {
  background-image: url(../assets/rk_row1.png)
}

.rk-row.r2 {
  background-image: url(../assets/rk_row2.png)
}

.rk-row.r3 {
  background-image: url(../assets/rk_row3.png)
}

.rk-row.r1 .c1,
.rk-row.r2 .c1,
.rk-row.r3 .c1 {
  background: none;
  clip-path: none;
  width: 112px
}

.rk-row.r1 .c1 b,
.rk-row.r2 .c1 b,
.rk-row.r3 .c1 b,
.rk-row.r1 .c1 sup,
.rk-row.r2 .c1 sup,
.rk-row.r3 .c1 sup {
  display: none
}

.rk-row.r1 .c2,
.rk-row.r2 .c2,
.rk-row.r3 .c2 {
  width: 205px
}

.rk-row.r1 .c3,
.rk-row.r2 .c3,
.rk-row.r3 .c3 {
  width: 148px
}

.rk-row.r1 .c4,
.rk-row.r2 .c4,
.rk-row.r3 .c4 {
  width: 149px
}

.rk-row.r1 .av,
.rk-row.r2 .av,
.rk-row.r3 .av {
  width: 46px;
  height: 46px;
  margin-left: 8px
}

.rk-row.r1 .nm,
.rk-row.r2 .nm,
.rk-row.r3 .nm {
  font-size: 22px
}

.rk-row.r1 .pill,
.rk-row.r2 .pill,
.rk-row.r3 .pill {
  background: none;
  box-shadow: none;
  width: 100%;
  height: 100%;
  padding: 0 0 0 44px;
  justify-content: center;
  font-size: 22px
}

.rk-row.r1 .pill .cn,
.rk-row.r2 .pill .cn,
.rk-row.r3 .pill .cn {
  display: none
}

/* new header icons (53x53) sit on the cleaned ring */

#ring .hit {
  background-repeat: no-repeat;
  background-size: 53px 53px;
  background-position: center;
  border-radius: 50%
}

#btnBack {
  background-image: url(../assets/ic_back.png)
}

#btnHistory {
  background-image: url(../assets/ic_hist.png)
}

#btnRule {
  background-image: url(../assets/ic_help.png)
}

#btnSetting {
  background-image: url(../assets/ic_gear.png)
}

#ring .hit:active {
  background-color: transparent;
  transform: scale(.94)
}

/* Round plate: its rim bulbs blink in two alternating sets every 0.5s (frames cut from the video) */

.plate {
  position: absolute;
  left: 250px;
  top: 280px;
  width: 220px;
  height: 64px;
  pointer-events: none
}

.plate.pa {
  animation: plA 1s linear infinite
}

.plate.pb {
  animation: plB 1s linear infinite
}

@keyframes plA {
  0%,
  49.9% {
    opacity: 1
  }
  50%,
  100% {
    opacity: 0
  }
}

@keyframes plB {
  0%,
  49.9% {
    opacity: 0
  }
  50%,
  100% {
    opacity: 1
  }
}
/* profile pictures sit exactly in the baked circles (measured on the stage art) and stop at the ribbon */
#podium .p2 .av{left:27.5px;top:23px;width:92px;height:92px;clip-path:inset(0 0 21px 0)}
#podium .p1 .av{left:21.5px;top:12px;width:106px;height:106px;clip-path:inset(0 0 24px 0)}
#podium .p3 .av{left:27.5px;top:22.5px;width:91px;height:91px;clip-path:inset(0 0 19.5px 0)}
