@font-face {
  font-family: OldKingC;
  src: url("/assets/fonts/oldkingc.otf") format("opentype");
  font-display: block;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080505;
  color: white;
  overscroll-behavior: none;
}
body {
  font-family: OldKingC, Georgia, serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid #ff6a13;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
#app {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
.scene-backdrop {
  position: absolute;
  pointer-events: none;
  filter: blur(2.5px);
}
#game-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#game-background > img {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  object-fit: cover;
  filter: blur(2.5px);
}
.map-enter {
  animation: map-enter 1050ms cubic-bezier(0.37, 0, 0.32, 1) both;
}
#game-background.is-paused .map-enter {
  animation-play-state: paused;
}
@keyframes map-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .map-enter { animation-duration: 1ms; }
}
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
[data-screen="menu"]::before {
  top: var(--menu-shade-top);
  background: linear-gradient(transparent, #000);
}
[data-screen="menu"]::after {
  content: "";
  position: absolute;
  inset: var(--menu-shade-top) 0 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent, #000);
}
[data-screen="leaders"]::before {
  top: var(--leaders-shade-top);
  background: #0008;
}
[data-screen="info"]::before {
  background: rgb(0 0 0 / 85%);
}
[data-screen="info"] .tutorial-preview {
  z-index: 0;
  pointer-events: none;
}
.scene-frame,
.scene-footer {
  position: absolute;
  left: var(--scene-center, 50%);
  width: 412px;
  transform-origin: top center;
  z-index: 2;
}
.scene-frame {
  top: var(--frame-top, 0px);
  height: 917px;
  transform: translateX(-50%) scale(var(--frame-scale, 1));
}
.scene-footer {
  bottom: var(--safe-bottom, 0px);
  height: 157px;
  transform-origin: bottom center;
  transform: translateX(-50%) scale(var(--frame-scale, 1));
  pointer-events: none;
}
.scene-footer > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene-footer > button {
  pointer-events: auto;
}
[data-screen="game"] .scene-frame {
  left: var(--safe-left, 0px);
  top: var(--safe-top, 0px);
  transform-origin: top left;
  transform: scale(var(--frame-scale, 1));
  pointer-events: none;
}
.design {
  display: block;
  position: absolute;
  inset: 0;
  width: 412px;
  height: 917px;
  pointer-events: none;
}
[data-screen="game"] .design {
  transform: translateZ(0);
}
.hit {
  position: absolute;
  z-index: 4;
  appearance: none;
  -webkit-appearance: none;
  user-select: none;
  -webkit-user-select: none;
  border: 0;
  background: transparent;
  min-height: var(--minimum-touch-size, 44px);
  min-width: var(--minimum-touch-size, 44px);
  padding: 0;
}
.dynamic {
  position: absolute;
  pointer-events: none;
  text-align: center;
  margin: 0;
  font-weight: 400;
  line-height: 1;
}
.menu-wisps {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.menu-wisp {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--wisp-size);
  height: var(--wisp-size);
  margin: calc(var(--wisp-size) / -2);
}
.menu-wisp > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe2a3 0 7%, #ffab4b 13%, #ed692b90 30%, #d84c241f 56%, transparent 72%);
  animation: wisp-pulse var(--wisp-pulse) ease-in-out infinite alternate;
}
@keyframes wisp-pulse {
  from { opacity: 0.5; transform: scale(0.84); filter: hue-rotate(-9deg); }
  to { opacity: 0.9; transform: scale(1.08); filter: hue-rotate(9deg); }
}
@media (prefers-reduced-motion: reduce) {
  .menu-wisps { display: none; }
}
#character-carousel,
.character-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.character {
  position: absolute;
  width: 200px;
  height: 200px;
  object-fit: contain;
  left: 106px;
  top: 166.312px;
  pointer-events: none;
}
.character.side {
  opacity: 0.5;
  filter: blur(3px);
}
.character.left {
  left: -94px;
}
.character.right {
  left: 306px;
}
#character-name {
  left: 110px;
  right: 110px;
  top: 384px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  white-space: nowrap;
  text-transform: uppercase;
}
.best-score-art {
  position: absolute;
  left: 61.6269px;
  top: 519.72px;
  width: 279.8px;
  height: 96.7197px;
  pointer-events: none;
}
#menu-user {
  left: 40px;
  top: 643px;
  width: 332px;
  font-size: 15px;
  color: #8a8a8a;
  letter-spacing: -0.05em;
}
#menu-rank {
  left: 130px;
  top: 677px;
  width: 152px;
  font-size: 14.2857px;
}
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;
  transform: translateZ(0);
  outline: none;
}
.game-pause {
  position: absolute;
  z-index: 3;
  right: calc(var(--safe-right, 0px) + 14px);
  top: calc(var(--safe-top, 0px) + 14px);
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 50%;
  background: rgb(0 0 0 / 55%);
  display: grid;
  place-items: center;
  padding: 0;
}
.game-pause > span {
  width: 14px;
  height: 16px;
  border-inline: 4px solid #fff;
}
.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 65%);
  touch-action: none;
}
.pause-controls {
  width: min(280px, calc(100% - 48px));
  display: grid;
  justify-items: center;
  gap: 20px;
}
.pause-volume {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: 18px;
}
.pause-volume output {
  font-variant-numeric: tabular-nums;
}
#game-volume {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: #ff793e;
}
.resume-button {
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid #ff793e;
  border-radius: 8px;
  background: #761f0a;
  font-size: 24px;
}
.resume-countdown {
  margin: 0;
  font-size: 88px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#game-score {
  position: absolute;
  left: 14px;
  top: 74px;
  width: 110px;
  text-align: center;
  font-size: 40px;
  letter-spacing: -0.05em;
}
#leaderboard-list {
  position: absolute;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
#leaderboard-button-label,
#leaderboard-title {
  text-transform: uppercase;
  white-space: nowrap;
}
#leaderboard-button-label {
  inset: 0 15px auto;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
#leaderboard-title {
  inset: 77px 22px auto 64px;
  font-size: 22px;
}
.leaderboard-empty {
  color: #b8a899;
  padding: 20px 10px;
  text-align: center;
}
.leaderboard-row {
  position: relative;
  display: grid;
  grid-template-columns: 50px 226px 100px;
  column-gap: 2px;
  min-height: 58px;
  margin-bottom: 8px;
  align-items: center;
  font-size: 20px;
}
.leaderboard-row > span {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-rank {
  text-align: center;
  font-size: 28px;
}
.leaderboard-name {
  padding: 0 12px;
}
.leaderboard-score {
  text-align: center;
}
.row-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.leaderboard-row:nth-child(-n + 3) {
  color: #fff;
}
.leaderboard-row.is-me {
  color: #ff8b40;
}
.app-status {
  position: absolute;
  bottom: calc(var(--safe-bottom, 0px) + 110px);
  left: 50%;
  width: min(360px, calc(100% - 50px));
  transform: translateX(-50%);
  z-index: 20;
  background: #0d0909eb;
  border: 1px solid #633121;
  font:
    14px/1.4 Arial,
    sans-serif;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
}
.app-status:empty {
  display: none;
}
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
.loading-logo {
  position: relative;
  width: min(68%, 212px);
  aspect-ratio: 150 / 29.311;
}
.loading-logo > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.loading-logo > svg:first-child {
  opacity: 0.24;
}
.loading-logo-fill {
  clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);
  transition: clip-path 140ms linear;
}
@media (prefers-reduced-motion: reduce) {
  .loading-logo-fill { transition: none; }
}
.load-retry {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 65%;
  transform: translateX(-50%);
  padding: 14px 25px;
  background: #ff6a13;
  border: 0;
}
.info-return {
  position: absolute;
  left: 16px;
  top: 62px;
  background: transparent;
  border: 0;
  font-size: 30px;
  z-index: 5;
}
