﻿* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

button,
a,
input,
select,
textarea,
summary,
[role="button"],
[onclick] {
  -webkit-tap-highlight-color: transparent;
}

#game-shell {
  position: relative;
  width: min(96vw, 1200px);
}

#game-canvas {
  width: 100%;
  height: auto;
  border: 2px solid #111;
  background: #ffffff;
  display: block;
  touch-action: none;
}

.game-pause-hitbox {
  position: absolute;
  left: 0.7%;
  top: 11.2%;
  width: 17%;
  height: 15.75%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  z-index: 25;
  cursor: pointer;
  padding: 0;
  appearance: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.game-pause-hitbox:focus-visible {
  outline: 3px solid rgba(255, 126, 126, 0.9);
  outline-offset: 3px;
}

@media (max-width: 1200px), (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #000;
  }

  body {
    display: block;
  }

  #game-shell {
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0;
  }

  #game-canvas {
    width: 100% !important;
    height: 100% !important;
    border: 0;
  }

  .game-pause-hitbox {
    left: 0.8%;
    top: 11.8%;
    width: 20%;
    height: 16.5%;
    border-width: 2px;
    border-radius: 8px;
  }
}

#game-over {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: center;
  z-index: 30;
  cursor: default;
  padding: 10px 16px 16px;
  overflow-y: auto;
}

#game-over.hidden {
  display: none;
}

.game-over-banner {
  display: block;
  width: min(31.5vw, 323px);
  max-width: 92vw;
  height: auto;
  margin: 0 auto 12px;
  position: static;
  transform: none;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

#level-finished {
  position: fixed;
  inset: 0;
  background: rgba(4, 16, 28, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 32;
  padding: 16px;
  overflow: hidden;
}

#level-finished.hidden {
  display: none;
}

#badge-reward-overlay,
#skin-reward-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 31;
  padding: 20px;
  overflow: hidden;
}

#level-finished-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

#level-finished-continue {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
  z-index: 2;
}

#badge-reward-overlay.hidden,
#skin-reward-overlay.hidden {
  display: none;
}

.badge-reward-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 30, 48, 0.14), rgba(4, 12, 22, 0.58));
  opacity: 0;
  transition: opacity 220ms ease;
}

.badge-reward-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 252, 226, 0.96) 0%, rgba(255, 236, 173, 0.82) 42%, rgba(255, 236, 173, 0) 74%);
  transform: translate(-50%, -50%) scale(0.04);
  opacity: 0;
  pointer-events: none;
}

.badge-reward-card {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-width: 92vw;
  max-height: min(86vh, 760px);
  padding: 28px 28px 24px;
  border-radius: 28px;
  border: 0;
  background:
    url("assets/gfx2/trophy_pics/Badge_unlocked_bckg.jpg") center center / 100% 100% no-repeat;
  background-color: transparent;
  box-shadow:
    0 24px 54px rgba(4, 12, 22, 0.28);
  text-align: center;
  transform: scale(0.98);
  overflow: auto;
}

.badge-reward-kicker {
  margin: 0 0 8px 0;
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a631d;
  opacity: 0.92;
}

.badge-reward-name {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 56px);
  line-height: 0.94;
  color: #0d2b3f;
  opacity: 0;
  transform: translateY(14px);
}

.badge-reward-tier {
  margin: 12px 0 0 0;
  font-size: clamp(18px, 2.9vw, 26px);
  font-weight: 800;
  color: #496476;
  opacity: 0;
  transform: translateY(12px);
}

.badge-reward-medal-wrap {
  position: relative;
  width: min(20vw, 152px);
  height: min(20vw, 152px);
  margin: 16px auto 10px;
  overflow: visible;
}

.badge-reward-trophy {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
  display: block;
}

.badge-reward-trophy-base {
  opacity: 0;
  z-index: 1;
  filter: none;
}

.badge-reward-trophy-art {
  opacity: 0;
  z-index: 2;
  transform: translate(-50%, -50%) scale(1);
  filter: none;
}

.badge-reward-trophy-art.is-visible {
  opacity: 1;
}

.badge-reward-goal {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.18;
  color: #15364a;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
}

.badge-reward-progress {
  margin: 8px 0 0 0;
  font-size: clamp(16px, 2.2vw, 20px);
  color: #5b7485;
  opacity: 0.88;
}

.badge-reward-prompt {
  margin: 12px 0 0 0;
  font-size: clamp(15px, 2vw, 18px);
  color: #7a8892;
  opacity: 0.92;
}

#badge-reward-overlay.is-revealing .badge-reward-backdrop,
#badge-reward-overlay.is-ready .badge-reward-backdrop,
#skin-reward-overlay.is-revealing .badge-reward-backdrop,
#skin-reward-overlay.is-ready .badge-reward-backdrop {
  opacity: 1;
}

#badge-reward-overlay.is-revealing .badge-reward-flash,
#skin-reward-overlay.is-revealing .badge-reward-flash {
  animation: badge-reward-flash 760ms ease-out forwards;
}

#badge-reward-overlay.is-revealing .badge-reward-card,
#skin-reward-overlay.is-revealing .badge-reward-card {
  animation: badge-reward-shake 420ms ease-out;
}

#badge-reward-overlay.is-revealing .badge-reward-name,
#badge-reward-overlay.is-ready .badge-reward-name,
#skin-reward-overlay.is-revealing .badge-reward-name,
#skin-reward-overlay.is-ready .badge-reward-name {
  animation: badge-reward-copy-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms forwards;
}

#badge-reward-overlay.is-revealing .badge-reward-tier,
#badge-reward-overlay.is-ready .badge-reward-tier,
#skin-reward-overlay.is-revealing .badge-reward-tier,
#skin-reward-overlay.is-ready .badge-reward-tier {
  animation: badge-reward-copy-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms forwards;
}

#badge-reward-overlay.is-revealing .badge-reward-trophy-art,
#badge-reward-overlay.is-ready .badge-reward-trophy-art,
#skin-reward-overlay.is-revealing .badge-reward-trophy-art,
#skin-reward-overlay.is-ready .badge-reward-trophy-art {
  opacity: 1;
}

#badge-reward-overlay.is-revealing .badge-reward-trophy-base,
#badge-reward-overlay.is-ready .badge-reward-trophy-base,
#skin-reward-overlay.is-revealing .badge-reward-trophy-base,
#skin-reward-overlay.is-ready .badge-reward-trophy-base {
  animation: badge-reward-medal-pop 760ms cubic-bezier(0.18, 0.82, 0.22, 1) 280ms forwards;
}

#badge-reward-overlay.is-revealing .badge-reward-goal,
#badge-reward-overlay.is-ready .badge-reward-goal,
#skin-reward-overlay.is-revealing .badge-reward-goal,
#skin-reward-overlay.is-ready .badge-reward-goal {
  animation: badge-reward-copy-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) 540ms forwards;
}

@keyframes badge-reward-flash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.04);
  }

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

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(38);
  }
}

@keyframes badge-reward-medal-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.04);
  }

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

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

@keyframes badge-reward-copy-in {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badge-reward-shake {
  0% {
    transform: translateX(0) scale(0.98);
  }

  20% {
    transform: translateX(-12px) rotate(-0.8deg) scale(0.98);
  }

  40% {
    transform: translateX(10px) rotate(0.6deg) scale(0.99);
  }

  60% {
    transform: translateX(-8px) rotate(-0.4deg) scale(1);
  }

  80% {
    transform: translateX(5px) rotate(0.2deg) scale(1);
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 700px),
(max-height: 760px) {
  #badge-reward-overlay {
    padding: 10px;
  }

  .badge-reward-card {
    width: min(94vw, 480px);
    max-width: 94vw;
    max-height: min(92vh, 680px);
    padding: 16px 16px 14px;
    border-width: 3px;
    border-radius: 20px;
  }

  .badge-reward-kicker {
    margin-bottom: 4px;
    font-size: clamp(12px, 3vw, 16px);
    letter-spacing: 0.14em;
  }

  .badge-reward-name {
    font-size: clamp(28px, 8vw, 48px);
  }

  .badge-reward-tier {
    margin-top: 8px;
    font-size: clamp(16px, 4.5vw, 22px);
  }

  .badge-reward-medal-wrap {
    width: min(24vw, 110px);
    height: min(24vw, 110px);
    margin: 10px auto 6px;
  }

  .badge-reward-trophy {
    width: 100%;
    height: 100%;
  }

  .badge-reward-goal {
    font-size: clamp(18px, 5vw, 28px);
  }

  .badge-reward-progress {
    margin-top: 10px;
    font-size: clamp(13px, 3.4vw, 16px);
  }

  .badge-reward-prompt {
    margin-top: 12px;
    font-size: clamp(12px, 3vw, 15px);
  }
}

#game-over h1 {
  margin: 0 0 10px 0;
  font-size: clamp(48px, 7.2vw, 96px);
  line-height: 1;
  text-shadow: none;
}

#game-over p {
  margin: 8px 0;
  font-size: clamp(18px, 2.5vw, 30px);
  text-shadow: none;
  max-width: min(92vw, 900px);
}

#game-over-layout {
  width: min(100%, 2200px);
  display: grid;
  grid-template-columns: clamp(240px, 30vw, 480px) minmax(180px, 1fr) clamp(240px, 30vw, 480px);
  align-items: start;
  gap: 12px;
  margin: 0 0 18px;
}

#final-current-run {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 4px;
  width: 100%;
  text-align: center;
  transform: translateY(-4px);
}

#final-current-run p {
  margin: 4px 0;
  font-size: clamp(16px, 2.8vh, 28px);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
  width: 100%;
  text-align: center;
}

#final-current-run .final-economy-line {
  margin: 4px 0;
  font-size: clamp(14px, 2.15vh, 22px);
  line-height: 1.15;
}

#final-continue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

#final-continue-actions.hidden {
  display: none;
}

#final-continue-actions button {
  position: relative;
  display: block;
  width: clamp(110px, 16vw, 248px);
  min-width: 0;
  aspect-ratio: 331 / 98;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: visible;
  z-index: 3;
}

#final-continue-actions button:disabled {
  cursor: default;
  opacity: 0.72;
  filter: grayscale(0.25);
}

#final-continue-actions button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  opacity: 1;
}

#final-continue-btn {
  filter: drop-shadow(0 2px 0 rgba(18, 60, 26, 0.18));
}

#final-end-run-btn {
  filter: drop-shadow(0 2px 0 rgba(90, 56, 18, 0.18));
}

#final-watch-ad-btn {
  filter: drop-shadow(0 2px 0 rgba(90, 56, 18, 0.18));
}

#continue-purchase-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 18, 28, 0.62);
  z-index: 220;
}

#continue-purchase-overlay.hidden {
  display: none;
}

#continue-purchase-card {
  position: relative;
  box-sizing: border-box;
  width: min(560px, 82vw, calc((100vh - 36px) * 433 / 327));
  aspect-ratio: 433 / 327;
  padding: clamp(47px, 8.3vw, 66px) clamp(20px, 3.6vw, 30px) clamp(54px, 8.5vw, 88px);
  border: 0;
  border-radius: 0;
  background:
    url("assets/gfx2/game_over_scr/buy_continue_clean.png") center center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #08293a;
  text-align: center;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

#continue-purchase-unit-price {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 20px);
  line-height: 1;
}

#continue-purchase-wallet,
#continue-purchase-total,
#continue-purchase-status {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 20px);
  line-height: 1;
}

#continue-purchase-wallet {
  margin: 0;
}

#continue-purchase-hearts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 1px 0 0;
}

#continue-purchase-total {
  margin-top: 0;
}

#continue-purchase-status {
  margin-top: 0;
}

.continue-life-heart {
  min-width: clamp(30px, 4.8vw, 42px);
  min-height: clamp(30px, 4.8vw, 42px);
  border: none;
  border-radius: 0;
  background: transparent;
  color: transparent;
  -webkit-text-stroke: 2px #c64f6b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: clamp(22px, 4.4vw, 34px);
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.continue-life-heart.selected {
  color: #e34b66;
  -webkit-text-stroke: 0 transparent;
  text-shadow: 0 1px 0 rgba(124, 16, 37, 0.18);
}

#continue-purchase-actions {
  position: absolute;
  left: clamp(12px, 10%, 48px);
  right: clamp(12px, 10%, 48px);
  bottom: clamp(14px, 5.5%, 28px);
  transform: translateY(-33.333%);
  transform-origin: center bottom;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 4%, 18px);
  align-items: stretch;
}

#continue-purchase-actions button {
  width: 100%;
  min-height: clamp(34px, 5.5vw, 48px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0;
  line-height: 0;
  color: transparent;
  cursor: pointer;
  opacity: 0;
  box-shadow: none;
  transform: scaleY(1.25);
  transform-origin: center bottom;
}

#continue-purchase-buy {
  grid-column: 1;
  background: transparent;
}

#continue-purchase-back {
  grid-column: 2;
  background: transparent;
}

#continue-purchase-actions button:disabled {
  cursor: default;
  opacity: 0;
}

@media (max-width: 700px) {
  #continue-purchase-overlay {
    padding: 14px;
  }

  #continue-purchase-card {
    width: min(94vw, 560px, calc((100vh - 28px) * 433 / 327));
    aspect-ratio: 433 / 327;
    box-sizing: border-box;
    padding: clamp(37px, 7.8vw, 55px) clamp(16px, 4vw, 24px) clamp(42px, 7vw, 68px);
  }

  #continue-purchase-unit-price,
  #continue-purchase-wallet,
  #continue-purchase-total,
  #continue-purchase-status {
    font-size: clamp(12px, 3.4vw, 16px);
    line-height: 1;
  }

  #continue-purchase-hearts {
    gap: 8px;
    margin: 0;
  }

  .continue-life-heart {
    min-width: clamp(24px, 7.2vw, 36px);
    min-height: clamp(24px, 7.2vw, 36px);
    font-size: clamp(18px, 6vw, 28px);
  }

  #continue-purchase-actions {
    left: clamp(10px, 8.5%, 40px);
    right: clamp(10px, 8.5%, 40px);
    bottom: clamp(12px, 4.2%, 22px);
    transform: translateY(-33.333%);
    transform-origin: center bottom;
    gap: clamp(8px, 3.5%, 14px);
  }

  #continue-purchase-actions button {
    min-height: clamp(28px, 6.4vw, 40px);
    transform: scaleY(1.25);
  }
}

#level-finished h1 {
  margin: 0 0 18px 0;
  font-size: clamp(62px, 9vw, 98px);
  line-height: 1;
}

#level-finished p {
  margin: 8px 0;
  font-size: clamp(28px, 3.8vw, 40px);
  max-width: min(92vw, 900px);
}

#level-finished-continue {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font: inherit;
  padding: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0;
  line-height: 0;
  pointer-events: auto;
}

#final-highscores {
  margin: 0;
  padding: 10px 12px 24px;
  border: 0;
  border-radius: 18px;
  background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
  color: #10263b;
  width: 100%;
  max-width: none;
  text-shadow: none;
  text-align: left;
  align-self: center;
  display: flex;
  flex-direction: column;
  transform: translateY(-20%);
  min-height: min(78vh, 760px);
}

#final-highscores h2 {
  margin: 0 0 8px 0;
  font-size: clamp(16px, 2vh, 22px);
  text-align: center;
  text-shadow: none;
}

#final-highscores p {
  margin: 6px 0;
  font-size: clamp(12px, 1.8vh, 16px);
  text-shadow: none;
}

#final-online-highscore {
  margin: 0;
  padding: 10px 12px 24px;
  border: 0;
  border-radius: 18px;
  background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
  color: #10263b;
  width: 100%;
  max-width: none;
  text-shadow: none;
  text-align: left;
  align-self: center;
  display: flex;
  flex-direction: column;
  transform: translateY(-20%);
  min-height: min(78vh, 760px);
}

#final-online-highscore h2 {
  margin: 0 0 8px 0;
  font-size: clamp(16px, 2vh, 22px);
  text-align: center;
  text-shadow: none;
}

#final-online-status {
  margin: 0 0 8px 0;
  font-size: clamp(12px, 1.8vh, 16px);
  color: #355161;
  text-shadow: none;
  text-align: center;
  line-height: 1.2;
}

#final-top-scores-status {
  margin: 0 0 8px 0;
  font-size: clamp(12px, 1.8vh, 16px);
  color: #355161;
  text-shadow: none;
  text-align: center;
  line-height: 1.2;
}

#final-top-scores-list,
#final-online-list {
  margin: 0;
  padding: 0 28px 0 22px;
  text-align: left;
  flex: 1 1 auto;
  box-sizing: border-box;
}

#final-top-scores-list li,
#final-online-list li {
  margin: 4px 0;
  font-size: 12px;
  color: #143043;
  text-shadow: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

#final-top-scores-list li strong,
#final-online-list li strong {
  color: #0d2740;
  font-weight: 700;
  white-space: nowrap;
}

#final-top-scores-list li.is-player-row,
#final-online-list li.is-player-row {
  color: #0c2b4f;
  font-weight: 700;
}

#final-top-scores-list li.is-current-run-row,
#final-online-list li.is-current-run-row {
  color: #7a1f1f;
  font-weight: 700;
}

#pre-run-screen {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  padding: 0;
  overflow-y: auto;
}

#pre-run-screen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: transparent !important;
}

.pre-run-card {
  width: 100vw !important;
  max-width: none !important;
  min-height: 100dvh !important;
  max-height: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex;
  flex-direction: column;
}

#pre-run-screen.is-launch-transition .pre-run-card {
  height: 100dvh !important;
  max-height: 100dvh !important;
}

#pre-run-select-gfx2.pre-run-select-variant {
  flex: 1 1 auto;
  min-height: 0;
}

#pre-run-select-gfx2 .pre-run-gfx2-scene {
  flex: 1 1 auto;
  min-height: 0;
  height: 100% !important;
  max-height: none !important;
}

#pre-run-select-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#pre-run-select-gfx2.pre-run-select-variant {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#pre-run-screen.hidden {
  display: none;
}

#pre-run-screen.is-launch-transition {
  overflow: hidden;
}

.pre-run-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: transparent;
  background-color: transparent;
  border-radius: 0;
  border: 0;
  padding: 26px 28px;
  box-shadow: none;
  overflow-y: auto;
}

#pre-run-screen.is-launch-transition .pre-run-stage {
  opacity: 0;
  pointer-events: none;
}

#pre-run-screen.is-launch-transition .pre-run-card {
  height: min(700px, calc(100dvh - 28px));
  max-height: min(700px, calc(100dvh - 28px));
  overflow: hidden;
}

.pre-run-launch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.pre-run-launch-copy {
  color: #08293a;
  font-size: clamp(48px, 11vw, 180px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 8px 18px rgba(255, 255, 255, 0.55),
    0 18px 40px rgba(8, 41, 58, 0.18);
  opacity: 0;
  transform: scale(0.18);
}

.pre-run-launch-overlay.phase-ready .pre-run-launch-copy,
.pre-run-launch-overlay.phase-run .pre-run-launch-copy {
  opacity: 1;
}

.pre-run-launch-overlay.phase-ready .pre-run-launch-copy {
  color: #0d3551;
}

.pre-run-launch-overlay.phase-run .pre-run-launch-copy {
  color: #0d4a23;
}

.pre-run-stage.hidden {
  display: none;
}

.pre-run-stage {
  position: relative;
  min-height: 100%;
  background: #f5f5f5;
}

#pre-run-settings-screen.in-game-pause {
  position: fixed;
  inset: 0;
  z-index: 42;
  min-height: 100dvh;
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
}

#pre-run-settings-screen.in-game-pause .pre-run-settings-gfx2 {
  width: 100%;
  min-height: calc(100dvh - 20px);
}

#pre-run-settings-screen.in-game-pause .pre-run-settings-gfx2-scene {
  height: calc(100dvh - 20px);
  min-height: 320px;
}

#pre-run-scores-screen {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.pre-run-badges-gfx2-scene {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.pre-run-badges-gfx2-back {
  position: absolute;
  left: 0;
  top: 0;
  width: 20%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
}

.pre-run-badges-gfx2-back-right {
  left: auto;
  right: 0;
}

.pre-run-badges-gfx2-scroll {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 4% 0 12%;
  scroll-padding-bottom: 12%;
}

.pre-run-badges-gfx2-top {
  position: relative;
  width: 104%;
  margin-left: -2%;
  aspect-ratio: 1024 / 127;
  background: url("assets/gfx2/badges_top.jpg") center center / 100% 100% no-repeat;
}

.pre-run-badges-gfx2-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 6%;
}

.pre-run-badges-gfx2-summary {
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 34px;
  background: url("assets/gfx2/badges_total.jpg") center center / 100% 100% no-repeat;
  min-width: min(100%, 520px);
  min-height: 96px;
}

.pre-run-badges-gfx2-summary strong {
  font-size: clamp(18px, 3.2vw, 32px);
  color: #ffffff;
  font-weight: 900;
  line-height: 1.05;
}

.pre-run-badges-gfx2-summary span {
  font-size: clamp(11px, 2vw, 18px);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.pre-run-badges-gfx2-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12%;
}

.pre-run-badges-gfx2-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pre-run-badges-gfx2-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 820px) {
  .pre-run-badges-gfx2-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pre-run-badges-gfx2-rows {
    grid-template-columns: 1fr;
  }
}

.pre-run-badges-gfx2-category-header {
  width: 100%;
  min-height: clamp(54px, 9vw, 96px);
  background: url("assets/gfx2/badges_category.jpg") center center / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3.2vw, 30px);
  color: #f8f2d6;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pre-run-badges-gfx2-category-title {
  font-size: clamp(16px, 3.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.pre-run-badges-gfx2-category-count {
  font-size: clamp(12px, 2.4vw, 20px);
  font-weight: 700;
  color: #f1e6be;
}

.pre-run-badges-gfx2-row {
  width: 100%;
  aspect-ratio: 1024 / 380;
  min-height: 240px;
  max-height: 380px;
  background: url("assets/gfx2/badges_single.jpg") center center / 100% 100% no-repeat;
  position: relative;
}

.pre-run-badges-gfx2-trophy-slot {
  position: absolute;
  left: 7%;
  top: 19%;
  width: 27%;
  height: 48%;
  pointer-events: none;
}

.pre-run-badges-gfx2-trophy-base,
.pre-run-badges-gfx2-trophy-art {
  position: absolute;
  left: 0;
  top: 4%;
  object-fit: contain;
  object-position: left center;
  transform-origin: left center;
}

.pre-run-badges-gfx2-trophy-base {
  top: auto;
  bottom: 6%;
  max-width: 102.96%;
  max-height: 116.16%;
  width: auto;
  height: auto;
  transform: translate(0, 15%);
  filter: drop-shadow(0 5px 10px rgba(24, 12, 4, 0.18));
}

.pre-run-badges-gfx2-trophy-art {
  top: auto;
  bottom: 6%;
  max-width: 102.96%;
  max-height: 116.16%;
  width: auto;
  height: auto;
  object-position: center center;
  transform: translate(0, 15%);
  filter: drop-shadow(0 5px 10px rgba(24, 12, 4, 0.18));
}

.pre-run-badges-gfx2-row-icon {
  display: none;
}

.pre-run-badges-gfx2-row-medals {
  display: none;
}

.pre-run-badges-gfx2-medal {
  display: none;
}

.pre-run-badges-gfx2-tier-stack {
  position: absolute;
  top: 0;
  right: 2.8%;
  width: 57.2%;
  height: 100%;
}

.pre-run-badges-gfx2-tier {
  --badge-medal-size: clamp(34px, 4.3vw, 50px);
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  color: #f3ecd2;
}

.pre-run-badges-gfx2-tier.is-locked .pre-run-badge-medal {
  filter: none;
}

.pre-run-badges-gfx2-tier.is-locked .pre-run-badges-gfx2-tier-label,
.pre-run-badges-gfx2-tier.is-locked .pre-run-badges-gfx2-tier-value {
  color: rgba(243, 236, 210, 0.52);
}

.pre-run-badges-gfx2-tier-shelf-top {
  top: 20%;
  transform: translateY(calc(var(--badge-medal-size) * -0.5));
}

.pre-run-badges-gfx2-tier-shelf-middle {
  top: 45%;
  transform: translateY(calc(var(--badge-medal-size) * -0.8));
}

.pre-run-badges-gfx2-tier-shelf-bottom {
  top: 70%;
  transform: translateY(calc(var(--badge-medal-size) * -1));
}

.pre-run-badges-gfx2-tier-medal-wrap {
  width: clamp(40px, 5vw, 58px);
  min-width: clamp(40px, 5vw, 58px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pre-run-badges-gfx2-tier-medal-wrap .pre-run-badge-medal {
  width: var(--badge-medal-size);
  height: var(--badge-medal-size);
  display: block;
  object-fit: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: none;
  background-color: transparent;
  filter: drop-shadow(0 3px 7px rgba(24, 12, 4, 0.28));
}

.pre-run-badges-gfx2-tier .badge-sprite-bronze {
  background-image: url("assets/gfx2/badges/layout/medal-bronze.png");
  background-position: center;
}

.pre-run-badges-gfx2-tier .badge-sprite-silver {
  background-image: url("assets/gfx2/badges/layout/medal-silver.png");
  background-position: center;
}

.pre-run-badges-gfx2-tier .badge-sprite-gold {
  background-image: url("assets/gfx2/badges/layout/medal-gold.png");
  background-position: center;
}

.pre-run-badges-gfx2-tier.is-locked .badge-sprite-bronze {
  background-image: url("assets/gfx2/badges/layout/medal-bronze-locked.png");
}

.pre-run-badges-gfx2-tier.is-locked .badge-sprite-silver {
  background-image: url("assets/gfx2/badges/layout/medal-silver-locked.png");
}

.pre-run-badges-gfx2-tier.is-locked .badge-sprite-gold {
  background-image: url("assets/gfx2/badges/layout/medal-gold-locked.png");
}

.pre-run-badges-gfx2-tier-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pre-run-badges-gfx2-tier-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.pre-run-badges-gfx2-tier-label {
  font-size: clamp(10px, 1.1vw, 12px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b88a31;
  line-height: 1;
}

.pre-run-badges-gfx2-tier-date {
  font-size: clamp(9px, 0.95vw, 11px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #ffffff;
  white-space: nowrap;
}

.pre-run-badges-gfx2-tier-value {
  font-size: clamp(11px, 1.45vw, 17px);
  line-height: 1.05;
  font-weight: 800;
  color: #f3ecd2;
  text-shadow: 0 1px 2px rgba(39, 22, 8, 0.65);
}

.pre-run-badges-gfx2-row-copy {
  position: absolute;
  left: 6%;
  right: 2%;
  top: 6%;
  bottom: 6%;
  color: #2b4a61;
  pointer-events: none;
}

.pre-run-badges-gfx2-row-copy h4 {
  margin: 0;
  font-size: clamp(15px, 2.6vw, 22px);
  color: #ffffff;
  position: absolute;
  top: -0.5em !important;
  left: 4%;
  right: 2%;
  line-height: 1.05;
  font-weight: 900;
}

.pre-run-badges-gfx2-row-copy p {
  margin: 0;
  position: absolute;
  bottom: 0% !important;
  left: 4%;
  right: 2%;
  color: #f0f4f8;
  line-height: 1.15;
  font-size: clamp(12px, 2vw, 18px);
}

.pre-run-scores-gfx2-scene {
  position: relative;
  width: min(100%, 1536px);
  aspect-ratio: 1536 / 1853;
  margin: 0 auto;
  background: url("assets/gfx2/scores_inside.jpg") center center / 100% 100% no-repeat;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 6px rgba(8, 41, 58, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(8, 41, 58, 0.16);
}

.pre-run-scores-gfx2-back {
  position: absolute;
  left: 2.2%;
  top: 1.6%;
  width: 12.5%;
  height: 6.5%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.pre-run-stage-scrollable,
#pre-run-badges-screen,
#pre-run-rules-screen,
#pre-run-credits-screen,
#pre-run-settings-screen,
#pre-run-shop-screen,
#pre-run-detail-screen {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#pre-run-badges-screen {
  overflow-y: auto;
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y;
}

#pre-run-select-screen,
#pre-run-badges-screen {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#pre-run-rules-screen,
#pre-run-credits-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 24px 32px 28px;
  box-sizing: border-box;
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y;
}

#pre-run-rules-screen .pre-run-scores-heading h2,
#pre-run-credits-screen .pre-run-scores-heading h2 {
  color: #fff7e2;
  text-shadow:
    0 3px 0 rgba(54, 28, 10, 0.45),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.pre-run-gfx2-exit-btn {
  width: clamp(110px, 11vw, 162px);
  min-width: 0;
  min-height: auto !important;
  aspect-ratio: 162 / 65;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("assets/gfx2/Exit.png") center / contain no-repeat !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
  overflow: hidden;
}

.pre-run-gfx2-exit-btn:hover {
  transform: translateY(-2px);
}

.pre-run-gfx2-desk-panel {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 10% !important;
  background: url("assets/gfx2/desk_credits.jpg") center / 100% 100% no-repeat !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.pre-run-scores-grid {
  touch-action: pan-y;
}

.pre-run-brand {
  text-align: center;
  font-size: clamp(54px, 9vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #168a34;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 24px rgba(22, 138, 52, 0.2);
  margin-bottom: 26px;
}

.pre-run-select-topbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pre-run-side-btn {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border: 3px solid #08293a;
  border-radius: 999px;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 26px rgba(8, 41, 58, 0.1);
}

.pre-run-rules-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #fff1bf 0%, #f7b85e 100%);
  color: #5b3510;
}

.pre-run-settings-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #e8f4ff 0%, #9bcaf0 100%);
  color: #123c5d;
}

.pre-run-credits-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #efe5ff 0%, #c8b2ef 100%);
  color: #47316a;
}

.pre-run-shop-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #dff9d6 0%, #99de8c 100%);
  color: #1d4d24;
}

.pre-run-select-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.pre-run-select-variant {
  width: 100%;
}

.pre-run-gfx2-scene {
  position: relative;
  width: 100%;
  height: clamp(420px, 67vh, 740px);
  max-height: min(70dvh, 740px);
  border-radius: 0;
  overflow: hidden;
  background: url("assets/gfx2/crossing_page/crossing_background.jpg") center center / 100% 100% no-repeat;
  box-shadow: none;
}

.pre-run-gfx2-sky,
.pre-run-gfx2-foreground,
.pre-run-gfx2-animation-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pre-run-gfx2-sky {
  z-index: 0;
  background: url("assets/gfx2/crossing_page/crossing_background.jpg") center center / 100% 100% no-repeat;
  display: none;
}

.pre-run-gfx2-foreground {
  z-index: 2;
  background: url("assets/gfx2/crossing_page/crossing_foreground.png") center center / 100% 100% no-repeat;
  display: block;
}

.pre-run-gfx2-animation-frame {
  z-index: 5;
  background: none;
  background-position: center center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: block;
}

.pre-run-gfx2-static-cloud,
.pre-run-gfx2-hotspot,
.pre-run-gfx2-cloud-hitbox {
  position: absolute;
}

.pre-run-gfx2-static-cloud {
  z-index: 1;
  pointer-events: none;
  display: block;
  width: auto;
  max-width: none;
  opacity: 1;
  object-fit: contain;
  object-position: center;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
}

.pre-run-gfx2-shop-visual {
  position: absolute;
  z-index: 3;
  display: block;
  pointer-events: none;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.pre-run-gfx2-hotspot,
.pre-run-gfx2-cloud-hitbox {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.pre-run-gfx2-house {
  position: absolute;
  z-index: 4;
  display: block;
  padding: 0;
  border: 0;
  margin: 0;
  background: none;
  background-image: none;
  background-color: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}

.pre-run-gfx2-house:hover {
  transform: translateY(-3px) scale(1.02);
}

.pre-run-gfx2-hotspot {
  --hotspot-rotate: 0deg;
  border-radius: 0;
  clip-path: none;
  z-index: 4;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
  transform: none;
  transform-origin: center;
}

.pre-run-gfx2-hotspot:hover {
  transform: translateY(-2px);
  background: transparent;
  box-shadow: none;
}

@media (hover: none) and (pointer: coarse) {

  .pre-run-gfx2-hotspot:hover,
  .pre-run-gfx2-cloud-hitbox:hover,
  .pre-run-gfx2-house:hover {
    transform: none;
    background: transparent;
    box-shadow: none;
  }

  .pre-run-gfx2-hotspot:focus-visible,
  .pre-run-gfx2-cloud-hitbox:focus-visible,
  .pre-run-gfx2-house:focus-visible {
    outline: none;
  }
}

.pre-run-gfx2-hotspot:focus-visible,
.pre-run-gfx2-cloud-hitbox:focus-visible,
.pre-run-gfx2-house:focus-visible {
  outline: none;
}

.pre-run-gfx2-hotspot.locked {
  background: rgba(72, 45, 10, 0.08);
}

.pre-run-gfx2-hotspot-advanced.locked {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.pre-run-gfx2-hotspot-advanced {
  left: 46.4%;
  top: 14.3%;
  width: 13.8%;
  height: 8.8%;
}

.pre-run-gfx2-hotspot-settings {
  --hotspot-rotate: -10deg;
  left: 58.3%;
  top: 10.3%;
  width: 19.4%;
  height: 9.3%;
}

.pre-run-gfx2-hotspot-classic {
  left: 45.9%;
  top: 28.2%;
  width: 13.1%;
  height: 7.8%;
}

.pre-run-gfx2-hotspot-badges {
  --hotspot-rotate: 0deg;
  left: 58.9%;
  top: 29.3%;
  width: 15.2%;
  height: 6.8%;
}

.pre-run-gfx2-hotspot-scores {
  --hotspot-rotate: 16deg;
  left: 68.9%;
  top: 77.6%;
  width: 15.9%;
  height: 9.6%;
}

.pre-run-gfx2-static-cloud-rules,
.pre-run-gfx2-cloud-hitbox-rules {
  left: 3.2%;
  top: 2.4%;
  width: 14.8%;
  height: 18.2%;
}

.pre-run-gfx2-static-cloud-credits,
.pre-run-gfx2-cloud-hitbox-credits {
  left: calc(27.8% - 7.36%);
  top: 2%;
  width: 18.4%;
  height: 16.2%;
}

.pre-run-gfx2-static-cloud-fortune {
  left: 48.8%;
  top: 1.9%;
  width: 15.8%;
  height: 15.4%;
}

.pre-run-gfx2-cloud-hitbox-fortune {
  left: 48.8%;
  top: 1.9%;
  width: 15.8%;
  height: 15.4%;
}

.pre-run-gfx2-cloud-hitbox-mine {
  left: 0%;
  top: 46%;
  width: 17.5%;
  height: 54%;
  z-index: 7;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pre-run-gfx2-static-cloud-shop {
  right: 3.4%;
  top: 2.2%;
  width: 13.8%;
  height: 17.4%;
}

.pre-run-gfx2-hotspot-house-classic {
  left: 0.2%;
  top: 8.8%;
  width: 10.8%;
  height: 21.8%;
  z-index: 4;
  transform: none;
}

.pre-run-gfx2-hotspot-house-settings {
  right: 0.2%;
  top: 8.8%;
  width: 10.8%;
  height: 21.8%;
  z-index: 4;
  transform: none;
}

.pre-run-gfx2-hotspot-classic-corner {
  left: 0;
  top: 64px;
  width: 128px;
  height: 192px;
  z-index: 8;
}

.pre-run-gfx2-hotspot-settings-corner {
  right: 0;
  top: 84px;
  width: 102px;
  height: 138px;
  z-index: 4;
}

.pre-run-gfx2-hotspot-classic,
.pre-run-gfx2-hotspot-settings,
.pre-run-gfx2-hotspot-house-classic,
.pre-run-gfx2-hotspot-house-settings {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.pre-run-gfx2-hotspot-classic,
.pre-run-gfx2-hotspot-house-classic {
  box-sizing: border-box;
}

.pre-run-gfx2-hotspot-classic:hover,
.pre-run-gfx2-hotspot-settings:hover,
.pre-run-gfx2-hotspot-house-classic:hover,
.pre-run-gfx2-hotspot-house-settings:hover,
.pre-run-gfx2-hotspot-settings-corner:hover,
.pre-run-gfx2-hotspot-classic:focus-visible,
.pre-run-gfx2-hotspot-settings:focus-visible,
.pre-run-gfx2-hotspot-house-classic:focus-visible,
.pre-run-gfx2-hotspot-house-settings:focus-visible,
.pre-run-gfx2-hotspot-settings-corner:focus-visible,
.pre-run-gfx2-hotspot-classic:active,
.pre-run-gfx2-hotspot-settings:active,
.pre-run-gfx2-hotspot-house-classic:active,
.pre-run-gfx2-hotspot-house-settings:active,
.pre-run-gfx2-hotspot-settings-corner:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.pre-run-gfx2-cloud-hitbox {
  z-index: 6;
  display: block;
  padding: 0;
  margin: 0;
  color: transparent;
  font-size: 0;
  line-height: 0;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease;
}

.pre-run-gfx2-cloud-hitbox:hover {
  transform: translateY(-3px);
}

.pre-run-gfx2-house-shop {
  right: 0.9%;
  top: 40.9%;
  width: 11.8%;
  aspect-ratio: 1 / 1;
}

.pre-run-gfx2-shop-visual-house {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.pre-run-gfx2-lock-note {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  max-width: min(82%, 620px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(85, 16, 20, 0.82);
  color: #fff3e8;
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 12px 24px rgba(49, 7, 7, 0.24);
}

.pre-run-mine-gfx2-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: url("assets/gfx2/mine_inside.jpg") center center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 0 6px rgba(8, 41, 58, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(8, 41, 58, 0.16);
}

.pre-run-mine-gfx2-hitbox-exit {
  display: block;
  position: absolute;
  left: 4.2%;
  top: 18%;
  width: 17%;
  height: 12%;
  z-index: 999;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  opacity: 1;
}

.pre-run-mine-gfx2-wallet {
  position: absolute;
  z-index: 4;
  left: 67.8%;
  top: 8.6%;
  width: 25.8%;
  height: 31.5%;
  color: #f7e3b2;
  text-align: left;
  text-shadow:
    0 2px 0 rgba(35, 17, 3, 0.75),
    0 0 14px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.pre-run-mine-gfx2-storage {
  position: absolute;
  z-index: 5;
  left: 34.6%;
  top: 16.7%;
  width: 21.2%;
  height: 14.2%;
  color: #ffe9a7;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(35, 17, 3, 0.75),
    0 0 12px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.pre-run-mine-gfx2-storage-value {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(20px, 2.15vw, 31px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pre-run-mine-gfx2-countdown-wrap {
  position: absolute;
  z-index: 6;
  left: 38.9%;
  top: 71.2%;
  width: 15.9%;
  height: 7.4%;
  pointer-events: none;
}

.pre-run-mine-gfx2-countdown {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #ffe9a7;
  text-shadow:
    0 2px 0 rgba(35, 17, 3, 0.75),
    0 0 12px rgba(0, 0, 0, 0.18);
}

.pre-run-mine-gfx2-countdown.is-full {
  color: #fff0ab;
}

.pre-run-mine-gfx2-wallet-value {
  position: absolute;
  left: 46.5%;
  top: 76.5%;
  transform: translate(-50%, -50%);
  font-size: clamp(13px, 1.8vw, 24px);
  font-weight: 900;
  line-height: 1;
  color: #fff1bf;
}

.pre-run-mine-gfx2-transfer-btn {
  position: absolute;
  left: 68.2%;
  top: 49.6%;
  width: 16.8%;
  height: 17.8%;
  z-index: 8;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.pre-run-mine-gfx2-transfer-btn::after {
  content: attr(data-ad-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: 95%;
  color: #fff2bf;
  font-size: clamp(12px, 1.6vw, 20px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.pre-run-mine-gfx2-transfer-btn[data-ad-label]:not([data-ad-label=""])::after {
  opacity: 1;
}

.pre-run-mine-gfx2-message {
  position: absolute;
  left: 18.8%;
  bottom: 8.8%;
  width: 43.6%;
  min-height: 0;
  padding: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffe8b2;
  font-size: clamp(13px, 1.35vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 10px rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.pre-run-mine-gfx2-message-face {
  display: block;
  flex: 0 0 auto;
  width: clamp(42px, 4.4vw, 64px);
  height: clamp(42px, 4.4vw, 64px);
  object-fit: contain;
  image-rendering: auto;
  transform-origin: center center;
}

.pre-run-mine-gfx2-message-face.is-mine-face-15 {
  transform: scale(1.75);
}

.pre-run-mine-gfx2-message-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.pre-run-mine-gfx2-message-text.is-mine-face-15 {
  transform: translateX(5%);
}

.pre-run-mine-gfx2-message.is-success {
  color: #d6ff9a;
}

.pre-run-mine-gfx2-message.is-warning {
  color: #ffd36a;
}

.pre-run-mine-gfx2-message.is-info {
  color: #ffe8b2;
}

@media (max-width: 980px) {
  .pre-run-gfx2-scene {
    border-radius: 22px;
    height: clamp(340px, 56vh, 620px);
    max-height: min(58dvh, 620px);
  }

  .pre-run-mine-gfx2-scene {
    height: calc(100dvh - 46px);
    min-height: calc(100dvh - 46px);
  }

  .pre-run-gfx2-foreground {
    background-size: 100% 100%;
    background-position: center center;
  }

  .pre-run-gfx2-static-cloud-rules,
  .pre-run-gfx2-cloud-hitbox-rules {
    left: 2.9%;
    top: 2.2%;
    width: 14.4%;
    height: 17.7%;
  }

  .pre-run-gfx2-static-cloud-credits,
  .pre-run-gfx2-cloud-hitbox-credits {
    left: calc(26.8% - 7.12%);
    top: 1.8%;
    width: 17.8%;
    height: 15.8%;
  }

  .pre-run-gfx2-static-cloud-fortune,
  .pre-run-gfx2-cloud-hitbox-fortune {
    left: 48.2%;
    top: 1.8%;
    width: 16.2%;
    height: 15.8%;
  }

  .pre-run-gfx2-static-cloud-shop {
    right: 3%;
    top: 2%;
    width: 13.4%;
    height: 17%;
  }

  .pre-run-gfx2-house-shop {
    right: 0.8%;
    top: 40.6%;
    width: 12.2%;
  }

  .pre-run-mine-gfx2-scene {
    height: 100%;
    min-height: 100%;
  }

  .pre-run-mine-gfx2-hitbox-exit {
    left: 4%;
    top: 18.5%;
    width: 18%;
    height: 12.5%;
  }

  .pre-run-mine-gfx2-wallet {
    left: 67.4%;
    top: 8.7%;
    width: 26.2%;
    height: 31%;
  }

  .pre-run-mine-gfx2-storage {
    left: 35%;
    top: 16%;
    width: 18%;
    height: 13.2%;
  }

  .pre-run-mine-gfx2-storage-value {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .pre-run-mine-gfx2-countdown-wrap {
    left: 39%;
    top: 71.4%;
    width: 16.1%;
    height: 7.6%;
  }

  .pre-run-gfx2-hotspot-scores {
    left: 67.8%;
    top: 78.4%;
    width: 17.5%;
    height: 10.5%;
  }
}

@media (max-width: 640px) {
  #pre-run-screen {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background:
      linear-gradient(135deg, rgba(6, 20, 33, 1), rgba(8, 28, 45, 1)),
      url("assets/start_bkg.png") center / cover no-repeat;
  }

  .pre-run-card {
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-width: 0;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    box-shadow: none;
    overflow: hidden;
  }

  #pre-run-select-screen {
    flex: 1 1 auto;
    min-height: 0;
  }

  #pre-run-shop-screen:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  #pre-run-detail-screen:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  #pre-run-select-gfx2.pre-run-select-variant {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .pre-run-shop-gfx2:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .pre-run-classic-gfx2:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .pre-run-shop-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    border-radius: 18px;
  }

  .pre-run-classic-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    border-radius: 18px;
  }

  .pre-run-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0;
    height: 100%;
    max-height: none;
  }

  .pre-run-gfx2-foreground {
    background-size: 100% 100%;
    background-position: center center;
  }

  .pre-run-gfx2-static-cloud-rules,
  .pre-run-gfx2-cloud-hitbox-rules {
    left: 2.4%;
    top: 1.8%;
    width: 14%;
    height: 17%;
  }

  .pre-run-gfx2-static-cloud-credits,
  .pre-run-gfx2-cloud-hitbox-credits {
    left: calc(25.2% - 6.8%);
    top: 1.4%;
    width: 17%;
    height: 15.2%;
  }

  .pre-run-gfx2-static-cloud-shop {
    right: 2.6%;
    top: 1.6%;
    width: 13%;
    height: 16.6%;
  }

  .pre-run-gfx2-static-cloud-fortune,
  .pre-run-gfx2-cloud-hitbox-fortune {
    left: 48.4%;
    top: 1.6%;
    width: 16.4%;
    height: 16.2%;
  }

  .pre-run-gfx2-house-shop {
    right: 0.6%;
    top: 40.3%;
    width: 12.8%;
  }

  .pre-run-mine-gfx2-scene {
    height: 100%;
    min-height: 0;
    border-radius: 0;
  }

  .pre-run-mine-gfx2-hitbox-exit {
    left: 4%;
    top: 18.4%;
    width: 19%;
    height: 13%;
  }

  .pre-run-mine-gfx2-wallet {
    left: 67.2%;
    top: 8.8%;
    width: 26.8%;
    height: 30.4%;
  }

  .pre-run-mine-gfx2-storage {
    left: 35.2%;
    top: 16.2%;
    width: 18.3%;
    height: 13.4%;
  }

  .pre-run-mine-gfx2-storage-value {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .pre-run-mine-gfx2-countdown-wrap {
    left: 39.1%;
    top: 71.7%;
    width: 16.4%;
    height: 7.8%;
  }

  .pre-run-gfx2-lock-note {
    width: calc(100% - 26px);
    bottom: 2.2%;
    padding: 10px 14px;
  }

  .pre-run-gfx2-hotspot-advanced {
    left: 45.6%;
    top: 15.1%;
    width: 15.2%;
    height: 9.6%;
  }

  .pre-run-gfx2-hotspot-settings {
    left: 57.2%;
    top: 11.2%;
    width: 21.2%;
    height: 10.2%;
  }

  .pre-run-gfx2-hotspot-classic {
    left: 47.6%;
    top: 28.8%;
    width: 13.4%;
    height: 9.2%;
  }

  .pre-run-gfx2-hotspot-badges {
    left: 59.2%;
    top: 28.9%;
    width: 16.4%;
    height: 9.4%;
  }

  .pre-run-gfx2-hotspot-scores {
    left: 67.2%;
    top: 78.8%;
    width: 18.8%;
    height: 11.6%;
  }
}

.pre-run-mode-card {
  border: 10px solid #08293a;
  border-radius: 28px;
  min-height: 260px;
  height: 100%;
  width: 100%;
  background: #fff;
  padding: 26px 22px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 28px rgba(8, 41, 58, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.pre-run-mode-card:disabled {
  cursor: default;
}

.pre-run-mode-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 34px rgba(8, 41, 58, 0.14);
}

.pre-run-mode-card:disabled:hover {
  transform: none;
}

#pre-run-jump-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.18)),
    url("assets/jump_mode_bkg.jpg") center / cover no-repeat;
}

#pre-run-full-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.16)),
    url("assets/full_mode_bkg.jpg") center / cover no-repeat;
}

.pre-run-mode-title {
  display: block;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1;
  text-align: center;
  width: 100%;
}

.pre-run-mode-copy {
  display: block;
  font-size: clamp(16px, 1.7vw, 24px);
  line-height: 1.25;
  text-align: center;
}

.pre-run-difficulty-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  align-items: center;
  height: 100%;
}

.pre-run-difficulty-toggle {
  position: relative;
  width: clamp(180px, 19vw, 339px);
  aspect-ratio: 339 / 76;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: none;
  transition: none;
  transform-style: flat;
}

.pre-run-difficulty-toggle:hover {
  transform: none;
  box-shadow: none;
}

.pre-run-difficulty-toggle.is-flipping {
  animation: none;
}

.pre-run-difficulty-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
}

.pre-run-difficulty-toggle-lock {
  display: none;
}

.pre-run-badges-btn {
  width: min(100%, 220px);
  min-width: 0;
  min-height: 92px;
  border: 3px solid #08293a;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #fff2be 0%, #f5c55f 100%);
  color: #5a3812;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 16px 28px rgba(8, 41, 58, 0.1);
  margin-top: 0;
}

.pre-run-scores-btn {
  width: min(100%, 220px);
  min-width: 0;
  min-height: 74px;
  border: 3px solid #08293a;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #dcf4ff 0%, #90d0f4 100%);
  color: #123c5d;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 26px rgba(8, 41, 58, 0.1);
}

.pre-run-player-name-btn {
  width: min(100%, 220px);
  min-width: 0;
  min-height: 60px;
  border: 3px solid #08293a;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #d8ecff 0%, #9dc7ee 100%);
  color: #123c5d;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 24px rgba(8, 41, 58, 0.08);
}

.pre-run-badges-btn:hover,
.pre-run-scores-btn:hover,
.pre-run-side-btn:hover,
.pre-run-player-name-btn:hover,
.pre-run-settings-toggle:hover {
  transform: translateY(-2px);
}

.pre-run-rules-panel {
  flex: 1 1 auto;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.pre-run-rules-panel.pre-run-gfx2-desk-panel,
.pre-run-credits-card.pre-run-gfx2-desk-panel {
  background: url("assets/gfx2/desk_credits.jpg") center / 100% 100% no-repeat !important;
}

.pre-run-rules-viewer {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.pre-run-rules-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 clamp(7px, 0.75vw, 10px) 10px;
  margin-top: -20px;
  margin-bottom: -40px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.pre-run-rules-frame-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: -18px;
}

.pre-run-rules-page-title {
  color: #5b3211;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

.pre-run-rules-text {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 58, 31, 0.65) rgba(255, 236, 204, 0.16);
  white-space: pre-wrap;
  word-break: break-word;
  color: #27160a;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.42;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.pre-run-rules-text.is-html {
  white-space: normal;
}

.pre-run-rules-text::-webkit-scrollbar {
  width: 8px;
}

.pre-run-rules-text::-webkit-scrollbar-track {
  background: rgba(255, 236, 204, 0.16);
  border-radius: 999px;
}

.pre-run-rules-text::-webkit-scrollbar-thumb {
  background: rgba(90, 58, 31, 0.65);
  border-radius: 999px;
  border: 2px solid rgba(255, 236, 204, 0.16);
}

.pre-run-rules-text::-webkit-scrollbar-thumb:hover {
  background: rgba(90, 58, 31, 0.82);
}

.pre-run-rules-text.is-html .pre-run-brief-columns {
  gap: 18px 26px;
}

.pre-run-rules-text.is-html .pre-run-brief-columns-single {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.pre-run-rules-text.is-html .brief-row {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.brief-jump-bonus {
  width: 26px;
  height: 26px;
  margin-right: 10px;
  margin-top: 1px;
  background:
    center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19C4 12 7 9 11 13C13 6 17 3 20 4' fill='none' stroke='%23f39c12' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20 4L15 3L16 8Z' fill='%23f39c12'/%3E%3C/svg%3E");
}

.pre-run-rules-text strong {
  font-weight: 800;
}

.pre-run-rules-text .brief-row > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.18;
}

.pre-run-rules-text .brief-icon {
  width: 26px;
  height: 26px;
  margin-right: 10px;
}

.pre-run-rules-text .brief-jump-bonus {
  width: 28px;
  height: 28px;
  margin-top: 0;
}

.pre-run-rules-pager {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pre-run-rules-page-label {
  min-width: 92px;
  text-align: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 41, 58, 0.12);
  color: #d9c39a;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.28);
}

.pre-run-rules-pager-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pre-run-rules-pager-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(8, 41, 58, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.22)),
    linear-gradient(180deg, #ffe7b8 0%, #f0c671 100%);
  color: #08293a;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 18px rgba(8, 41, 58, 0.12);
}

.pre-run-rules-pager-btn:hover {
  transform: translateY(-1px);
}

.pre-run-credits-card {
  flex: 1 1 auto;
  min-height: 320px;
  padding: 28px 30px;
}

.pre-run-credits-version {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 41, 58, 0.26);
  color: #fff;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.35),
    0 3px 10px rgba(0, 0, 0, 0.18);
}

.pre-run-credits-update-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(180deg, rgba(18, 60, 93, 0.92), rgba(7, 33, 53, 0.94));
  color: #fff;
  font-size: clamp(15px, 1.55vw, 21px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(8, 41, 58, 0.16);
}

.pre-run-credits-update-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.76);
}

.pre-run-credits-card p {
  margin: 0 0 18px 0;
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.45;
  color: #123c5d;
}

.pre-run-credits-card p:last-child {
  margin-bottom: 0;
}

.pre-run-settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pre-run-settings-gfx2 {
  width: 100%;
  min-height: min(720px, calc(100dvh - 36px));
}

.pre-run-settings-gfx2-scene {
  position: relative;
  width: 100%;
  height: min(720px, calc(100dvh - 36px));
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: url("assets/gfx2/settings_inside.jpg") center center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 0 6px rgba(8, 41, 58, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(8, 41, 58, 0.16);
}

.pre-run-settings-gfx2-off-layer {
  position: absolute;
  inset: 0;
  background: url("assets/gfx2/settings_inside_off.jpg") center center / 100% 100% no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 1;
}

.pre-run-settings-gfx2.is-music-off .pre-run-settings-gfx2-off-music,
.pre-run-settings-gfx2.is-sfx-off .pre-run-settings-gfx2-off-sfx {
  opacity: 1;
}

.pre-run-settings-gfx2-off-music {
  clip-path: inset(12% 58% 46% 14%);
}

.pre-run-settings-gfx2-off-sfx {
  clip-path: inset(13% 10% 47% 58%);
}

.pre-run-settings-gfx2-hitbox {
  position: absolute;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.pre-run-settings-gfx2-hitbox-music-graphic {
  left: 14.5%;
  top: 15.5%;
  width: 28%;
  height: 46%;
}

.pre-run-settings-gfx2-hitbox-sfx-graphic {
  right: 15%;
  top: 16%;
  width: 28%;
  height: 44%;
}

.pre-run-settings-gfx2-hitbox:hover {
  box-shadow: none;
  background: transparent;
}

.pre-run-settings-gfx2-hitbox:focus-visible {
  outline: 3px solid rgba(255, 228, 168, 0.72);
  outline-offset: 4px;
}

.pre-run-settings-gfx2-volume {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  overflow: visible;
}

.pre-run-settings-gfx2-volume::before {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  border: 2px solid rgba(62, 41, 20, 0.72);
  background:
    linear-gradient(180deg, rgba(250, 248, 244, 0.98), rgba(209, 205, 198, 0.92) 20%, rgba(168, 165, 160, 0.96) 49%, rgba(120, 118, 114, 0.98) 50%, rgba(211, 208, 202, 0.92) 78%, rgba(138, 134, 128, 0.94)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, 0.18) 58%, rgba(255, 255, 255, 0.15));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -4px 10px rgba(0, 0, 0, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.pre-run-settings-gfx2-volume::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: none;
  pointer-events: none;
  opacity: 0;
}

.pre-run-settings-gfx2-volume-music {
  left: 7.2%;
  top: 19%;
  width: 8%;
  height: 42%;
}

.pre-run-settings-gfx2-volume-sfx {
  right: 7.2%;
  top: 19%;
  width: 8%;
  height: 42%;
}

.pre-run-settings-gfx2-volume-global {
  left: 14%;
  bottom: 5.2%;
  width: 72%;
  height: 11%;
}

.pre-run-settings-gfx2-volume-music::before,
.pre-run-settings-gfx2-volume-sfx::before {
  top: 4%;
  bottom: 4%;
  left: 43%;
  right: 43%;
}

.pre-run-settings-gfx2-volume-global::before {
  left: 6%;
  right: 6%;
  top: 39%;
  bottom: 39%;
}

.pre-run-settings-gfx2-volume-caption {
  position: absolute;
  left: 50%;
  top: -24%;
  transform: translateX(-50%);
  color: #f8e1b0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow:
    0 2px 0 rgba(73, 36, 0, 0.9),
    0 0 10px rgba(255, 245, 208, 0.22);
  pointer-events: none;
  z-index: 2;
}

.pre-run-settings-gfx2-volume-range {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.pre-run-settings-gfx2-volume-range::-webkit-slider-runnable-track {
  background: transparent;
  border: 0;
}

.pre-run-settings-gfx2-volume-range::-moz-range-track {
  background: transparent;
  border: 0;
}

.pre-run-settings-gfx2-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 50%;
  border: 2px solid rgba(76, 46, 0, 0.88);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 236, 186, 0.96) 12%, rgba(223, 171, 58, 0.98) 35%, rgba(149, 91, 10, 0.98) 66%, rgba(77, 43, 0, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 8px rgba(0, 0, 0, 0.24),
    0 4px 9px rgba(0, 0, 0, 0.34);
}

.pre-run-settings-gfx2-volume-range::-moz-range-thumb {
  border-radius: 50%;
  border: 2px solid rgba(76, 46, 0, 0.88);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 236, 186, 0.96) 12%, rgba(223, 171, 58, 0.98) 35%, rgba(149, 91, 10, 0.98) 66%, rgba(77, 43, 0, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 8px rgba(0, 0, 0, 0.24),
    0 4px 9px rgba(0, 0, 0, 0.34);
}

.pre-run-settings-gfx2-volume-range-vertical {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240%;
  height: 12px;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  -webkit-appearance: none;
  appearance: none;
  cursor: ns-resize;
  touch-action: none;
}

.pre-run-settings-gfx2-volume-range-vertical::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin: 0;
}

.pre-run-settings-gfx2-volume-range-vertical::-moz-range-thumb {
  width: 28px;
  height: 28px;
}

.pre-run-settings-gfx2-volume-range-horizontal {
  width: calc(100% - 104px);
  height: 34px;
  -webkit-appearance: none;
  appearance: none;
  accent-color: transparent;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.pre-run-settings-gfx2-volume-range-horizontal::-webkit-slider-runnable-track {
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.pre-run-settings-gfx2-volume-range-horizontal::-moz-range-track {
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.pre-run-settings-gfx2-volume-range-horizontal::-moz-range-progress {
  background: transparent;
}

.pre-run-settings-gfx2-volume-range-horizontal::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -6px;
}

.pre-run-settings-gfx2-volume-range-horizontal::-moz-range-thumb {
  width: 24px;
  height: 24px;
}

.pre-run-settings-gfx2-hitbox-exit {
  left: 2.1%;
  top: 3.1%;
  width: 14%;
  height: 9.2%;
}

.pre-run-settings-gfx2-hitbox-account {
  right: 2.1%;
  top: 3.1%;
  width: 14%;
  height: 9.2%;
  border-radius: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(255, 234, 182, 0.98), rgba(214, 153, 37, 0.98));
  border: 4px solid rgba(92, 49, 0, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 18px rgba(0, 0, 0, 0.18);
  color: #4d2600;
  font-size: clamp(14px, 1.3vw, 20px);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.pre-run-settings-gfx2-hitbox-account:hover,
.pre-run-settings-gfx2-hitbox-account:focus-visible,
.pre-run-settings-gfx2-hitbox-account:active {
  background: linear-gradient(180deg, rgba(255, 243, 207, 1), rgba(231, 169, 52, 1));
  border-color: rgba(112, 60, 0, 0.9);
  outline: none;
}

.pre-run-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 3px solid rgba(8, 41, 58, 0.18);
  border-radius: 22px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.42)),
    url("assets/start%20screen%20bkg.png") center / cover no-repeat;
  box-shadow: 0 14px 26px rgba(8, 41, 58, 0.08);
}

.pre-run-settings-copy h3 {
  margin: 0 0 4px 0;
  font-size: clamp(22px, 2.3vw, 28px);
  color: #08293a;
}

.pre-run-settings-copy p {
  margin: 0;
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.2;
  color: #375364;
}

.pre-run-settings-toggle {
  align-self: center;
  min-width: 104px;
  min-height: 48px;
  padding: 6px 18px;
  border: 3px solid #08293a;
  border-radius: 999px;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 24px rgba(8, 41, 58, 0.08);
}

.pre-run-settings-toggle.is-on {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #d9ffd7 0%, #8fe18b 100%);
  color: #0f3517;
}

.pre-run-settings-toggle.is-off {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #f4e2e2 0%, #d6b7b7 100%);
  color: #6a2323;
}

.pre-run-settings-account-btn {
  display: block;
  margin: 18px auto 0;
  min-width: min(320px, 84vw);
  padding: 14px 20px;
  border: 3px solid rgba(242, 214, 160, 0.85);
  border-radius: 18px;
  background: linear-gradient(180deg, #7d5520 0%, #4d2e0f 100%);
  color: #fff5d7;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.25);
}

.pre-run-settings-account-btn:hover {
  filter: brightness(1.08);
}


.pre-run-shop-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pre-run-shop-summary-card,
.pre-run-shop-card {
  border: 3px solid rgba(8, 41, 58, 0.18);
  border-radius: 24px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.42)),
    url("assets/start%20screen%20bkg.png") center / cover no-repeat;
  box-shadow: 0 14px 26px rgba(8, 41, 58, 0.08);
}

.pre-run-shop-summary-card {
  text-align: center;
}

.pre-run-shop-summary-card strong {
  display: block;
  font-size: clamp(20px, 2.1vw, 32px);
  line-height: 1;
  color: #08293a;
  margin-bottom: 6px;
}

.pre-run-shop-summary-card span {
  display: block;
  font-size: clamp(12px, 1vw, 16px);
  color: #375364;
}

.pre-run-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.pre-run-shop-card h3 {
  margin: 0 0 10px 0;
  font-size: clamp(18px, 1.8vw, 28px);
  color: #08293a;
}

.pre-run-shop-card p {
  margin: 0;
  font-size: clamp(12px, 0.95vw, 16px);
  line-height: 1.3;
  color: #375364;
}

.pre-run-shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.pre-run-shop-action-btn {
  min-height: 42px;
  padding: 7px 14px;
  border: 3px solid #08293a;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #fff2be 0%, #f5c55f 100%);
  color: #5a3812;
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 24px rgba(8, 41, 58, 0.08);
}

.pre-run-shop-action-btn:hover {
  transform: translateY(-2px);
}

.pre-run-shop-action-btn:disabled {
  cursor: default;
  filter: grayscale(0.22);
  opacity: 0.68;
  transform: none;
}

.pre-run-shop-status {
  min-height: 2.6em;
  font-size: clamp(12px, 0.95vw, 16px);
  font-weight: 700;
  color: #123c5d;
}

.pre-run-shop-gfx2 {
  width: 100%;
  min-height: min(720px, calc(100dvh - 36px));
}

.pre-run-shop-gfx2-scene {
  position: relative;
  width: 100%;
  height: min(720px, calc(100dvh - 36px));
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: url("assets/gfx2/shop_inside.jpg") center center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 0 6px rgba(8, 41, 58, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(8, 41, 58, 0.16);
}

.pre-run-shop-gfx2-hitbox {
  position: absolute;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  z-index: 8;
}

.pre-run-shop-gfx2-hitbox.is-sold::after {
  content: "SOLD";
  position: absolute;
  left: 50%;
  top: calc(50% - 10px);
  transform: translate(-50%, -50%) rotate(-25deg);
  min-width: 46%;
  padding: 0.11em 0.2em;
  border-radius: 0.18em;
  background: rgba(95, 18, 18, 0.82);
  color: #ffd46a;
  font-size: clamp(15px, 1.4vw, 22px);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 8px rgba(255, 220, 120, 0.22);
  box-shadow:
    0 0 0 2px rgba(255, 212, 120, 0.6),
    0 8px 18px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  z-index: 10;
}

.pre-run-shop-gfx2-hitbox.is-sold::before {
  content: "";
  position: absolute;
  inset: 12% 10%;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(255, 236, 164, 0.18),
    rgba(255, 236, 164, 0.02) 32%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
  z-index: 9;
}

.pre-run-shop-gfx2-hitbox:hover {
  box-shadow: none;
}

.pre-run-shop-gfx2-hitbox:focus-visible {
  outline: none;
}

@media (hover: none) and (pointer: coarse) {

  .pre-run-shop-gfx2-hitbox:hover,
  .pre-run-shop-gfx2-hitbox:focus,
  .pre-run-shop-gfx2-hitbox:focus-visible,
  .pre-run-shop-gfx2-hitbox:active {
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
  }
}

.pre-run-shop-gfx2-hitbox-exit {
  left: 4.5%;
  top: 7%;
  width: 14%;
  height: 12%;
}

.pre-run-shop-gfx2-hitbox-new-level {
  left: 19%;
  top: 12.7%;
  width: 15.5%;
  height: 8%;
}

.pre-run-shop-gfx2-hitbox-skin-cat {
  left: 7.3%;
  top: 27.3%;
  width: 7.36%;
  height: 14.4%;
}

.pre-run-shop-gfx2-hitbox-skin-cube {
  left: 16.2%;
  top: 27.3%;
  width: 8.4%;
  height: 14.4%;
}

.pre-run-shop-gfx2-hitbox-skin-wizard {
  left: 24.3%;
  top: 27.3%;
  width: 10.8%;
  height: 14.4%;
}

.pre-run-shop-gfx2-hitbox-skin-06 {
  left: 24.3%;
  top: 27.3%;
  width: 10.8%;
  height: 14.4%;
}

.pre-run-shop-gfx2-hitbox-chest {
  left: 5.1%;
  top: 42.32%;
  width: 11.4%;
  height: 10.6%;
}

.pre-run-shop-gfx2-hitbox-coin-one {
  left: 16.4%;
  top: 43.9%;
  width: 8.5%;
  height: 9.1%;
}

.pre-run-shop-gfx2-hitbox-coin-ten {
  left: 25.9%;
  top: 43.9%;
  width: 8.8%;
  height: 9.1%;
}

.pre-run-shop-gfx2-board {
  position: absolute;
  left: 42.2%;
  top: 14.8%;
  width: 52.1%;
  height: 43.5%;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9vw, 12px);
  padding: clamp(12px, 1.7vw, 20px);
  z-index: 3;
  color: #f2f9ff;
  text-shadow: 0 2px 2px rgba(5, 15, 22, 0.45);
  overflow: visible;
  pointer-events: none;
}

.pre-run-shop-gfx2-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(16px, 1.4vw, 24px);
}

.pre-run-shop-gfx2-label {
  font-size: clamp(16px, 1.8vw, 28px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.08;
  padding-left: clamp(18px, 1.8vw, 26px);
  max-width: 44%;
}

.pre-run-shop-gfx2-value {
  font-size: clamp(16px, 1.8vw, 28px);
  font-weight: 900;
  line-height: 1.08;
  text-align: right;
  max-width: 54%;
  overflow-wrap: anywhere;
}

#pre-run-shop-gfx2-selection-value {
  color: #ff8172;
}

.pre-run-shop-gfx2-divider {
  margin-top: 2px;
  border-top: 2px solid rgba(255, 255, 255, 0.45);
}

.pre-run-shop-gfx2-board.is-welcome .pre-run-shop-gfx2-divider,
.pre-run-shop-gfx2-board.is-welcome .pre-run-shop-gfx2-row--selection,
.pre-run-shop-gfx2-board.is-welcome .pre-run-shop-gfx2-row--cost {
  display: none;
}

.pre-run-shop-gfx2-status {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 86%;
  transform: translate(-50%, -100%);
  margin: 0;
  min-height: 0;
  font-size: clamp(26px, 2.5vw, 40px);
  font-weight: 800;
  color: #deefff;
  line-height: 1.1;
  padding: 0;
  text-align: center;
  pointer-events: none;
}

.pre-run-shop-gfx2-status.is-error {
  color: #ffcfb3;
}

.pre-run-shop-gfx2-status.is-success {
  color: #c9ffd8;
}

.pre-run-shop-gfx2-buy-btn {
  position: absolute;
  z-index: 9;
  left: 77.5%;
  top: 87.5%;
  transform: translate(50%, 0);
  min-width: clamp(96px, 9.5vw, 132px);
  min-height: clamp(34px, 3.8vw, 46px);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: url("assets/gfx2/shop_scr/buy.png") center center / 100% 100% no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
  image-rendering: pixelated;
  pointer-events: auto;
}

.pre-run-shop-gfx2-buy-btn:hover {
  transform: translate(50%, -2px);
}

.pre-run-classic-gfx2 {
  width: 100%;
  min-height: min(720px, calc(100dvh - 36px));
}

.pre-run-classic-gfx2-scene {
  position: relative;
  width: 100%;
  height: min(720px, calc(100dvh - 36px));
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: url("assets/gfx2/Classic_inside_blank.jpg") center center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 0 6px rgba(8, 41, 58, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 18px 34px rgba(8, 41, 58, 0.16);
}

.pre-run-advanced-gfx2-scene {
  background-image: url("assets/gfx2/advanced_iside_blank.jpg");
}

.pre-run-classic-gfx2-skin-slot {
  position: absolute;
  width: 11.59%;
  height: 16.99%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  image-rendering: pixelated;
}

.pre-run-classic-gfx2-skin-slot-1 {
  left: 8.72%;
  top: 26.07%;
}

.pre-run-classic-gfx2-skin-slot-2 {
  left: 21.35%;
  top: 26.07%;
}

.pre-run-classic-gfx2-skin-slot-3 {
  left: 33.20%;
  top: 26.07%;
  transform: scale(1.07);
  transform-origin: center center;
}

.pre-run-classic-gfx2-skin-slot-4 {
  left: 8.53%;
  top: 45.12%;
}

.pre-run-classic-gfx2-skin-slot-5 {
  left: 21.24%;
  top: 45.21%;
}

.pre-run-classic-gfx2-skin-slot-6 {
  left: 33.27%;
  top: 45.31%;
}

.pre-run-classic-gfx2-floor-skin {
  position: absolute;
  width: 13.8%;
  height: 17.4%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
  image-rendering: pixelated;
}

.pre-run-classic-gfx2-floor-skin-7 {
  left: 11.4%;
  top: 75.6%;
}

.pre-run-advanced-gfx2-skin-slot {
  position: absolute;
  width: 11.59%;
  height: 16.99%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  image-rendering: pixelated;
}

.pre-run-advanced-gfx2-skin-slot-1 {
  left: 8.72%;
  top: 26.07%;
}

.pre-run-advanced-gfx2-skin-slot-2 {
  left: 21.35%;
  top: 26.07%;
}

.pre-run-advanced-gfx2-skin-slot-3 {
  left: 33.20%;
  top: 26.07%;
  transform: scale(1.07);
  transform-origin: center center;
}

.pre-run-advanced-gfx2-skin-slot-4 {
  left: 8.53%;
  top: 45.12%;
}

.pre-run-advanced-gfx2-skin-slot-5 {
  left: 21.24%;
  top: 45.21%;
}

.pre-run-advanced-gfx2-skin-slot-6 {
  left: 33.27%;
  top: 45.31%;
}

.pre-run-classic-gfx2-hitbox {
  position: absolute;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.pre-run-classic-gfx2-hitbox:hover {
  box-shadow: none;
}

.pre-run-classic-gfx2-hitbox:focus-visible {
  outline: none;
}

.pre-run-classic-gfx2-hitbox.selected {
  box-shadow: none;
}

.pre-run-classic-gfx2-hitbox.locked,
.pre-run-classic-gfx2-hitbox.future {
  cursor: default;
  box-shadow: none;
}

.pre-run-classic-gfx2-hitbox-exit {
  left: 2.2%;
  top: 3.4%;
  width: 12.1%;
  height: 8.8%;
}

.pre-run-classic-gfx2-hitbox-admin {
  right: 2.4%;
  top: 3.4%;
  width: 15.2%;
  height: 8.8%;
  z-index: 12;
}

.pre-run-classic-gfx2-hitbox-start {
  left: 37.3%;
  top: 76.6%;
  width: 24.2%;
  height: 10.4%;
}

.pre-run-classic-gfx2-hitbox-skin-1,
.pre-run-classic-gfx2-hitbox-skin-2,
.pre-run-classic-gfx2-hitbox-skin-3,
.pre-run-classic-gfx2-hitbox-skin-4,
.pre-run-classic-gfx2-hitbox-skin-future-1,
.pre-run-classic-gfx2-hitbox-skin-future-2 {
  width: 10.2%;
  height: 18.2%;
}

.pre-run-classic-gfx2-hitbox-skin-6 {
  width: 10.2%;
  height: 18.2%;
}

.pre-run-classic-gfx2-hitbox-skin-1 {
  left: 9.92%;
  top: 26.8%;
}

.pre-run-classic-gfx2-hitbox-skin-2 {
  left: 21.64%;
  top: 26.8%;
}

.pre-run-classic-gfx2-hitbox-skin-3 {
  left: 33.27%;
  top: 26.8%;
}

.pre-run-classic-gfx2-hitbox-skin-4 {
  left: 9.92%;
  top: 46.9%;
}

.pre-run-classic-gfx2-hitbox-skin-future-1 {
  left: 21.64%;
  top: 46.9%;
}

.pre-run-classic-gfx2-hitbox-skin-future-2 {
  left: 33.27%;
  top: 46.9%;
}

.pre-run-classic-gfx2-hitbox-skin-6 {
  left: 33.27%;
  top: 46.9%;
}

.pre-run-classic-gfx2-hitbox-skin-7 {
  left: 11.4%;
  top: 75.6%;
  width: 13.8%;
  height: 17.4%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: 3;
}

.pre-run-classic-gfx2-board {
  --classic-board-title-size: 24px;
  --classic-board-copy-size: 18px;
  --classic-board-note-size: 13px;
  --classic-board-gap: 5px;
  --classic-board-section-gap: 4px;
  --classic-board-divider-gap: 1px;
  --classic-board-row-gap: 9px;
  position: absolute;
  left: 52.4%;
  top: 18.5%;
  width: 39.9%;
  height: 51.5%;
  display: flex;
  flex-direction: column;
  gap: var(--classic-board-gap);
  padding: clamp(12px, 1.35vw, 18px) clamp(12px, 1.35vw, 18px) clamp(12px, 1.35vw, 18px) clamp(24px, 2.45vw, 34px);
  color: #f4ecbf;
  text-shadow: 0 2px 2px rgba(44, 28, 8, 0.34);
  overflow: visible;
  z-index: 1;
}

.pre-run-classic-gfx2-row-difficulty {
  align-items: center;
  order: -2;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.pre-run-classic-gfx2-row-difficulty .pre-run-difficulty-toggle {
  margin-left: auto;
  transform: translateX(10%);
}

.pre-run-classic-gfx2-row-difficulty .pre-run-difficulty-toggle:hover {
  transform: translateX(10%);
}

.pre-run-classic-gfx2-row-level {
  order: -1;
  margin-top: 6px;
}

.pre-run-classic-gfx2-row-lives {
  order: 0;
}

.pre-run-classic-gfx2-board.is-between-levels {
  --classic-board-gap: 4px;
  --classic-board-section-gap: 3px;
  --classic-board-divider-gap: 0px;
  --classic-board-row-gap: 8px;
}

.pre-run-classic-gfx2-board.is-between-levels .pre-run-classic-gfx2-row-difficulty,
.pre-run-classic-gfx2-board.is-between-levels .pre-run-classic-gfx2-note {
  display: none;
}

.pre-run-classic-gfx2-board-top,
.pre-run-classic-gfx2-section {
  display: flex;
  flex-direction: column;
  gap: var(--classic-board-section-gap);
}

.pre-run-classic-gfx2-section:last-child {
  margin-top: 10px;
}

.pre-run-classic-gfx2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--classic-board-row-gap);
}

.pre-run-classic-gfx2-row-level {
  margin-bottom: 12px;
}

.pre-run-classic-gfx2-label,
.pre-run-classic-gfx2-value,
.pre-run-classic-gfx2-heading,
.pre-run-classic-gfx2-controls,
.pre-run-classic-gfx2-goal-value,
.pre-run-classic-gfx2-note {
  font-family: inherit;
}

.pre-run-classic-gfx2-label,
.pre-run-classic-gfx2-value,
.pre-run-classic-gfx2-heading {
  font-size: var(--classic-board-title-size);
  line-height: 0.96;
  font-weight: 900;
}

.pre-run-classic-gfx2-row-level .pre-run-classic-gfx2-label,
.pre-run-classic-gfx2-row-level .pre-run-classic-gfx2-value {
  font-size: calc(var(--classic-board-title-size) * 2);
  line-height: 0.92;
}

.pre-run-classic-gfx2-value {
  color: #fff4d0;
}

.pre-run-classic-gfx2-heading,
.pre-run-classic-gfx2-goal-value,
.pre-run-classic-gfx2-controls {
  margin: 0;
}

.pre-run-classic-gfx2-divider {
  border-top: 2px solid rgba(255, 255, 255, 0.46);
  margin: calc(var(--classic-board-divider-gap) * 2.5) 0;
}

.pre-run-classic-gfx2-difficulty-buttons {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.pre-run-classic-gfx2-difficulty-btn {
  min-width: 76px;
  min-height: 17px;
  padding: 1px 24px;
  border: 2px solid rgba(75, 48, 13, 0.72);
  border-radius: 999px;
  background: rgba(82, 54, 18, 0.26);
  color: #fff2c6;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 900;
  cursor: pointer;
}

.pre-run-classic-gfx2-difficulty-btn.selected {
  background: rgba(255, 239, 180, 0.34);
  box-shadow: inset 0 0 0 2px rgba(255, 252, 234, 0.52);
}

.pre-run-classic-gfx2-difficulty-btn.locked {
  opacity: 0.7;
}

.pre-run-classic-gfx2-note {
  margin: -2px 0 0;
  min-height: 1em;
  font-size: var(--classic-board-note-size);
  font-weight: 800;
  color: #ffd7af;
}

.pre-run-classic-gfx2-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--classic-board-copy-size);
  line-height: 1;
  font-weight: 700;
}

.pre-run-classic-gfx2-controls p {
  margin: 0;
}

.pre-run-classic-gfx2-controls ul {
  margin: 0;
  padding-left: 1.2em;
}

.pre-run-classic-gfx2-controls li+li {
  margin-top: 0;
}

.pre-run-classic-gfx2-goal-value {
  font-size: 15px;
  line-height: 1.03;
  font-weight: 800;
}

.pre-run-classic-gfx2-section .pre-run-classic-gfx2-heading {
  font-size: 18px;
  line-height: 1.03;
}

.pre-run-classic-gfx2-goal-value .goal-score {
  color: #ff8f76;
}

@media (max-width: 980px) {
  .pre-run-select-topbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .pre-run-side-btn {
    min-height: 34px;
    padding: 5px 8px;
    font-size: clamp(11px, 1.8vw, 14px);
  }

  .pre-run-settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pre-run-settings-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .pre-run-shop-summary,
  .pre-run-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pre-run-shop-gfx2-scene {
    height: min(640px, calc(100dvh - 30px));
    min-height: 380px;
  }

  .pre-run-classic-gfx2-scene {
    height: min(640px, calc(100dvh - 30px));
    min-height: 380px;
  }

  .pre-run-settings-gfx2-scene {
    height: min(640px, calc(100dvh - 30px));
    min-height: 380px;
  }

  .pre-run-shop-gfx2-board {
    left: 41.9%;
    top: 14.4%;
    width: 52.4%;
    height: 43.4%;
    padding: clamp(10px, 1.5vw, 16px);
    gap: clamp(4px, 0.8vw, 10px);
  }

  .pre-run-classic-gfx2-board {
    left: 51.2%;
    top: 18.1%;
    width: 42.2%;
    height: 52.2%;
    padding: clamp(10px, 1.15vw, 14px) clamp(10px, 1.15vw, 14px) clamp(10px, 1.15vw, 14px) clamp(20px, 1.9vw, 27px);
  }
}

@media (max-width: 760px) {
  .pre-run-select-topbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .pre-run-side-btn {
    min-height: 30px;
    padding: 4px 6px;
    font-size: clamp(10px, 2vw, 12px);
    border-width: 2px;
  }

  .pre-run-settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pre-run-shop-summary {
    gap: 8px;
  }

  .pre-run-shop-summary-card,
  .pre-run-shop-card {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .pre-run-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pre-run-shop-card h3 {
    font-size: clamp(15px, 2.3vw, 20px);
    margin-bottom: 8px;
  }

  .pre-run-shop-card p,
  .pre-run-shop-status {
    font-size: clamp(11px, 1.6vw, 13px);
    line-height: 1.25;
  }

  .pre-run-shop-action-btn {
    min-height: 36px;
    padding: 6px 10px;
    font-size: clamp(11px, 1.5vw, 13px);
    border-width: 2px;
  }

  .pre-run-shop-gfx2-scene {
    height: min(520px, calc(100dvh - 22px));
    min-height: 320px;
    border-radius: 18px;
  }

  .pre-run-classic-gfx2-scene {
    height: min(520px, calc(100dvh - 22px));
    min-height: 320px;
    border-radius: 18px;
  }

  .pre-run-settings-gfx2-scene {
    height: min(520px, calc(100dvh - 22px));
    min-height: 320px;
    border-radius: 18px;
  }

  .pre-run-settings-gfx2-hitbox-music-graphic {
    left: 12.8%;
    top: 15.2%;
    width: 30%;
    height: 45%;
  }

  .pre-run-settings-gfx2-hitbox-sfx-graphic {
    right: 13%;
    top: 15.7%;
    width: 30%;
    height: 43%;
  }

  .pre-run-shop-gfx2-hitbox:hover {
    box-shadow: inset 0 0 0 2px rgba(255, 241, 176, 0.84);
  }

  .pre-run-shop-gfx2-board {
    left: 41.5%;
    top: 13.8%;
    width: 53.3%;
    height: 51.5%;
    padding: 8px;
    gap: 4px;
  }

  .pre-run-shop-gfx2-label,
  .pre-run-shop-gfx2-value {
    font-size: clamp(20px, 3.4vw, 26px);
  }

  .pre-run-shop-gfx2-label {
    padding-left: 12px;
  }

  .pre-run-shop-gfx2-status {
    left: 50%;
    top: 84.5%;
    transform: translateX(-50%);
    min-height: 0;
    font-size: clamp(18px, 3vw, 22px);
    padding: 0;
    width: 46%;
    max-width: 46%;
    text-align: center;
  }

  .pre-run-shop-gfx2-buy-btn {
    min-width: 128px;
    min-height: 42px;
    padding: 0;
    border-width: 0;
    font-size: 0;
    left: 78%;
    top: 90.5%;
    transform: translate(50%, 0);
  }

  .pre-run-classic-gfx2-board {
    left: 49.2%;
    top: 17.9%;
    width: 46.2%;
    height: 53%;
    padding: 8px 8px 10px 18px;
    gap: 4px;
  }

  .pre-run-classic-gfx2-floor-skin {
    width: 15.2%;
    height: 18.9%;
  }

  .pre-run-classic-gfx2-floor-skin-7,
  .pre-run-classic-gfx2-hitbox-skin-7 {
    left: 11.0%;
    top: 74.8%;
  }

  .pre-run-classic-gfx2-hitbox-skin-7 {
    width: 15.2%;
    height: 18.9%;
  }

  .pre-run-classic-gfx2-label,
  .pre-run-classic-gfx2-value,
  .pre-run-classic-gfx2-heading {
    font-size: clamp(15px, 2.15vw, 20px);
  }

  .pre-run-classic-gfx2-controls,
  .pre-run-classic-gfx2-goal-value {
    font-size: clamp(13px, 1.75vw, 16px);
  }

  .pre-run-classic-gfx2-difficulty-btn {
    min-width: 58px;
    min-height: 14px;
    padding: 0 18px;
    font-size: clamp(11px, 1.6vw, 14px);
  }
}

.pre-run-scores-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pre-run-scores-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 16px;
  align-items: center;
}

.pre-run-credits-meta {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pre-run-scores-heading {
  grid-column: 2;
  text-align: center;
}

.pre-run-scores-heading h2 {
  margin: 0;
  font-size: clamp(48px, 5.8vw, 72px);
  line-height: 1;
  color: #08293a;
}

.pre-run-scores-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pre-run-scores-grid-gfx2 {
  position: absolute;
  inset: 0;
  display: block;
}

.pre-run-scores-board {
  border: 3px solid rgba(8, 41, 58, 0.18);
  border-radius: 28px;
  min-height: 320px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.4)),
    url("assets/start%20screen%20bkg.png") center / cover no-repeat;
  box-shadow: 0 14px 26px rgba(8, 41, 58, 0.08);
  display: flex;
  flex-direction: column;
}

.pre-run-scores-grid-gfx2 .pre-run-scores-board {
  position: absolute;
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: clamp(12px, 1.2vw, 18px);
  background: transparent;
  box-shadow: none;
  color: #f6f0d1;
}

.pre-run-scores-grid-gfx2 .pre-run-scores-board-header h3 {
  color: #f7f2d8;
  font-size: clamp(36px, 2.8vw, 56px);
  text-align: center;
}

.pre-run-scores-grid-gfx2 .pre-run-scores-status,
.pre-run-scores-grid-gfx2 .pre-run-scores-list li {
  color: #f6f0d1;
}

.pre-run-scores-grid-gfx2 .pre-run-scores-status {
  font-size: clamp(24px, 2.4vw, 38px);
}

.pre-run-scores-grid-gfx2 .pre-run-scores-list li {
  font-size: clamp(22px, 2.2vw, 42px);
}

.pre-run-scores-grid-gfx2 .pre-run-scores-list li strong {
  color: #fff9e8;
}

.pre-run-scores-board-jump_easy {
  left: 3.45%;
  top: 9.82%;
  width: 44.08%;
  height: 41.2%;
}

.pre-run-scores-board-jump_hard {
  left: 52.28%;
  top: 9.82%;
  width: 44.27%;
  height: 41.2%;
}

.pre-run-scores-board-full_easy {
  left: 3.45%;
  top: 54.72%;
  width: 44.08%;
  height: 41.2%;
}

.pre-run-scores-board-full_hard {
  left: 52.28%;
  top: 54.72%;
  width: 44.27%;
  height: 41.2%;
}

.pre-run-scores-board-header h3 {
  margin: 0;
  font-size: clamp(52px, 5.6vw, 72px);
  line-height: 1.05;
  color: #08293a;
  text-align: center;
}

.pre-run-scores-status {
  margin: 10px 0 0 0;
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.35;
  color: #355364;
  text-align: center;
}

.pre-run-scores-list {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pre-run-scores-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  font-size: clamp(22px, 2.2vw, 42px);
  color: #113450;
  font-weight: 700;
  line-height: 1.04;
}

.pre-run-scores-list li span {
  min-width: 0;
}

.pre-run-scores-list li strong {
  color: #0a2740;
  white-space: nowrap;
}

.pre-run-badges-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.pre-run-badges-topbar {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.pre-run-badges-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1;
  color: #08293a;
}

.pre-run-badges-heading p {
  margin: 10px 0 0 0;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.35;
  color: #355364;
  max-width: 780px;
}

.pre-run-badges-summary {
  display: grid;
  grid-template-columns: minmax(260px, 420px);
  gap: 14px;
  justify-content: center;
}

.pre-run-badges-summary-card {
  border: 3px solid rgba(8, 41, 58, 0.18);
  border-radius: 22px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.38)),
    url("assets/start%20screen%20bkg.png") center / cover no-repeat;
  box-shadow: 0 12px 24px rgba(8, 41, 58, 0.08);
  text-align: center;
}

.pre-run-badges-summary-card strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  color: #08293a;
}

.pre-run-badges-summary-card span {
  display: block;
  margin-top: 4px;
  font-size: clamp(15px, 1.7vw, 21px);
  color: #436171;
  font-weight: 700;
}

.pre-run-badges-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pre-run-badges-intro {
  border-radius: 20px;
  padding: 14px 18px;
  background: rgba(255, 251, 235, 0.9);
  border: 2px solid rgba(208, 155, 23, 0.2);
  color: #5b3510;
}

.pre-run-badges-intro p {
  margin: 0;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.35;
}

.pre-run-badges-intro p+p {
  margin-top: 8px;
}

.pre-run-badge-group {
  border-radius: 24px;
  padding: 16px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.42)),
    url("assets/start%20screen%20bkg.png") center / cover no-repeat;
  border: 3px solid rgba(8, 41, 58, 0.12);
  box-shadow: 0 14px 28px rgba(8, 41, 58, 0.08);
}

.pre-run-badge-group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: end;
  margin-bottom: 14px;
}

.pre-run-badge-group-header h3 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1;
  color: #08293a;
}

.pre-run-badge-group-header p {
  margin: 8px 0 0 0;
  grid-column: 1 / 2;
  font-size: clamp(16px, 1.8vw, 22px);
  color: #375364;
}

.pre-run-badge-group-count {
  align-self: start;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(8, 41, 58, 0.08);
  color: #23485d;
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 800;
  white-space: nowrap;
}

.pre-run-badge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.pre-run-badge-card {
  border-radius: 22px;
  border: 3px solid rgba(8, 41, 58, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 250, 0.82));
  padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(8, 41, 58, 0.08);
}

.pre-run-badge-card-header h3 {
  margin: 8px 0 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  color: #08293a;
}

.pre-run-badge-card-header p {
  margin: 8px 0 0 0;
  min-height: 44px;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.35;
  color: #466372;
}

.pre-run-badge-tier-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pre-run-badge-tier {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(8, 41, 58, 0.08);
}

.pre-run-badge-tier.is-unlocked {
  box-shadow: 0 10px 20px rgba(8, 41, 58, 0.06);
}

.pre-run-badge-tier.is-locked {
  opacity: 0.52;
  border-color: rgba(8, 41, 58, 0.04);
  background: rgba(239, 243, 247, 0.84);
  filter: grayscale(1);
  box-shadow: none;
}

.pre-run-badge-tier.is-locked .pre-run-badge-medal {
  filter: grayscale(1) brightness(1.02) contrast(0.86);
}

.pre-run-badge-tier.is-locked .pre-run-badge-tier-label,
.pre-run-badge-tier.is-locked .pre-run-badge-tier-date,
.pre-run-badge-tier.is-locked .pre-run-badge-tier-value {
  color: #6f7f8b;
}

.pre-run-badge-medal-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pre-run-badge-medal {
  width: 56px;
  height: 56px;
  background-image: url("assets/badges/badges.png");
  background-repeat: no-repeat;
  background-size: 300% 100%;
  filter: drop-shadow(0 4px 8px rgba(8, 41, 58, 0.18));
}

.badge-sprite-bronze {
  background-position: 0 50%;
  filter:
    sepia(0.95) saturate(1.6) hue-rotate(-16deg) brightness(0.92) drop-shadow(0 4px 8px rgba(8, 41, 58, 0.18));
}

.badge-sprite-silver {
  background-position: 50% 50%;
  filter:
    grayscale(1) brightness(1.24) contrast(0.92) drop-shadow(0 4px 8px rgba(8, 41, 58, 0.18));
}

.badge-sprite-gold {
  background-position: 100% 50%;
}

.pre-run-badge-tier-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pre-run-badge-tier-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pre-run-badge-tier-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a631d;
}

.pre-run-badge-tier-date {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6e8191;
  white-space: nowrap;
}

.pre-run-badge-tier-value {
  font-size: clamp(14px, 1.45vw, 18px);
  line-height: 1.25;
  color: #15364a;
  font-weight: 700;
}

.pre-run-lock-note {
  display: block;
  font-size: clamp(12px, 1.2vw, 16px);
  line-height: 1.2;
  font-weight: 700;
  color: #b51616;
}

.pre-run-difficulty-toggle.locked,
.pre-run-mode-card.locked {
  filter: none;
  opacity: 1;
}

.pre-run-difficulty-toggle.locked {
  border-color: transparent;
  box-shadow: none;
}

.pre-run-mode-card.locked {
  border-color: #70848f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 22px rgba(8, 41, 58, 0.06);
}

.pre-run-mode-card.locked .pre-run-lock-note {
  color: #c81414 !important;
  opacity: 1;
  text-shadow: none;
}

.pre-run-phone-art {
  width: min(190px, 100%);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(8, 41, 58, 0.08);
}

.pre-run-phone-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.pre-run-detail-header {
  display: grid;
  grid-template-columns: 155px minmax(180px, 220px) minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px 10px;
  margin-bottom: 20px;
}

.pre-run-compact-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: min(420px, calc(100dvh - 120px));
}

.pre-run-compact-top {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  gap: 20px;
}

.pre-run-compact-heading {
  text-align: center;
}

.pre-run-compact-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1;
  color: #08293a;
}

.pre-run-compact-goal-line {
  margin-top: 12px;
  color: #08293a;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.25;
}

.pre-run-compact-start-btn {
  flex: 1 1 auto;
  width: 100%;
  min-height: min(260px, calc(100dvh - 260px));
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #08293a;
  font-weight: 800;
  font-size: clamp(64px, 10vw, 132px);
  cursor: pointer;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pre-run-compact-start-label {
  display: block;
  width: 100%;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-align: center;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pre-run-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 155px;
}

.pre-run-back-btn,
#pre-run-tester-info-btn,
#pre-run-future-release-btn,
#pre-run-detail-admin-btn,
#pre-run-start-btn,
.pre-run-compact-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #08293a;
  border-radius: 999px;
  background: #fff;
  color: #08293a;
  font-weight: bold;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8em;
  min-height: 38px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 16px rgba(8, 41, 58, 0.1);
}

#pre-run-detail-admin-btn,
.pre-run-compact-admin-btn {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#pre-run-back-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #ffd2d2 0%, #ff9f9f 100%);
}

#pre-run-tester-info-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #d8ecff 0%, #9dc7ee 100%);
  color: #123c5d;
}

#pre-run-future-release-btn {
  align-self: flex-start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #ffe8bf 0%, #ffbc6b 100%);
  color: #5b3510;
}

#pre-run-detail-admin-btn {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.94);
  color: #08293a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 16px rgba(8, 41, 58, 0.1);
}

#pre-run-future-release-btn,
#pre-run-detail-admin-btn {
  position: relative;
  width: 190px;
  min-width: 190px;
  min-height: 38px;
  font-size: 0.8em;
  text-align: center;
  z-index: 3;
}

#pre-run-start-btn {
  max-width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, #d9ffd7 0%, #8fe18b 100%);
}

.pre-run-compact-admin-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  color: #08293a;
  font-size: clamp(15px, 1.3vw, 20px);
  min-height: 40px;
  min-width: 92px;
  padding: 4px 10px;
  z-index: 3;
}

#pre-run-compact-back-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #08293a;
  font-size: clamp(15px, 1.3vw, 20px);
  min-height: 40px;
  min-width: 92px;
  padding: 4px 10px;
}

.pre-run-detail-heading h2 {
  margin: 0;
  font-size: clamp(23px, 2.7vw, 32px);
}

.pre-run-detail-heading p {
  margin: 6px 0 0 0;
  font-size: 18px;
  color: #375364;
}

.pre-run-detail-rules {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.pre-run-detail-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pre-run-skin-panel {
  width: min(760px, 100%);
  min-width: 280px;
  border: 2px solid #d7e0e6;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.48)),
    url("assets/start%20screen%20bkg.png") center / calc(100% + 18px) calc(100% + 18px) no-repeat;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.pre-run-skin-panel h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
}

.pre-run-skin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.pre-run-skin-btn {
  border: 2px solid #b8c8d4;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.52)),
    url("assets/start%20screen%20bkg.png") center / 100% 100% no-repeat;
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #08293a;
  min-height: 94px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 6px 14px rgba(8, 41, 58, 0.06);
}

.pre-run-skin-btn.selected {
  border-color: #d09b17;
  background: #fff4d1;
  box-shadow: none;
}

@media (hover: none) and (pointer: coarse) {

  .pre-run-skin-btn:hover,
  .pre-run-skin-btn:focus,
  .pre-run-skin-btn:focus-visible,
  .pre-run-skin-btn:active,
  .pre-run-skin-btn.selected {
    box-shadow: none !important;
    outline: none !important;
  }
}

.pre-run-skin-btn.locked,
.pre-run-skin-btn:disabled,
.pre-run-skin-btn.future {
  cursor: default;
  background:
    linear-gradient(180deg, rgba(247, 250, 252, 0.74), rgba(240, 245, 249, 0.68)),
    url("assets/start%20screen%20bkg.png") center / 100% 100% no-repeat;
}

.pre-run-skin-preview {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #e7f0f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(8, 41, 58, 0.12);
}

.pre-run-skin-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}

.pre-run-skin-preview img.pre-run-skin-preview-future {
  width: 40px;
  height: 40px;
  mix-blend-mode: multiply;
}

.pre-run-skin-btn.locked .pre-run-skin-preview img {
  filter:
    grayscale(1) brightness(0) drop-shadow(1px 0 0 #15364a) drop-shadow(-1px 0 0 #15364a) drop-shadow(0 1px 0 #15364a) drop-shadow(0 -1px 0 #15364a);
  opacity: 0.75;
}

.pre-run-skin-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.pre-run-skin-status {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  color: #516976;
}

.pre-run-skin-btn.selected .pre-run-skin-status {
  color: #8f6400;
  font-weight: 700;
}

.pre-run-skin-btn.future .pre-run-skin-status {
  color: #6a7f8d;
  font-weight: 700;
}

.pre-run-skin-copy {
  margin: 8px 0 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: #5a6f7c;
}

#pre-run-detail-level {
  font-weight: 700;
  color: #08293a;
}

.pre-run-detail-life-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0;
}

.pre-run-detail-life-rules span {
  white-space: nowrap;
}

.pre-run-detail-rule-note {
  display: block;
  margin-top: 2px;
  font-size: 0.78em;
  font-weight: 600;
}

.pre-run-detail-life-rules-linebreak {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.brief-life-rule-instant {
  color: #b51616;
  font-weight: 700;
}

.brief-life-rule-safe {
  color: #18613c;
  font-weight: 700;
}

.pre-run-detail-panel {
  border: 2px solid #d7e0e6;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.48)),
    url("assets/start%20screen%20bkg.png") center / calc(100% + 18px) calc(100% + 18px) no-repeat;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.pre-run-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.85fr);
  gap: 18px;
}

.pre-run-level-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(5%);
}

.pre-run-level-panel p {
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.2;
  color: #c81414;
  font-weight: 800;
}

.pre-run-detail-panel h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.pre-run-detail-panel p,
#pre-run-controls-copy p {
  margin: 8px 0;
  line-height: 1.35;
  font-size: 17px;
}

.brief-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  vertical-align: middle;
}

.brief-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: nowrap;
}

.pre-run-brief-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 26px;
}

.pre-run-brief-columns-single {
  grid-template-columns: minmax(0, 1fr);
}

.brief-money {
  width: 22px;
  height: 22px;
  background: center / contain no-repeat url("assets/moneybag-clean.png");
  margin-right: 6px;
}

.brief-coin {
  width: 22px;
  height: 22px;
  background: center / contain no-repeat url("assets/coin01-clean.png");
  margin-right: 6px;
}

.brief-live {
  width: 22px;
  height: 22px;
  background: center / contain no-repeat url("assets/heart01.png");
  margin-right: 6px;
}

.brief-blocker {
  width: 22px;
  height: 22px;
  background:
    linear-gradient(#111, #111) 0 22% / 100% 3px no-repeat,
    linear-gradient(#111, #111) 0 70% / 100% 3px no-repeat,
    linear-gradient(#111, #111) 12% 5% / 3px 90% no-repeat,
    linear-gradient(#111, #111) 78% 5% / 3px 90% no-repeat;
}

.brief-projectile {
  width: 32px;
  height: 18px;
  background: center / contain no-repeat url("assets/rocket01-clean.png");
  margin-right: 8px;
}

.brief-cracked-coin,
.brief-question-coin,
.brief-curse,
.brief-shield,
.brief-slow,
.brief-skin-pickup {
  width: 22px;
  height: 22px;
  margin-right: 6px;
}

.brief-cracked-coin {
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 38%, #6f4e17 39% 47%, transparent 48%),
    radial-gradient(circle, #f6d66f 0 43%, #d3a63a 44% 68%, transparent 69%);
}

.brief-question-coin {
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffe282 0 44%, #f0c94a 45% 68%, transparent 69%);
  position: relative;
}

.brief-question-coin::after {
  content: "?";
  position: absolute;
  inset: 0;
  font: 700 15px/22px Arial, sans-serif;
  color: #5d3fd3;
  text-align: center;
}

.brief-curse {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #171125 0 38%, #2b2345 39% 68%, transparent 69%);
  position: relative;
}

.brief-curse::after {
  content: "!";
  position: absolute;
  inset: 0;
  font: 700 14px/22px Arial, sans-serif;
  color: #b78cff;
  text-align: center;
}

.brief-shield {
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 10%, rgba(122, 231, 255, 0.28) 11% 58%, rgba(122, 231, 255, 0.9) 59% 66%, transparent 67%);
}

.brief-slow {
  position: relative;
  width: 24px;
  height: 24px;
  background: transparent;
  margin-right: 8px;
}

.brief-slow::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #f4c430;
  border: 1.8px solid #111;
  transform: rotate(45deg);
  transform-origin: center;
  box-sizing: border-box;
}

.brief-slow::after {
  content: "SLOW\A DOWN";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 4.8px/1 Arial, sans-serif;
  white-space: pre;
  text-align: center;
  color: #111;
  letter-spacing: -0.1px;
}

.brief-skin-pickup {
  border-radius: 8px;
  background:
    center / contain no-repeat url("assets/skins/Skin02/hero-icon.png"),
    linear-gradient(180deg, #f8fbff 0%, #dce9f5 100%);
  border: 1px solid rgba(8, 41, 58, 0.12);
}

body.visual-theme-retro .brief-money {
  width: 17px;
  height: 17px;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 45% 58%, #7abf32 0 38%, transparent 39%),
    radial-gradient(circle at 55% 58%, #95cf4a 0 52%, transparent 53%);
  position: relative;
}

body.visual-theme-retro .brief-money::after {
  content: "$";
  position: absolute;
  inset: 1px 0 0 0;
  font: 700 10px/17px Arial, sans-serif;
  color: #fff4b0;
  text-align: center;
}

body.visual-theme-retro .brief-coin {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #e7b73d 0 36%, #f2d45a 37% 62%, transparent 63%);
  position: relative;
}

body.visual-theme-retro .brief-coin::after {
  content: "$";
  position: absolute;
  inset: 0;
  font: 700 10px/17px Arial, sans-serif;
  color: #fff2b7;
  text-align: center;
}

body.visual-theme-retro .brief-live {
  background: none;
  color: #d93030;
  font: 700 20px/22px Arial, sans-serif;
  text-align: center;
}

body.visual-theme-retro .brief-live::before {
  content: "â™¡";
}

body.visual-theme-retro .brief-projectile {
  width: 21px;
  height: 12px;
  border-radius: 999px 4px 4px 999px;
  background:
    linear-gradient(90deg, #c81414 0 70%, #f08a2c 70% 100%);
}

body.visual-theme-modern .brief-blocker {
  background: center / contain no-repeat url("assets/blocker01-clean.png");
}

body.visual-theme-modern .brief-live::before,
body.visual-theme-retro .brief-money::before,
body.visual-theme-retro .brief-coin::before,
body.visual-theme-modern .brief-live::after,
body.visual-theme-modern .brief-money::after,
body.visual-theme-modern .brief-coin::after {
  content: none;
}

body.visual-theme-retro .brief-live {
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 C18 60 8 42 18 24 C28 8 46 16 50 30 C54 16 72 8 82 24 C92 42 82 60 50 90 Z' fill='none' stroke='%23000' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  color: transparent;
  font-size: 0;
}

body.visual-theme-retro .brief-live::before {
  content: none !important;
}

@media (max-width: 760px) {
  .pre-run-card {
    width: min(760px, 96vw);
    padding: 20px;
  }

  .pre-run-select-layout {
    grid-template-columns: 1fr;
  }

  .pre-run-difficulty-column {
    order: -1;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .pre-run-badges-summary {
    grid-template-columns: 1fr;
  }

  .pre-run-badge-group-header {
    grid-template-columns: 1fr;
  }

  .pre-run-badge-group-count {
    justify-self: start;
  }

  .pre-run-badge-card-grid {
    grid-template-columns: 1fr;
  }

  .pre-run-difficulty-toggle {
    width: clamp(180px, 19vw, 339px);
  }

  .pre-run-mode-card {
    min-height: 0;
  }

  .pre-run-detail-grid {
    grid-template-columns: 1fr;
  }

  .pre-run-brief-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pre-run-compact-shell {
    min-height: 0;
  }

  .pre-run-compact-top {
    grid-template-columns: 84px 1fr 84px;
  }

  .pre-run-compact-start-btn {
    min-height: 180px;
  }
}

@media (max-width: 1280px),
(max-height: 880px) {
  .game-over-banner {
    width: min(34vw, 289px);
    margin-bottom: 10px;
    position: static;
    transform: none;
  }

  #final-current-run {
    padding: 0 4px;
  }

  #final-current-run p {
    font-size: clamp(16px, 2.8vh, 28px);
    margin: 6px 0;
  }

  #final-highscores,
  #final-online-highscore {
    padding: 10px 16px 24px;
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
    transform: translateY(-20%);
  }

  #final-highscores h2,
  #final-online-highscore h2 {
    font-size: clamp(16px, 2vh, 22px);
    text-align: center;
  }

  #final-top-scores-status,
  #final-online-status,
  #final-top-scores-list li,
  #final-online-list li {
    font-size: 12px;
  }

  .pre-run-card {
    width: min(940px, 95vw);
    padding: 18px 20px;
  }

  .pre-run-brand {
    margin-bottom: 20px;
    font-size: clamp(44px, 7vw, 62px);
  }

  .pre-run-select-layout {
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 16px;
  }

  .pre-run-mode-card {
    min-height: 220px;
    padding: 20px 18px;
    gap: 14px;
    border-width: 8px;
  }

  .pre-run-mode-title {
    font-size: clamp(28px, 3.6vw, 42px);
  }

  .pre-run-mode-copy {
    font-size: clamp(15px, 1.5vw, 21px);
  }

  .pre-run-difficulty-column {
    gap: 12px;
  }

  .pre-run-difficulty-toggle,
  .pre-run-badges-btn,
  .pre-run-scores-btn {
    min-height: 0;
  }

  .pre-run-scores-topbar {
    grid-template-columns: 110px 1fr 110px;
    gap: 12px;
  }

  .pre-run-scores-heading h2 {
    font-size: clamp(36px, 5.2vw, 54px);
  }

  .pre-run-player-name-btn {
    min-height: 54px;
    font-size: clamp(16px, 1.6vw, 22px);
  }
}

@media (max-width: 1080px),
(max-height: 760px) {
  #game-over {
    justify-content: flex-start;
    padding: 14px 10px 18px;
  }

  .game-over-banner {
    width: min(35.7vw, 264px);
    margin-bottom: 10px;
    position: static;
    transform: none;
  }

  #final-current-run {
    order: 0;
    padding: 0 4px;
    transform: translateY(-2px);
  }

  #final-current-run p {
    font-size: clamp(16px, 2.8vh, 28px);
    margin: 4px 0;
  }

  #final-current-run .final-economy-line {
    font-size: clamp(14px, 2.15vh, 22px);
  }

  #final-highscores,
  #final-online-highscore {
    width: 100%;
    justify-self: stretch;
    padding: 10px 16px 24px;
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
    align-self: center;
    transform: translateY(-20%);
    min-height: min(78vh, 760px);
  }

  #final-highscores h2,
  #final-online-highscore h2 {
    font-size: clamp(16px, 2vh, 22px);
    text-align: center;
  }

  #final-top-scores-status,
  #final-online-status,
  #final-top-scores-list li,
  #final-online-list li {
    font-size: 12px;
  }

  #final-top-scores-list,
  #final-online-list {
    padding: 0 36px 0 18px;
  }

  .pre-run-card {
    width: min(880px, 96vw);
    padding: 14px 16px;
  }

  .pre-run-select-topbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .pre-run-select-layout {
    grid-template-columns: minmax(0, 1fr) 134px minmax(0, 1fr);
    gap: 12px;
  }

  .pre-run-mode-card {
    min-height: 0;
    padding: 16px 14px;
    gap: 10px;
    border-width: 6px;
  }

  .pre-run-mode-title {
    font-size: clamp(24px, 3.3vw, 36px);
  }

  .pre-run-mode-copy {
    font-size: clamp(14px, 1.35vw, 18px);
    line-height: 1.18;
  }

  .pre-run-difficulty-column {
    gap: 10px;
  }

  .pre-run-difficulty-toggle {
    width: clamp(180px, 19vw, 339px);
  }

  .pre-run-badges-btn {
    min-height: 66px;
    width: min(190px, 100%);
    font-size: clamp(20px, 2.4vw, 30px);
  }

  .pre-run-scores-btn {
    min-height: 58px;
    width: min(190px, 100%);
    font-size: clamp(18px, 2vw, 24px);
  }

  .pre-run-player-name-btn {
    width: min(190px, 100%);
    min-height: 50px;
    font-size: clamp(15px, 1.5vw, 20px);
  }
}

@media (max-width: 700px) {
  #game-over {
    justify-content: flex-start;
    padding: 18px 12px 24px;
  }

  .game-over-banner {
    width: min(37.4vw, 230px);
    margin-bottom: 8px;
    position: static;
    transform: none;
  }

  #game-over-layout {
    width: min(100%, 760px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #final-current-run {
    order: -1;
    padding: 0;
    transform: translateY(-2px);
  }

  #final-current-run p {
    margin: 4px 0;
    font-size: clamp(18px, 5.8vw, 30px);
  }

  #final-current-run .final-economy-line {
    font-size: clamp(14px, 4.2vw, 22px);
  }

  #level-finished {
    justify-content: flex-start;
    padding: 18px 12px 24px;
  }

  #level-finished h1 {
    margin-bottom: 14px;
    font-size: clamp(42px, 13vw, 70px);
  }

  #level-finished p {
    margin: 6px 0;
    font-size: clamp(18px, 6vw, 28px);
  }

  #level-finished-art {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: fill;
  }

  #final-highscores {
    width: min(100%, 100%);
    padding: 10px 16px 24px;
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
    transform: translateY(-20%);
  }

  #final-highscores h2 {
    text-align: center;
    font-size: clamp(20px, 6vw, 26px);
  }

  #final-highscores p {
    font-size: clamp(16px, 5vw, 22px);
  }

  #final-online-highscore {
    width: min(100%, 100%);
    padding: 10px 16px 24px;
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
    transform: translateY(-20%);
  }

  #final-online-highscore h2 {
    text-align: center;
    font-size: clamp(20px, 6vw, 26px);
  }

  .pre-run-difficulty-toggle {
    width: clamp(180px, 19vw, 339px);
  }

  .pre-run-scores-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pre-run-scores-board {
    min-height: 0;
  }

  .pre-run-scores-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
  }

  .pre-run-scores-heading {
    grid-column: auto;
  }

  .pre-run-scores-heading h2 {
    font-size: clamp(30px, 8vw, 42px);
  }

  #final-online-list li {
    font-size: 12px;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-board-header h3 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-status {
    margin-top: 6px;
    font-size: clamp(20px, 6.4vw, 26px);
    line-height: 1.1;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-list {
    margin-top: 6px;
    gap: 3px;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-list li {
    font-size: clamp(20px, 6vw, 28px);
    line-height: 1;
    gap: 8px;
  }

  .pre-run-scores-board-jump_easy,
  .pre-run-scores-board-jump_hard,
  .pre-run-scores-board-full_easy,
  .pre-run-scores-board-full_hard {
    height: 42.7%;
  }

  #pre-run-screen {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background:
      linear-gradient(135deg, rgba(6, 20, 33, 1), rgba(8, 28, 45, 1)),
      url("assets/start_bkg.png") center / cover no-repeat;
  }

  .pre-run-card {
    width: 100vw;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-width: 0;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    box-shadow: none;
  }

  .pre-run-launch-copy {
    font-size: clamp(44px, 13vw, 108px);
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }

  .pre-run-brand {
    margin-bottom: 12px;
    font-size: clamp(30px, 10vw, 48px);
  }

  .pre-run-select-layout {
    gap: 14px;
  }

  .pre-run-mode-card {
    border-width: 6px;
    border-radius: 20px;
    padding: 16px 14px;
    gap: 12px;
  }

  .pre-run-mode-title {
    font-size: clamp(28px, 10vw, 40px);
  }

  .pre-run-mode-copy {
    font-size: clamp(16px, 4.8vw, 22px);
  }

  .pre-run-difficulty-column {
    gap: 12px;
  }

  .pre-run-fullmode-diagram {
    width: min(150px, 100%);
    height: 76px;
    font-size: 14px;
  }

  .pre-run-detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .pre-run-compact-top {
    grid-template-columns: 76px 1fr 76px;
    gap: 12px;
  }

  .pre-run-compact-heading {
    grid-column: auto;
    order: 0;
  }

  .pre-run-skin-panel {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
  }

  .pre-run-skin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .pre-run-skin-btn {
    min-height: 132px;
    padding: 8px 6px;
  }

  .pre-run-skin-preview {
    width: 64px;
    height: 64px;
  }

  .pre-run-skin-preview img {
    width: 46px;
    height: 46px;
  }

  .pre-run-detail-actions {
    width: 100%;
    max-width: none;
    gap: 10px;
  }

  .pre-run-detail-rules {
    width: 100%;
    gap: 10px;
  }

  .pre-run-detail-heading h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .pre-run-detail-heading p {
    font-size: 16px;
  }

  .pre-run-detail-life-rules {
    gap: 8px;
  }

  .pre-run-detail-life-rules span {
    white-space: normal;
  }

  .pre-run-detail-panel {
    padding: 12px 14px;
    margin-bottom: 14px;
  }

  .pre-run-detail-panel h3 {
    font-size: 17px;
  }

  .pre-run-detail-panel p,
  #pre-run-controls-copy p {
    font-size: 16px;
    margin: 6px 0;
  }

  .brief-icon {
    margin-right: 6px;
  }

  .pre-run-rules-text .brief-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
  }

  .pre-run-rules-text .brief-jump-bonus {
    width: 26px;
    height: 26px;
  }

  .pre-run-brief-columns {
    gap: 10px;
  }

  #pre-run-start-btn,
  .pre-run-back-btn,
  #pre-run-tester-info-btn,
  #pre-run-future-release-btn,
  #pre-run-detail-admin-btn,
  .pre-run-compact-admin-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 48px;
  }

  .pre-run-compact-goal-line {
    font-size: clamp(18px, 4.5vw, 24px);
  }

  .pre-run-compact-start-btn {
    min-height: 150px;
    font-size: clamp(54px, 12vw, 86px);
  }

  .pre-run-compact-start-label {
    letter-spacing: 0.16em;
  }
}

@media (max-width: 760px) {
  .pre-run-scores-topbar {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .pre-run-rules-pager {
    gap: 8px;
  }

  .pre-run-rules-page-label {
    min-width: 60px;
    padding: 5px 8px;
    font-size: clamp(13px, 3.8vw, 17px);
  }

  .pre-run-rules-pager-btn {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .pre-run-rules-frame {
    padding: 14px 5px 8px;
    gap: 10px;
    margin-top: -20px;
    margin-bottom: -40px;
  }

  .pre-run-rules-page-title {
    font-size: clamp(22px, 5.6vw, 30px);
  }

  .pre-run-rules-text {
    font-size: clamp(15px, 3.9vw, 21px);
    line-height: 1.36;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  #game-over {
    padding: 10px 12px 20px;
    justify-content: flex-start;
  }

  .game-over-banner {
    width: min(29.75vw, 238px);
    margin-bottom: 8px;
  }

  #final-current-run {
    padding: 0 0;
    transform: translateY(-2px);
  }

  #final-current-run p {
    margin: 3px 0;
    font-size: clamp(14px, 3.4vh, 24px);
  }

  #final-current-run .final-economy-line {
    font-size: clamp(12px, 2.7vh, 18px);
  }

  #level-finished {
    padding: 10px 12px 20px;
    justify-content: flex-start;
  }

  #level-finished h1 {
    margin-bottom: 8px;
    font-size: clamp(34px, 8vh, 54px);
  }

  #level-finished p {
    margin: 4px 0;
    font-size: clamp(15px, 3.8vh, 22px);
  }

  #level-finished-art {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: fill;
  }

  #final-highscores {
    width: 100%;
    margin: 6px 0 2px 0;
    padding: 8px 16px 22px;
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
  }

  #final-highscores h2 {
    margin-bottom: 4px;
    font-size: clamp(16px, 4.2vh, 22px);
    text-align: center;
  }

  #final-top-scores-status {
    margin: 2px 0;
    font-size: clamp(13px, 3.3vh, 18px);
  }

  #final-online-highscore {
    width: 100%;
    margin: 6px 0 2px 0;
    padding: 8px 16px 22px;
    min-height: min(78vh, 760px);
    border: 0;
    border-radius: 18px;
    background: url("assets/gfx2/gameover_scr_scores_bckg.jpg") center top / 100% 100% no-repeat;
    transform: translateY(-20%);
  }

  #final-online-highscore h2 {
    margin-bottom: 4px;
    font-size: clamp(16px, 4.2vh, 22px);
    text-align: center;
  }

  #final-online-status {
    font-size: clamp(12px, 3.1vh, 16px);
  }

  #final-top-scores-list,
  #final-online-list {
    padding: 0 36px 0 18px;
  }

  #final-top-scores-list li,
  #final-online-list li {
    margin: 2px 0;
    font-size: 12px;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-board-header h3 {
    font-size: clamp(30px, 2.4vw, 48px);
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-status {
    margin-top: 6px;
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.05;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-list {
    margin-top: 6px;
    gap: 3px;
  }

  .pre-run-scores-grid-gfx2 .pre-run-scores-list li {
    font-size: clamp(18px, 2.1vw, 30px);
    line-height: 1;
    gap: 8px;
  }

  .pre-run-scores-board-jump_easy,
  .pre-run-scores-board-jump_hard,
  .pre-run-scores-board-full_easy,
  .pre-run-scores-board-full_hard {
    height: 43.4%;
  }

  #pre-run-screen {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background:
      linear-gradient(135deg, rgba(6, 20, 33, 1), rgba(8, 28, 45, 1)),
      url("assets/start_bkg.png") center / cover no-repeat;
  }

  .pre-run-card {
    width: 100vw;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .pre-run-brand {
    margin-bottom: 8px;
    font-size: clamp(26px, 6vh, 40px);
  }

  .pre-run-select-topbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 6px;
  }

  .pre-run-side-btn {
    min-height: 28px;
    padding: 3px 6px;
    font-size: clamp(10px, 1.8vh, 12px);
    border-width: 2px;
  }

  .pre-run-badges-btn {
    width: min(100%, 180px);
    min-height: 56px;
    font-size: clamp(18px, 5vw, 26px);
    margin-top: 0;
  }

  .pre-run-scores-btn {
    width: min(100%, 180px);
    min-height: 50px;
    font-size: clamp(16px, 4.4vw, 22px);
  }

  .pre-run-select-layout {
    grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
    gap: 12px;
  }

  .pre-run-mode-card {
    min-height: 0;
    border-width: 5px;
    border-radius: 18px;
    padding: 12px;
    gap: 8px;
  }

  .pre-run-mode-title {
    font-size: clamp(24px, 7vh, 34px);
  }

  .pre-run-mode-copy {
    font-size: clamp(13px, 3.5vh, 18px);
    line-height: 1.15;
  }

  .pre-run-difficulty-column {
    order: 0;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    gap: 10px;
  }

  .pre-run-badges-topbar {
    grid-template-columns: 1fr;
  }

  .pre-run-badge-tier {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .pre-run-badge-medal {
    width: 44px;
    height: 44px;
  }

  .pre-run-fullmode-diagram {
    width: min(120px, 100%);
    height: 58px;
    border-width: 3px;
    font-size: 11px;
  }

  .pre-run-fullmode-diagram .diag-jump {
    border-right-width: 2px;
  }

  .pre-run-fullmode-diagram .diag-right {
    border-bottom-width: 2px;
  }

  .pre-run-detail-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .pre-run-detail-actions {
    gap: 8px;
  }

  .pre-run-back-btn,
  #pre-run-tester-info-btn,
  #pre-run-future-release-btn,
  #pre-run-detail-admin-btn,
  #pre-run-start-btn,
  .pre-run-compact-admin-btn {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 14px;
  }

  .pre-run-compact-shell {
    gap: 10px;
    min-height: 0;
  }

  .pre-run-compact-goal-line {
    margin-top: 8px;
    font-size: clamp(16px, 4.2vh, 22px);
  }

  .pre-run-compact-start-btn {
    min-height: 120px;
    padding: 16px 12px;
    font-size: clamp(28px, 8vh, 40px);
  }

  #final-continue-actions {
    gap: 8px;
    margin-top: 10px;
  }

  #final-continue-actions button {
    width: clamp(124px, 36vw, 252px);
    min-width: 0;
    padding: 0;
  }

  .pre-run-shop-summary {
    gap: 8px;
    margin-bottom: 10px;
  }

  .pre-run-shop-summary-card,
  .pre-run-shop-card {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .pre-run-shop-summary-card strong {
    font-size: clamp(16px, 3vh, 24px);
  }

  .pre-run-shop-summary-card span {
    font-size: clamp(10px, 1.8vh, 13px);
  }

  .pre-run-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pre-run-shop-card h3 {
    font-size: clamp(14px, 2.6vh, 20px);
    margin-bottom: 6px;
  }

  .pre-run-shop-card p,
  .pre-run-shop-status {
    font-size: clamp(10px, 1.9vh, 13px);
    line-height: 1.2;
  }

  .pre-run-shop-actions {
    gap: 6px;
    margin: 8px 0 6px;
  }

  .pre-run-shop-action-btn {
    min-height: 32px;
    padding: 5px 8px;
    border-width: 2px;
    font-size: clamp(10px, 1.8vh, 12px);
  }

  .pre-run-shop-gfx2-scene {
    height: min(72dvh, 460px);
    min-height: 260px;
    border-radius: 16px;
  }

  .pre-run-shop-gfx2-board {
    left: 41.5%;
    top: 13.8%;
    width: 53.3%;
    height: 51.5%;
    padding: 8px;
    gap: 4px;
  }

  .pre-run-shop-gfx2-label,
  .pre-run-shop-gfx2-value {
    font-size: clamp(20px, 3.5vh, 26px);
  }

  .pre-run-shop-gfx2-label {
    padding-left: 12px;
  }

  .pre-run-shop-gfx2-status {
    left: 50%;
    top: 86.5%;
    transform: translateX(-50%);
    min-height: 0;
    font-size: clamp(18px, 3vh, 22px);
    padding: 0;
    width: 46%;
    max-width: 46%;
    text-align: center;
  }

  .pre-run-shop-gfx2-buy-btn {
    min-width: 128px;
    min-height: 42px;
    padding: 0;
    border-width: 0;
    font-size: 0;
    left: 78%;
    top: 90.5%;
    transform: translate(50%, 0);
  }

  .pre-run-detail-heading h2 {
    font-size: clamp(24px, 6.5vh, 34px);
  }

  .pre-run-detail-heading p {
    margin-top: 4px;
    font-size: 13px;
  }

  .pre-run-detail-life-rules {
    gap: 6px 12px;
    font-size: 12px;
  }

  .pre-run-detail-panel {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .pre-run-detail-panel h3 {
    margin-bottom: 6px;
    font-size: 15px;
  }

  .pre-run-detail-panel p,
  #pre-run-controls-copy p {
    margin: 4px 0;
    line-height: 1.15;
    font-size: 13px;
  }

  .brief-icon {
    width: 14px;
    height: 14px;
    margin-right: 5px;
  }

  .pre-run-rules-text .brief-icon {
    width: 18px;
    height: 18px;
    margin-right: 7px;
  }

  .pre-run-rules-text .brief-jump-bonus {
    width: 20px;
    height: 20px;
  }

  .brief-cracked-coin,
  .brief-question-coin,
  .brief-curse,
  .brief-shield {
    width: 16px;
    height: 16px;
  }

  .brief-question-coin::after,
  .brief-curse::after {
    font-size: 11px;
    line-height: 16px;
  }

  .brief-projectile {
    width: 26px;
    height: 15px;
  }
}

#touch-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  z-index: 17;
}

.touch-btn {
  pointer-events: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 22px;
  font-weight: bold;
  touch-action: none;
  user-select: none;
  position: absolute;
  display: none;
}

.touch-zone {
  align-items: center;
  justify-content: center;
}

.touch-btn:active {
  background: transparent;
}

#touch-controls.mode-full .jump-zone {
  display: flex;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
}

#touch-controls.mode-full .right-zone {
  display: flex;
  left: 50%;
  top: 0;
  width: 50%;
  height: 50%;
}

#touch-controls.mode-full .left-zone {
  display: flex;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 50%;
}

#touch-controls.mode-jump .jump-zone {
  display: flex;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

#admin-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 50;
  border: 1px solid #222;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  pointer-events: auto;
}

#admin-toggle.hidden {
  display: none;
}

#admin-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 50px;
  width: min(980px, 96vw);
  max-height: min(70vh, 560px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #222;
  border-radius: 10px;
  padding: 10px;
  z-index: 40;
}

.update-notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 23, 34, 0.5);
  z-index: 45;
  overflow-y: auto;
}

.update-notice.hidden {
  display: none;
}

.update-notice-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 36px);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #123040;
  border-radius: 16px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.24);
  padding: 20px 20px 18px;
  overflow-y: auto;
}

.update-notice-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  color: #0f2f44;
}

.update-notice-card p {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: #223b4c;
}

.update-notice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.whats-new-card {
  width: min(560px, 92vw);
}

.player-name-card {
  width: min(520px, 96vw);
}

.player-name-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  color: #123040;
  font-weight: 700;
}

.player-name-field input {
  border: 2px solid #123040;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 20px;
  font-weight: 600;
  color: #123040;
}

.player-name-error {
  margin-top: 12px !important;
  font-size: 16px !important;
  color: #b03131 !important;
}

.whats-new-version {
  margin: 0 0 14px 0;
  font-size: 15px;
  color: #587080;
}

.whats-new-list {
  margin: 0;
  padding-left: 22px;
  text-align: left;
  color: #143043;
}

.whats-new-list li {
  margin: 0 0 10px 0;
  line-height: 1.45;
  font-size: 16px;
}

#update-notice-later,
#update-notice-apply,
#whats-new-ok,
#badge-reset-ok,
#player-name-guest,
#player-name-save {
  border: 2px solid #123040;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}

#update-notice-later {
  background: #ffffff;
  color: #123040;
}

#update-notice-apply {
  background: linear-gradient(180deg, #c8f6b7 0%, #8dd87f 100%);
  color: #123040;
}

#whats-new-ok {
  background: linear-gradient(180deg, #fff3cf 0%, #ffd878 100%);
  color: #123040;
}

#badge-reset-ok {
  background: linear-gradient(180deg, #dff6ff 0%, #91d5f4 100%);
  color: #123040;
}

#player-name-guest {
  background: #ffffff;
  color: #123040;
}

#player-name-save {
  background: linear-gradient(180deg, #d9ffd7 0%, #8fe18b 100%);
  color: #123040;
}

.admin-reset-confirm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 23, 34, 0.45);
  z-index: 40;
}

.admin-reset-confirm.hidden {
  display: none;
}

.admin-reset-confirm-card {
  width: min(560px, 100%);
  background: #ffffff;
  border: 1px solid #1d2a35;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  padding: 18px 18px 16px;
}

.admin-reset-confirm-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.admin-reset-confirm-card p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.4;
}

.admin-reset-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

#admin-reset-confirm-cancel,
#admin-reset-confirm-apply {
  border: 1px solid #222;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
}

#admin-reset-confirm-cancel {
  background: #ffffff;
}

#admin-reset-confirm-apply {
  background: #ffe0e0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.admin-header h2 {
  margin: 0;
  font-size: 18px;
}

#admin-export,
#admin-copy-json,
#admin-import-file-btn,
#admin-import-text,
#admin-reset-all,
#admin-privacy,
#admin-close {
  border: 1px solid #222;
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: bold;
  cursor: pointer;
}

#admin-export,
#admin-copy-json,
#admin-import-file-btn,
#admin-import-text,
#admin-reset-all {
  background: #eef7ff;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

#admin-close {
  min-width: 88px;
  padding: 8px 18px;
  font-size: 22px;
  line-height: 1;
  border: 2px solid #183427;
  border-radius: 999px;
  background: linear-gradient(180deg, #bff4b5 0%, #5eb96a 100%);
  color: #103120;
  box-shadow: 0 6px 14px rgba(21, 58, 37, 0.2);
}

#admin-close:hover,
#admin-close:focus-visible {
  background: linear-gradient(180deg, #d4f9cc 0%, #6ec97b 100%);
}

#admin-panel .mode-default {
  border: 1px solid #222;
  background: #fff7d1;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: bold;
  cursor: pointer;
}

#admin-panel .mode-reset-max-score {
  border: 1px solid #222;
  background: #ffe4e4;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: bold;
  cursor: pointer;
}

.admin-global-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-mode-group {
  border: 1px solid #bfc7cf;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 12px;
  background: #f7fbff;
}

.admin-difficulty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.admin-difficulty-column {
  min-width: 0;
}

.admin-difficulty-title {
  margin: 0 0 10px 0;
  font-size: 20px;
}

.admin-level-group {
  border: 1px solid #c8d4de;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
  background: #fdfefe;
}

.admin-level-group-1 {
  background: #fdfefe;
}

.admin-level-group-2 {
  background: #eef9ef;
}

.admin-level-group-3 {
  background: #fff0f0;
}

.admin-level-group-4 {
  background: #fff9de;
}

.admin-level-group-5 {
  background: #f1f1f1;
}

.admin-level-group-1 .admin-mode-group,
.admin-level-group-1 .admin-section {
  background: #f7fbff;
}

.admin-level-group-2 .admin-mode-group,
.admin-level-group-2 .admin-section {
  background: #dff3e2;
}

.admin-level-group-3 .admin-mode-group,
.admin-level-group-3 .admin-section {
  background: #ffdede;
}

.admin-level-group-4 .admin-mode-group,
.admin-level-group-4 .admin-section {
  background: #fff0ab;
}

.admin-level-group-5 .admin-mode-group,
.admin-level-group-5 .admin-section {
  background: #dddddd;
}

.admin-level-title {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.admin-collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.admin-toggle-arrow {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.admin-collapsible-content.hidden {
  display: none;
}

.admin-section-title-toggle {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

@media (max-width: 1100px),
(max-height: 820px) {
  #admin-panel {
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: none;
    padding: 12px;
  }

  .admin-header {
    align-items: flex-start;
    gap: 10px;
  }

  .admin-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
  }

  #admin-close {
    min-width: 116px;
    padding: 10px 20px;
    font-size: 24px;
  }
}

.admin-section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-section-title-row .admin-section-title-toggle {
  flex: 1 1 auto;
  margin-bottom: 0;
  min-width: 0;
}

.admin-reset-badges-btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.admin-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.admin-mode-header h3 {
  margin: 0;
  font-size: 15px;
}

.admin-mode-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-field {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-field label {
  font-size: 13px;
  line-height: 1.2;
}

.admin-field input {
  width: 100%;
  border: 1px solid #999;
  border-radius: 6px;
  padding: 4px 6px;
}

@media (max-width: 900px) {
  .admin-difficulty-grid {
    grid-template-columns: 1fr;
  }

  .admin-global-button-grid {
    grid-template-columns: 1fr;
  }
}

.admin-field.checkbox-field {
  grid-template-columns: 1fr auto;
}

.admin-field.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  border: 0;
  padding: 0;
}

.admin-field.admin-field-stacked {
  grid-template-columns: 1fr;
  align-items: start;
}

.admin-field.admin-field-no-label {
  margin-top: -4px;
}

.admin-inline-checkbox-wrap {
  display: grid;
  gap: 8px;
}

.admin-inline-checkbox-caption {
  font-size: 12px;
  color: #4a4a4a;
}

.admin-inline-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.admin-inline-checkbox-list .admin-reset-max-btn {
  min-width: 110px;
}

.admin-inline-checkbox-list .admin-reset-max-btn.is-active {
  border-color: #08293a;
  background: #fff2bd;
  box-shadow: 0 0 0 2px rgba(8, 41, 58, 0.14);
}

.admin-inline-checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.admin-inline-checkbox-item input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.admin-badges-config {
  display: grid;
  gap: 14px;
  width: 100%;
}

.admin-badge-category {
  border: 1px solid rgba(8, 41, 58, 0.14);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.admin-badge-category-header h4 {
  margin: 0;
  font-size: 16px;
}

.admin-badge-category-header p {
  margin: 6px 0 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #4b5f6d;
}

.admin-badge-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.admin-badge-series-card {
  border: 1px solid rgba(8, 41, 58, 0.12);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(8, 41, 58, 0.05);
}

.admin-badge-goal-field {
  grid-template-columns: 1fr;
  align-items: start;
}

.admin-badge-goal-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.admin-badge-goal-collected {
  font-weight: 700;
  color: #15364a;
}

.admin-badge-goal-from,
.admin-badge-goal-unit {
  color: #4b5f6d;
}

.admin-badge-goal-control input {
  width: 96px;
  flex: 0 0 96px;
}

#mode-switch {
  position: absolute;
  top: var(--mode-switch-top, 10px);
  left: 0;
  right: 0;
  height: var(--mode-switch-height, 30px);
  display: block;
  z-index: 18;
  pointer-events: none;
}

.mode-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mode-slot-gap, 6px);
  min-width: 170px;
}

#mode-1-wrap {
  left: 33%;
  top: 0;
  transform: translateX(-50%);
}

#mode-2-wrap {
  left: 67%;
  top: 0;
  transform: translateX(-50%);
}

.mode-slot.hidden {
  display: none;
}

.mode-badge {
  border: 1px solid #222;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.mode-badge.active {
  background: #d9eefc;
}

#mode-2-btn {
  display: none !important;
}

.mode-lives {
  min-height: var(--life-square-size, 18px);
  display: flex;
  justify-content: center;
  gap: var(--mode-lives-gap, 6px);
  margin-top: var(--mode-lives-top, 18px);
  transform: translateX(var(--mode-lives-shift, 57px));
  pointer-events: none;
}

.life-square {
  width: var(--life-square-size, 18px);
  height: var(--life-square-size, 18px);
}

.life-heart.modern {
  background: center / contain no-repeat url("assets/heart01.png");
}

.life-heart.retro {
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 C18 60 8 42 18 24 C28 8 46 16 50 30 C54 16 72 8 82 24 C92 42 82 60 50 90 Z' fill='none' stroke='%23000' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.life-square.lost {
  opacity: 0.3;
  filter: grayscale(1) brightness(0.65);
}

.admin-section {
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  background: #fcfcfc;
  padding: 8px;
  margin-bottom: 10px;
}

.admin-section h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #e4e4e4;
  padding-bottom: 4px;
}

@media (orientation: landscape) and (max-height: 640px) {
  #pre-run-screen {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .pre-run-card {
    display: flex;
    flex-direction: column;
    width: 100vw !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
    border-radius: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  #pre-run-select-screen {
    flex: 1 1 auto;
    min-height: 0;
  }

  #pre-run-shop-screen:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  #pre-run-detail-screen:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  #pre-run-select-gfx2.pre-run-select-variant {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .pre-run-shop-gfx2:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .pre-run-classic-gfx2:not(.hidden) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .pre-run-shop-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    height: 100% !important;
    max-height: none !important;
    border-radius: 16px;
  }

  .pre-run-classic-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    height: 100% !important;
    max-height: none !important;
    border-radius: 16px;
  }

  .pre-run-gfx2-scene {
    flex: 1 1 auto;
    min-height: 0;
    height: 100% !important;
    max-height: none !important;
    border-radius: 0;
  }
}

/* Final GFX2 full-bleed overrides */
#pre-run-screen,
#pre-run-screen .pre-run-card {
  padding: 0 !important;
  background: transparent !important;
}

#pre-run-select-screen,
#pre-run-badges-screen {
  width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
}

#pre-run-select-screen {
  background: url("assets/gfx2/crossing_page/crossing_background.jpg") center center / 100% 100% no-repeat !important;
}

#pre-run-badges-screen {
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y !important;
}

#pre-run-select-gfx2.pre-run-select-variant,
#pre-run-select-gfx2 .pre-run-gfx2-scene,
.pre-run-badges-gfx2-scene {
  width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#pre-run-select-gfx2 .pre-run-gfx2-scene {
  height: 100dvh !important;
  max-height: none !important;
}

.pre-run-badges-gfx2-scene {
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.pre-run-badges-gfx2-tier-medal-wrap,
.pre-run-badges-gfx2-tier-medal-wrap .pre-run-badge-medal {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.pre-run-badges-gfx2-tier-medal-wrap .pre-run-badge-medal {
  object-fit: contain !important;
}

.pre-run-gfx2-hotspot {
  clip-path: none !important;
  transform: none !important;
  border-radius: 0 !important;
}

.pre-run-gfx2-hotspot:hover {
  transform: translateY(-2px) !important;
}

.pre-run-gfx2-hotspot-advanced {
  left: 41.211% !important;
  top: 14.84% !important;
  width: 15.638% !important;
  height: 10.2% !important;
}

.pre-run-gfx2-hotspot-settings {
  left: 57.8% !important;
  top: 9.5% !important;
  width: 23.0% !important;
  height: 22.4% !important;
}

.pre-run-gfx2-hotspot-classic {
  left: 41.552% !important;
  top: 28.82% !important;
  width: 16.016% !important;
  height: 10.1% !important;
}

.pre-run-gfx2-hotspot-badges {
  left: 59.6% !important;
  top: 29.628% !important;
  width: 17.4% !important;
  height: 10.302% !important;
}

@media (max-width: 640px) {

  #pre-run-screen,
  #pre-run-screen .pre-run-card {
    padding: 0 !important;
  }

  .pre-run-gfx2-hotspot-advanced {
    left: 40.6805% !important;
    top: 15.88% !important;
    width: 16.569% !important;
    height: 11.4% !important;
  }

  .pre-run-gfx2-hotspot-settings {
    left: 57.4% !important;
    top: 10.2% !important;
    width: 24.2% !important;
    height: 24.2% !important;
  }

  .pre-run-gfx2-hotspot-classic {
    left: 41.251% !important;
    top: 29.96% !important;
    width: 16.758% !important;
    height: 10.8% !important;
  }

  .pre-run-gfx2-hotspot-badges {
    left: 59.6% !important;
    top: 30.824% !important;
    width: 18.4% !important;
    height: 11.016% !important;
  }
}

@media (orientation: landscape) and (max-height: 640px) {

  #pre-run-screen,
  #pre-run-screen .pre-run-card {
    padding: 0 !important;
  }
}

.pre-run-shop-gfx2,
.pre-run-classic-gfx2,
.pre-run-advanced-gfx2,
.pre-run-settings-gfx2 {
  width: 100vw !important;
  min-height: 100dvh !important;
  background: url("assets/gfx2/wood_background.jpg") center top / 100% auto repeat-y !important;
}

.pre-run-shop-gfx2-scene,
.pre-run-classic-gfx2-scene,
.pre-run-advanced-gfx2-scene,
.pre-run-settings-gfx2-scene,
.pre-run-badges-gfx2-scene {
  width: 100vw !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pre-run-badges-gfx2-scroll {
  min-height: calc(100dvh + 1px) !important;
  padding-bottom: 14dvh !important;
}

.pre-run-shop-gfx2-hitbox-chest {
  top: 42.32% !important;
}

.pre-run-shop-gfx2-status {
  top: 84% !important;
  transform: translate(-50%, -100%) !important;
  font-size: clamp(26px, 2.5vw, 40px) !important;
  width: 44% !important;
  max-width: 44% !important;
}
