/* ===== final fixes: title ribbons, portrait centering, difficulty row, sound button state ===== */
/* ribbon titles: text sits on the red band (band centre is ~35% of the ribbon art, not 50%) */
#ui .rib {
  padding: 0 3.4em 1em !important;
  text-align: center;
}

#ui .rbn {
  padding: 0 4.8em 1.45em !important;
  text-align: center;
}

#ui .panel h2 {
  padding: 0.35em 1.9em 1.1em !important;
  line-height: 1.2;
  text-align: center;
}

#ui .panel .pb,
#ui .panel > p,
#ui .panel > div {
  text-align: center;
}

#ui .panel .pb .srow,
#ui .panel .pb .set2,
#ui .panel .pb .set {
  text-align: left;
}

/* portrait phones: top bar stays at top, page content is centred in the remaining space */
@media (max-aspect-ratio: 1/1) {
  .sx .sxb {
    justify-content: center !important;
    padding-top: 0 !important;
    padding-bottom: 1em;
  }
  .lvx .lgw {
    margin: auto 0 !important;
  }
  .lvx .lcb {
    margin-top: auto;
  }
  .lvx .lcb + .lgw {
    margin-top: 0 !important;
  }
}

/* difficulty picker (lobby) */
/* sound button in the HUD reflects mute state */
.sm [data-a="snd"].off {
  opacity: 0.8;
  filter: grayscale(0.4) drop-shadow(0 0.15em 0.2em #0009);
}

/* lobby content vertically centred */
#ui .l2 {
  justify-content: center !important;
  padding: 1.4em 0 4% 0 !important;
}

.dfr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  margin-top: 0.9em;
  position: relative;
  z-index: 2;
}

.dfr > span {
  font:
    400 0.75em Bungee,
    Impact,
    sans-serif;
  color: #cde;
  text-shadow: 0 0.1em 0.2em #000;
  letter-spacing: 0.05em;
}

.dfr .dfs {
  display: inline-flex;
  border-radius: 2em;
  overflow: hidden;
  border: 0.14em solid #5c6aa0;
  background: #0b1230;
  box-shadow: 0 0.25em 0.6em #0009;
}

.dfr .dfs button {
  all: unset;
  cursor: pointer;
  padding: 0.6em 1.2em 0.55em;
  font:
    400 0.7em/1 Bungee,
    Impact,
    sans-serif;
  color: #aab;
  text-align: center;
  transition:
    background 0.12s,
    color 0.12s;
}

.dfr .dfs button:hover {
  color: #fff;
}

.dfr .dfs button.on[data-a="dfl:low"] {
  background: linear-gradient(#a8ffb8, #2fbf4f);
  color: #06290f;
}

.dfr .dfs button.on[data-a="dfl:medium"] {
  background: linear-gradient(#ffe36b, #ff9a00);
  color: #4a1f00;
}

.dfr .dfs button.on[data-a="dfl:hard"] {
  background: linear-gradient(#ff9a8a, #e0301a);
  color: #fff;
}

/* lobby: PLAY on top, QUICK FIGHT below */
#ui .l2 .mm {
  flex-direction: column;
  align-items: center;
  gap: 0.7em;
}

/* lobby: big PLAY, smaller QUICK FIGHT */
#ui .l2 .mm .mi:first-child .btn {
  font-size: 1.7em;
}

#ui .l2 .mm .mi:last-child .btn {
  font-size: 1.05em;
}

/* touch controls: same side margin as the top bar (D-pad, action buttons, ULT, HUD buttons share one edge) */
#tp .dp {
  margin-left: 0 !important;
}

#tp .ac {
  margin-right: 0 !important;
}

#tp b.ult {
  right: max(2%, env(safe-area-inset-right)) !important;
}

/* big center banners (ROUND / FIGHT / K.O. / TIME): centered on screen */
#bn,
#bn.go.bn-ko {
  top: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== Styles formerly injected by JavaScript ===== */
/* from audio-saves-and-lobby.js */
.lob {
  justify-content: flex-start;
  padding-top: 1.5%;
  background: linear-gradient(#000a, #0000 42%, #0007);
}

.lob #lg {
  width: 33%;
  margin-top: 0.5%;
}

.row {
  display: flex;
  gap: 0.8em;
  justify-content: center;
  margin-top: -0.2em;
}

.row2 {
  display: flex;
  gap: 0.6em;
  margin-top: 0.55em;
}

.big {
  font-size: 1.5em !important;
  min-width: 7.5em !important;
}

.mini {
  font-size: 0.9em !important;
  min-width: 6em !important;
  padding: 0.4em 1em !important;
  margin: 0 !important;
}

.top {
  position: absolute;
  top: 2.5%;
  left: 2.5%;
  right: 2.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top div:last-child {
  display: flex;
  gap: 0.5em;
}

.coins {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.9em 0.25em 0.35em;
  border-radius: 2em;
  background: #000a;
  border: 0.12em solid #ffd54a;
  box-shadow: 0 0.2em 0.5em #000a;
}

.coins b {
  color: #ffe36b;
}

.c2 {
  font-size: 1.5em;
  margin: 0.2em 0 0.6em;
}

.cn {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  background: radial-gradient(#fff6a0, #ffc21f 55%, #b86a00);
  border: 0.1em solid #fff3a0;
  box-shadow: inset 0 0 0 0.18em #e89a00;
}

.pulse {
  animation: pu 0.8s infinite alternate;
}

@keyframes pu {
  to {
    transform: scale(1.1);
    filter: brightness(1.3);
  }
}

.sel .selbody {
  display: flex;
  gap: 1.5em;
  width: 92%;
  align-items: stretch;
  justify-content: center;
}

#pv {
  width: 34%;
  border-radius: 1em;
  background: linear-gradient(#3a4466, #12162a);
  border: 0.2em solid #ffcf4a;
  padding: 1em;
  text-align: center;
  box-shadow: 0 0.5em 1.4em #000a;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#pv img {
  height: 12em;
  filter: drop-shadow(0 0.4em 0.4em #000a);
  animation: fl 2.5s ease-in-out infinite;
}

#pv h3 {
  margin: 0.3em 0;
  font-size: 1.6em;
}

.st {
  display: flex;
  align-items: center;
  gap: 0.5em;
  width: 100%;
  font-size: 0.7em;
  margin: 0.25em 0;
}

.st span {
  width: 6em;
  text-align: left;
}

.st s {
  flex: 1;
  height: 0.7em;
  background: #0008;
  border-radius: 1em;
  overflow: hidden;
}

.st i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffe36b, #ff6a00);
}

.sel #grid {
  width: 58%;
  grid-template-columns: repeat(3, 1fr);
}

.sel .card {
  aspect-ratio: 1/1.12;
}

.vs {
  background: linear-gradient(100deg, #0b1030f2 49.6%, #2a0a0af2 50.4%);
  flex-direction: row;
  justify-content: space-around;
}

.vp {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 34%;
}

.vp img {
  height: 20em;
  filter: drop-shadow(0 0.5em 0.5em #000);
}

.vp.r img {
  transform: scaleX(-1);
}

.vp b {
  font-size: 2.2em;
  text-shadow: 0 0.1em 0.3em #000;
}

.vp.l {
  animation: sl 0.5s ease-out;
}

.vp.r {
  animation: sr 0.5s ease-out;
}

@keyframes sl {
  from {
    transform: translateX(-130%);
  }
}

@keyframes sr {
  from {
    transform: translateX(130%);
  }
}

.vsx {
  font-size: 6em;
  color: #ffe36b;
  -webkit-text-stroke: 0.03em #5a1c00;
  text-shadow:
    0 0.06em 0 #b23d00,
    0 0.3em 0.5em #000;
  animation: vz 0.5s 0.3s both cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes vz {
  from {
    transform: scale(4);
    opacity: 0;
  }
}

input[type="range"] {
  width: 12em;
  accent-color: #ffb300;
}

.set {
  display: flex;
  align-items: center;
  gap: 1em;
  justify-content: space-between;
  margin: 0.6em 0;
}

.srow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 2em;
  margin: 0.5em 0;
  padding: 0.5em 0.8em;
  background: #0005;
  border-radius: 0.7em;
}

.srow small {
  display: block;
  font-size: 0.55em;
  opacity: 0.85;
  font-family: sans-serif;
}

.pips {
  display: flex;
  gap: 0.25em;
  margin-top: 0.3em;
}

.pips i {
  width: 1.1em;
  height: 0.5em;
  border-radius: 0.2em;
  background: #0008;
  border: 0.08em solid #ffd54a;
}

.pips i.on {
  background: linear-gradient(#fff3a0, #ff9a00);
}

.hw {
  line-height: 1.9;
  font-size: 0.75em !important;
}

#tm.low {
  animation: pu 0.5s infinite alternate;
  color: #a00;
}

/* from audio-saves-and-lobby.js */
.panel {
  max-width: 44em;
}

#ui {
  pointer-events: none;
}

#ui > * {
  pointer-events: auto;
}

.sel #pv img {
  height: 8em;
}

.mvs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
  margin: 0.6em 0;
  text-align: left;
}

.mvs.two {
  grid-template-columns: repeat(2, 1fr);
}

.mc {
  background: #0005;
  border-radius: 0.6em;
  padding: 0.4em 0.6em;
}

.mc h3 {
  margin: 0 0 0.2em;
  font-size: 0.9em;
}

.mv {
  font-size: 0.6em;
  margin: 0.3em 0;
  line-height: 1.3;
  text-align: left;
}

.mv i {
  font-style: normal;
  color: #8cf;
  margin-left: 0.5em;
}

.mv small {
  display: block;
  font-family: sans-serif;
  opacity: 0.85;
}

.hg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  text-align: left;
  font-size: 0.62em;
  line-height: 1.8;
  font-family: sans-serif;
  font-weight: 700;
}

/* from audio-saves-and-lobby.js */
.sm {
  top: 19%;
  bottom: auto;
}

#tp {
  inset: auto 0 2.5% 0;
  align-items: flex-end;
  opacity: 1;
}

#tp .dp {
  display: grid;
  grid-template-columns: repeat(3, 5em);
  grid-template-rows: repeat(3, 4.2em);
  grid-template-areas: ". u ." "l . r" ". d .";
  gap: 0.2em;
  margin-left: 1%;
}

#tp .ac {
  display: grid;
  grid-template-columns: 5.6em 6.4em;
  grid-template-rows: 5.6em 6.4em;
  gap: 0.4em;
  align-items: center;
  justify-items: center;
  margin-right: 1%;
}

#tp b {
  font-family: Bungee, Impact, sans-serif;
  width: 100%;
  height: 100%;
  min-width: 4em;
  border-radius: 50%;
  margin: 0;
  font-size: 0.8em;
  color: #fff;
  text-shadow: 0 0.1em 0.15em #0009;
  background:
    radial-gradient(circle at 35% 28%, #fffb, #fff3 35%, #0003 100%), #566;
  border: 0.2em solid #fffd;
  box-shadow:
    0 0.35em 0 #0008,
    0 0.6em 1em #0007;
  transition: transform 0.06s;
  opacity: 0.88;
  letter-spacing: 0.03em;
}

#tp b.on {
  transform: translateY(0.25em) scale(0.93);
  box-shadow: 0 0.1em 0 #0008;
  filter: brightness(1.3);
  opacity: 1;
}

#tp .dp b {
  border-radius: 1em;
  font-size: 1.3em;
  background: linear-gradient(#fff5, #0004), #334;
}

#tp .u {
  grid-area: u;
}

#tp .l {
  grid-area: l;
}

#tp .r {
  grid-area: r;
}

#tp .d {
  grid-area: d;
}

#tp .pp {
  background: radial-gradient(circle at 35% 28%, #fffb, #fff0 35%), #e02828;
}

#tp .kk {
  background: radial-gradient(circle at 35% 28%, #fffb, #fff0 35%), #2a6cf0;
}

#tp .sp {
  background: radial-gradient(circle at 35% 28%, #fffb, #fff0 35%), #8a3cf0;
}

#tp .sp.rdy {
  animation: bl 0.4s infinite alternate;
  box-shadow:
    0 0 1.4em #c8f,
    0 0.35em 0 #0008;
}

#tp .sp2 {
  background: radial-gradient(circle at 35% 28%, #fff9, #fff0 35%), #667;
  font-size: 0.62em;
}

#tp .pp {
  width: 100%;
  height: 100%;
  font-size: 0.95em;
}

/* from audio-saves-and-lobby.js */
.btn {
  border: solid transparent;
  border-width: 0.7em 1.1em;
  border-image: url("../images/ui/btn_orange.webp") 30 44 fill/.7em 1.1em
    stretch;
  background: none;
  box-shadow: none;
  padding: 0.05em 0.4em 0.3em;
  color: #4a1f00;
  text-shadow: 0 0.06em 0 #ffe9a0;
  filter: drop-shadow(0 0.2em 0.25em #0009);
  min-width: 7em;
}

.btn.blue {
  border-image-source: url("../images/ui/btn_blue.webp");
  background: none;
  box-shadow: none;
  color: #fff;
  text-shadow: 0 0.08em 0.12em #000b;
}

.btn.dark {
  border-image-source: url("../images/ui/btn_gray.webp");
  background: none;
  box-shadow: none;
  color: #fff;
  text-shadow: 0 0.08em 0.12em #000b;
}

.btn:hover {
  filter: drop-shadow(0 0.2em 0.25em #0009) brightness(1.12);
}

.btn:active,
.btn.blue:active,
.btn.dark:active {
  transform: translateY(0.15em);
  box-shadow: none;
  filter: drop-shadow(0 0.05em 0.1em #0009) brightness(0.95);
}

.panel {
  background: none;
  border: solid transparent;
  border-width: 2.2em;
  border-image: url("../images/ui/panel.webp") 46 fill/2.2em stretch;
  box-shadow: none;
  padding: 0 0.4em;
  filter: drop-shadow(0 0.8em 1.2em #000a);
}

.panel:before {
  display: none;
}

.panel h2 {
  display: inline-block;
  background: url("../images/ui/ribbon.webp") center/100% 100% no-repeat;
  padding: 0.5em 1.9em 0.65em;
  margin: -2.7em 0 0.5em;
  font-size: 1.25em;
  color: #4a2400;
  text-shadow: 0 0.06em 0 #ffe9a0;
  filter: drop-shadow(0 0.15em 0.2em #0008);
}

.cn {
  background: url("../images/ui/coin.webp") center/contain no-repeat;
  border: 0;
  box-shadow: none;
  width: 1.5em;
  height: 1.5em;
}

.card {
  border: solid transparent;
  border-width: 1.1em;
  border-image: url("../images/ui/card.webp") 34 fill/1.1em stretch;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.card.on {
  border-image-source: url("../images/ui/card_sel.webp");
  filter: drop-shadow(0 0 0.7em var(--cc));
}

.card:hover {
  box-shadow: none;
}

.pip img.e {
  filter: grayscale(1) brightness(0.7);
}

.pip img {
  height: 1.2em;
  margin-right: 0.2em;
  vertical-align: middle;
  filter: drop-shadow(0 0.1em 0.1em #000a);
}

.vsx img {
  height: 9em;
  filter: drop-shadow(0 0.3em 0.5em #000);
}

.vsx {
  -webkit-text-stroke: 0;
  text-shadow: none;
}

#tm {
  width: 3.3em;
  height: 4em;
  font-size: 1.25em;
  background: url("../images/ui/timer.webp") center/contain no-repeat;
  border: 0;
  box-shadow: none;
  padding-top: 0.8em;
  top: 0.2%;
  color: #3b1700;
  filter: drop-shadow(0 0.15em 0.2em #0009);
}

.sm .btn {
  width: 2.7em;
  height: 2.7em;
  min-width: 0;
  border: 0;
  border-image: none;
  padding: 0;
  font-size: 1em;
  color: transparent;
  text-shadow: none;
  text-indent: 150%;
  overflow: hidden;
  white-space: nowrap;
  background-color: transparent;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0.15em 0.2em #0009);
}

.sm [data-a="pause"] {
  background-image: url("../images/ui/pause.webp");
}

.sm [data-a="help"] {
  background-image: url("../images/ui/help.webp");
}

.sm [data-a="snd"] {
  background-image: url("../images/ui/snd.webp");
}

.sm [data-a="tch"] {
  background-image: url("../images/ui/dpad.webp");
}

#tp b {
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
  font-size: 0 !important;
  border-radius: 0;
  opacity: 1;
  filter: drop-shadow(0 0.3em 0.3em #0009);
}

#tp .pp,
#tp .kk,
#tp .sp,
#tp .sp2 {
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}

#tp .pp {
  background-image: url("../images/ui/fist.webp") !important;
}

#tp .kk {
  background-image: url("../images/ui/boot.webp") !important;
}

#tp .sp {
  background-image: url("../images/ui/bolt.webp") !important;
}

#tp .sp2 {
  background-image: url("../images/ui/bolt2.webp") !important;
}

#tp .sp.rdy {
  animation: bl 0.35s infinite alternate;
  filter: drop-shadow(0 0 0.8em #d9f);
}

#tp b.on {
  transform: scale(0.9);
  filter: brightness(1.4);
}

#tp .dp {
  width: 13.5em;
  height: 13.5em;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
  background: url("../images/ui/dpad.webp") center/contain no-repeat;
  filter: drop-shadow(0 0.3em 0.3em #0009);
}

#tp .dp b {
  border-radius: 0.8em;
  filter: none;
}

#tp .dp b.on {
  background: #fff5 !important;
  transform: none;
  filter: none;
}

#tp .ac {
  grid-template-columns: 5.8em 5.8em;
  grid-template-rows: 5.8em 6.6em;
}

#tp .ac b {
  min-width: 0;
}

/* from audio-saves-and-lobby.js */
.vsx {
  font-size: 1em;
}

.vsx img {
  height: 9em;
}

.panel h2 {
  display: table;
  margin: -2.7em auto 0.5em;
  white-space: nowrap;
}

.panel .coins {
  display: flex;
  width: max-content;
  margin: 0.2em auto 0.7em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  padding: 0.1em 0.4em 0.32em;
  text-align: center;
}

.srow b {
  font-size: 1em;
}

.srow small {
  font-size: 0.72em;
}

.sel #pv .mv {
  font-size: 0.72em;
}

.panel p {
  line-height: 1.5;
}

.panel.hp {
  width: 40em;
  max-width: 92%;
}

.tabs {
  display: flex;
  gap: 0.5em;
  justify-content: center;
  margin: 0.2em 0 0.8em;
}

.tab {
  font-family: inherit;
  font-size: 0.85em;
  padding: 0.5em 1.3em;
  border-radius: 2em;
  border: 0.15em solid #5c6aa0;
  background: #0b1230;
  color: #aab;
  cursor: pointer;
}

.tab.on {
  background: linear-gradient(#ffe36b, #ff9a00);
  color: #4a1f00;
  border-color: #fff3a0;
  box-shadow: 0 0.2em 0.4em #0008;
}

.hb {
  min-height: 15.5em;
  text-align: left;
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4em;
}

.cols h4 {
  margin: 0 0 0.5em;
  text-align: center;
  color: #ffd54a;
  font-size: 1em;
  letter-spacing: 0.08em;
}

.kr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25em 0.6em;
  margin: 0.2em 0;
  background: #0005;
  border-radius: 0.5em;
  font-size: 0.8em;
}

.kr div {
  display: flex;
  align-items: center;
  gap: 0.2em;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.4em;
  border-radius: 0.4em;
  background: linear-gradient(#fff, #dde 55%, #99a);
  color: #223;
  box-shadow:
    0 0.2em 0 #556,
    0 0.3em 0.4em #0006;
  font-size: 0.9em;
  margin: 0 0.1em;
  font-family: sans-serif;
  font-weight: 800;
}

.nt {
  text-align: center;
  font-size: 0.75em !important;
  opacity: 0.85;
  margin: 0.8em 0 0 !important;
}

.tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8em;
}

.tip {
  display: flex;
  gap: 0.8em;
  align-items: center;
  background: #0005;
  border-radius: 0.8em;
  padding: 0.7em 0.9em;
}

.tip img {
  width: 3.6em;
  height: 3.6em;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 0.2em 0.2em #000a);
}

.tip b {
  display: block;
  color: #ffd54a;
  font-size: 0.95em;
  margin-bottom: 0.2em;
}

.tip span {
  font-size: 0.75em;
  line-height: 1.45;
  font-family: sans-serif;
  font-weight: 700;
  opacity: 0.92;
}

.chips {
  display: flex;
  gap: 0.5em;
  justify-content: center;
  margin-bottom: 0.8em;
}

.chip {
  width: 5.3em;
  text-align: center;
  border-radius: 0.7em;
  padding: 0.4em 0.2em 0.3em;
  background: #0b1230;
  border: 0.15em solid #3b4778;
  cursor: pointer;
  font-size: 0.8em;
}

.chip img {
  height: 4.2em;
  display: block;
  margin: 0 auto;
}

.chip.on {
  border-color: var(--cc);
  box-shadow: 0 0 0.8em var(--cc);
  background: #1a2552;
}

.mcs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8em;
}

.mcd {
  background: #0005;
  border-radius: 0.8em;
  padding: 0.7em 0.9em;
  text-align: center;
}

.mcd b {
  font-size: 1.05em;
}

.mcd .kk {
  margin: 0.5em 0;
}

.mcd p {
  margin: 0;
  font-size: 0.75em;
  font-family: sans-serif;
  font-weight: 700;
  opacity: 0.92;
}

/* from audio-saves-and-lobby.js */
.card p {
  background: none;
  font-size: 0.85em;
  color: #ffe9a0;
  text-shadow:
    0 0.1em 0.2em #000,
    0 0 0.4em #000;
  padding: 0.3em 0 0.55em;
}

#rot {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #07080c;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: Bungee, Impact, sans-serif;
}

#rot b {
  display: block;
  font-size: 1.4em;
  color: #ffd54a;
  margin: 0.8em 0 0.2em;
}

#rot span {
  display: block;
  font-size: 0.8em;
  opacity: 0.8;
  margin-bottom: 1.2em;
}

.ph {
  width: 3.2em;
  height: 5.6em;
  margin: 0 auto;
  border: 0.25em solid #fff;
  border-radius: 0.6em;
  animation: rt 2s ease-in-out infinite;
}

@keyframes rt {
  0%,
  20% {
    transform: rotate(0);
  }
  60%,
  100% {
    transform: rotate(90deg);
  }
}

/* from menu-screens.js */
@font-face {
  font-family: Bungee;
  src: url(../fonts/bungee.woff2) format("woff2");
}

@font-face {
  font-family: Nunito;
  font-weight: 800;
  src: url(../fonts/nunito.woff2) format("woff2");
}

#ui .btn {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  cursor: pointer;
  height: 3.2em;
  min-width: 9em;
  padding: 0 0.4em 0.3em;
  border: solid transparent;
  border-width: 0.8em 1.2em;
  border-image: url("../images/ui/btn_orange.webp") 30 44 fill/.8em 1.2em
    stretch;
  font:
    400 1em/1 Bungee,
    Impact,
    sans-serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #4a1f00;
  text-shadow: 0 0.07em 0 #ffe9a0;
  filter: drop-shadow(0 0.2em 0.2em #0009);
  transition:
    transform 0.08s,
    filter 0.12s;
}

#ui .btn.blue {
  border-image-source: url("../images/ui/btn_blue.webp");
  color: #fff;
  text-shadow: 0 0.08em 0.1em #000b;
}

#ui .btn.dark {
  border-image-source: url("../images/ui/btn_gray.webp");
  color: #fff;
  text-shadow: 0 0.08em 0.1em #000b;
}

#ui .btn:hover {
  filter: drop-shadow(0 0.2em 0.2em #0009) brightness(1.12);
}

#ui .btn:active {
  transform: translateY(0.16em);
  filter: drop-shadow(0 0.05em 0.1em #0009);
}

#ui .btn.l {
  font-size: 1.3em;
  min-width: 8.6em;
}

#ui .btn.s {
  font-size: 0.78em;
  min-width: 7.4em;
}

#ui .btn .ci {
  height: 1.25em;
}

#ui .modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000a;
  z-index: 9;
}

#ui .panel {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 25em;
  max-width: 46em;
  max-height: 92%;
  border: solid transparent;
  border-width: 2.2em 2.4em;
  border-image: url("../images/ui/panel.webp") 46 fill/2.2em 2.4em stretch;
  filter: drop-shadow(0 0.8em 1.2em #000b);
  animation: pp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #fff;
  text-align: center;
  font-family: Bungee, Impact, sans-serif;
}

#ui .panel.na {
  animation: none;
}

#ui .panel.panel-small {
  font-size: 0.86em;
}

#ui .rib {
  position: absolute;
  top: -3.7em;
  left: 50%;
  transform: translateX(-50%);
  min-width: 13em;
  height: 3.5em;
  padding: 0 3.4em 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../images/ui/ribbon.webp") center/100% 100% no-repeat;
  font:
    400 1.05em/1 Bungee,
    Impact;
  color: #4a2400;
  text-shadow: 0 0.07em 0 #ffe9a0;
  white-space: nowrap;
  filter: drop-shadow(0 0.2em 0.2em #0009);
}

#ui .pb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85em;
  padding: 1.3em 0.4em 1.3em;
  width: 100%;
}

#ui .pb p {
  margin: 0;
  font:
    800 0.95em/1.5 Nunito,
    sans-serif;
  max-width: 30em;
  opacity: 0.95;
}

#ui .coins {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 2.3em;
  padding: 0 1em 0 0.4em;
  border-radius: 2em;
  background: #000b;
  border: 0.14em solid #ffd54a;
  font: 400 1em/1 Bungee;
  box-shadow: 0 0.2em 0.5em #000a;
}

#ui .coins b {
  font-weight: 400;
  color: #ffe36b;
  padding-top: 0.08em;
}

#ui .l2 {
  justify-content: flex-start;
  padding-top: 1.1em;
  background: linear-gradient(#000b, #0000 42%, #0008);
}

#ui .l2 #lg {
  width: 29%;
  margin: 0;
  margin-top: 0.2em;
}

#ui .tp2 {
  position: absolute;
  top: 0.9em;
  left: 1em;
  right: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#ui .mm {
  display: flex;
  gap: 2.4em;
  margin-top: 0.1em;
}

#ui .mi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55em;
}

#ui .mi span {
  font:
    800 0.8em Nunito,
    sans-serif;
  color: #ffe9a0;
  text-shadow:
    0 0.1em 0.2em #000,
    0 0 0.5em #000;
}

#ui .mr {
  display: flex;
  gap: 0.9em;
  margin-top: 1.1em;
}

#ui .mm {
  margin-top: 0.2em;
}

#ui .sbar {
  display: flex;
  gap: 1.4em;
  align-items: center;
  margin-top: 0.9em;
}

#ui .seg {
  display: inline-flex;
  align-items: stretch;
  border-radius: 2em;
  overflow: hidden;
  border: 0.14em solid #5c6aa0;
  background: #0b1230;
}

#ui .seg span {
  display: flex;
  align-items: center;
  padding: 0 0.9em;
  font: 400 0.66em Bungee;
  color: #cde;
  background: #0008;
}

#ui .seg button {
  all: unset;
  cursor: pointer;
  padding: 0.55em 1.1em 0.5em;
  font: 400 0.68em/1 Bungee;
  color: #aab;
}

#ui .seg button.on {
  background: linear-gradient(#ffe36b, #ff9a00);
  color: #4a1f00;
}

#ui .srow {
  display: grid;
  grid-template-columns: 3.3em 1fr auto;
  align-items: center;
  gap: 0.9em;
  width: 100%;
  padding: 0.55em 0.9em;
  background: #0006;
  border-radius: 0.8em;
  text-align: left;
}

#ui .srow > img {
  width: 3.1em;
  height: 3.1em;
  object-fit: contain;
}

#ui .srow b {
  display: block;
  font: 400 1em Bungee;
}

#ui .srow small {
  display: block;
  font: 800 0.72em Nunito;
  opacity: 0.85;
  margin: 0.25em 0;
}

#ui .set2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6em;
  width: 100%;
  padding: 0.5em 0.9em;
  background: #0006;
  border-radius: 0.8em;
  font: 400 0.85em Bungee;
}

#ui .set2 input {
  width: 11em;
}

#ui .panel.hp {
  font-size: 0.84em;
}

#ui .hp .pb {
  gap: 0.55em;
  padding-top: 1.1em;
}

#ui .hp .hb {
  min-height: 12.5em;
}

#ui .hp .kr {
  padding: 0.15em 0.6em;
}

#ui .hp .tabs {
  margin: 0;
}

#ui .tab {
  font-family: Bungee;
  font-weight: 400;
}

#ui .tip span,
#ui .mcd p,
#ui .mv small,
#ui .nt,
#ui .hg,
#ui .kr {
  font-family: Nunito, sans-serif;
  font-weight: 800;
}

#ui .card p {
  font-family: Bungee;
  font-weight: 400;
  font-size: 0.78em;
}

#ui .res {
  background: radial-gradient(ellipse at 50% 35%, #16255cdd, #000e);
  justify-content: flex-start;
  padding-top: 1.2em;
  overflow: hidden;
}

#ui .rbn {
  min-width: 19em;
  height: 5.2em;
  padding: 0 4.8em 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../images/ui/ribbon.webp") center/100% 100% no-repeat;
  font: 400 1.55em/1 Bungee;
  color: #4a2400;
  text-shadow: 0 0.07em 0 #ffe9a0;
  white-space: nowrap;
  filter: drop-shadow(0 0.3em 0.3em #000a);
  animation: rbn 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes rbn {
  from {
    transform: scale(2.4);
    opacity: 0;
  }
}

#ui .rb {
  display: flex;
  gap: 2.4em;
  align-items: center;
  margin-top: 0.3em;
}

#ui .rw {
  text-align: center;
  width: 13em;
}

#ui .rw img {
  height: 14.5em;
  filter: drop-shadow(0 0.5em 0.6em #000);
  animation: fl 2.4s ease-in-out infinite;
}

#ui .rw img.dim {
  filter: grayscale(0.8) brightness(0.8) drop-shadow(0 0.5em 0.6em #000);
  animation: none;
}

#ui .rw b {
  display: block;
  font: 400 1.3em Bungee;
  margin-top: 0.3em;
}

#ui .rs {
  width: 21em;
  padding: 0.9em 1.2em;
  background: #0a1030d9;
  border: 0.16em solid #ffcf4a;
  border-radius: 1em;
  box-shadow: 0 0.6em 1.4em #000a;
}

#ui .stars {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

#ui .stars img {
  height: 3.1em;
  animation: sp 0.6s both cubic-bezier(0.2, 1.8, 0.4, 1);
}

#ui .stars img.e {
  filter: grayscale(1) opacity(0.3);
}

@keyframes sp {
  from {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
}

#ui .rr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 0.2em;
  border-bottom: 0.08em solid #fff2;
  font: 400 0.8em Bungee;
}

#ui .rr:last-child {
  border: 0;
}

#ui .rr b {
  font-weight: 400;
  color: #ffe36b;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

#ui .rr .ci {
  height: 1.3em;
}

#ui .rt {
  font: 800 0.8em Nunito;
  color: #ffe9a0;
  margin-top: 0.6em;
  text-align: center;
}

#ui .rbt {
  display: flex;
  gap: 1em;
  margin-top: 0.9em;
}

#ui .cf i {
  position: absolute;
  top: -1.5em;
  width: 0.6em;
  height: 1em;
  border-radius: 0.1em;
  animation: cf linear infinite;
}

@keyframes cf {
  to {
    transform: translateY(40em) rotate(720deg);
  }
}

/* from menu-screens.js */
.pl {
  width: 33% !important;
}

.pl.l {
  left: 8.5% !important;
}

.pl.r {
  right: 8.5% !important;
}

.pt {
  position: absolute;
  top: 0.1em;
  width: 3.7em;
  height: 3.7em;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 6%;
  border: 0.2em solid #ffd54a;
  background: radial-gradient(#3a4a8a, #10163a);
  box-shadow: 0 0.25em 0.5em #000a;
}

.pl.l .pt {
  left: -4.5em;
}

.pl.r .pt {
  right: -4.5em;
  transform: scaleX(-1);
}

#ui .modal {
  background: #000c;
}

/* from menu-screens.js */
.fl.low {
  background: linear-gradient(
    #ffc2c2,
    #ff3a3a 40%,
    #c40000 41%,
    #850000
  ) !important;
  animation: pu 0.5s infinite alternate;
}

/* from menu-screens.js */
body {
  background: radial-gradient(ellipse at 50% 40%, #141b3a, #05060a 75%);
}

#ui,
#hud {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#ui .btn {
  height: 3.3em;
  letter-spacing: 0.07em;
  color: #fff;
  text-shadow:
    0.06em 0 #6b2a00,
    -0.06em 0 #6b2a00,
    0 0.06em #6b2a00,
    0 -0.06em #6b2a00,
    0.045em 0.045em #6b2a00,
    -0.045em 0.045em #6b2a00,
    0.045em -0.045em #6b2a00,
    -0.045em -0.045em #6b2a00,
    0 0.14em 0 #6b2a00;
  position: relative;
  overflow: hidden;
  border-radius: 1.2em;
}

#ui .btn.blue {
  text-shadow:
    0.06em 0 #0b2a78,
    -0.06em 0 #0b2a78,
    0 0.06em #0b2a78,
    0 -0.06em #0b2a78,
    0.045em 0.045em #0b2a78,
    -0.045em 0.045em #0b2a78,
    0.045em -0.045em #0b2a78,
    -0.045em -0.045em #0b2a78,
    0 0.14em 0 #0b2a78;
}

#ui .btn.dark {
  text-shadow:
    0.06em 0 #171b28,
    -0.06em 0 #171b28,
    0 0.06em #171b28,
    0 -0.06em #171b28,
    0.045em 0.045em #171b28,
    -0.045em 0.045em #171b28,
    0.045em -0.045em #171b28,
    -0.045em -0.045em #171b28,
    0 0.14em 0 #171b28;
}

#ui .btn[data-a="next"],
#ui .btn[data-a="go"],
#ui .btn[data-a="resume"] {
  filter: hue-rotate(78deg) saturate(1.15) drop-shadow(0 0.2em 0.2em #0009);
}

#ui .btn:after {
  content: "";
  position: absolute;
  inset: 0.35em 0.6em;
  background: linear-gradient(105deg, #fff0 38%, #fff7 50%, #fff0 62%);
  transform: translateX(-130%);
  pointer-events: none;
}

#ui .btn:hover:after {
  animation: shn 0.65s ease-out;
}

@keyframes shn {
  to {
    transform: translateX(130%);
  }
}

#ui .mm .mi:first-child .btn {
  animation: glw 1.6s ease-in-out infinite alternate;
}

@keyframes glw {
  to {
    filter: drop-shadow(0 0.2em 0.2em #0009) drop-shadow(0 0 0.8em #ffb02e);
  }
}

#ui .modal {
  background: radial-gradient(ellipse at 50% 45%, #1d2f7a99, #000d 72%);
}

#ui .rib,
#ui .rbn {
  color: #fff;
  text-shadow:
    0.06em 0 #6b2a00,
    -0.06em 0 #6b2a00,
    0 0.06em #6b2a00,
    0 -0.06em #6b2a00,
    0.045em 0.045em #6b2a00,
    -0.045em 0.045em #6b2a00,
    0.045em -0.045em #6b2a00,
    -0.045em -0.045em #6b2a00,
    0 0.14em 0 #6b2a00;
}

#ui .pb p {
  font-size: 1.02em;
  line-height: 1.55;
}

#ui .xbtn {
  all: unset;
  position: absolute;
  top: -1.2em;
  right: -1.3em;
  width: 2.9em;
  height: 2.9em;
  cursor: pointer;
  background: url("../images/ui/close.webp") center/contain no-repeat;
  filter: drop-shadow(0 0.2em 0.2em #000a);
  transition: transform 0.12s;
  z-index: 3;
}

#ui .xbtn:hover {
  transform: scale(1.12) rotate(8deg);
}

#ui .xbtn:active {
  transform: scale(0.94);
}

#ui .coins,
#ui .coins b {
  text-shadow:
    0.06em 0 #2a1600,
    -0.06em 0 #2a1600,
    0 0.06em #2a1600,
    0 -0.06em #2a1600,
    0.045em 0.045em #2a1600,
    -0.045em 0.045em #2a1600,
    0.045em -0.045em #2a1600,
    -0.045em -0.045em #2a1600,
    0 0.14em 0 #2a1600;
}

.pl b {
  font-family: Bungee, Impact, sans-serif !important;
  font-weight: 400 !important;
  font-size: 1.02em;
  letter-spacing: 0.05em;
  text-shadow:
    0.06em 0 #000,
    -0.06em 0 #000,
    0 0.06em #000,
    0 -0.06em #000,
    0.045em 0.045em #000,
    -0.045em 0.045em #000,
    0.045em -0.045em #000,
    -0.045em -0.045em #000,
    0 0.14em 0 #000;
}

.bar {
  border-color: #ffd54a !important;
  border-width: 0.2em !important;
  box-shadow:
    0 0.25em 0.6em #000a,
    inset 0 0 0.6em #000 !important;
}

.mt {
  border-color: #7fb4ff !important;
}

#tm {
  font-family: Bungee, Impact, sans-serif;
  font-size: 1.35em !important;
}

.pip img {
  height: 1.3em;
}

#bn {
  font-family: Bungee, Impact, sans-serif;
}

.cb {
  font-family: Bungee, Impact, sans-serif;
}

/* from menu-screens.js */
#ui .sel h2 {
  text-shadow:
    0.06em 0 #6b2a00,
    -0.06em 0 #6b2a00,
    0 0.06em #6b2a00,
    0 -0.06em #6b2a00,
    0 0.12em 0 #6b2a00;
  font-size: 1.9em;
  letter-spacing: 0.06em;
  color: #ffe27a;
  margin: 0 0 0.35em;
}

#ui .sel .selbody {
  gap: 1em;
  align-items: stretch;
  width: 92%;
}

#ui .sel {
  padding: 0.3em 0;
}

#ui .sel #grid {
  gap: 0.8em;
  flex: 1;
  width: auto;
  min-width: 0;
}

#ui .sel .card {
  position: relative;
  aspect-ratio: var(--ar, 1/1.06);
  transition:
    transform 0.15s,
    filter 0.15s;
}

#ui .sel .card img {
  height: 76%;
  bottom: 17%;
  filter: drop-shadow(0 0.3em 0.3em #000a);
}

#ui .sel .card p {
  font-size: 0.95em;
  color: #fff;
  text-shadow:
    0.06em 0 #10163a,
    -0.06em 0 #10163a,
    0 0.06em #10163a,
    0 -0.06em #10163a,
    0 0.12em 0 #10163a;
  padding: 0.2em 0 0.55em;
  letter-spacing: 0.06em;
}

#ui .sel .card p:after {
  content: "";
  display: block;
  width: 55%;
  height: 0.2em;
  margin: 0.25em auto 0;
  border-radius: 1em;
  background: var(--cc);
  box-shadow: 0 0 0.6em var(--cc);
}

#ui .sel .card:hover {
  transform: translateY(-0.3em);
  filter: drop-shadow(0 0 0.9em var(--cc));
}

#ui .sel .card.on {
  filter: drop-shadow(0 0 1.1em var(--cc));
}

#ui .sel #pv {
  flex: 0 0 34%;
  width: 34%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.8em 1em;
  gap: 0.3em;
  background:
    radial-gradient(ellipse at 50% 24%, #ffffff22, #0000 58%),
    linear-gradient(#27315f, #0f1639);
  border: 0.2em solid #ffd54a;
  border-radius: 1em;
  box-shadow:
    0 0.5em 1.4em #000a,
    inset 0 0 1.5em #0008;
  align-items: center;
}

#ui .sel #pv .pi {
  height: 8.6em;
  filter: drop-shadow(0 0.4em 0.4em #000a);
  animation: none;
}

#ui .sel #pv h3 {
  font-family: Bungee, Impact, sans-serif;
  font-weight: 400;
  font-size: 1.6em;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow:
    0.06em 0 #000,
    -0.06em 0 #000,
    0 0.06em #000,
    0 -0.06em #000,
    0 0.12em 0 #000;
}

#ui .sel .sts {
  width: 100%;
}

#ui .sel .st2 {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0.22em 0;
  font-size: 0.8em;
}

#ui .sel .st2 span {
  width: 5.2em;
  text-align: left;
  font-family: Bungee, Impact, sans-serif;
  font-size: 0.85em;
  color: #cfd8ff;
  letter-spacing: 0.04em;
}

#ui .sel .st2 s {
  flex: 1;
  height: 0.8em;
  background: #0009;
  border-radius: 1em;
  overflow: hidden;
  border: 0.1em solid #3b4778;
  text-decoration: none;
}

#ui .sel .st2 i {
  display: block;
  height: 100%;
  border-radius: 1em;
  background: linear-gradient(90deg, #ffe36b, #ff7a00);
}

#ui .sel .mvl {
  width: 100%;
  display: grid;
  gap: 0.45em;
  margin-top: 0.35em;
}

#ui .sel .mvc {
  background: #0007;
  border: 0.1em solid #2c3868;
  border-radius: 0.6em;
  padding: 0.45em 0.7em;
  text-align: left;
}

#ui .sel .mvc b {
  font-family: Bungee, Impact, sans-serif;
  font-weight: 400;
  font-size: 0.8em;
  letter-spacing: 0.03em;
}

#ui .sel .mvc .kc {
  float: right;
  display: flex;
  gap: 0.15em;
  align-items: center;
  font-size: 0.75em;
}

#ui .sel .mvc small {
  display: block;
  clear: both;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.72em;
  line-height: 1.35;
  color: #e4e9ff;
  opacity: 0.92;
  margin-top: 0.15em;
}

/* from menu-screens.js */
@font-face {
  font-family: Russo;
  src: url(../fonts/russo.woff2) format("woff2");
  font-display: block;
}

.pl b {
  font-family: Russo, Impact, sans-serif !important;
  font-size: 1.1em !important;
  letter-spacing: 0.08em !important;
}

.pl.l b {
  color: #cfe8ff;
  text-shadow:
    0.06em 0 #0d2f66,
    -0.06em 0 #0d2f66,
    0 0.06em #0d2f66,
    0 -0.06em #0d2f66,
    0 0.12em 0 #0d2f66;
}

.pl.r b {
  color: #ffd6d6;
  text-shadow:
    0.06em 0 #6a1212,
    -0.06em 0 #6a1212,
    0 0.06em #6a1212,
    0 -0.06em #6a1212,
    0 0.12em 0 #6a1212;
}

.pl.l .bar {
  border-color: #58b0ff !important;
}

.pl.r .bar {
  border-color: #ff6666 !important;
}

.pl.l .pt {
  border-color: #58b0ff !important;
}

.pl.r .pt {
  border-color: #ff6666 !important;
}

#tm {
  font-family: Russo, Impact, sans-serif !important;
}

#ui .sel .st2 span,
#ui .sel .mvc b {
  font-family: Russo, Impact, sans-serif !important;
  letter-spacing: 0.05em;
}

#ui .srow2 b,
#ui .rw b {
  font-family: Russo, Impact, sans-serif;
}

#ui .sel h2 {
  background: linear-gradient(#fff3a8, #ffbf1f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.08em 0 #7a3600) drop-shadow(0 0.15em 0.3em #000a);
  text-shadow: none;
}

#ui .btn {
  filter: saturate(1.12) drop-shadow(0 0.2em 0.25em #0009);
}

/* from menu-screens.js */
#ui .sel2 {
  justify-content: flex-start;
  padding-top: 0.7em;
}

#ui .sel2 h2 {
  background: linear-gradient(#fff3a8, #ffbf1f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.08em 0 #7a3600) drop-shadow(0 0.15em 0.3em #000a);
  font-size: 1.75em;
  letter-spacing: 0.07em;
  margin: 0 0 0.35em;
}

#ui .sel2 .stage {
  display: flex;
  width: 92%;
  height: 19.2em;
  gap: 1em;
  align-items: stretch;
}

#ui .sel2 #hero {
  position: relative;
  flex: 0 0 40%;
  border-radius: 1em;
  overflow: hidden;
  background: linear-gradient(#1b2560, #0a0f2e);
  border: 0.18em solid #ffd54a;
  box-shadow:
    0 0.5em 1.4em #000a,
    inset 0 0 1.6em #0009;
}

#ui .sel2 #hero .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 64%,
    var(--cc, #fff) 0%,
    transparent 62%
  );
  opacity: 0.5;
}

#ui .sel2 #hero .himg {
  position: absolute;
  left: 50%;
  bottom: 3.4em;
  height: 14.6em;
  transform: translateX(-50%);
  filter: drop-shadow(0 0.4em 0.4em #000a);
}

#ui .sel2 #hero .hname {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.35em;
  text-align: center;
  font-family: Bungee, Impact, sans-serif;
  font-size: 1.9em;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow:
    0.06em 0 #10163a,
    -0.06em 0 #10163a,
    0 0.06em #10163a,
    0 -0.06em #10163a,
    0 0.12em 0 #10163a;
}

#ui .sel2 #hero.pop .himg {
  animation: hpop 0.32s cubic-bezier(0.2, 1.5, 0.4, 1);
}

@keyframes hpop {
  from {
    transform: translateX(-50%) scale(0.88);
    opacity: 0.3;
  }
}

#ui .sel2 #info {
  flex: 1;
  min-width: 0;
  background: linear-gradient(#141c4acc, #0a0f2ecc);
  border: 0.15em solid #3b4778;
  border-radius: 1em;
  padding: 0.9em 1.1em;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  text-align: left;
  box-shadow: 0 0.5em 1.4em #000a;
}

#ui .sel2 .ih {
  font-family: Bungee, Impact, sans-serif;
  font-size: 0.8em;
  letter-spacing: 0.08em;
  color: #ffd54a;
  margin: 0.1em 0 0;
}

#ui .sel2 .st2 {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.95em;
}

#ui .sel2 .st2 span {
  width: 5.4em;
  font-family: Russo, Impact, sans-serif;
  font-size: 0.85em;
  color: #cfd8ff;
  letter-spacing: 0.05em;
}

#ui .sel2 .st2 s {
  flex: 1;
  height: 0.85em;
  background: #05081c;
  border-radius: 1em;
  overflow: hidden;
  border: 0.1em solid #3b4778;
  text-decoration: none;
}

#ui .sel2 .st2 i {
  display: block;
  height: 100%;
  border-radius: 1em;
  background: linear-gradient(90deg, #ffe36b, #ff7a00);
}

#ui .sel2 .mvl {
  display: grid;
  gap: 0.5em;
}

#ui .sel2 .mvc {
  background: #05081c99;
  border: 0.1em solid #2c3868;
  border-radius: 0.7em;
  padding: 0.55em 0.8em;
}

#ui .sel2 .mvc b {
  font-family: Russo, Impact, sans-serif;
  font-weight: 400;
  font-size: 0.95em;
  letter-spacing: 0.04em;
}

#ui .sel2 .mvc .kc {
  float: right;
  display: flex;
  gap: 0.15em;
  align-items: center;
  font-size: 0.85em;
}

#ui .sel2 .mvc small {
  display: block;
  clear: both;
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 0.8em;
  line-height: 1.35;
  color: #e4e9ff;
  margin-top: 0.2em;
}

#ui .sel2 #roster {
  display: flex;
  gap: 0.7em;
  margin: 0.8em 0 0.2em;
  justify-content: center;
  flex-wrap: nowrap;
}

#ui .sel2 .tile {
  position: relative;
  width: 5.4em;
  height: 5.4em;
  flex: none;
  border-radius: 0.8em;
  overflow: hidden;
  border: 0.18em solid #4a5690;
  background: #10163a;
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

#ui .sel2 .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 3%;
}

#ui .sel2 .tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-family: Bungee, Impact, sans-serif;
  font-size: 0.62em;
  background: linear-gradient(#0000, #000d);
  padding: 1em 0 0.25em;
  color: #fff;
  letter-spacing: 0.04em;
}

#ui .sel2 .tile.hov,
#ui .sel2 .tile:hover {
  transform: translateY(-0.25em) scale(1.07);
  border-color: var(--cc);
  box-shadow: 0 0 1em var(--cc);
}

#ui .sel2 .tile.on {
  border-color: #ffd54a;
  box-shadow: 0 0 1em #ffd54a;
}

/* from campaign-and-abilities.js */
#ui .btn:active {
  border-image-source: url("../images/ui/btn_orange_p.webp");
}

#ui .btn.blue:active {
  border-image-source: url("../images/ui/btn_blue_p.webp");
}

#ui .btn.green:active {
  border-image-source: url("../images/ui/btn_green_p.webp");
}

#ui .btn.red:active {
  border-image-source: url("../images/ui/btn_red_p.webp");
}

#ui .btn.dark:active {
  border-image-source: url("../images/ui/btn_gray_p.webp");
}

#ui .btn.green {
  border-image-source: url("../images/ui/btn_green.webp");
}

#ui .btn.red {
  border-image-source: url("../images/ui/btn_red.webp");
}

#ui .btn.no {
  border-image-source: url("../images/ui/btn_gray_p.webp");
}

/* from ai-difficulty-and-input.js */
.sm [data-a="snd"].off {
  background-image: url("../images/ui/mute.webp") !important;
}

/* from ai-difficulty-and-input.js */
#lobbySnd {
  flex: none;
  display: block;
  width: 2.6em;
  height: 2.6em;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: url("../images/ui/snd.webp") center/contain no-repeat;
  color: transparent;
  font-size: 1em;
  cursor: pointer;
  filter: drop-shadow(0 0.15em 0.2em #0009);
}

#lobbySnd.off {
  background-image: url("../images/ui/mute.webp");
  opacity: 0.85;
}

#app > #lobbySnd {
  display: none !important;
}

#ui .tp2 > .lft {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

/* ===== Utility classes (replace inline style attributes in generated markup) ===== */
#lbar {
  width: 0;
}

.mt-sm {
  margin-top: 0.4em;
}

.mt-md {
  margin-top: 0.8em;
}

.row-gap-sm {
  display: flex;
  gap: 0.6em;
}

.row-gap-center {
  display: flex;
  gap: 0.8em;
  justify-content: center;
}

#sxc,
.js-end {
  justify-self: end;
}

.sxf {
  justify-content: center;
}

.tc-neutral {
  --tc: #cfd8ff;
}

.opp-label {
  font:
    400 0.75em Russo,
    Impact,
    sans-serif;
  letter-spacing: 0.2em;
  color: #cfd8ff;
}

.mt-lg {
  margin-top: 1em;
}

.mt-sm2 {
  margin-top: 0.6em;
}

.row-wrap-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* portrait phones: lobby logo and buttons were tiny, scale them up */
@media (max-aspect-ratio: 1/1) {
  #ui .l2 #lg {
    width: 74% !important;
    margin-top: 0.6em;
  }

  #ui .l2 .mm {
    gap: 1.2em;
  }

  #ui .l2 .mm .mi:first-child .btn {
    font-size: 2.9em !important;
  }

  #ui .l2 .mm .mi:last-child .btn {
    font-size: 1.9em !important;
  }

  #ui .l2 .mm .mi > span {
    font-size: 1.3em;
  }

  #ui .l2 .mr {
    gap: 0.8em;
  }

  #ui .l2 .mr .btn,
  #ui .l2 .tp2 .btn {
    font-size: 1.3em !important;
  }

  #ui .l2 .tp2 .coins {
    font-size: 1.4em;
  }

  #ui .l2 .dfr {
    font-size: 1.5em;
  }

  #ui .l2 ~ #lobbySnd,
  #app > #lobbySnd {
    font-size: 1.5em;
  }
}

/* portrait phones: in-game HUD and touch controls were too small */
@media (max-aspect-ratio: 1/1) {
  #hud .pl {
    font-size: 1.25em;
    width: 31% !important;
  }

  #hud .pl.l {
    left: 13% !important;
  }

  #hud .pl.r {
    right: 13% !important;
  }

  #hud #tm {
    font-size: 1.65em !important;
  }

  #hud .sm {
    font-size: 1.4em;
  }

  #tp {
    font-size: 1.25em;
  }

  #tp b.ult {
    bottom: 13.8em;
  }
}

/* portrait phones: bigger fighter select, level list and dialogs */
@media (max-aspect-ratio: 1/1) {
  .sx .sxb {
    zoom: 1.45;
  }

  .lvx .lgw {
    zoom: 1.14;
  }

  .lvx .chs {
    zoom: 1.7;
  }

  .lvx .cfoot {
    zoom: 1.25;
  }

  #ui .modal > div {
    zoom: 1.4;
  }
}
