/* =====================================================================
   REVD PIXEL — HUB MENU STYLES  (menu.js)
   Chunky pixel buttons, notched corners, stepped animations.
===================================================================== */

/* ---------------------------------------------------------------
   0. IN-GAME CLEAN-UP  →  while playing only the PAUSE button stays.
      Everything else lives in the hub.
--------------------------------------------------------------- */
#startOverlay {
  display: none !important;
}

.top-actions .player-chip,
#installBtn,
#playerOpenBtn,
#soundBtn {
  display: none !important;
}

#tutorialFooterBtn,
#restartBtn {
  display: none !important;
}

.game-bottom-nav,
.game-drawer {
  display: none !important;
}

body.player-app-mode {
  padding-bottom: 0 !important;
}

.explorer-toggle {
  display: none !important;
}

body.map-explorer-mode .explorer-toggle {
  display: block !important;
}

body.hub-open {
  overflow: hidden;
}

/* pause menu + game over extras */
#pauseOverlay .overlay-symbol,
#pauseOverlay .overlay-copy {
  display: none;
}

.pause-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pause-menu .secondary-btn {
  padding: 10px 6px;
  font-size: 10px;
  line-height: 1.3;
}

.over-menu {
  width: 100%;
  margin-top: 10px;
}

/* ---------------------------------------------------------------
   1. SHARED PIXEL BUTTON
--------------------------------------------------------------- */

.px-btn {
  --b: var(--ac, #3d754c);
  position: relative;
  border: 0;
  padding: 12px 15px;
  background: var(--b);
  color: #fffdf4;
  font-size: 11px;
  line-height: 1.2;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  box-shadow:
    inset -4px -4px 0 rgba(0, 0, 0, .28),
    inset 4px 4px 0 rgba(255, 255, 255, .3),
    0 0 0 3px var(--ink),
    4px 5px 0 3px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .08s steps(2), filter .12s;
  -webkit-tap-highlight-color: transparent;
}

.px-btn:hover {
  filter: brightness(1.1);
}

.px-btn:active {
  transform: translate(3px, 3px);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .28), inset 4px 4px 0 rgba(255, 255, 255, .3), 0 0 0 3px var(--ink), 1px 2px 0 3px rgba(0, 0, 0, .35);
}

.px-btn:disabled {
  filter: grayscale(1) brightness(.75);
  cursor: not-allowed;
  transform: none;
}

.px-big {
  width: 100%;
  padding: 16px 14px;
  font-size: 13px;
  --b: #3d754c;
}


/* ---------------------------------------------------------------
   2. HUB (full-screen carousel)
--------------------------------------------------------------- */
.hub {
  --u: 200px;
  --ac: #e77a3b;
  --ac-d: #8a4521;
  --ac-l: #f5b24b;
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow: hidden;
  background: #10150f;
  color: #fffdf4;
  font-family: var(--sans);
  user-select: none;
  -webkit-user-select: none;
}

.hub.hidden {
  display: none;
}

.hub-bg {
  position: absolute;
  inset: 0;
  background: #10150f;
}

.hub-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity .5s steps(6), filter .4s;
}

.hub-bg canvas.on {
  opacity: 1;
}

.hub-bg canvas.bg-blur {
  filter: blur(3.5px) saturate(1.15) brightness(.92);
  transform: scale(1.04);
}

.hub-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 9, .5) 0%, rgba(8, 12, 9, 0) 22%, rgba(8, 12, 9, 0) 48%, rgba(8, 12, 9, .72) 100%);
}

.hub-main {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(8px + env(safe-area-inset-bottom));
}

/* top bar */
.hub-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  transform: translateY(-24px);
  opacity: 0;
  transition: transform .45s steps(5) .1s, opacity .45s steps(5) .1s;
}

.hub.in .hub-top {
  transform: none;
  opacity: 1;
}

.hub-logo {
  height: clamp(34px, 9vh, 66px);
  width: auto;
  justify-self: center;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45));
  pointer-events: none;
}

.hub-stats {
  justify-self: end;
  display: flex;
  gap: 8px;
}

.hub-profile {
  justify-self: start;
  cursor: pointer;
  text-align: left;
}

.hub-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 10px;
  border: 0;
  background: rgba(16, 21, 15, .72);
  color: #fffdf4;
  font-family: var(--pixel);
  font-size: 10px;
  box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .14);
}

.hub-profile:hover {
  background: rgba(16, 21, 15, .9);
}

.hc-av {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #ffebc6;
  box-shadow: 0 0 0 2px var(--ink);
  font-size: 18px;
  flex: none;
}

.hc-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hc-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
  font-weight: 400;
}

.hc-copy small {
  color: var(--ac-l);
  font-size: 8px;
}

.px-coin {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: #f4bd45;
  box-shadow: inset -3px -3px 0 #c47f14, inset 3px 3px 0 #fff0a8, 0 0 0 2px var(--ink);
  flex: none;
}

/* stage + tiles */
.hub-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  touch-action: none;
  cursor: grab;
}

.hub-stage:active {
  cursor: grabbing;
}

.tile {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--u);
  height: calc(var(--u) * 1.14);
  margin-left: calc(var(--u) * -.5);
  margin-top: calc(var(--u) * -.57);
  padding: 0;
  border: 0;
  background: none;
  color: #fffdf4;
  cursor: pointer;
  will-change: transform, opacity;
  filter: drop-shadow(0 calc(var(--u) * .045) 0 rgba(0, 0, 0, .45));
  -webkit-tap-highlight-color: transparent;
}

.tile:focus-visible {
  outline: none;
}

.tile:focus-visible .tile-edge {
  background: #fffdf4;
}

.tile::before,
.tile-edge,
.tile-face,
.tile-dim {
  content: "";
  position: absolute;
  display: block;
  clip-path: polygon(0 var(--n), var(--n) var(--n), var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)));
}

.tile::before {
  --n: calc(var(--u) * .06);
  inset: calc(var(--u) * -.04);
  background: #fffdf4;
  opacity: 0;
}

.tile-edge {
  --n: calc(var(--u) * .05);
  inset: 0;
  background: var(--ink);
}

.tile-face {
  --n: calc(var(--u) * .035);
  inset: calc(var(--u) * .03);
  background-color: var(--tc);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 calc(var(--u) * .035), transparent calc(var(--u) * .035) calc(var(--u) * .07));
  box-shadow: inset calc(var(--u) * .03) calc(var(--u) * .03) 0 rgba(255, 255, 255, .3), inset calc(var(--u) * -.03) calc(var(--u) * -.03) 0 rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * .035);
  padding: 0 calc(var(--u) * .06);
}

.tile-dim {
  --n: calc(var(--u) * .035);
  inset: calc(var(--u) * .03);
  background: #0b0f0c;
  opacity: var(--dim, 0);
  pointer-events: none;
}

.tile-icon {
  width: calc(var(--u) * .5);
  height: calc(var(--u) * .5);
  flex: none;
}

.tile-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 calc(var(--u) * .02) 0 rgba(0, 0, 0, .35));
}

.tile-label {
  font-family: var(--pixel);
  font-size: calc(var(--u) * .075);
  line-height: 1.1;
  letter-spacing: .03em;
  white-space: nowrap;
  text-shadow: calc(var(--u) * .012) calc(var(--u) * .012) 0 rgba(0, 0, 0, .55);
}

.tile-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--pixel);
  font-size: max(7px, calc(var(--u) * .043));
  color: rgba(255, 255, 255, .85);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .4);
}

.tile:not(.is-center) .tile-sub {
  opacity: 0;
}

.tile.is-center::before {
  opacity: 1;
  animation: tileBlink .9s steps(1) infinite;
}

.tile.is-center .tile-icon {
  animation: iconBob 1.2s steps(4) infinite;
}

.tile.is-center[data-id="play"] .tile-sub {
  animation: blink 1s steps(1) infinite;
  color: #fffdf4;
}

@keyframes tileBlink {

  0%,
  100% {
    background: #fffdf4;
  }

  50% {
    background: var(--tc-l);
  }
}

@keyframes iconBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(calc(var(--u) * -.03));
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .25;
  }
}

/* title + description */
.hub-info {
  text-align: center;
  padding: 4px 6px 0;
  min-height: 64px;
}

.hub-info h2 {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(16px, 3.4vw, 30px);
  letter-spacing: .06em;
  color: #fffdf4;
  text-shadow: 3px 3px 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 0 0 0 var(--ac);
}

.hub-info h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin: 9px auto 0;
  background: var(--ac);
  box-shadow: 0 0 0 2px var(--ink), inset 0 2px 0 rgba(255, 255, 255, .35);
}

.hub-info p {
  margin: 0 auto;
  max-width: 460px;
  font-size: clamp(12px, 1.7vw, 15px);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
}

.hub-info.swap h2,
.hub-info.swap p {
  animation: infoIn .3s steps(4) both;
}

@keyframes infoIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* nav row */
.hub-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 0 4px;
}

.hub-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: var(--ac);
  color: #fffdf4;
  font-family: var(--pixel);
  font-size: 14px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .28), inset 4px 4px 0 rgba(255, 255, 255, .3), 0 0 0 3px var(--ink), 3px 4px 0 3px rgba(0, 0, 0, .35);
  cursor: pointer;
}

.hub-arrow:active {
  transform: translate(2px, 2px);
}

.hub-dots {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 60vw;
}

.hub-dot {
  display: block;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 0 2px var(--ink);
  cursor: pointer;
  transition: width .15s steps(3), background .15s;
}

.hub-dot.on {
  width: 24px;
  background: var(--tc);
  box-shadow: 0 0 0 2px #fffdf4, 0 0 0 4px var(--ink);
}

.hub-hint {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .6);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .6);
}

.hub-crt {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, .42) 100%);
}

body.crt-off .hub-crt {
  display: none;
}

/* ---------------------------------------------------------------
   3. SECTIONS (each one opens full screen, with BACK)
--------------------------------------------------------------- */
.hub-sec {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  background: linear-gradient(rgba(10, 14, 11, .5), rgba(10, 14, 11, .7));
}

.hub-sec.open {
  display: flex;
  animation: secIn .42s steps(8) both;
}

.hub-sec.closing {
  animation: secOut .28s steps(6) both;
}

@keyframes secIn {
  from {
    clip-path: inset(47% 47% 47% 47%);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes secOut {
  from {
    clip-path: inset(0 0 0 0);
  }

  to {
    clip-path: inset(47% 47% 47% 47%);
  }
}

.sec-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--ac);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px);
  border-bottom: 5px solid var(--ink);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 6px 0 rgba(0, 0, 0, .3);
}

.sec-back {
  --b: var(--ac-d);
  flex: none;
}

.sec-icon {
  width: 36px;
  height: 36px;
  flex: none;
}

.sec-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .35));
}

.sec-title {
  margin: 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(13px, 2.8vw, 22px);
  letter-spacing: .08em;
  color: #fffdf4;
  text-shadow: 3px 3px 0 var(--ink);
}

.sec-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 16px calc(40px + env(safe-area-inset-bottom));
  scrollbar-color: var(--ac) var(--ink);
  scrollbar-width: thin;
}

.sec-body::-webkit-scrollbar {
  width: 12px;
}

.sec-body::-webkit-scrollbar-track {
  background: var(--ink);
}

.sec-body::-webkit-scrollbar-thumb {
  background: var(--ac);
  border: 2px solid var(--ink);
}

.sec-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.sec-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
}

.sec-grid>* {
  min-width: 0;
  margin: 0 !important;
}

/* relocated game cards */
.hub-sec .info-card,
.hub-sec .drawer-card {
  background: var(--panel);
  color: var(--ink);
  border: 3px solid var(--ink) !important;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .5) !important;
  border-radius: 0;
}

.hub-sec .drawer-panel {
  display: block !important;
  padding: 0;
}

.hub-sec .drawer-panel .leaderboard-list {
  max-height: none;
}

.hub-sec #skinPreview {
  width: min(70vw, 260px);
  height: auto;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#efe9cf 0 25%, #e6dfc0 0 50%) 0 0 / 16px 16px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
}

.hub-sec .skin-showcase {
  justify-content: center;
  gap: 12px;
}

.hub-sec .leaderboard-list {
  padding: 0;
}

.hub-sec .achievements-section {
  margin: 0;
}

/* hint cards (settings / help) */
.hcard {
  padding: 16px 18px 12px;
  background: var(--panel);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .5);
}

.hcard-k {
  margin: 0 0 12px;
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--ac);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .12);
}

.hcard-h {
  margin: 0 0 10px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}

.hcard-h span {
  color: var(--orange);
}

.hcard-p {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: #4a5148;
}

.hcard-note {
  margin: 12px 0 2px;
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.7;
  color: #6c7268;
}

.hcard-about {
  text-align: center;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 3px dashed #dedcc9;
}

.set-row:first-of-type {
  border-top: 0;
}

.hcard-k+.set-row {
  border-top: 0;
}

.set-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.set-copy b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.4;
}

.set-copy small {
  font-size: 12px;
  font-weight: 600;
  color: #6c7268;
  line-height: 1.4;
}

.set-act {
  --b: #3d754c;
  padding: 10px 12px;
  font-size: 10px;
  flex: none;
}

.px-switch {
  position: relative;
  flex: none;
  width: 76px;
  height: 34px;
  padding: 0;
  border: 0;
  background: #8a8f86;
  color: #fff;
  cursor: pointer;
  font-family: var(--pixel);
  font-size: 9px;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .28), 0 0 0 3px var(--ink);
}

.px-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  background: #fffdf4;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .25), 0 0 0 2px var(--ink);
  transition: transform .14s steps(3);
}

.px-switch .sw-txt {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 9px;
  display: flex;
  align-items: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .4);
}

.px-switch.on {
  background: #3d754c;
}

.px-switch.on i {
  transform: translateX(42px);
}

.px-switch.on .sw-txt {
  left: 9px;
  right: auto;
}

.keyrow {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 3px dashed #dedcc9;
}

.hcard-k+.keyrow {
  border-top: 0;
}

.keyrow .keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyrow kbd {
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: #fffdf4;
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--ink);
  box-shadow: inset -2px -3px 0 rgba(0, 0, 0, .18), 0 0 0 2px var(--ink), 0 4px 0 2px var(--ink);
  margin-bottom: 4px;
}

.keyrow b {
  display: block;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 10px;
  margin-bottom: 5px;
}

.keyrow small {
  font-size: 12px;
  font-weight: 600;
  color: #6c7268;
  line-height: 1.4;
}

.pw {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 3px dashed #dedcc9;
}

.hcard-k+.pw {
  border-top: 0;
}

.pw i {
  flex: none;
  width: 24px;
  height: 24px;
  background: var(--pc);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .35), inset -4px -4px 0 rgba(0, 0, 0, .25), 0 0 0 3px var(--ink);
}

.pw b {
  display: block;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 10px;
  margin-bottom: 5px;
}

.pw small {
  font-size: 12px;
  font-weight: 600;
  color: #6c7268;
}

.tips {
  margin: 0;
  padding: 0 0 6px 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.tips li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #3d443b;
}

.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------------------------------------------------------------
   4. PROFILE → full-screen section look (logic untouched)
--------------------------------------------------------------- */
.profile-modal {
  z-index: 3600 !important;
  display: grid;
  place-items: start center;
  padding: calc(84px + env(safe-area-inset-top)) 14px 24px !important;
  overflow-y: auto;
}

.profile-modal.hidden {
  display: none !important;
}

.profile-modal::before {
  content: "PROFILE";
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(66px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: #2e8b96;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px);
  border-bottom: 5px solid var(--ink);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 6px 0 rgba(0, 0, 0, .3);
  font-family: var(--pixel);
  font-size: clamp(13px, 2.8vw, 20px);
  letter-spacing: .08em;
  color: #fffdf4;
  text-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
}

.profile-backdrop {
  position: fixed !important;
  background: rgba(10, 14, 11, .88) !important;
  backdrop-filter: blur(3px);
}

.profile-card {
  position: relative;
  z-index: 2;
  width: min(580px, 100%) !important;
  max-height: none !important;
  overflow: visible !important;
  border: 4px solid var(--ink) !important;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .5) !important;
  border-radius: 0 !important;
}

.profile-close.px-btn {
  --b: #1d5c64;
  position: fixed !important;
  z-index: 3;
  top: calc(12px + env(safe-area-inset-top));
  left: 16px;
  right: auto;
  width: auto;
  height: auto;
  display: block;
  font-size: 11px;
  line-height: 1.2;
  padding: 12px 15px;
}

.profile-fox {
  border-radius: 0;
}

#profileUsername {
  border-radius: 0 !important;
  font-family: var(--sans);
}

/* ---------------------------------------------------------------
   5. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 640px) {
  .hub-top {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "logo logo" "chip stats";
    row-gap: 8px;
  }

  .hub-logo {
    grid-area: logo;
    height: clamp(34px, 7vh, 54px);
  }

  .hub-profile {
    grid-area: chip;
  }

  .hub-stats {
    grid-area: stats;
  }

  .hc-copy b {
    max-width: 96px;
  }

  .hub-dots {
    max-width: 64vw;
    gap: 7px;
  }

  .hub-info p {
    font-size: 12px;
  }

  .sec-head {
    gap: 9px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .px-btn {
    padding: 11px 12px;
    font-size: 10px;
  }

  .keyrow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-height: 520px) {

  .hub-logo,
  .hub-hint {
    display: none;
  }

  .hub-top {
    grid-template-columns: 1fr auto;
    grid-template-areas: none;
  }

  .hub-profile,
  .hub-stats {
    grid-area: auto;
  }

  .hub-info {
    min-height: 0;
    padding-top: 0;
  }

  .hub-info h2 {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .hub-info h2::after {
    margin-top: 5px;
    height: 4px;
  }

  .hub-info p {
    font-size: 11px;
    line-height: 1.3;
  }

  .hub-nav {
    padding: 6px 0 2px;
  }

  .hub-arrow {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .hub *,
  .hub *::before {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===============================================================
   THEME MATCH  →  same paper / ink / hard-shadow look as the game
=============================================================== */
:root {
  --hub-ink: #272b27;
}

/* no scanlines / vignette */
.hub-crt {
  display: none !important;
}

/* light, paper-like wash instead of dark shade */
.hub-shade {
  background: linear-gradient(180deg, rgba(244, 240, 223, .30) 0%, rgba(244, 240, 223, 0) 30%, rgba(244, 240, 223, 0) 55%, rgba(244, 240, 223, .78) 100%);
}

.hub {
  color: var(--ink);
  background: var(--paper);
}

.hub-bg {
  background: var(--paper);
}

.hub-bg canvas.bg-blur {
  filter: blur(3px) saturate(1.1);
}

/* game-style buttons (panel + ink border + hard shadow) */
.px-btn {
  background: var(--panel);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  text-shadow: none;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 10px 14px;
}

.px-btn:hover {
  filter: none;
  background: #fff;
}

.px-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.px-big {
  font-size: 13px;
  padding: 14px;
  background: var(--green);
  color: #fff;
}

.px-big:hover {
  background: var(--green-dark);
}

.set-act {
  background: var(--green);
  color: #fff;
  font-size: 11px;
}

.sec-back {
  background: var(--panel);
}

/* top chips = game's player-chip */
.hub-chip {
  background: var(--panel);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  border: 2px solid var(--ink);
}

.hub-profile:hover {
  background: #fff;
}

.hc-av {
  box-shadow: none;
  border: 1px solid var(--ink);
}
.hc-av .hub-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.hc-copy small {
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: .5px;
}

.hc-copy b {
  font-family: var(--sans);
  font-weight: 800;
}

.px-coin {
  box-shadow: inset -3px -3px 0 #c47f14, inset 3px 3px 0 #fff0a8, 0 0 0 2px var(--ink);
}

.hub-logo {
  filter: drop-shadow(0 2px 0 rgba(39, 43, 39, .25));
}

/* tiles: same shapes, game-style hard shadow */
.tile {
  filter: drop-shadow(0 calc(var(--u) * .04) 0 rgba(39, 43, 39, .55));
}

.tile::before {
  background: var(--ink);
}

.tile.is-center::before {
  animation: none;
  opacity: 1;
}

.tile.is-center .tile-edge {
  background: var(--ink);
}

/* info text in ink, like the game headings */
.hub-info h2 {
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--ac-l);
}

.hub-info h2::after {
  box-shadow: 0 0 0 2px var(--ink);
}

.hub-info p {
  color: #4a5148;
  text-shadow: none;
  font-weight: 700;
}

.hub-hint {
  color: var(--muted);
  text-shadow: none;
}

.hub-arrow {
  background: var(--panel);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 900;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-shadow: none;
}

.hub-arrow:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.hub-dot {
  background: #cfcbb6;
  box-shadow: 0 0 0 2px var(--ink);
}

.hub-dot.on {
  background: var(--tc);
  box-shadow: 0 0 0 2px var(--ink);
}

/* sections: paper page with game-style header */
.hub-sec {
  background-color: rgba(244, 240, 223, .93);
  background-image: radial-gradient(#d9d6c4 .8px, transparent .8px);
  background-size: 16px 16px;
}

.sec-head {
  background: var(--panel);
  background-image: none;
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(39, 43, 39, .12);
}

.sec-icon svg {
  filter: none;
}

.sec-title {
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--ac-l);
}

.sec-body {
  scrollbar-color: var(--ink) var(--paper);
}

.sec-body::-webkit-scrollbar-track {
  background: var(--paper);
}

.sec-body::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--paper);
}

.hub-sec .info-card,
.hub-sec .drawer-card,
.hcard {
  border-width: 2px !important;
  box-shadow: 4px 4px 0 var(--ink) !important;
}

.hcard-k {
  color: var(--green);
  text-shadow: none;
}

/* profile = same paper page */
.profile-modal::before {
  background: var(--panel);
  background-image: none;
  color: var(--ink);
  text-shadow: 2px 2px 0 #9be0e8;
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(39, 43, 39, .12);
}

.profile-backdrop {
  background: rgba(244, 240, 223, .96) !important;
  backdrop-filter: none;
}

.profile-card {
  border: 2px solid var(--ink) !important;
  box-shadow: 4px 4px 0 var(--ink) !important;
}

.profile-close.px-btn {
  background: var(--panel);
  font-size: 12px;
  padding: 10px 14px;
}

/* switches */
.px-switch {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .25), 0 0 0 2px var(--ink);
}

.px-switch i {
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------------------------------------------------------------
   9. POLISH — carousel arrows follow the selected menu colour
--------------------------------------------------------------- */
.hub-arrow {
  background: var(--ac) !important;
  color: #fffdf4 !important;
  border: 2px solid var(--ink) !important;
  box-shadow:
    inset -3px -3px 0 rgba(0, 0, 0, .22),
    inset 2px 2px 0 rgba(255, 255, 255, .28),
    3px 3px 0 var(--ink) !important;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .35) !important;
  transition: background-color .22s ease, color .22s ease, transform .12s steps(2), box-shadow .12s steps(2), filter .15s ease;
}

.hub-arrow:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.hub-arrow:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink) !important;
  filter: brightness(.96);
}

.hub-arrow:focus-visible,
.hub-dot:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.hub-dot {
  transition: width .18s steps(3), background-color .22s ease, transform .18s ease, box-shadow .18s ease;
}

.hub-dot:hover {
  transform: translateY(-2px);
}

.hub-dot.on {
  background: var(--ac) !important;
}

.hub-info h2::after {
  transition: background-color .22s ease, width .22s ease;
}

.tile {
  transition: filter .18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tile:not(.is-center):hover {
    filter: brightness(1.08) drop-shadow(0 7px 0 rgba(39, 43, 39, .45));
  }
}

@media (prefers-reduced-motion: reduce) {

  .hub-arrow,
  .hub-dot,
  .hub-info h2::after,
  .tile {
    transition: none !important;
  }
}


/* Runtime-coloured carousel arrows: JS updates these for every selected tile. */
#hub .hub-nav .hub-arrow {
  background-color: var(--arrow-accent, var(--ac)) !important;
  color: #fffdf4 !important;
  border: 2px solid var(--ac-d, var(--ink)) !important;
}

/* FOX CUSTOMIZATION STUDIO — roster, loadout and style tools */
.fox-studio {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 26px);
}

.studio-heading,
.fox-roster-head,
.studio-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-heading h2 {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.6;
}

.studio-intro {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  opacity: .78;
}

.studio-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  background: var(--ac);
  color: #fff;
  border: 3px solid var(--ink);
  font-size: 25px;
  box-shadow: 4px 4px 0 var(--ink);
}

.fox-roster-head,
.studio-tools-head {
  padding-bottom: 10px;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 28%, transparent);
  font-family: var(--pixel);
  font-size: 10px;
}

.fox-roster-head small,
.studio-tools-head small {
  font-family: inherit;
  font-size: 8px;
  opacity: .7;
}

.fox-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.fox-roster-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.fox-roster-card:hover {
  transform: translateY(-3px);
  box-shadow: 3px 6px 0 var(--ink);
}

.fox-roster-card.is-equipped {
  outline: 3px solid var(--ac);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--ac) 13%, var(--panel));
}

.fox-roster-card.is-locked {
  opacity: .58;
  filter: saturate(.55);
}

.fox-roster-card b {
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.6;
}

.fox-roster-card small {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--ac);
}

.fox-roster-card em {
  font-size: 10px;
  font-style: normal;
  opacity: .75;
}

.fox-swatch {
  position: relative;
  display: block;
  width: 54px;
  height: 42px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--fox-color) 25%, white), transparent);
  border-bottom: 2px solid var(--ink);
}

.fox-swatch:before,
.fox-swatch:after {
  content: '';
  position: absolute;
  background: var(--fox-color);
  border: 2px solid var(--ink);
}

.fox-swatch:before {
  width: 27px;
  height: 19px;
  left: 14px;
  top: 16px;
  box-shadow: -10px 7px 0 -3px var(--fox-color), 10px 7px 0 -3px var(--fox-color);
}

.fox-swatch:after {
  width: 8px;
  height: 13px;
  left: 17px;
  top: 5px;
  transform: skew(-12deg);
  box-shadow: 17px 0 0 -1px var(--fox-color);
}

.fox-swatch i {
  position: absolute;
  z-index: 2;
  width: 4px;
  height: 4px;
  left: 31px;
  top: 22px;
  background: #fff;
  border: 1px solid var(--ink);
}

.studio-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--ac) 8%, var(--panel));
}

.studio-tools-head {
  grid-column: 1/-1;
}

.tool-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.tool-group label {
  font-family: var(--pixel);
  font-size: 8px;
}

.tool-group select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.studio-reset {
  grid-column: 1/-1;
  justify-self: start;
}

.studio-unlock {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f5d66f;
  color: #352719;
  border: 3px solid #352719;
  box-shadow: 5px 5px 0 #352719;
}

.studio-unlock.show {
  display: flex;
  animation: foxUnlockPop .45s steps(4);
}

.studio-unlock>span {
  font-size: 30px;
}

.studio-unlock div {
  display: grid;
  gap: 5px;
}

.studio-unlock b {
  font-family: var(--pixel);
  font-size: 10px;
}

.studio-unlock small {
  font-weight: 700;
}

@keyframes foxUnlockPop {
  from {
    transform: scale(.82);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

@media(max-width:520px) {
  .studio-tools {
    grid-template-columns: 1fr;
  }

  .studio-tools-head,
  .studio-reset {
    grid-column: 1;
  }

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

  .fox-studio {
    padding: 13px;
  }
}

@media(prefers-reduced-motion:reduce) {

  .fox-roster-card,
  .studio-unlock.show {
    transition: none;
    animation: none;
  }
}

/* FOX SKIN CAROUSEL — same rotating-card language as the main hub */
.fox-carousel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fox-carousel-stage {
  height: 270px;
  position: relative;
  min-width: 0;
  overflow: hidden;
  perspective: 900px;
  touch-action: pan-y;
}

.fox-carousel-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(54%, 230px);
  height: 220px;
  transform: translate(calc(-50% + var(--fox-x, 0px)), -50%) rotateY(calc(var(--fox-offset, 0) * -15deg)) scale(var(--fox-scale, .72));
  opacity: var(--fox-opacity, .28);
  z-index: var(--fox-z, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fox-color, #6a9d67) 22%, var(--panel)), var(--panel) 66%);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, filter .3s ease, box-shadow .3s ease;
  backface-visibility: hidden;
}

.fox-carousel-card[style*="--fox-offset: 0"],
.fox-carousel-card.is-active {
  --fox-scale: 1;
  --fox-opacity: 1;
  --fox-z: 8;
  filter: none;
  box-shadow: 7px 7px 0 var(--ink), 0 0 0 4px var(--ac);
}

.fox-carousel-card:not(.is-active) {
  --fox-scale: .78;
  --fox-opacity: .58;
  --fox-z: 3;
  filter: saturate(.72);
}

.fox-carousel-card[style*="--fox-offset: -2"],
.fox-carousel-card[style*="--fox-offset: 2"] {
  --fox-scale: .62;
  --fox-opacity: .22;
  --fox-z: 1;
}

.fox-carousel-card.is-locked {
  filter: grayscale(.65) saturate(.45);
}

.fox-carousel-card .fox-swatch {
  width: 100px;
  height: 100px;
  transform: scale(1.5);
  margin: 0 0 12px;
  border: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--fox-color) 30%, transparent), transparent 70%);
}

.fox-carousel-card .fox-swatch:before {
  width: 46px;
  height: 34px;
  left: 26px;
  top: 42px;
  box-shadow: -16px 12px 0 -5px var(--fox-color), 16px 12px 0 -5px var(--fox-color);
}

.fox-carousel-card .fox-swatch:after {
  width: 14px;
  height: 25px;
  left: 31px;
  top: 17px;
  box-shadow: 27px 0 0 -1px var(--fox-color);
}

.fox-carousel-card .fox-swatch i {
  left: 53px;
  top: 52px;
  width: 6px;
  height: 6px;
}

.fox-carousel-card>b {
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.fox-carousel-card>small {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--ac);
}

.fox-carousel-arrow {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ac);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
}

.fox-carousel-arrow:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.fox-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  max-width: 100%;
}

.fox-carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 22%, var(--panel));
  cursor: pointer;
}

.fox-carousel-dot.on {
  width: 23px;
  background: var(--ac);
}

.fox-selected-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--ac) 10%, var(--panel));
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.fox-selected-info>div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.fox-selected-info h3 {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(11px, 2vw, 15px);
}

.fox-selected-info p {
  margin: 0;
  font-weight: 800;
  color: var(--ac);
  font-size: 12px;
}

.fox-selected-info small {
  font-size: 11px;
  opacity: .75;
}

.fox-rarity {
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: .08em;
  color: var(--ac);
}

.fox-equip-btn {
  flex: 0 0 auto;
  max-width: 190px;
  font-size: 9px !important;
}

.fox-equip-btn:disabled {
  opacity: .62;
  cursor: default;
}

@media(max-width:520px) {
  .fox-carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 3px;
  }

  .fox-carousel-stage {
    height: 218px;
  }

  .fox-carousel-card {
    width: 68%;
    height: 180px;
    padding: 12px 7px;
  }

  .fox-carousel-card .fox-swatch {
    transform: scale(1.12);
    margin-bottom: 4px;
  }

  .fox-carousel-arrow {
    width: 32px;
    height: 42px;
    font-size: 12px;
  }

  .fox-selected-info {
    align-items: stretch;
    flex-direction: column;
  }

  .fox-equip-btn {
    max-width: none;
    width: 100%;
  }

  .fox-carousel-dots {
    gap: 5px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .fox-carousel-card {
    transition: none;
  }
}

/* ================================================================
   REVD PIXEL FOX GARAGE — pixel-art collection + separate workshop
   Uses the game's parchment / forest-green / burnt-orange palette.
================================================================ */
.garage-studio {
  display: grid;
  gap: 18px;
  padding: clamp(14px, 2.5vw, 24px);
  background: var(--panel);
}

.garage-studio [hidden] {
  display: none !important;
}

.garage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(14px, 2vw, 22px);
  background: #263b2c;
  color: #fff5d9;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 7px, transparent 7px 14px);
}

.garage-heading .hcard-k {
  color: #f5b24b;
  margin-bottom: 10px;
}

.garage-heading h2 {
  font: 400 clamp(15px, 2.3vw, 23px)/1.55 var(--pixel);
  margin: 0;
  color: #fff4d5;
  text-shadow: 3px 3px 0 #17271d;
}

.garage-heading p:not(.hcard-k) {
  margin: 8px 0 0;
  max-width: 650px;
  color: #e4e7d8;
  font-size: 12px;
  line-height: 1.6;
}

.garage-stamp {
  flex: none;
  width: 64px;
  height: 64px;
  display: grid;
  place-content: center;
  text-align: center;
  background: #e77a3b;
  color: #fff9e8;
  border: 3px solid #17271d;
  box-shadow: 4px 4px 0 #17271d;
  font: 16px var(--pixel);
  transform: rotate(3deg);
}

.garage-stamp small {
  font: 6px var(--pixel);
  margin-top: 6px;
}

.garage-roster-view,
.garage-detail-view {
  display: grid;
  gap: 14px;
}

.garage-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #c8c5b2;
}

.garage-section-title span,
.garage-step {
  display: block;
  color: var(--green);
  font: 7px var(--pixel);
  letter-spacing: .08em;
  margin-bottom: 7px;
}

.garage-section-title h3 {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(10px, 1.5vw, 13px)/1.6 var(--pixel);
}

.garage-section-title>b {
  font: 7px var(--pixel);
  color: #6d7669;
  text-align: right;
}

.garage-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.garage-fox-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 124px;
  padding: 10px;
  background: #f5f0df;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .12s steps(2), box-shadow .12s steps(2), background .15s;
}

.garage-fox-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 7px 0 var(--ink);
  background: #fffdf4;
}

.garage-fox-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.garage-fox-card.equipped {
  background: #e8f0dc;
  outline: 3px solid var(--green);
  outline-offset: 1px;
}

.garage-fox-card.locked {
  background: #e9e5d8;
}

.garage-card-art {
  grid-column: 1/-1;
  display: grid;
  place-items: center;
  min-height: 72px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fox-color) 17%, #fffdf4), #e8e2cd);
  border: 1px solid #d1cbb7;
  overflow: hidden;
}

.garage-fox-art {
  width: 118px;
  height: 84px;
  filter: drop-shadow(2px 3px 0 rgba(39, 43, 39, .22));
}

.garage-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.garage-card-copy b {
  font: 8px/1.6 var(--pixel);
  overflow-wrap: anywhere;
}

.garage-card-copy small {
  font: 7px var(--pixel);
  color: var(--green);
}

.garage-fox-card.locked .garage-card-copy small {
  color: #8b6250;
}

.garage-card-arrow {
  font-size: 23px;
  font-weight: 900;
  color: var(--orange);
}

.garage-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.garage-back {
  --b: #3d754c;
  font: 7px var(--pixel);
  padding: 11px 13px;
}

.garage-step {
  margin: 0;
  color: #8a6844;
}

.garage-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.garage-preview-panel,
.garage-custom-panel {
  min-width: 0;
  padding: 14px;
  background: #f4f0df;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.garage-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #c8c5b2;
  font: 7px var(--pixel);
  color: #5c6658;
}

.garage-live-dot {
  color: var(--green);
}

.garage-fox-window {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 12px 0;
  background-color: #e9e3ce;
  background-image: linear-gradient(rgba(39, 43, 39, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(39, 43, 39, .055) 1px, transparent 1px);
  background-size: 12px 12px;
  border: 2px solid #d0c9b2;
  overflow: hidden;
}

.garage-fox-window:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .8), transparent 60%);
  pointer-events: none;
}

.garage-ground {
  position: absolute;
  bottom: 24px;
  left: 12%;
  right: 12%;
  height: 7px;
  background: #6d8754;
  border: 2px solid var(--ink);
  box-shadow: 0 5px 0 #c3b58f;
}

.garage-fox-window #skinPreview {
  position: relative;
  z-index: 1;
  width: min(82%, 300px);
  height: auto;
  max-height: 180px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 7px 0 rgba(39, 43, 39, .18));
  animation: garageFoxIdle 1.5s steps(4) infinite;
}

@keyframes garageFoxIdle {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-5px)
  }
}

.garage-legacy-source {
  display: none !important;
}

.garage-nameplate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: #263b2c;
  color: #fff5d9;
  border: 2px solid var(--ink);
}

.garage-nameplate small {
  font: 6px var(--pixel);
  color: #f5b24b;
}

.garage-nameplate h3 {
  margin: 7px 0 4px;
  font: 400 11px/1.5 var(--pixel);
  overflow-wrap: anywhere;
}

.garage-nameplate span {
  font: 6px var(--pixel);
  color: #d8dfc9;
}

.garage-equipped-mark {
  flex: none;
  padding: 7px 8px;
  background: #d8e8bf;
  color: #294a2f;
  border: 2px solid #17271d;
  font: 6px var(--pixel);
}

.garage-equipped-mark[hidden] {
  display: none !important;
}

.garage-perk {
  display: grid;
  gap: 6px;
  padding: 12px 2px;
}

.garage-perk small {
  font: 6px var(--pixel);
  color: var(--green);
}

.garage-perk b {
  font: 9px var(--pixel);
  line-height: 1.6;
}

.garage-perk p {
  margin: 0;
  color: #65705f;
  font-size: 11px;
  line-height: 1.5;
}

.garage-equip {
  width: 100%;
  --b: #e77a3b;
  font: 8px var(--pixel);
  padding: 14px 10px;
}

.garage-equip:disabled {
  --b: #71816c;
  opacity: 1;
  color: #f5f0df;
}

.garage-custom-panel .garage-section-title {
  margin-bottom: 12px;
}

.garage-tool-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #e77a3b;
  color: white;
  border: 2px solid var(--ink);
  font-size: 18px;
}

.garage-tool-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
}

.garage-tool-tabs button {
  min-width: 0;
  min-height: 39px;
  padding: 7px 3px;
  background: #e8e2ce;
  color: #52604f;
  border: 2px solid #9d9b86;
  font: 6px var(--pixel);
  cursor: pointer;
}

.garage-tool-tabs button.on {
  background: #3d754c;
  color: #fffdf4;
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.garage-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.garage-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  background: #fffdf4;
  color: var(--ink);
  border: 2px solid #c9c4af;
  text-align: left;
  cursor: pointer;
}

.garage-option.selected {
  background: #e5efda;
  border: 2px solid var(--green);
  box-shadow: 2px 2px 0 var(--green);
}

.garage-option-icon {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #e8e2ce;
  border: 1px solid #c8c0a8;
  color: #3d754c;
  font-size: 18px;
}

.garage-option b {
  font: 7px/1.5 var(--pixel);
  overflow-wrap: anywhere;
}

.garage-option i {
  font: 6px var(--pixel);
  font-style: normal;
  color: #71816c;
}

.garage-option.selected i {
  color: var(--green);
}

.garage-tool-note {
  min-height: 30px;
  padding: 10px 0;
  color: #777d6d;
  font-size: 10px;
  line-height: 1.5;
}

.garage-reset {
  --b: #6b705f;
  font: 7px var(--pixel);
  padding: 11px 12px;
  width: 100%;
}

.garage-unlock {
  margin-top: 4px;
}

@media(max-width:760px) {
  .garage-layout {
    grid-template-columns: 1fr;
  }

  .garage-preview-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .garage-fox-window {
    min-height: 190px;
  }

  .garage-roster {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media(max-width:460px) {
  .garage-studio {
    padding: 11px;
    gap: 13px;
  }

  .garage-heading {
    padding: 12px;
  }

  .garage-stamp {
    width: 48px;
    height: 48px;
    font-size: 12px;
  }

  .garage-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .garage-fox-card {
    min-height: 112px;
    padding: 8px;
  }

  .garage-card-art {
    min-height: 64px;
  }

  .garage-fox-art {
    width: 100px;
    height: 72px;
  }

  .garage-detail-top {
    align-items: flex-start;
  }

  .garage-back {
    font-size: 6px;
    padding: 10px 8px;
  }

  .garage-section-title h3 {
    font-size: 9px;
  }

  .garage-options {
    gap: 6px;
  }

  .garage-option {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 6px;
  }

  .garage-option-icon {
    width: 27px;
    height: 27px;
    font-size: 15px;
  }

  .garage-option b {
    font-size: 6px;
  }

  .garage-tool-tabs button {
    font-size: 5px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .garage-fox-window #skinPreview {
    animation: none;
  }

  .garage-fox-card,
  .garage-option {
    transition: none;
  }
}

/* FOX SELECT — REVD PIXEL main-menu visual language */
.garage-studio {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: clamp(10px, 1.8vw, 20px) !important;
  gap: 20px !important;
}

.garage-heading {
  position: relative;
  min-height: 112px;
  padding: clamp(16px, 2.2vw, 24px) !important;
  background: #263b2c !important;
  border: 3px solid #272b27 !important;
  box-shadow: 5px 5px 0 #272b27 !important;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 7px, transparent 7px 14px) !important;
}

.garage-heading h2 {
  font-size: clamp(17px, 2.5vw, 25px) !important;
  letter-spacing: .03em;
}

.fox-wallet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 7px 11px;
  background: #f5b24b;
  color: #272b27;
  border: 2px solid #17271d;
  box-shadow: 3px 3px 0 #17271d;
  font: 7px var(--pixel);
}

.fox-wallet b {
  font-size: 10px;
}

.garage-section-title {
  border-bottom: 2px dashed #b8b49f !important;
}

.garage-fox-card {
  background: #f5f0df !important;
  border: 2px solid #272b27 !important;
  box-shadow: 4px 4px 0 #272b27 !important;
  border-radius: 0 !important;
}

.garage-fox-card:hover {
  background: #fffdf4 !important;
}

.garage-fox-card.equipped {
  background: #e8f0dc !important;
  outline: 3px solid #3d754c !important;
}

.garage-card-art {
  background: linear-gradient(180deg, color-mix(in srgb, var(--fox-color) 17%, #fffdf4), #e8e2cd) !important;
}

.garage-preview-panel,
.garage-custom-panel {
  background: #f5f0df !important;
  border: 2px solid #272b27 !important;
  box-shadow: 4px 4px 0 #272b27 !important;
  border-radius: 0 !important;
}

.garage-fox-window {
  background-color: #e9e3ce !important;
  background-image: linear-gradient(rgba(39, 43, 39, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(39, 43, 39, .07) 1px, transparent 1px) !important;
  background-size: 10px 10px !important;
  border: 2px solid #272b27 !important;
}

.garage-nameplate {
  background: #263b2c !important;
  border: 2px solid #272b27 !important;
}

.garage-equip {
  --b: #e77a3b !important;
  border: 2px solid #272b27 !important;
  box-shadow: 3px 3px 0 #272b27 !important;
}

.garage-equip.buy-fox {
  --b: #3d754c !important;
}

.fox-upgrade-panel {
  margin: 10px 0 14px;
  padding: 12px;
  background: #e9e3ce;
  border: 2px solid #272b27;
  box-shadow: 3px 3px 0 #272b27;
}

.fox-upgrade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 2px dashed #b8b49f;
}

.fox-upgrade-head small {
  font: 6px var(--pixel);
  color: #3d754c;
}

.fox-upgrade-head h4 {
  margin: 5px 0 0;
  font: 9px/1.5 var(--pixel);
  color: #272b27;
}

.fox-upgrade-head>span {
  font: 6px var(--pixel);
  color: #9a6338;
  text-align: right;
}

.fox-upgrade-grid {
  display: grid;
  gap: 8px;
}

.fox-upgrade-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: #fffdf4;
  border: 2px solid #c9c4af;
}

.fox-upgrade-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #f5b24b;
  color: #272b27;
  border: 2px solid #272b27;
  font: 16px var(--pixel);
}

.fox-upgrade-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fox-upgrade-copy>b,
.fox-upgrade-copy b {
  font: 7px var(--pixel);
  color: #272b27;
}

.fox-upgrade-copy small {
  font-size: 10px;
  line-height: 1.35;
  color: #65705f;
}

.fox-upgrade-copy em {
  font: 6px var(--pixel);
  font-style: normal;
  color: #3d754c;
}

.fox-level-bars {
  display: flex;
  gap: 3px;
}

.fox-level-bars i {
  display: block;
  width: 17px;
  height: 5px;
  background: #d8d2bd;
  border: 1px solid #a9a38e;
}

.fox-level-bars i.filled {
  background: #e77a3b;
  border-color: #9b4d2b;
}

.fox-upgrade-buy {
  min-width: 62px;
  min-height: 34px;
  padding: 6px;
  background: #3d754c;
  color: #fffdf4;
  border: 2px solid #272b27;
  box-shadow: 2px 2px 0 #272b27;
  font: 6px var(--pixel);
  cursor: pointer;
}

.fox-upgrade-buy:disabled {
  background: #aaa995;
  color: #f7f2e4;
  cursor: not-allowed;
  box-shadow: none;
}

@media(max-width:520px) {
  .fox-upgrade-card {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .fox-upgrade-buy {
    grid-column: 2;
    justify-self: start;
  }

  .fox-upgrade-head {
    align-items: flex-start;
  }
}



#skinsComingSoon {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(6px);
}

.skins-coming-card {
  width: min(100%, 360px);
  padding: 30px 24px;
  text-align: center;
  color: #f5f0df;
  background: #171a25;
  border: 2px solid #8c754b;
  box-shadow: 0 8px 0 #080a10;
}

.skins-coming-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.skins-coming-tag {
  color: #d9b66e;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: bold;
}

.skins-coming-card h2 {
  margin: 14px 0 10px;
  font-size: 21px;
  letter-spacing: 1px;
}

.skins-coming-card p {
  margin: 8px 0;
  font-size: 13px;
}

.skins-coming-sub {
  color: #a9a9b2;
}

.skins-coming-card button {
  margin-top: 18px;
  min-width: 110px;
  padding: 11px 24px;
  border: 2px solid #d9b66e;
  background: #d9b66e;
  color: #171a25;
  font-weight: 800;
  cursor: pointer;
}

/* =========================================
   REVD PIXEL — SKINS UNDER DEVELOPMENT
========================================= */

/* Barrier over the existing skin card */
.skin-card {
  position: relative;
  overflow: hidden;
}

/* RED UNDER DEVELOPMENT BARRIER */
.skin-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: auto;
  background:
    repeating-linear-gradient(-45deg,
      #c83d35 0px,
      #c83d35 12px,
      #f0c15b 12px,
      #f0c15b 24px);
  opacity: 0.92;
  border: 3px solid #272b27;
}

.skin-card::before {
  content: "LOCKED  •  COMING SOON";
  position: absolute;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  color: #fff0cf;
  background: rgba(39, 43, 39, 0.72);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 2px;
  text-shadow: 2px 2px #272b27;
  pointer-events: none;
}

/*
.skin-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  background:
    repeating-linear-gradient(0deg,
      rgba(39, 43, 39, 0.78) 0px,
      rgba(39, 43, 39, 0.78) 3px,
      rgba(39, 43, 39, 0.84) 3px,
      rgba(39, 43, 39, 0.84) 6px);
  border: 3px solid #272b27;
  pointer-events: auto;
}

.skin-card::before {
  content: "🔒  UNDER DEVELOPMENT\\A\\A FOX COLLECTION\\A COMING SOON";
  white-space: pre;
  position: absolute;
  z-index: 21;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #fff0cf;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(13px, 2vw, 19px);
  font-weight: 900;
  line-height: 2;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 #272b27;
  pointer-events: auto;
  background: radial-gradient(ellipse,
      rgba(217, 104, 44, 0.25),
      transparent 70%);
}

*/

/* Popup backdrop */
#skinsComingSoon {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 29, 25, 0.82);
  backdrop-filter: blur(3px);
}

/* Retro popup */
.skins-coming-card {
  position: relative;
  width: min(100%, 390px);
  padding: 30px 24px;
  text-align: center;
  color: #272b27;
  background: #f4f0df;
  border: 4px solid #272b27;
  box-shadow:
    7px 7px 0 #d9682c,
    12px 12px 0 rgba(0, 0, 0, 0.35);
  animation: skinsPopupIn 0.2s steps(4, end);
}

.skins-coming-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed #c9b98f;
  pointer-events: none;
}

.skins-coming-icon {
  font-size: 38px;
  margin-bottom: 12px;
  image-rendering: pixelated;
}

.skins-coming-tag {
  display: inline-block;
  padding: 6px 10px;
  background: #272b27;
  color: #f5b24b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}

.skins-coming-card h2 {
  margin: 18px 0 10px;
  color: #d9682c;
  font-size: clamp(19px, 5vw, 25px);
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #e5d8a7;
}

.skins-coming-card p {
  margin: 8px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.skins-coming-sub {
  color: #747568;
  font-size: 11px !important;
  letter-spacing: 1px;
}

.skins-coming-card button {
  position: relative;
  z-index: 2;
  min-width: 125px;
  margin-top: 20px;
  padding: 12px 24px;
  border: 3px solid #272b27;
  background: #f5b24b;
  color: #272b27;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 4px 4px 0 #272b27;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.skins-coming-card button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #272b27;
}

@keyframes skinsPopupIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .skins-coming-card {
    padding: 25px 18px;
  }
}

/* =========================================
   REVD PIXEL — SKINS LOCK BARRIER
========================================= */

.tile[data-id="skins"] {
  position: absolute;
  overflow: hidden;
}

.tile[data-id="skins"] .skins-lock-barrier {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  background: rgba(39, 43, 39, 0.88);
  border: 4px solid #272b27;
  box-shadow: inset 0 0 0 3px #fff0cf;
  pointer-events: none;
  text-align: center;
}

.tile[data-id="skins"] .barrier-stripes {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background: repeating-linear-gradient(-45deg,
      #d94336 0 12px,
      #f4c451 12px 24px);
}

.tile[data-id="skins"] .skins-lock-barrier b,
.tile[data-id="skins"] .skins-lock-barrier small {
  position: relative;
  z-index: 2;
  color: #fff0cf;
  font-family: inherit;
  font-weight: 900;
  text-shadow: 2px 2px #272b27;
}

.tile[data-id="skins"] .skins-lock-barrier b {
  font-size: clamp(10px, 2vw, 15px);
  letter-spacing: 1px;
}

.tile[data-id="skins"] .skins-lock-barrier small {
  padding: 5px 9px;
  color: #272b27;
  background: #f4c451;
  border: 2px solid #272b27;
  font-size: 10px;
  letter-spacing: 2px;
}

/* ===============================================================
   v1.1 — FOX GARAGE (infinite carousel + Hill-Climb style upgrades)
=============================================================== */
.fx-garage {
  display: grid;
  gap: 14px;
  position: relative;
}

.fx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-wallet {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--ink);
}

.fx-wallet b {
  font-weight: 400;
}

.fx-wallet small {
  font-size: 8px;
  color: var(--muted);
}

.fx-count {
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--ink);
  padding: 8px 12px;
  background: #e6e2cd;
  border: 2px solid var(--ink);
}

.fx-stage {
  --fu: 170px;
  position: relative;
  height: clamp(250px, 38vh, 350px);
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.fx-stage:active {
  cursor: grabbing;
}

.fx-card {
  --n: calc(var(--fu) * .05);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--fu);
  height: calc(var(--fu) * 1.22);
  margin-left: calc(var(--fu) * -.5);
  margin-top: calc(var(--fu) * -.61);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  will-change: transform, opacity;
  filter: drop-shadow(0 calc(var(--fu) * .04) 0 rgba(39, 43, 39, .5));
  -webkit-tap-highlight-color: transparent;
}

.fx-card .fx-edge,
.fx-card .fx-face,
.fx-card .fx-dim {
  position: absolute;
  display: block;
  clip-path: polygon(0 var(--n), var(--n) var(--n), var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)));
}

.fx-edge {
  inset: 0;
  background: var(--ink);
}

.fx-face {
  --n: calc(var(--fu) * .035);
  inset: calc(var(--fu) * .03);
  background: var(--fcl);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .35) 0 calc(var(--fu) * .035), transparent calc(var(--fu) * .035) calc(var(--fu) * .07));
  box-shadow: inset calc(var(--fu) * .03) calc(var(--fu) * .03) 0 rgba(255, 255, 255, .6), inset calc(var(--fu) * -.03) calc(var(--fu) * -.03) 0 rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--fu) * .04);
  padding: calc(var(--fu) * .06) calc(var(--fu) * .05);
}

.fx-dim {
  --n: calc(var(--fu) * .035);
  inset: calc(var(--fu) * .03);
  background: #10150f;
  opacity: var(--dim, 0);
  pointer-events: none;
}

.fx-art {
  width: 100%;
  flex: 0 0 auto;
  display: block;
}

.fx-art svg,
.fx-art canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.fx-art canvas {
  background: transparent;
}

.fx-name {
  font-family: var(--pixel);
  font-size: calc(var(--fu) * .085);
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--ink);
}

.fx-tag {
  font-family: var(--pixel);
  font-size: max(7px, calc(var(--fu) * .05));
  padding: calc(var(--fu) * .02) calc(var(--fu) * .045);
  background: var(--ink);
  color: #fffdf4;
  white-space: nowrap;
}

.fx-card.equipped .fx-tag {
  background: var(--green);
}

.fx-card.locked .fx-art svg,
.fx-card.locked .fx-art canvas {
  filter: grayscale(.85) brightness(.82);
}

.fx-card.locked .fx-tag {
  background: #8a8f86;
}

.fx-card:not(.is-center) .fx-tag {
  opacity: 0;
}

.fx-card.is-center::before {
  content: "";
  position: absolute;
  inset: calc(var(--fu) * -.035);
  background: var(--ink);
  clip-path: polygon(0 var(--n), var(--n) var(--n), var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)));
  --n: calc(var(--fu) * .06);
}

.fx-card.is-center .fx-art {
  animation: iconBob 1.3s steps(4) infinite;
  --u: var(--fu);
}

.fx-card.is-center.locked .fx-face::after {
  content: "🔒";
  position: absolute;
  top: calc(var(--fu) * .06);
  right: calc(var(--fu) * .08);
  font-size: calc(var(--fu) * .11);
}

.fx-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.fx-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 70vw;
}

.fx-dot {
  display: block;
  width: 10px;
  height: 10px;
  background: #cfcbb6;
  box-shadow: 0 0 0 2px var(--ink);
  cursor: pointer;
  transition: width .15s steps(3);
}

.fx-dot.own {
  background: var(--fc);
}

.fx-dot.on {
  width: 22px;
}

.fx-dot.eq {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--green);
}

.fx-plate {
  display: grid;
  gap: 12px;
}

.fx-plate-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fx-plate-top small {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--muted);
}

.fx-plate-top h3 {
  margin: 8px 0 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(16px, 3vw, 24px);
}

.fx-state {
  font-family: var(--pixel);
  font-size: 9px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  background: #e6e2cd;
}

.fx-state.equipped {
  background: var(--green);
  color: #fff;
}

.fx-state.owned {
  background: #ffe8b0;
}

.fx-perk {
  padding: 12px 14px;
  background: #fff5d9;
  border: 2px dashed var(--ink);
}

.fx-perk small {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--orange);
}

.fx-perk b {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 12px;
}

.fx-perk p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #4a5148;
  line-height: 1.45;
}

.fx-action.buy-fox {
  background: var(--orange);
}

.fx-action:disabled {
  background: #8a8f86;
}

.fx-gate {
  margin: 0;
  text-align: center;
}

.fx-cols {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .fx-cols {
    grid-template-columns: 1.15fr 1fr;
  }

  .fx-plate {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }

  .fx-plate .fx-perk {
    grid-column: 2;
    grid-row: 1;
  }

  .fx-plate-top {
    grid-column: 1;
  }

  .fx-action,
  .fx-gate {
    grid-column: 1 / -1;
  }
}

.fx-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.fx-h .hcard-h {
  margin: 0;
}

.fx-rating {
  text-align: right;
  min-width: 120px;
}

.fx-rating small {
  display: block;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: .08em;
}

.fx-rating b {
  display: block;
  margin: 6px 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 15px;
}

.fx-rating b span {
  font-size: 9px;
  color: var(--muted);
}

.fx-rating i {
  display: block;
  height: 10px;
  background: #e6e2cd;
  border: 2px solid var(--ink);
  position: relative;
}

.fx-rating i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--p);
  background: var(--orange);
  transition: width .3s steps(6);
}

.fx-up {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 3px dashed #dedcc9;
}

.fx-up.off {
  opacity: .6;
}

.fx-up.bought {
  animation: fxBuy .5s steps(5);
}

@keyframes fxBuy {
  0% {
    background: #fff0a8;
  }

  100% {
    background: transparent;
  }
}

.fx-up-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #3d754c;
  color: #fffdf4;
  font-size: 22px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .3), inset -3px -3px 0 rgba(0, 0, 0, .25), 0 0 0 2px var(--ink);
}

.fx-up:nth-child(2) .fx-up-ic {
  background: #7461c4;
}

.fx-up:nth-child(3) .fx-up-ic {
  background: #c9506b;
}

.fx-up:nth-child(4) .fx-up-ic {
  background: #b9801f;
}

.fx-up:nth-child(5) .fx-up-ic {
  background: #3f86c9;
}

.fx-up:nth-child(6) .fx-up-ic {
  background: #2e8b96;
}

.fx-up:nth-child(7) .fx-up-ic {
  background: #e77a3b;
}

.fx-up-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.fx-up-copy b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 10px;
}

.fx-up-copy small {
  font-size: 12px;
  font-weight: 600;
  color: #6c7268;
  line-height: 1.35;
}

.fx-up-copy em {
  font-style: normal;
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
  color: var(--muted);
}

.fx-pips {
  display: flex;
  gap: 4px;
}

.fx-pips i {
  width: 100%;
  max-width: 34px;
  height: 10px;
  background: #e6e2cd;
  box-shadow: 0 0 0 2px var(--ink);
}

.fx-pips i.on {
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ink), inset 0 3px 0 rgba(255, 255, 255, .4);
}

.fx-up-buy {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 84px;
  justify-content: center;
  padding: 10px 10px;
  border: 2px solid var(--ink);
  background: var(--green);
  color: #fff;
  font-family: var(--pixel);
  font-size: 10px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}

.fx-up-buy:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.fx-up-buy:disabled {
  background: #cfcbb6;
  color: var(--ink);
  cursor: default;
  box-shadow: none;
}

.fx-up-buy.short {
  background: #c9506b;
}

.fx-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fx-tabs button {
  padding: 9px 11px;
  border: 2px solid var(--ink);
  background: #fffdf4;
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--ink);
  cursor: pointer;
}

.fx-tabs button.on {
  background: var(--ink);
  color: #fffdf4;
}

.fx-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.fx-opt {
  display: grid;
  grid-template-columns: 26px 1fr 14px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  text-align: left;
  border: 2px solid var(--ink);
  background: #fffdf4;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}

.fx-opt span {
  font-size: 17px;
  text-align: center;
}

.fx-opt b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 8px;
  line-height: 1.5;
}

.fx-opt i {
  font-style: normal;
  font-size: 12px;
  color: var(--green);
  font-weight: 900;
}

.fx-opt.on {
  background: #e1f1d9;
  box-shadow: 2px 2px 0 var(--green);
  border-color: var(--green);
}

.fx-reset {
  margin-top: 12px;
  width: 100%;
}

.fx-toast {
  position: sticky;
  bottom: 14px;
  justify-self: center;
  padding: 11px 16px;
  background: var(--ink);
  color: #fffdf4;
  font-family: var(--pixel);
  font-size: 10px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .2s, transform .2s steps(4);
  z-index: 5;
}

.fx-toast.show {
  opacity: 1;
  transform: none;
}

.fx-toast.bad {
  background: #c9506b;
}

/* ===============================================================
   v1.1 — WHAT'S NEW
=============================================================== */
.wn-release {
  display: grid;
  gap: 16px;
}

.wn-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wn-ver {
  display: inline-block;
  padding: 9px 12px;
  background: var(--orange);
  color: #fff;
  font-family: var(--pixel);
  font-size: 14px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.wn-head h3 {
  margin: 0 0 6px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(13px, 2.6vw, 20px);
}

.wn-head small {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--muted);
}

.wn-sum {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: #3d443b;
  max-width: 760px;
}

.wn-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.wn-card {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  align-content: start;
}

.wn-shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: repeating-conic-gradient(#efe9cf 0 25%, #e6dfc0 0 50%) 0 0 / 16px 16px;
  cursor: zoom-in;
  overflow: hidden;
}

.wn-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.wn-shot.noimg {
  cursor: default;
}

.wn-shot.noimg img {
  display: none;
}

.wn-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 8px;
  background: #c4472f;
  color: #fff;
  font-family: var(--pixel);
  font-size: 8px;
  border: 2px solid var(--ink);
}

.wn-copy {
  padding: 14px 16px 16px;
}

.wn-copy h4 {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.5;
}

.wn-copy p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: #4a5148;
}

.wn-old {
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--ink);
  margin-top: 18px;
}

.wn-old summary {
  cursor: pointer;
  font-family: var(--pixel);
  font-size: 10px;
}

.wn-old .wn-release {
  margin-top: 14px;
}

.wn-lightbox {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(39, 43, 39, .88);
  animation: infoIn .2s steps(3) both;
}

.wn-lb-card {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.wn-lb-card img {
  max-width: 100%;
  max-height: 74vh;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .4);
  background: #fff;
}

.wn-lb-card p {
  margin: 0;
  font-family: var(--pixel);
  font-size: 10px;
  color: #fffdf4;
}

.wn-lb-close {
  justify-self: end;
}

.wn-pop {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(39, 43, 39, .72);
  animation: infoIn .25s steps(4) both;
}

.wn-pop.out {
  opacity: 0;
  transition: opacity .2s;
}

.wn-pop-card {
  width: min(520px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px;
  display: grid;
  gap: 14px;
  background: var(--panel);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .45);
}

.wn-pop-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wn-pop-head small {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .12em;
  color: #c4472f;
}

.wn-pop-head h3 {
  margin: 7px 0 0;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(12px, 3vw, 17px);
  line-height: 1.4;
}

.wn-pop-shot {
  border: 2px solid var(--ink);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e6dfc0;
}

.wn-pop-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wn-pop-sum {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #3d443b;
}

.wn-pop-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.wn-pop-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.4;
}

.wn-pop-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ink);
}

.wn-pop-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

/* ===============================================================
   v1.1 — ABOUT
=============================================================== */
.about {
  display: grid;
  gap: 18px;
}

.about-hero {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.about-hero img {
  width: min(300px, 70%);
  height: auto;
  image-rendering: pixelated;
}

.about-tag {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(9px, 2vw, 12px);
  letter-spacing: .1em;
  color: var(--orange);
}

.about-hero .hcard-p {
  max-width: 560px;
  margin: 0;
}

.about-nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.about-nums div {
  padding: 14px 10px;
  text-align: center;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.about-nums b {
  display: block;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 24px;
  color: var(--green);
}

.about-nums span {
  display: block;
  margin-top: 8px;
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: .06em;
}

.about-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: st;
}

.about-steps li {
  position: relative;
  padding-left: 44px;
  counter-increment: st;
  display: grid;
  gap: 5px;
}

.about-steps li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  font-family: var(--pixel);
  font-size: 11px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.about-steps b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.5;
}

.about-steps span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: #4a5148;
}

.stack {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.stack small {
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--muted);
}

.stack p {
  margin: 9px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stack i {
  font-style: normal;
  padding: 6px 9px;
  background: #fffdf4;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.credit {
  padding: 9px 0;
  border-top: 3px dashed #dedcc9;
  display: grid;
  gap: 5px;
}

.credit:first-of-type {
  border-top: 0;
}

.credit small {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: .08em;
}

.credit b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 14px;
}

@media (max-width: 640px) {
  .fx-up {
    grid-template-columns: 38px 1fr;
  }

  .fx-up-ic {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .fx-up-buy {
    grid-column: 1 / -1;
  }

  .fx-stage {
    height: clamp(230px, 40vh, 300px);
  }

  .wn-head {
    align-items: flex-start;
  }
}

/* fox preview canvas inside the carousel card */
.fx-art #skinPreview {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  image-rendering: pixelated;
  margin: 0 !important;
  padding: 0 !important;
}

.fx-art #skinPreview.locked {
  filter: grayscale(.85) brightness(.82);
}

.fx-card .fx-face {
  display: flex;
}

/* sections hide the carousel behind them completely */
.hub-main[inert] {
  opacity: 0;
  pointer-events: none;
}

/* locked foxes keep their real colours, only slightly muted */
.fx-card.locked .fx-art canvas,
.fx-card.locked .fx-art svg {
  filter: saturate(.55) brightness(.97);
}

.fx-art #skinPreview.locked {
  filter: none;
}

.fx-thumb {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ===============================================================
   v1.1.1 — STYLE WORKBENCH 2: live fox stage, prices, buy bar
=============================================================== */
.fx-wallet-mini {
  padding: 5px 10px;
  font-size: 11px;
  box-shadow: 2px 2px 0 var(--ink);
}

.fx-stagebox {
  position: sticky;
  top: 6px;
  z-index: 4;
  margin-bottom: 12px;
  border: 3px solid var(--ink);
  background: #cfe8c4;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}

.fx-stagebox canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 230px;
  image-rendering: pixelated;
}

.fx-stage-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 6px 8px;
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: .06em;
  background: var(--ink);
  color: #fffdf4;
}

.fx-stage-tag.try {
  background: var(--orange);
  color: #fff;
  animation: fxTry .9s steps(2) infinite;
}

@keyframes fxTry {
  50% {
    filter: brightness(1.2);
  }
}

.fx-test {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 8px !important;
  padding: 8px 10px !important;
}

.fx-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

@media (min-width: 560px) {
  .fx-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fx-chip {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  text-align: left;
  border: 2px solid var(--ink);
  background: #fffdf4;
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
}

.fx-chip small {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--muted);
  letter-spacing: .08em;
}

.fx-chip b {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 8px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-chip.try {
  border-color: var(--orange);
  background: #ffeedd;
}

.fx-chip.try small {
  color: var(--orange);
}

.fx-opt {
  grid-template-columns: 26px 1fr;
  row-gap: 2px;
}

.fx-opt i {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--ink);
  font-weight: 400;
}

.fx-opt i .px-coin {
  width: 10px;
  height: 10px;
}

.fx-opt.on i {
  color: var(--green);
}

.fx-opt.locked {
  background: #f1ede0;
}

.fx-opt.locked span {
  filter: grayscale(.7);
  opacity: .75;
}

.fx-opt.try {
  border-color: var(--orange);
  background: #ffeedd;
  box-shadow: 2px 2px 0 var(--orange);
}

.fx-opt.try i {
  color: var(--orange);
}

.fx-opt:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.fx-buybar {
  margin-top: 12px;
  padding: 10px;
  border: 3px solid var(--orange);
  background: #fff6e8;
  display: grid;
  gap: 10px;
  animation: fxPop .22s steps(3);
}

.fx-buybar[hidden] {
  display: none;
}

@keyframes fxPop {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

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

.fx-buy-list {
  display: grid;
  gap: 6px;
}

.fx-buy-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.fx-buy-list em {
  font-style: normal;
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--muted);
  min-width: 62px;
}

.fx-buy-list b {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 9px;
}

.fx-buy-list b .px-coin {
  width: 11px;
  height: 11px;
}

.fx-buy-act {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .fx-buy-act {
    grid-template-columns: 1.6fr 1fr;
  }
}

.fx-buy-go.short {
  opacity: .75;
  background: #c9506b;
}

@media (max-height: 520px) {
  .fx-stagebox canvas {
    max-height: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .fx-stage-tag.try,
  .fx-buybar {
    animation: none;
  }
}


/* =====================================================================
   v1.1 — CHALLENGE TIERS, SWAP, EXPLORER DOCK
===================================================================== */
.challenge-item-top {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.challenge-item-top strong {
  flex: 1 1 auto;
  min-width: 0;
}

.tier-badge {
  font-style: normal;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: .5px;
  padding: 4px 6px 3px;
  border: 2px solid var(--ink);
  background: #e6f3dd;
  color: var(--green-dark);
}

.tier-medium .tier-badge {
  background: #fff0cf;
  color: #8a5a00;
}

.tier-hard .tier-badge {
  background: #ffd9d4;
  color: #a22d20;
}

.tier-hard {
  border-left: 4px solid #d65a49 !important;
}

.tier-medium {
  border-left: 4px solid #e8a93a !important;
}

.tier-easy {
  border-left: 4px solid #5aa36a !important;
}

.challenge-swap {
  margin-top: 8px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font: 800 10px/1 var(--sans);
  letter-spacing: .6px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}

.challenge-swap:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Explorer: toggle is a small pill, the settings live in a dock under the game */
body .explorer-toggle {
  top: 8px;
  right: 8px;
  padding: 6px 9px;
  font-size: 9px;
  box-shadow: 2px 2px 0 var(--ink);
}

body .explorer-panel {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: 30;
  width: 100%;
  max-height: none;
  overflow: visible;
  margin: 12px 0 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  box-shadow: 4px 4px 0 rgba(39, 43, 39, .7);
}

body .explorer-panel.hidden {
  display: none !important;
}

body .explorer-panel-head {
  grid-column: 1 / -1;
  margin: 0;
}

body .explorer-panel-head h3 {
  font-size: 15px;
  margin: 2px 0 0;
}

body .explorer-field {
  grid-column: span 2;
  margin: 0;
}

body .explorer-switch {
  grid-column: span 2;
  margin: 0;
  padding: 4px 0;
  border: 0;
}

body .explorer-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 7px 9px;
  font-size: 10px;
}

body .explorer-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

body .explorer-panel .pixel-select-menu {
  max-height: 220px;
  overflow: auto;
  z-index: 60;
}

@media (max-width: 700px) {
  body .explorer-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
    gap: 8px;
    margin-top: 10px;
  }

  body .explorer-field,
  body .explorer-switch {
    grid-column: span 1;
  }

  body .explorer-switch small {
    display: none;
  }

  body .explorer-note {
    display: none;
  }

  body .explorer-toggle {
    top: 6px;
    right: 6px;
    padding: 5px 7px;
    font-size: 8px;
  }

  body .explorer-panel-head h3 {
    font-size: 13px;
  }

  body .explorer-close {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  body .explorer-actions button {
    min-height: 38px;
    font-size: 11px;
  }
}

body .explorer-panel {
  align-items: start;
}

body .explorer-panel-head {
  order: 0;
}

body .explorer-field {
  order: 1;
}

body .explorer-switch {
  order: 2;
  align-self: center;
}

body .explorer-note {
  order: 3;
}

body .explorer-actions {
  order: 4;
}

@media (min-width: 701px) {
  body .explorer-panel {
    grid-template-columns: auto minmax(160px, 1fr) minmax(130px, 1fr) auto auto auto;
    align-items: center;
    padding: 10px 14px;
    gap: 10px 14px;
  }

  body .explorer-panel-head {
    grid-column: auto;
  }

  body .explorer-kicker {
    display: none;
  }

  body .explorer-close {
    display: none;
  }

  body .explorer-field,
  body .explorer-switch,
  body .explorer-actions {
    grid-column: auto;
  }

  body .explorer-field>span {
    display: block;
    font-size: 10px;
    margin-bottom: 3px;
  }

  body .explorer-switch small {
    display: none;
  }

  body .explorer-note {
    display: none;
  }

  body .explorer-actions {
    grid-template-columns: auto auto;
  }

  body .explorer-actions button {
    white-space: nowrap;
    padding: 0 12px;
  }

  body .explorer-panel .pixel-select-trigger {
    min-height: 36px;
    padding: 6px 10px;
  }
}

/* =====================================================================
   v1.1 — SETTINGS: sliders, segmented buttons, accent swatches
===================================================================== */
.set-slider,
.set-seg,
.set-accent {
  flex-wrap: wrap;
}

.set-range {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  flex: 0 1 190px;
}

.set-range output {
  font: 800 11px/1 var(--sans);
  min-width: 38px;
  text-align: right;
  color: var(--ink);
}

.set-range input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 14px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, var(--green) var(--p, 100%), #e4dfcc var(--p, 100%));
  margin: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 0;
}

.set-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 24px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.set-range input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 20px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: 2px 2px 0 var(--ink);
}

.seg {
  display: flex;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--panel);
}

.seg-b {
  padding: 8px 10px;
  font: 800 10px/1 var(--sans);
  letter-spacing: .5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 2px solid var(--ink);
  cursor: pointer;
  min-height: 34px;
}

.seg-b:last-child {
  border-right: 0;
}

.seg-b.on {
  background: var(--green);
  color: #fff;
}

.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 2px solid var(--ink);
  background: var(--panel);
  cursor: pointer;
}

.swatch i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--sw);
}

.swatch.on {
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--ink);
}

.px-switch.on {
  background: var(--green) !important;
}

.set-act,
.px-btn.set-act {
  background-color: var(--green);
}

@media (max-width: 520px) {

  .set-slider .set-range,
  .set-seg .seg,
  .set-accent .swatches {
    flex: 1 1 100%;
    margin-top: 10px;
  }

  .set-seg .seg-b {
    flex: 1;
  }
}

/* PERSONALIZED CONTROLS / TEXT */
body.pref-lefty .touch-controls {
  flex-direction: row-reverse;
}

@media (hover: none),
(max-width: 700px) {
  body[data-btn="sm"] .touch-control {
    height: clamp(66px, 10dvh, 92px) !important;
  }

  body[data-btn="lg"] .touch-control {
    height: clamp(112px, 19dvh, 170px) !important;
  }
}

body[data-text="lg"] .sec-inner,
body[data-text="lg"] .profile-card,
body[data-text="lg"] .hub-sec .sec-body {
  zoom: 1.12;
}

/* =====================================================================
   v1.1 — STATS DASHBOARD
===================================================================== */
.st-dash {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.st-hero {
  display: flex;
  gap: 14px;
  align-items: center;
}

.st-av {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 36px;
  border: 3px solid var(--ink);
  background: #ffe8c9;
  box-shadow: 3px 3px 0 var(--ink);
}
.st-av .stats-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.st-who {
  min-width: 0;
  flex: 1;
}

.st-who small {
  display: block;
  font: 800 10px/1 var(--sans);
  letter-spacing: 1px;
  color: var(--green-dark);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-who b {
  display: block;
  font: 800 17px/1.2 var(--sans);
  margin: 5px 0 8px;
}

.st-xp {
  height: 12px;
  border: 2px solid var(--ink);
  background: #e4dfcc;
}

.st-xp span {
  display: block;
  height: 100%;
  background: var(--green);
}

.st-who em {
  display: block;
  margin-top: 6px;
  font: 700 10px/1 var(--sans);
  font-style: normal;
  color: #6d7167;
  letter-spacing: .4px;
}

.st-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.st-tile {
  position: relative;
  padding: 12px 12px 11px 14px;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
  display: grid;
  gap: 3px;
}

.st-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--c);
}

.st-tile i {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
}

.st-tile b {
  font: 800 20px/1.1 var(--sans);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-tile span {
  font: 800 9px/1.3 var(--sans);
  letter-spacing: .6px;
  color: #6d7167;
  text-transform: uppercase;
}

.st-chart .hcard-k {
  margin-bottom: 12px;
}

.st-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: 0 2px;
  border-bottom: 2px solid var(--ink);
}

.st-bar {
  flex: 1;
  min-width: 0;
  height: var(--h);
  background: #b7d4bd;
  position: relative;
  border: 2px solid var(--ink);
  border-bottom: 0;
}

.st-bar.top {
  background: #f2b642;
}

.st-bar.last {
  background: var(--green);
}

.st-bar i {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font: 800 9px/1 var(--sans);
  font-style: normal;
  padding: 3px 4px;
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
  margin-bottom: 4px;
  z-index: 2;
}

.st-bar:hover i,
.st-bar:focus i,
.st-bar.last i {
  display: block;
}

.st-empty {
  margin: auto;
  font: 700 12px/1.5 var(--sans);
  color: #6d7167;
  text-align: center;
  padding: 24px 8px;
  width: 100%;
}

.st-rec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.st-rec div {
  display: grid;
  gap: 4px;
}

.st-rec b {
  font: 800 15px/1.1 var(--sans);
}

.st-rec span {
  font: 800 8px/1.3 var(--sans);
  letter-spacing: .5px;
  color: #6d7167;
}

.st-hide {
  display: none !important;
}

.st-extra {
  margin-top: 0;
}

@media (min-width: 640px) {
  .st-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =====================================================================
   v1.1 — MISSIONS SUMMARY
===================================================================== */
.ms-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.ms-row {
  display: grid;
  gap: 6px;
}

.ms-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.ms-top b {
  font: 800 14px/1 var(--sans);
  letter-spacing: .5px;
}

.ms-top span {
  font: 800 10px/1 var(--sans);
  color: var(--green-dark);
  letter-spacing: .5px;
}

.ms-track {
  height: 14px;
  border: 2px solid var(--ink);
  background: #e4dfcc;
}

.ms-track span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width .4s;
}

.ms-row.w .ms-track span {
  background: #7461c4;
}

.ms-row small {
  font: 700 10px/1.4 var(--sans);
  color: #6d7167;
  letter-spacing: .3px;
}

.ms-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 2px dashed #d6d0b8;
}

.ms-foot div {
  display: grid;
  gap: 4px;
  text-align: center;
}

.ms-foot b {
  font: 800 18px/1 var(--sans);
}

.ms-foot span {
  font: 800 8px/1.2 var(--sans);
  letter-spacing: .5px;
  color: #6d7167;
}

/* =====================================================================
   v1.1 — ABOUT: CONTACT
===================================================================== */
.about-contact {
  display: grid;
  gap: 12px;
}

.contact-mail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  text-align: center;
  word-break: break-all;
  font: 800 15px/1.2 var(--sans);
  color: var(--ink);
  text-decoration: none;
  background: #fff6df;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.contact-mail:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.contact-copy {
  width: 100%;
}

/* =====================================================================
   v1.1 — PROFILE CARD
===================================================================== */
.profile-card {
  padding: 0 0 18px;
  width: min(440px, 100%);
  max-height: min(94dvh, 820px);
  overscroll-behavior: contain;
}

.profile-card>*:not(.pf-banner):not(.profile-close) {
  margin-left: 20px;
  margin-right: 20px;
}

.pf-banner {
  height: 96px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .12) 50%, transparent 50%) 0 0 / 16px 16px,
    linear-gradient(180deg, var(--green) 0 62%, var(--green-dark) 62% 100%);
  border-bottom: 3px solid var(--ink);
}

.pf-banner .profile-fox {
  width: 84px;
  height: 84px;
  margin: 0 0 -42px;
  font-size: 46px;
  background: #ffebc6;
  position: relative;
  z-index: 2;
}

.profile-close {
  z-index: 5;
  width: 34px;
  height: 34px;
  background: var(--panel);
  border: 2px solid var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pf-head {
  margin-top: 52px !important;
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.pf-head h2 {
  margin: 0;
  font-size: 22px;
}

.pf-rank {
  font: 800 10px/1 var(--sans);
  letter-spacing: 1px;
  padding: 6px 10px 5px;
  background: #fff0cf;
  color: #8a5a00;
  border: 2px solid var(--ink);
}

.pf-rank:empty {
  display: none;
}

.pf-xp {
  width: min(240px, 80%);
  height: 10px;
  border: 2px solid var(--ink);
  background: #e4dfcc;
}

.pf-xp span {
  display: block;
  height: 100%;
  background: var(--green);
}

.pf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px !important;
  border: 2px solid var(--ink);
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--ink);
}

.pf-stats div {
  display: grid;
  gap: 4px;
  padding: 10px 4px;
  text-align: center;
  border-right: 2px dashed #d6d0b8;
  min-width: 0;
}

.pf-stats div:last-child {
  border-right: 0;
}

.pf-stats b {
  font: 800 15px/1 var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-stats span {
  font: 800 8px/1 var(--sans);
  letter-spacing: .6px;
  color: #6d7167;
}

.profile-intro {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
}

.pf-block {
  margin-top: 16px !important;
}

.pf-block .avatar-picker {
  margin: 0;
  max-height: 168px;
  overflow-y: auto;
  padding: 8px;
  border: 2px solid var(--ink);
  background: var(--panel);
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}

.pf-block .avatar-choice {
  font-size: 22px;
  min-height: 44px;
}

.profile-id-line {
  margin-top: 14px !important;
}

.pf-danger {
  margin-top: 12px !important;
  border: 1px dashed #d9a39b;
  padding: 8px 10px;
}

.pf-danger summary {
  font: 800 10px/1 var(--sans);
  letter-spacing: 1px;
  color: #a22d20;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}

.pf-danger summary::-webkit-details-marker {
  display: none;
}

.pf-danger[open] summary {
  margin-bottom: 8px;
}

.profile-actions {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding: 8px 0;
  z-index: 3;
}

@media (max-width: 480px) {
  .profile-modal {
    padding: 10px;
  }

  .profile-card>*:not(.pf-banner):not(.profile-close) {
    margin-left: 14px;
    margin-right: 14px;
  }

  .pf-banner {
    height: 80px;
  }

  .pf-banner .profile-fox {
    width: 76px;
    height: 76px;
    margin-bottom: -38px;
    font-size: 40px;
  }

  .pf-head {
    margin-top: 46px !important;
  }
}

/* HUD: score, distance, best and coins in one row */
.game-topline {
  gap: clamp(12px, 3.2vw, 56px);
}

.game-topline .stat-dist strong {
  color: var(--green-dark);
}

@media (max-width: 700px) {
  .game-topline {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  .game-topline .stat {
    min-width: 0;
    text-align: center;
  }

  .game-topline .stat strong {
    font-size: clamp(11px, 3.4vw, 15px) !important;
    white-space: nowrap;
  }

  .game-topline .stat-label {
    font-size: 7px !important;
    letter-spacing: .6px;
  }
}

body .explorer-panel {
  z-index: auto;
}

.game-topline .stat {
  display: grid;
  justify-items: center;
  gap: 4px;
}

@media (min-width: 701px) {
  .game-topline .stat {
    justify-items: start;
  }
}

.explorer-panel .pixel-select-menu .pixel-select-option {
  min-height: 44px;
}

/* =====================================================================
   v1.1 — PLAYER CARD (profile) — two columns on desktop
===================================================================== */
body .profile-card.pf2 {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  padding: 0;
  width: min(920px, 100%);
  max-height: min(94dvh, 860px);
  overflow: auto;
  background: var(--paper);
}

body .profile-card.pf2>.pf-side,
body .profile-card.pf2>.pf-main {
  margin: 0;
}

.pf-side {
  background: linear-gradient(180deg, #fbf6e4, #f2ecd3);
  border-right: 3px solid var(--ink);
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pf-side>*:not(.pf-banner) {
  margin-left: 18px;
  margin-right: 18px;
}

.pf-main {
  padding: 20px 22px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pf-main>* {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pf-main>.pf-block:first-of-type,
.pf-main>.profile-intro {
  margin-top: 0 !important;
}

.pf-banner {
  height: 112px;
}

.pf-banner .profile-fox {
  width: 96px;
  height: 96px;
  margin-bottom: -48px;
  font-size: 54px;
}

.pf-head {
  margin-top: 58px !important;
  gap: 4px;
}

.pf-head .drawer-kicker {
  margin: 0;
}

.pf-head h2 {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #7a7d70;
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
}

.pf-name {
  font: 800 24px/1.15 var(--sans);
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-top: 4px;
}

.pf-pid {
  font: 400 9px/1 var(--pixel);
  color: #7a7d70;
  letter-spacing: .5px;
  margin: 2px 0 6px;
}

.pf-xp {
  width: 100%;
  height: 12px;
}

.pf-xptext {
  font: 700 10px/1 var(--sans);
  color: #6d7167;
  margin-top: 4px;
}

.pf2 .pf-stats {
  grid-template-columns: 1fr 1fr;
  margin-top: 16px !important;
}

.pf2 .pf-stats div {
  border-right: 2px dashed #d6d0b8;
  border-bottom: 2px dashed #d6d0b8;
  padding: 12px 4px;
}

.pf2 .pf-stats div:nth-child(2n) {
  border-right: 0;
}

.pf2 .pf-stats div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.pf2 .pf-stats b {
  font-size: 17px;
}

.pf-ladder {
  margin-top: 16px;
  padding: 12px;
  border: 2px solid var(--ink);
  background: var(--panel);
}

.pf-sub {
  margin: 0 0 8px;
  font: 800 9px/1 var(--sans);
  letter-spacing: 1.2px;
  color: var(--green-dark);
}

.pf-pips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.pf-pips i {
  height: 12px;
  border: 2px solid var(--ink);
  background: #e4dfcc;
}

.pf-pips i.done {
  background: var(--green);
}

.pf-pips i.now {
  background: #f2b642;
  animation: pfPulse 1.4s steps(2) infinite;
}

@keyframes pfPulse {
  50% {
    background: #ffe39a;
  }
}

.pf-ranks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font: 800 9px/1.3 var(--sans);
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #6d7167;
}

.pf-ranks span:last-child {
  text-align: right;
  color: var(--ink);
}

.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.pf-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  background: #fff6df;
  font: 800 10px/1 var(--sans);
}

.pf-chips i {
  font-style: normal;
  font-size: 12px;
}

.pf-since {
  margin-top: 14px;
  font: 700 10px/1 var(--sans);
  color: #8a8d80;
  text-align: center;
  letter-spacing: .4px;
}

.pf-since:empty {
  display: none;
}

.avatar-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.avatar-tabs::-webkit-scrollbar {
  display: none;
}

.avatar-tab {
  flex: none;
  padding: 7px 10px;
  font: 800 10px/1 var(--sans);
  letter-spacing: .6px;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--ink);
  cursor: pointer;
}

.avatar-tab.on {
  background: var(--green);
  color: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}

.pf2 .pf-block .avatar-picker {
  max-height: 214px;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
}

.pf2 .profile-actions {
  position: static;
  padding: 0;
  margin-top: 4px !important;
}

.pf2 .account-box {
  margin-top: 6px !important;
}

@media (max-width: 820px) {
  body .profile-card.pf2 {
    grid-template-columns: 1fr;
    width: min(480px, 100%);
  }

  .pf-side {
    border-right: 0;
    border-bottom: 3px solid var(--ink);
    padding-bottom: 16px;
  }

  .pf-banner {
    height: 84px;
  }

  .pf-banner .profile-fox {
    width: 78px;
    height: 78px;
    margin-bottom: -39px;
    font-size: 42px;
  }

  .pf-head {
    margin-top: 48px !important;
  }

  .pf-name {
    font-size: 21px;
  }

  .pf2 .pf-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .pf2 .pf-stats div,
  .pf2 .pf-stats div:nth-child(2n) {
    border-right: 2px dashed #d6d0b8;
    border-bottom: 0;
    padding: 10px 2px;
  }

  .pf2 .pf-stats div:last-child {
    border-right: 0;
  }

  .pf2 .pf-stats b {
    font-size: 14px;
  }

  .pf2 .pf-stats span {
    font-size: 7px;
  }

  .pf-main {
    padding: 16px 14px 18px;
  }

  .profile-modal {
    padding: 8px;
  }
}

body .profile-card.pf2 {
  width: min(940px, 100%) !important;
  max-height: none !important;
  overflow: visible !important;
}

@media (max-width: 820px) {
  body .profile-card.pf2 {
    width: min(520px, 100%) !important;
  }
}

.pf2 .profile-close.px-btn {
  width: auto;
  height: auto;
}

.pf2 .profile-message:empty {
  display: none;
}

/* ===============================================================
   v1.1.2 — MUSIC PLAYER (Settings)
=============================================================== */
.mp-now {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  background: #fffdf4;
  box-shadow: 3px 3px 0 var(--ink);
}

.mp-now>div {
  flex: 1;
  min-width: 0;
}

.mp-now small {
  display: block;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--muted);
}

.mp-now b {
  display: block;
  margin-top: 5px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-next {
  flex: none;
  font-size: 8px !important;
  padding: 9px 10px !important;
}

.mp-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 22px;
  height: 22px;
  flex: none;
}

.mp-eq i {
  flex: 1;
  height: 30%;
  background: var(--muted);
}

.mp-card.playing .mp-eq i {
  background: var(--green);
  animation: mpEq .8s steps(4) infinite;
}

.mp-card.playing .mp-eq i:nth-child(2) {
  animation-delay: -.25s;
}

.mp-card.playing .mp-eq i:nth-child(3) {
  animation-delay: -.5s;
}

.mp-card.playing .mp-eq i:nth-child(4) {
  animation-delay: -.12s;
}

@keyframes mpEq {
  0% {
    height: 25%;
  }

  25% {
    height: 100%;
  }

  50% {
    height: 55%;
  }

  75% {
    height: 85%;
  }

  100% {
    height: 25%;
  }
}

.mp-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
}

.mp-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 2px solid var(--ink);
  background: #fffdf4;
}

.mp-row.on {
  background: #e1f1d9;
  border-color: var(--green);
}

.mp-row.used {
  box-shadow: 3px 3px 0 var(--green);
}

.mp-play {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  background: #ffd36a;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.mp-play.on {
  background: var(--orange);
  color: #fff;
}

.mp-copy {
  min-width: 0;
}

.mp-copy b {
  display: block;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 9px;
  line-height: 1.5;
  color: var(--ink);
}

.mp-copy small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-use {
  font-size: 8px !important;
  padding: 9px 10px !important;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .mp-row {
    grid-template-columns: 34px 1fr auto;
    gap: 8px;
  }

  .mp-play {
    width: 34px;
    height: 34px;
  }

  .mp-copy b {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-card.playing .mp-eq i {
    animation: none;
    height: 70%;
  }
}

.wn-shot.wn-icon-shot {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #efe8c8 0 10px, #e6dfc0 10px 20px);
  cursor: default;
}

.wn-icon {
  font-size: clamp(38px, 9vw, 58px);
  line-height: 1;
  filter: drop-shadow(3px 3px 0 rgba(39, 43, 39, .35));
}


/* ---------------------------------------------------------------
   PIXEL AVATAR SYSTEM — profile, picker, player chip and leaderboard
--------------------------------------------------------------- */
.avatar-choice.pixel-avatar-choice {
  display: grid;
  place-items: center;
  padding: 4px;
  min-width: 0;
  min-height: 54px;
  background: var(--paper, #fffaf0);
}
.avatar-option-image {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.profile-fox .profile-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.player-avatar-mini .player-avatar-image,
.rank-avatar .leaderboard-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.player-avatar-mini,
.rank-avatar {
  overflow: hidden;
}
