html, body {
  color: #fff;
  overscroll-behavior: none;
  background: #0b0912;
  height: 100%;
  margin: 0;
}

#app {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.menu-host {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: auto;
}

.battle-screen {
  z-index: 5;
  touch-action: none;
  background: #0b0912;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.battle-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.battle-loading {
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c9cbe0;
  place-content: center;
  justify-items: center;
  gap: 14px;
  font: 600 14px / 1 Barlow Condensed, Inter, sans-serif;
  display: grid;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.battle-loading .spin {
  background: linear-gradient(#ee3b3b 0, #ee3b3b 46%, #14101f 46%, #14101f 54%, #f4f4f4 54%);
  border: 3px solid #14101f;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  animation: .9s linear infinite pb-spin;
}

@keyframes pb-spin {
  to {
    transform: rotate(360deg);
  }
}

.battle-screen.is-recording {
  place-items: center;
  display: grid;
}

.battle-screen.is-recording .battle-canvas {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
}

.rec-pill {
  z-index: 40;
  color: #ff5a5a;
  letter-spacing: .08em;
  pointer-events: none;
  background: #0a0a10d9;
  border-radius: 999px;
  padding: 6px 12px;
  font: 700 14px / 1 Barlow Condensed, sans-serif;
  position: absolute;
  top: 10px;
  left: 10px;
}

.hud {
  --hud-ink: #14101f;
  --hud-gold: var(--gold, #f2d675);
  --hud-accent: #2a75bb;
  --hud-accent-2: #ee1515;
  --hud-name-p0: var(--hud-gold);
  --hud-name-p1: #ff4d4d;
  --callout-bg: #fff8e6;
  --callout-ink: var(--hud-ink);
  --callout-border: var(--hud-ink);
  --splash-fill: #fff;
  --splash-stroke: var(--hud-ink);
  --splash-shadow: #3b5bdb;
  --card-bg: linear-gradient(180deg, #221e36f5, #141222f5);
  --card-radius: 10px;
  --res-bg: linear-gradient(180deg, #1a1f36, #121628);
  --res-border: #2a3150;
  --btn-primary-bg: var(--hud-gold);
  --btn-primary-ink: var(--hud-ink);
  --display: var(--font-display, "Luckiest Guy", "Lilita One", Impact, sans-serif);
  --uifont: var(--font-ui, "Barlow Condensed", "Inter", sans-serif);
  --pixel: var(--font-pixel, "Pixelify Sans", monospace);
  pointer-events: none;
  color: #fff;
  font-family: var(--uifont);
  user-select: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.hud button {
  pointer-events: auto;
  font-family: inherit;
}

.hud-top {
  background: linear-gradient(#0a0814b8, #0a081459 70%, #0a081400);
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 10px 12px 18px;
  display: grid;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.hud-panel {
  grid-template-rows: auto auto;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  max-width: 340px;
  display: grid;
}

.hud-panel.side-1 {
  grid-template-columns: minmax(0, 1fr) 58px;
  justify-self: end;
}

.hud-panel.side-1 .hud-portrait {
  grid-area: 1 / 2;
}

.hud-panel.side-1 .hud-info {
  text-align: right;
  grid-area: 1 / 1;
}

.hud-panel.side-1 .hud-trainer-row {
  flex-direction: row-reverse;
  grid-column: 1 / 3;
}

.hud-panel.side-1 .hud-chips {
  justify-content: flex-end;
}

.hud-panel.side-1 .hud-hp {
  transform: scaleX(-1);
}

.hud-panel.side-1 .hud-hp-text {
  text-align: right;
  left: auto;
  right: 6px;
  transform: scaleX(-1);
}

.hud-portrait {
  width: 58px;
  height: 58px;
  box-shadow: 0 0 0 2px var(--hud-ink), 0 4px 10px #00000080;
  image-rendering: pixelated;
  font-family: var(--display);
  color: var(--hud-ink);
  background-position: center;
  background-size: cover;
  border: 3px solid #fff;
  border-radius: 8px;
  place-items: center;
  display: grid;
}

.hud-info {
  min-width: 0;
}

.hud-name {
  font-family: var(--display);
  letter-spacing: .5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  -webkit-text-stroke: 1px var(--hud-ink);
  text-shadow: 0 2px 0 var(--hud-ink), 2px 0 0 var(--hud-ink), -2px 0 0 var(--hud-ink), 0 -1px 0 var(--hud-ink);
  font-size: 24px;
  line-height: 1;
  overflow: hidden;
}

.hud-chips {
  flex-wrap: wrap;
  gap: 3px;
  min-height: 15px;
  margin: 3px 0 4px;
  display: flex;
}

.hud-chips .chip {
  font-family: var(--uifont);
  letter-spacing: .4px;
  background: var(--c);
  color: #fff;
  text-shadow: 0 1px #00000073;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -1px #00000040, 0 0 0 1.5px #14101fcc;
}

.hud-chips .chip.boost.up {
  background: #e8573a;
}

.hud-chips .chip.boost.down {
  background: #3a7be8;
}

.hud-hp {
  border: 2px solid var(--hud-ink);
  background: #1b1726;
  border-radius: 4px;
  height: 15px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px #ffffff26;
}

.hud-hp-lag, .hud-hp-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
}

.hud-hp-lag {
  background: #ff5b5b;
}

.hud-hp-fill {
  background: linear-gradient(#7bf28a, #33c24d);
  transition: width .12s linear;
  box-shadow: inset 0 -3px #0000002e;
}

.hud-hp-fill[data-level="mid"] {
  background: linear-gradient(#ffe066, #f2b31b);
}

.hud-hp-fill[data-level="low"] {
  background: linear-gradient(#ff8a7a, #e8392b);
}

.hud-hp-text {
  font-family: var(--pixel);
  color: #fff;
  text-shadow: 1px 1px 0 var(--hud-ink), -1px -1px 0 var(--hud-ink), 1px -1px 0 var(--hud-ink), -1px 1px 0 var(--hud-ink);
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-52%);
}

.hud-trainer-row {
  grid-column: 1 / 3;
  align-items: center;
  gap: 8px;
  display: flex;
}

.hud-trainer-portrait {
  width: 34px;
  height: 26px;
  box-shadow: 0 0 0 2px var(--hud-ink);
  image-rendering: pixelated;
  background-color: #cfe3ff;
  background-position: 50% 18%;
  background-repeat: no-repeat;
  background-size: 160%;
  border: 2px solid #fff;
  border-radius: 5px;
  flex: none;
}

.hud-balls {
  gap: 3px;
  display: flex;
}

.hud-balls .ball {
  border: 1.5px solid var(--hud-ink);
  background: linear-gradient(180deg, #ee3b3b 0 45%, var(--hud-ink) 45% 55%, #f4f4f4 55%);
  border-radius: 50%;
  width: 13px;
  height: 13px;
  position: relative;
}

.hud-balls .ball:after {
  content: "";
  border: 1px solid var(--hud-ink);
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3.5px;
  bottom: 3.5px;
  left: 3.5px;
  right: 3.5px;
}

.hud-balls .ball[style*="background-image"] {
  image-rendering: pixelated;
  background-size: 100% 100%;
  border: 0;
  border-radius: 0;
  width: 14px;
  height: 14px;
}

.hud-balls .ball[style*="background-image"]:after {
  display: none;
}

.hud-chips .status-icon {
  width: auto;
  height: 15px;
  image-rendering: pixelated;
  border-radius: 3px;
  box-shadow: 0 0 0 1.5px #14101fcc;
}

.hud-balls .ball.out {
  filter: grayscale() brightness(.45);
  opacity: .8;
}

.hud-balls .ball.active {
  box-shadow: 0 0 0 2px var(--hud-gold), 0 0 8px var(--hud-gold);
}

.hud-trainer-name {
  font-family: var(--display);
  letter-spacing: .5px;
  color: var(--hud-name-p0);
  text-shadow: 0 2px 0 var(--hud-ink), 1px 0 0 var(--hud-ink), -1px 0 0 var(--hud-ink);
  font-size: 15px;
  font-style: italic;
}

.hud-panel.side-1 .hud-trainer-name {
  color: var(--hud-name-p1);
}

.hud-panel.swap {
  animation: .45s ease-out hud-swap;
}

.hud-panel.hurt .hud-portrait {
  animation: .3s hud-hurt;
}

@keyframes hud-swap {
  0% {
    opacity: .2;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hud-hurt {
  0%, to {
    transform: none;
  }

  25% {
    filter: brightness(2);
    transform: translate(-3px);
  }

  75% {
    transform: translate(3px);
  }
}

.hud-timer {
  font-family: var(--pixel);
  background: #0e0c18d9;
  border: 1px solid #ffffff1f;
  border-radius: 999px;
  margin-top: 4px;
  padding: 3px 12px;
  font-size: 15px;
  font-weight: 700;
}

.hud-callout {
  background: var(--callout-bg);
  color: var(--callout-ink);
  border: 3px solid var(--callout-border);
  box-shadow: 0 3px 0 var(--hud-ink);
  font-family: var(--display);
  letter-spacing: .3px;
  opacity: 0;
  border-radius: 999px;
  padding: 4px 12px 3px;
  font-size: 17px;
  transition: opacity .2s, transform .2s;
  position: absolute;
  top: 118px;
  transform: scale(.6);
}

.hud-callout.side-0 {
  left: 12px;
}

.hud-callout.side-1 {
  right: 12px;
}

.hud-callout.show {
  opacity: 1;
  animation: .3s cubic-bezier(.2, 1.6, .4, 1) callout-pop;
  transform: none;
}

@keyframes callout-pop {
  0% {
    transform: scale(.4)rotate(-4deg);
  }
}

.hud-ability-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.hud-ability {
  font-family: var(--display);
  animation: 1.7s cubic-bezier(.2, 1.1, .3, 1) forwards ability-in;
  position: absolute;
  top: 32%;
}

.hud-ability.side-0 {
  left: 6%;
}

.hud-ability.side-1 {
  text-align: right;
  right: 6%;
}

.hud-ability .big {
  color: var(--splash-fill);
  -webkit-text-stroke: 2px var(--splash-stroke);
  text-shadow: 0 5px 0 var(--splash-stroke), 4px 4px 0 var(--splash-shadow);
  letter-spacing: 1px;
  font-size: max(34px, min(6vw, 72px));
  font-style: italic;
}

.hud-ability .sub {
  color: #ff8fa3;
  text-shadow: 0 2px 0 var(--hud-ink), 2px 0 0 var(--hud-ink), -2px 0 0 var(--hud-ink);
  font-size: max(16px, min(2.2vw, 24px));
}

@keyframes ability-in {
  0% {
    opacity: 0;
    transform: translate(var(--from, -60px)) skew(-10deg);
  }

  12% {
    opacity: 1;
    transform: none;
  }

  80% {
    opacity: 1;
    transform: none;
  }

  to {
    opacity: 0;
    transform: translateY(-14px);
  }
}

.hud-ability.side-1 {
  --from: 60px;
}

.hud-banner {
  opacity: 0;
  font-family: var(--display);
  letter-spacing: 2px;
  white-space: nowrap;
  pointer-events: none;
  font-size: max(56px, min(11vw, 150px));
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%)scale(.3);
}

.hud-banner span {
  display: block;
  position: relative;
}

.hud-banner.show {
  animation: 1.4s cubic-bezier(.15, 1.5, .35, 1) forwards banner;
}

.hud-banner.fight span {
  color: #ffd43b;
  -webkit-text-stroke: 3px #7a3b00;
  text-shadow: 0 7px #7a3b00, 0 12px 20px #00000080;
  font-style: italic;
}

.hud-banner.ko span {
  color: #ff4d3d;
  -webkit-text-stroke: 4px var(--hud-ink);
  text-shadow: 0 8px 0 var(--hud-ink), 6px 6px 0 #fff;
  transform: rotate(-4deg);
}

.hud-banner.win span {
  color: #fff;
  -webkit-text-stroke: 3px var(--hud-ink);
  text-shadow: 0 6px 0 var(--hud-ink);
  font-size: .6em;
}

.hud-banner .burst {
  background: repeating-conic-gradient(#ffffffd9 0 6deg, transparent 6deg 24deg);
  opacity: 0;
  width: 2.6em;
  height: 2.6em;
  animation: 3s linear infinite spin;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-mask: radial-gradient(circle, #0000 18%, #000 20%, #000 48%, #0000 70%);
  mask: radial-gradient(circle, #0000 18%, #000 20%, #000 48%, #0000 70%);
}

.hud-banner.ko .burst {
  opacity: .9;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%)rotate(360deg);
  }
}

@keyframes banner {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%)scale(2.2);
  }

  14% {
    opacity: 1;
    transform: translate(-50%, -50%)scale(1);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -50%)scale(1.04);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%)scale(1.1);
  }
}

.hud-brand {
  opacity: .85;
  text-shadow: 0 1px 2px #000;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  position: absolute;
  bottom: 10px;
  left: 12px;
}

.pb-logo {
  width: 22px;
  height: 22px;
  color: var(--hud-ink);
  font-family: var(--display);
  border: 2px solid var(--hud-ink);
  background: linear-gradient(#ff5a5a 50%, #f4f4f4 50%);
  border-radius: 5px;
  place-items: center;
  font-size: 10px;
  display: grid;
}

.mode-play .hud-brand {
  display: none;
}

.hud-controls {
  right: 12px;
  top: var(--ctl-top, 12px);
  z-index: 20;
  gap: 6px;
  display: flex;
  position: absolute;
}

.hud-btn {
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  background: #0e0c18cc;
  border: 1px solid #ffffff2e;
  border-radius: 8px;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.hud-btn:hover {
  border-color: var(--hud-gold);
}

.hud-btn.on {
  background: var(--hud-gold);
  color: var(--hud-ink);
  border-color: var(--hud-gold);
}

.pm-overlay {
  z-index: 40;
  pointer-events: auto;
  background: #0806108c;
  place-items: center;
  padding: 16px;
  display: grid;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.pm-overlay.pm-live {
  background: #08061040;
}

.pm-card {
  border: 2px solid var(--hud-gold);
  width: min(380px, 100%);
  max-height: calc(100% - 8px);
  box-shadow: 0 10px 0 var(--hud-ink), 0 18px 40px #00000080;
  color: #fff;
  background: #14101ff5;
  border-radius: 14px;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  display: flex;
  overflow-y: auto;
}

.pm-title {
  font-family: var(--display);
  letter-spacing: 3px;
  text-align: center;
  color: var(--hud-gold);
  text-shadow: 0 4px 0 var(--hud-ink);
  font-size: 40px;
}

.pm-note {
  text-align: center;
  opacity: .8;
  margin: -6px 0 0;
  font-size: 12px;
}

.pm-group {
  border-top: 1px solid #ffffff1f;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  display: flex;
}

.pm-head {
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .65;
  font-size: 11px;
  font-weight: 800;
}

.pm-row {
  cursor: pointer;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  display: grid;
}

.pm-row.pm-check {
  grid-template-columns: 20px 1fr;
}

.pm-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--hud-gold);
  margin: 0;
}

.pm-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: .85;
}

.pm-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--hud-gold) var(--pct, 50%), #ffffff2e var(--pct, 50%));
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  height: 8px;
  margin: 0;
}

.pm-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: 3px solid var(--hud-ink);
  background: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

.pm-row input[type="range"]::-moz-range-thumb {
  border: 3px solid var(--hud-ink);
  background: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
}

.pm-keys {
  opacity: .9;
  gap: 4px;
  font-size: 13px;
}

.pm-keys b {
  color: var(--hud-gold);
}

.pm-btn {
  border: 2px solid var(--hud-ink);
  height: 44px;
  font-family: var(--display);
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--hud-ink);
  border-radius: 10px;
  font-size: 18px;
}

.pm-btn:active {
  box-shadow: 0 2px 0 var(--hud-ink);
  transform: translateY(2px);
}

.pm-primary {
  background: var(--hud-gold);
  color: var(--hud-ink);
}

.pm-danger {
  color: #ff7070;
  box-shadow: none;
  background: none;
  border-color: #ff707099;
}

.pm-danger:hover {
  background: #ff50501f;
}

.pm-btn:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #fff;
}

.pm-row input:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #fff;
}

.vs-intro {
  pointer-events: auto;
  font-family: var(--display);
  background: #0806108c;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.vs-card {
  background: var(--c);
  flex-direction: column;
  justify-content: center;
  width: 58%;
  height: 60%;
  padding: 0 8%;
  display: flex;
  position: absolute;
  top: 7%;
  box-shadow: 0 10px 40px #00000080;
}

.vs-card.side-0 {
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
  align-items: flex-start;
  animation: .5s cubic-bezier(.2, 1, .3, 1) vs-l;
  left: -4%;
}

.vs-card.side-1 {
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  align-items: flex-end;
  animation: .5s cubic-bezier(.2, 1, .3, 1) vs-r;
  top: 15%;
  right: -4%;
}

.vs-frame {
  aspect-ratio: 1;
  border: 5px solid var(--hud-ink);
  background: #bcd7f3;
  place-items: center;
  width: max(110px, min(18vw, 220px));
  display: grid;
  overflow: hidden;
}

.vs-frame img {
  object-fit: contain;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.vs-name {
  color: #fff;
  -webkit-text-stroke: 2px var(--hud-ink);
  text-shadow: 0 4px 0 var(--hud-ink);
  margin-top: 8px;
  font-size: max(26px, min(4vw, 52px));
  font-style: italic;
}

.vs-text {
  color: #ffd43b;
  -webkit-text-stroke: 4px var(--hud-ink);
  text-shadow: 0 10px 0 var(--hud-ink);
  font-size: max(80px, min(14vw, 200px));
  font-style: italic;
  animation: .6s cubic-bezier(.2, 1.8, .4, 1) .25s both vs-pop;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.vs-arena {
  text-align: center;
  font-family: var(--uifont);
  letter-spacing: 6px;
  opacity: .8;
  font-size: 14px;
  font-weight: 800;
  position: absolute;
  top: 75%;
  left: 0;
  right: 0;
}

.vs-who {
  text-align: center;
  color: #fff;
  -webkit-text-stroke: 2px var(--hud-ink);
  text-shadow: 0 5px 0 var(--hud-ink);
  font-size: max(34px, min(6vw, 70px));
  animation: .6s cubic-bezier(.2, 1.8, .4, 1) .6s both vs-pop;
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
}

.vs-intro.out {
  animation: .45s forwards fade-out;
}

@keyframes vs-l {
  0% {
    transform: translate(-100%);
  }
}

@keyframes vs-r {
  0% {
    transform: translate(100%);
  }
}

@keyframes vs-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%)scale(3);
  }
}

.vs-who {
  --x: 0;
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.play-bar {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, #0a0814d9, #0a081400);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  display: grid;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.pb-team {
  align-items: end;
  gap: 6px;
  display: flex;
}

.pb-slot {
  color: #fff;
  cursor: pointer;
  background: #141222e6;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  justify-items: center;
  gap: 2px;
  width: 54px;
  padding: 4px 3px 5px;
  font-size: 10px;
  font-weight: 700;
  display: grid;
}

.pb-slot span {
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 48px;
  overflow: hidden;
}

.pb-slot .pic {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  background: #2a2742 center / cover;
  border: 2px solid #fff3;
  border-radius: 50%;
}

.pb-slot .mini {
  background: #3a1d24;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  overflow: hidden;
}

.pb-slot .mini u {
  background: #4ade6b;
  height: 100%;
  display: block;
}

.pb-slot.active {
  border-color: var(--hud-gold);
  box-shadow: 0 0 0 1px var(--hud-gold), 0 0 14px #f2d67559;
}

.pb-slot.out {
  opacity: .4;
  filter: grayscale();
}

.pb-hint {
  opacity: .6;
  white-space: nowrap;
  align-self: center;
  margin-left: 4px;
  font-size: 11px;
}

.pb-hint b {
  color: var(--hud-gold);
}

.pb-moves {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-self: center;
  gap: 8px;
  width: 100%;
  max-width: 760px;
  display: grid;
}

.pb-dodge {
  color: #fff;
  cursor: pointer;
  background: #141222f2;
  border: 1px solid #ffffff29;
  border-radius: 10px;
  align-content: center;
  place-items: center;
  width: 92px;
  height: 58px;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  position: relative;
  overflow: hidden;
}

.pb-dodge .k {
  opacity: .6;
  font-size: 10px;
}

.pb-dodge .fill {
  background: var(--hud-gold);
  height: 4px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.pb-stick {
  pointer-events: auto;
  touch-action: none;
  background: #ffffff0f;
  border: 2px solid #ffffff2e;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: none;
  position: absolute;
  bottom: 120px;
  left: 22px;
}

.pb-stick .knob {
  background: #ffffff59;
  border: 2px solid #fff9;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  position: absolute;
  top: 35px;
  left: 35px;
}

@media (pointer: coarse) {
  .pb-stick {
    display: block;
  }
}

.results {
  backdrop-filter: blur(3px);
  pointer-events: auto;
  background: #06050ca8;
  place-items: center;
  padding: 16px;
  animation: .4s fade-in;
  display: grid;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
}

.res-card {
  background: var(--res-bg);
  border: 1px solid var(--res-border);
  border-radius: 16px;
  width: min(760px, 100%);
  animation: .5s cubic-bezier(.2, 1.3, .4, 1) res-in;
  overflow: hidden;
  box-shadow: 0 30px 80px #0009;
}

@keyframes res-in {
  0% {
    opacity: 0;
    transform: translateY(30px)scale(.96);
  }
}

.res-head {
  background: linear-gradient(90deg, var(--c), transparent);
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  display: flex;
}

.res-head img {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  background: #ffffff26;
  border-radius: 12px;
}

.res-label {
  letter-spacing: 3px;
  opacity: .75;
  font-size: 11px;
  font-weight: 800;
}

.res-title {
  font-family: var(--display);
  text-shadow: 0 4px 0 var(--hud-ink);
  font-size: max(30px, min(5vw, 48px));
  line-height: 1;
}

.res-sub {
  opacity: .8;
  margin-top: 4px;
  font-size: 13px;
}

.res-mvp {
  border-bottom: 1px solid #2a3150;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  display: flex;
}

.mvp-name {
  font-family: var(--display);
  color: var(--hud-gold);
  font-size: 26px;
}

.pic {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
  vertical-align: middle;
  background: #2a2742 center / cover;
  border-radius: 6px;
  margin-right: 8px;
  display: inline-block;
}

.pic.big {
  border: 2px solid var(--hud-gold);
  border-radius: 10px;
  width: 64px;
  height: 64px;
  margin: 0;
}

.res-tables {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 22px;
  display: grid;
}

.res-tables table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.res-tables th {
  text-align: left;
  letter-spacing: 1px;
  opacity: .6;
  padding: 4px 2px;
  font-size: 11px;
}

.res-tables td {
  border-top: 1px solid #ffffff0f;
  padding: 4px 2px;
}

.res-tables tr.fainted td {
  opacity: .5;
}

.res-actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  display: flex;
}

.btn-res {
  color: #fff;
  letter-spacing: 1px;
  cursor: pointer;
  height: 44px;
  font-weight: 800;
  font-family: var(--uifont);
  background: #1d2340;
  border: 1px solid #2a3150;
  border-radius: 10px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-res.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  border-color: #0000;
}

@media (max-width: 720px) {
  .hud-top {
    gap: 4px;
    padding: 6px 6px 12px;
  }

  .hud-panel {
    grid-template-columns: 42px minmax(0, 1fr);
    max-width: none;
  }

  .hud-panel.side-1 {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .hud-portrait {
    border-width: 2px;
    width: 42px;
    height: 42px;
  }

  .hud-name {
    font-size: 16px;
  }

  .hud-chips .chip {
    padding: 1px 4px;
    font-size: 9px;
  }

  .hud-balls .ball {
    width: 9px;
    height: 9px;
  }

  .hud-balls .ball:after {
    top: 2px;
    bottom: 2px;
    left: 2px;
    right: 2px;
  }

  .hud-trainer-name {
    font-size: 11px;
  }

  .hud-trainer-portrait {
    width: 24px;
    height: 20px;
  }

  .hud-timer {
    padding: 2px 8px;
    font-size: 12px;
  }

  .hud-callout {
    font-size: 13px;
    top: 92px;
  }

  .res-tables {
    grid-template-columns: 1fr;
  }

  .play-bar {
    grid-template-columns: 1fr auto;
  }

  .pb-team {
    grid-column: 1 / 3;
  }

  .pb-slot {
    width: 44px;
  }

  .pb-moves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pb-dodge {
    width: 70px;
    height: 100%;
  }

  .pb-stick {
    bottom: 200px;
  }
}

.hud[data-era="old"] {
  --hud-gold: #ffcb05;
  --hud-accent: #2a75bb;
  --hud-accent-2: #ee1515;
  --hud-name-p0: #ffcb05;
  --hud-name-p1: #ee1515;
  --callout-bg: #f8f0d8;
  --callout-ink: #282830;
  --callout-border: #3a3a4a;
  --splash-fill: #ffcb05;
  --splash-stroke: #1d2c5e;
  --splash-shadow: #2a75bb;
  --card-bg: linear-gradient(180deg, #f8f0d8, #e9dfc1);
  --card-radius: 5px;
  --res-bg: linear-gradient(180deg, #1d2c5e, #14213d);
  --res-border: #3a3a4a;
  --btn-primary-bg: #ffcb05;
  --btn-primary-ink: #1d2c5e;
}

.hud[data-era="old"] .hud-callout {
  box-shadow: inset 0 0 0 2px #a0a0b8, 0 3px 0 var(--callout-border);
  font-family: var(--pixel);
  letter-spacing: .5px;
  border-radius: 6px;
  font-weight: 700;
}

.hud[data-era="old"] .hud-timer {
  color: #ffcb05;
  background: #1d2c5e;
  border: 2px solid #ffcb05;
}

.hud[data-era="old"] .hud-trainer-name {
  -webkit-text-stroke: 1px #1d2c5e;
}

.hud[data-era="old"] .pb-slot, .hud[data-era="old"] .pb-dodge, .hud[data-era="old"] .hud-btn {
  background: #1d2c5e;
  border: 2px solid #3a3a4a;
  border-radius: 5px;
}

.hud[data-era="old"] .pb-slot.active {
  border-color: #ffcb05;
  box-shadow: 0 0 0 1px #ffcb05;
}

.hud[data-era="old"] .hud-btn.on {
  color: #1d2c5e;
  background: #ffcb05;
  border-color: #ffcb05;
}

.hud[data-era="old"] .pb-dodge .fill {
  background: #ffcb05;
}

.hud[data-era="old"] .vs-text {
  color: #ffcb05;
  -webkit-text-stroke-color: #1d2c5e;
  text-shadow: 0 10px #1d2c5e;
}

.hud[data-era="old"] .vs-who {
  -webkit-text-stroke-color: #1d2c5e;
  text-shadow: 0 5px #2a75bb;
}

.hud[data-era="old"] .hud-banner.fight span {
  color: #ffcb05;
  -webkit-text-stroke-color: #1d2c5e;
  text-shadow: 0 7px #2a75bb;
}

.hud[data-era="old"] .mvp-name {
  color: #ffcb05;
}

.hud[data-era="old"] .res-card {
  border-width: 3px;
  border-radius: 8px;
}

.hud[data-era="old"] .res-tables td, .hud[data-era="old"] .res-tables th {
  font-family: var(--pixel);
}

.hud[data-era="new"] {
  --hud-gold: #2ee6d6;
  --hud-accent: #7b3fe4;
  --hud-accent-2: #f34c1e;
  --hud-name-p0: #2ee6d6;
  --hud-name-p1: #ff7a45;
  --callout-bg: #120c26db;
  --callout-ink: #f5f3ff;
  --callout-border: transparent;
  --splash-fill: #fff;
  --splash-stroke: #1a1233;
  --splash-shadow: #7b3fe4;
  --card-bg: #ffffff12;
  --card-radius: 16px;
  --res-bg: linear-gradient(160deg, #f34c1e2e, #7b3fe438), #0e0b1a;
  --res-border: #ffffff24;
  --btn-primary-bg: linear-gradient(90deg, #f34c1e, #7b3fe4);
  --btn-primary-ink: #fff;
}

.hud[data-era="new"] .hud-callout {
  background: linear-gradient(var(--callout-bg), var(--callout-bg)) padding-box, linear-gradient(90deg, #f34c1e, #7b3fe4) border-box;
  backdrop-filter: blur(8px);
  border: 2px solid #0000;
  box-shadow: 0 0 16px #2ee6d659;
}

.hud[data-era="new"] .hud-timer {
  backdrop-filter: blur(8px);
  color: #2ee6d6;
  background: #ffffff14;
  border: 1px solid #ffffff29;
}

.hud[data-era="new"] .hud-ability .big {
  text-shadow: 0 5px #1a1233, -4px 4px #f34c1e, 4px 4px #7b3fe4;
}

.hud[data-era="new"] .hud-ability .sub {
  color: #2ee6d6;
}

.hud[data-era="new"] .hud-portrait {
  border-color: #f5f3ff;
  border-radius: 14px;
  box-shadow: 0 0 0 2px #1a1233, 0 0 14px #7b3fe499;
}

.hud[data-era="new"] .pb-slot, .hud[data-era="new"] .pb-dodge, .hud[data-era="new"] .hud-btn {
  backdrop-filter: blur(10px);
  border-radius: 14px;
}

.hud[data-era="new"] .pb-slot.active {
  border-color: #2ee6d6;
  box-shadow: 0 0 0 1px #2ee6d6, 0 0 16px #2ee6d673;
}

.hud[data-era="new"] .hud-btn.on {
  color: #fff;
  background: linear-gradient(90deg, #f34c1e, #7b3fe4);
  border-color: #0000;
}

.hud[data-era="new"] .pb-dodge .fill {
  background: linear-gradient(90deg, #f34c1e, #7b3fe4);
}

.hud[data-era="new"] .vs-text {
  background: linear-gradient(#ff7a45, #a77bff);
  color: #0000;
  -webkit-text-stroke: 4px #0e0b1a;
  text-shadow: none;
  filter: drop-shadow(0 8px #0e0b1a) drop-shadow(0 0 22px #2ee6d68c);
  -webkit-background-clip: text;
  background-clip: text;
}

.hud[data-era="new"] .vs-who {
  text-shadow: 0 5px #1a1233, -3px 3px #f34c1e, 3px 3px #7b3fe4;
}

.hud[data-era="new"] .hud-banner.fight span {
  color: #fff;
  -webkit-text-stroke-color: #1a1233;
  text-shadow: 0 7px #1a1233, -5px 5px #f34c1e, 5px 5px #7b3fe4;
}

.hud[data-era="new"] .res-card {
  backdrop-filter: blur(14px);
  border-radius: 18px;
}

.hud[data-era="new"] .mvp-name {
  background: linear-gradient(90deg, #ff7a45, #a77bff);
  color: #0000;
  -webkit-background-clip: text;
  background-clip: text;
}

.hud-banner.mega span {
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #7bed9f, #70a1ff, #a29bfe, #ff5f6d) 0 0 / 200% 100%;
  color: #0000;
  -webkit-text-stroke: 3px #14101f;
  filter: drop-shadow(0 6px #14101f) drop-shadow(0 0 18px #fff9);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: .62em;
  font-style: italic;
  animation: 1.2s linear infinite mega-shift;
}

.hud-banner.mega .burst {
  opacity: .8;
}

@keyframes mega-shift {
  to {
    background-position: 200% 0;
  }
}

.hud-mid {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  display: flex;
}

.hud-event-chip {
  opacity: 0;
  font-family: var(--uifont);
  letter-spacing: 1.5px;
  color: #fff;
  background: rgba(98, 98, 101, 1);
  background: color-mix(in srgb, var(--c, #888) 70%, #0b0912);
  box-shadow: 0 0 0 2px var(--hud-ink), 0 0 14px rgba(136, 136, 136, 0.6);
  box-shadow: 0 0 0 2px var(--hud-ink), 0 0 14px color-mix(in srgb, var(--c, #888) 60%, transparent);
  text-shadow: 0 1px 0 var(--hud-ink);
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 10px 2px;
  font-size: 12px;
  font-weight: 800;
  transition: opacity .25s, transform .25s;
  transform: translateY(-6px)scale(.9);
}

.hud-event-chip.show {
  opacity: 1;
  animation: 1.6s ease-in-out infinite chip-pulse;
  transform: none;
}

@keyframes chip-pulse {
  50% {
    box-shadow: 0 0 0 2px var(--hud-ink), 0 0 22px var(--c, #888);
  }
}

.hud-banner.event span {
  color: #fff;
  -webkit-text-stroke: 3px #14101f;
  text-shadow: 0 6px 0 #14101f, 0 0 26px var(--c, #fff), 0 0 6px var(--c, #fff);
  font-size: .62em;
  font-style: italic;
}

.hud-banner.event .burst {
  opacity: .55;
}

.hud-caption {
  opacity: 0;
  text-align: center;
  max-width: min(720px, 90vw);
  font-family: var(--display);
  color: #fff;
  -webkit-text-stroke: 1.5px #14101f;
  text-shadow: 0 3px #14101f, 2px 0 #14101f, -2px 0 #14101f;
  pointer-events: none;
  font-size: max(18px, min(2.4vw, 30px));
  line-height: 1.15;
  transition: opacity .25s, transform .25s;
  position: absolute;
  bottom: 13%;
  left: 50%;
  transform: translate(-50%, 8px);
}

.hud-caption.show {
  opacity: 1;
  transform: translate(-50%);
}

.mode-play .hud-caption {
  bottom: 24%;
}

@media (max-width: 720px) {
  .hud-ability {
    text-align: center !important;
    left: 4% !important;
    right: 4% !important;
  }

  .hud-ability.side-0 {
    top: 24%;
  }

  .hud-ability.side-1 {
    top: 36%;
  }

  .hud-ability .big {
    font-size: max(26px, min(9vw, 44px));
  }

  .hud-caption {
    font-size: max(16px, min(4.6vw, 22px));
    bottom: 18%;
  }

  .hud-trainer-name {
    font-size: 12px;
  }

  .hud-event-chip {
    font-size: 11px;
  }
}

.hud-net {
  z-index: 30;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  background: #0a0c18d1;
  border: 1px solid #ffffff40;
  border-radius: 999px;
  padding: 8px 18px;
  font: 700 15px / 1.2 Barlow Condensed, Pixelify Sans, sans-serif;
  transition: opacity .2s, transform .2s;
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -6px);
}

.hud-net.show {
  opacity: 1;
  transform: translate(-50%);
}

.res-verdict {
  color: #e8ebf7;
  text-align: center;
  background: #ffffff0f;
  border-radius: 10px;
  margin: 0 22px;
  padding: 10px 14px;
  font-size: 15px;
}

.res-support {
  text-align: center;
  background: #ffffff0a;
  border: 1px solid #2a3150;
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 4px 22px 0;
  padding: 14px 16px;
  display: flex;
}

.res-support-note {
  opacity: .85;
  max-width: 52ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.res-support-btns {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  display: flex;
}

.res-support-btns [hidden] {
  display: none;
}

a.btn-res {
  align-items: center;
  gap: 8px;
  line-height: 44px;
  text-decoration: none;
  display: inline-flex;
}

.btn-res.res-kofi {
  border-color: #ff5e5b;
}

.btn-res.res-kofi:hover {
  background: #ff5e5b;
}

.btn-res.res-kofi svg {
  width: 18px;
  height: 18px;
}

.res-fb {
  flex-direction: column;
  gap: 8px;
  width: 100%;
  display: flex;
}

.res-fb[hidden] {
  display: none;
}

.res-fb-cats {
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  display: flex;
}

.res-fb-cats label {
  cursor: pointer;
}

.res-fb-cats input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.res-fb-cats span {
  border: 1px solid #ffffff47;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  display: inline-block;
}

.res-fb-cats input:checked + span {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  border-color: #0000;
}

.res-fb-cats input:focus-visible + span {
  outline-offset: 2px;
  outline: 2px solid #fff;
}

.res-fb-text {
  color: #fff;
  resize: vertical;
  background: #00000059;
  border: 1px solid #2a3150;
  border-radius: 10px;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  font: 15px / 1.4 system-ui, sans-serif;
}

.res-fb-foot {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  display: flex;
}

.res-fb-status {
  text-align: left;
  opacity: .85;
  flex: 1;
  font-size: 13px;
}

.res-fb-count {
  opacity: .6;
  font-size: 12px;
}

.res-fb-thanks {
  margin: 4px 0;
  font-weight: 700;
}

@media (max-width: 720px) {
  .res-support {
    margin: 4px 12px 0;
  }

  .res-actions {
    justify-content: center;
  }
}

@media (min-width: 721px) {
  .hud[data-era] .play-bar {
    --deck-edge: #2a75bb;
    --deck-accent: #ffcb05;
    border: 2px solid var(--deck-edge);
    background: #0c1022e6;
    border-radius: 18px;
    grid-template-columns: minmax(0, 1fr) 116px;
    grid-template-areas: "team team"
                         "moves dodge";
    align-items: stretch;
    gap: 10px 12px;
    width: min(1000px, 100% - 32px);
    padding: 10px 14px 14px;
    bottom: 14px;
    left: 50%;
    right: auto;
    transform: translate(-50%);
    box-shadow: 0 10px 30px #00000073;
  }

  .hud[data-era="new"] .play-bar {
    --deck-edge: #7b3fe4;
    --deck-accent: #2ee6d6;
    background: #160e2ae6;
  }

  .hud[data-era] .play-bar .pb-team {
    grid-area: team;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .hud[data-era] .play-bar .pb-slot {
    width: 64px;
    box-shadow: none;
    color: #dfe3f2;
    background: none;
    border: 0;
    border-radius: 0;
    gap: 3px;
    padding: 2px 0 0;
    font-size: 11px;
    transition: transform .12s;
  }

  .hud[data-era] .play-bar .pb-slot:hover:not(.out):not(.active) {
    transform: translateY(-2px);
  }

  .hud[data-era] .play-bar .pb-slot .pic {
    background-color: #20263f;
    border: 3px solid #ffffff38;
    width: 44px;
    height: 44px;
  }

  .hud[data-era] .play-bar .pb-slot.active .pic {
    border-color: var(--deck-accent);
    box-shadow: 0 0 0 2px #00000080, 0 0 14px var(--deck-accent);
  }

  .hud[data-era] .play-bar .pb-slot.active span {
    color: var(--deck-accent);
  }

  .hud[data-era] .play-bar .pb-slot span {
    max-width: 64px;
  }

  .hud[data-era] .play-bar .pb-slot .mini {
    background: #ffffff1f;
    width: 44px;
    height: 5px;
  }

  .hud[data-era] .play-bar .pb-hint {
    opacity: .9;
    background: #ffffff12;
    border-radius: 8px;
    margin-left: 6px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .hud[data-era] .play-bar .pb-hint b {
    color: var(--deck-accent);
  }

  .hud[data-era] .play-bar .pb-moves {
    grid-area: moves;
    gap: 10px;
    max-width: none;
  }

  .hud[data-era] .play-bar .pb-dodge {
    border: 2px solid var(--deck-edge);
    letter-spacing: .06em;
    background: #171c35;
    border-radius: 12px;
    grid-area: dodge;
    width: auto;
    height: auto;
    font-size: 17px;
  }

  .hud[data-era] .play-bar .pb-dodge .k {
    opacity: 1;
    background: #ffffff24;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
  }

  .hud[data-era] .play-bar .pb-dodge .fill {
    background: var(--deck-accent);
    height: 5px;
  }
}

.hud .play-bar .pb-move {
  --c: #888;
  --c-hi: color-mix(in srgb, var(--c) 72%, #fff);
  --c-lo: color-mix(in srgb, var(--c) 62%, #000);
  --c-edge: color-mix(in srgb, var(--c) 38%, #000);
  isolation: isolate;
  border: 2px solid var(--c-edge);
  background: linear-gradient(180deg, var(--c-hi) 0%, var(--c) 48%, var(--c-lo) 100%);
  min-height: 58px;
  box-shadow: 0 5px 0 var(--c-edge), inset 0 2px #ffffff73, inset 0 -3px #0000002e;
  color: #fff;
  text-align: left;
  text-shadow: -1px -1px #0000008c, 1px -1px #0000008c, -1px 1px #0000008c, 0 2px #0000008c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 14px;
  align-content: center;
  gap: 4px;
  padding: 8px 12px 9px;
  transition: transform 70ms, box-shadow 70ms, filter .2s;
  display: grid;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.hud .play-bar .pb-move:before {
  content: "";
  z-index: -1;
  opacity: .16;
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.hud .play-bar .pb-move.cat-physical:before {
  background: repeating-linear-gradient(-55deg, #fff 0, #fff 6px, #0000 6px, #0000 16px);
}

.hud .play-bar .pb-move.cat-special:before {
  background: repeating-radial-gradient(circle at 88%, #fff 0, #fff 3px, #0000 3px, #0000 12px);
}

.hud .play-bar .pb-move.cat-status:before {
  background: radial-gradient(#fff 1.6px, #0000 2px) 0 0 / 12px 12px;
}

.hud .play-bar .pb-move:after {
  content: "";
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(#ffffff52, #fff0);
  border-radius: 10px 10px 40% 40% / 10px 10px 14px 14px;
  height: 38%;
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
}

.hud .play-bar .pb-move:hover:not(:disabled) {
  filter: brightness(1.08);
}

.hud .play-bar .pb-move:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--c-edge), inset 0 2px #ffffff4d, inset 0 -2px #0000002e;
  transform: translateY(4px);
}

.hud .play-bar .pb-move.ready {
  box-shadow: 0 5px 0 var(--c-edge), 0 0 18px -2px rgba(160, 160, 160, 1), inset 0 2px #ffffff73, inset 0 -3px #0000002e;
  box-shadow: 0 5px 0 var(--c-edge), 0 0 18px -2px color-mix(in srgb, var(--c) 80%, #fff), inset 0 2px #ffffff73, inset 0 -3px #0000002e;
}

.hud .play-bar .pb-move.cooling, .hud .play-bar .pb-move.nopp {
  filter: saturate(.45) brightness(.78);
}

.hud .play-bar .pb-move:disabled {
  opacity: .25;
  filter: grayscale();
  cursor: default;
}

.hud .play-bar .pb-move .k {
  min-width: 20px;
  height: 20px;
  text-shadow: none;
  background: #00000052;
  border-radius: 6px;
  place-items: center;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  position: absolute;
  top: 6px;
  right: 7px;
}

.hud .play-bar .pb-move .nm {
  font-family: var(--display);
  letter-spacing: .4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 24px;
  font-size: 18px;
  line-height: 1.05;
  overflow: hidden;
}

.hud .play-bar .pb-move .meta {
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  display: flex;
}

.hud .play-bar .pb-move .ty {
  text-transform: uppercase;
  letter-spacing: .6px;
  text-shadow: none;
  background: #0000004d;
  border: 1px solid #ffffff59;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
}

.hud .play-bar .pb-move .cat {
  width: auto;
  height: 12px;
  image-rendering: pixelated;
  border-radius: 2px;
}

.hud .play-bar .pb-move .bp {
  white-space: nowrap;
}

.hud .play-bar .pb-move .bp:not(:empty):after {
  content: " BP";
  opacity: .85;
}

.hud .play-bar .pb-move .pp {
  font-family: var(--pixel);
  white-space: nowrap;
  margin-left: auto;
  font-size: 11px;
}

.hud .play-bar .pb-move .cd {
  z-index: 1;
  pointer-events: none;
  background: #04060e8c;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.hud .play-bar .pb-move .cdt {
  z-index: 2;
  font-family: var(--pixel);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (min-width: 721px) {
  .hud .play-bar .pb-move {
    min-height: 74px;
    padding: 10px 14px 11px;
  }

  .hud .play-bar .pb-move .nm {
    letter-spacing: 0;
    font-size: max(15px, min(1.35vw, 21px));
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .hud .play-bar .pb-move .bp {
    display: none;
  }
}

@media (max-width: 720px) {
  .hud .play-bar .pb-move {
    min-height: 48px;
    box-shadow: 0 4px 0 var(--c-edge), inset 0 2px #fff6;
    border-radius: 11px;
    gap: 2px;
    padding: 5px 8px 6px;
  }

  .hud .play-bar .pb-move .nm {
    letter-spacing: 0;
    padding-right: 18px;
    font-size: 13px;
  }

  .hud .play-bar .pb-move .meta {
    gap: 4px;
  }

  .hud .play-bar .pb-move .cat {
    display: none;
  }

  .hud .play-bar .pb-move .ty {
    letter-spacing: .3px;
    padding: 0 5px;
    font-size: 9px;
  }

  .hud .play-bar .pb-move .pp {
    font-size: 10px;
  }

  .hud .play-bar .pb-move .k {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    top: 4px;
    right: 5px;
  }

  .hud .play-bar .pb-move .bp {
    display: none;
  }

  .hud .play-bar .pb-move .cdt {
    font-size: 16px;
  }
}

.res-share {
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 22px 0;
  padding: 12px 14px;
  display: flex;
}

.res-share-label {
  letter-spacing: .04em;
  font-weight: 800;
}

.res-share-btns {
  flex-wrap: wrap;
  gap: 10px;
  display: flex;
}

.res-share-ic {
  color: #fff;
  fill: currentColor;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  transition: transform .12s, filter .12s;
  display: grid;
  box-shadow: 0 2px 8px #00000059, inset 0 0 0 2px #ffffff1f;
}

.res-share-ic svg {
  fill: currentColor;
  width: 21px;
  height: 21px;
}

.res-share-ic:hover {
  filter: brightness(1.12);
  transform: translateY(-2px)scale(1.06);
}

.res-share-ic:active {
  transform: scale(.96);
}

.res-share-ic:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #ffcb05;
}

.res-share-ic.ic-native {
  color: #1a1a2e;
  background: #ffcb05;
}

.res-share-ic.ic-x {
  background: #000;
}

.res-share-ic.ic-facebook {
  background: #1877f2;
}

.res-share-ic.ic-facebook svg {
  width: 24px;
  height: 24px;
}

.res-share-ic.ic-reddit {
  background: #ff4500;
}

.res-share-ic.ic-reddit .ic-cut {
  fill: #ff4500;
}

.res-share-ic.ic-reddit .ic-cut-stroke {
  stroke: #ff4500;
}

.res-share-ic.ic-discord {
  background: #5865f2;
}

.res-share-ic.ic-copy {
  background: #3a4060;
}

@media (prefers-reduced-motion: reduce) {
  .res-share-ic {
    transition: none;
  }

  .res-share-ic:hover {
    transform: none;
  }
}

.res-share-status {
  opacity: .8;
  font-size: 13px;
}

@media (max-width: 720px) {
  .res-share {
    margin: 10px 12px 0;
  }
}

@media (pointer: coarse) {
  .hud .pb-hint, .hud .pb-dodge .k, .hud .play-bar .pb-move .k {
    display: none;
  }

  .hud .play-bar .pb-move .nm {
    padding-right: 0;
  }
}

@media (pointer: coarse) and (max-height: 520px) {
  .hud[data-era] .play-bar {
    left: 150px;
    right: max(8px, env(safe-area-inset-right));
    width: auto;
    padding: 5px 8px calc(6px + env(safe-area-inset-bottom));
    background: #0c1022b8;
    border-width: 1px;
    border-radius: 12px;
    grid-template-columns: minmax(0, 1fr) 64px;
    grid-template-areas: "team team"
                         "moves dodge";
    gap: 4px 6px;
    bottom: 6px;
    transform: none;
  }

  .hud .play-bar .pb-team {
    justify-content: flex-start;
    gap: 4px;
  }

  .hud[data-era] .play-bar .pb-slot {
    gap: 1px;
    width: 34px;
    padding: 2px;
  }

  .hud[data-era] .play-bar .pb-slot span {
    display: none;
  }

  .hud[data-era] .play-bar .pb-slot .pic, .hud[data-era] .play-bar .pb-slot.active .pic {
    width: 26px;
    height: 26px;
  }

  .hud[data-era] .play-bar .pb-slot .mini {
    width: 26px;
    height: 3px;
  }

  .hud .play-bar .pb-moves {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .hud .play-bar .pb-move {
    border-radius: 9px;
    gap: 1px;
    min-height: 40px;
    padding: 4px 7px 5px;
  }

  .hud .play-bar .pb-move .nm {
    letter-spacing: 0;
    font-size: 12px;
  }

  .hud .play-bar .pb-move .cat, .hud .play-bar .pb-move .bp {
    display: none;
  }

  .hud .play-bar .pb-move .ty {
    padding: 0 4px;
    font-size: 8px;
  }

  .hud .play-bar .pb-move .pp {
    font-size: 9px;
  }

  .hud .play-bar .pb-dodge {
    border-radius: 12px;
    width: 64px;
    height: auto;
    min-height: 40px;
    font-size: 12px;
  }

  .hud .pb-stick {
    left: max(12px, env(safe-area-inset-left));
    width: 120px;
    height: 120px;
    bottom: 12px;
  }
}

@media (pointer: coarse) and (max-width: 720px) and (min-height: 521px) {
  .hud .play-bar {
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .hud .play-bar .pb-team {
    gap: 4px;
  }

  .hud .play-bar .pb-slot {
    width: 42px;
    padding: 3px 2px 4px;
  }

  .hud .play-bar .pb-slot .pic {
    width: 30px;
    height: 30px;
  }

  .hud .play-bar .pb-dodge {
    width: 64px;
  }
}
