:root {
  --bg0: #0e0a12;
  --bg1: #16101c;
  --ink: #f8eef8;
  --muted: #b39ab8;
  --accent: #e879f9;
  --accent-2: #d946ef;
  --neon: #e879f9;
  --neon-2: #c026d3;
  --neon-glow: rgba(232, 121, 249, 0.45);
  --gold: #f0a8ec;
  --gold-2: #e879f9;
  --panel: rgba(22, 12, 28, 0.94);
  --line: rgba(240, 168, 236, 0.18);
  --ok: #7dce8a;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font-display: "Bodoni Moda", "Times New Roman", serif;
  --font-ui: "Montserrat", system-ui, sans-serif;
  --font-data: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-crt: "Share Tech Mono", "VT323", ui-monospace, monospace;
  --font-crt-title: "VT323", "Share Tech Mono", monospace;
  --font-token: "Orbitron", "Share Tech Mono", monospace;
  /* legacy aliases — UI by default; titles opt into --font-display */
  --font-d: var(--font-ui);
  --font-b: var(--font-ui);
  --crop-t: 0.09;
  --crop-b: 0.15;
  --crop-l: 0.07;
  --crop-r: 0.07;
  --app-max: 480px;
  --stage-pad-x: 12px;
  /* Filled by syncPlayViewport() — visual viewport clamps for Android Chrome */
  --vv-w: 100%;
  --play-w: 100%;
  --gutter-x: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  /* mobile browser chrome-safe full height */
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: radial-gradient(120% 80% at 50% 0%, #2a1628 0%, var(--bg0) 55%);
  color: var(--ink);
  font-family: var(--font-b);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Standalone legal pages load style.css — must unlock document scroll */
html.legal-doc,
html.legal-doc body {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
}
html.legal-doc body {
  /* page styles also pad; keep readable */
  -webkit-overflow-scrolling: touch;
}

.hidden,
[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* Age boot must always layer above app chrome and actually hide when cleared */
#age-gate {
  z-index: 200;
}
#age-gate.hidden,
#age-gate[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Cabinet load-in — above arcade chrome / age overlays while playing */
#load-in-gate.load-in-gate,
.load-in-gate {
  z-index: 13000;
  padding: 0;
  place-items: stretch;
  background: #050403;
  backdrop-filter: none;
  overflow: hidden;
  transition: opacity 1.2s ease-out;
}
#load-in-gate.hidden,
#load-in-gate[hidden] {
  display: none !important;
  pointer-events: none !important;
}
/* Playing must win — never let other rules blank the WebP while audio runs */
#load-in-gate.load-in-gate.is-playing:not([hidden]):not(.hidden) {
  display: grid !important;
  visibility: visible !important;
  opacity: 1;
  z-index: 13000 !important;
  pointer-events: auto !important;
}
#load-in-gate.is-fade {
  opacity: 0 !important;
}
#load-in-gate.is-fade #load-in-skip {
  pointer-events: auto !important;
}
#load-in-gate.is-loading {
  background: #050403;
}
.load-in-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #050403;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  visibility: visible;
}
.load-in-skip {
  position: absolute;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  z-index: 10;
  min-height: 2.4rem;
  opacity: 0.9;
  touch-action: manipulation;
  pointer-events: auto !important;
}
/* reduce-motion no longer CSS-kills load-in — own Settings toggle owns that */

.overlay-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(16px, var(--safe-t)) max(16px, var(--safe-r))
    max(16px, var(--safe-b)) max(16px, var(--safe-l));
  background: rgba(8, 5, 4, 0.78);
  backdrop-filter: blur(10px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tabbed shop / account shell */
.overlay-screen.overlay-fixed {
  overflow: hidden;
  place-items: stretch;
  align-items: stretch;
  justify-items: center;
}

/* Shop: use near-full mobile width/height · leave install banner room */
#shop.overlay-screen.overlay-fixed {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding:
    max(6px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(10px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
body:has(#install-banner:not([hidden]):not(.hidden)) #shop.overlay-screen.overlay-fixed {
  padding-bottom: max(9.5rem, calc(env(safe-area-inset-bottom, 0px) + 8.75rem));
}

.panel {
  width: min(100%, 400px);
  padding: 1.5rem 1.35rem;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(165deg, rgba(48, 20, 52, 0.5), transparent 50%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-height: min(92dvh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Fixed-height tab shell */
.panel.panel-tabbed {
  width: min(100%, 420px);
  height: min(100dvh - 24px, 720px);
  max-height: min(100dvh - 24px, 720px);
  padding: 0.85rem 0.85rem 0.65rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: auto;
}
/* TOKEN SHOP: full adaptive shell · scrolls inside tab body */
.panel.shop-panel.panel-tabbed {
  width: min(100%, 28rem);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding:
    max(0.65rem, 2.2vw)
    max(0.7rem, 2.5vw)
    max(0.55rem, 1.8vw);
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 121, 249, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(28, 14, 32, 0.97), rgba(12, 6, 14, 0.98));
  border-color: rgba(232, 121, 249, 0.22);
  box-shadow:
    0 0 0 1px rgba(232, 121, 249, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.55);
}
/* Account: same full-shell fit as shop so tall tabs can scroll */
#account-panel.overlay-screen.overlay-fixed {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding:
    max(6px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(10px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
body:has(#install-banner:not([hidden]):not(.hidden))
  #account-panel.overlay-screen.overlay-fixed {
  padding-bottom: max(9.5rem, calc(env(safe-area-inset-bottom, 0px) + 8.75rem));
}
.panel.account-panel-wide.panel-tabbed {
  width: min(100%, 440px);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}
/* Scroll tall account panes (login recovery, safety copy, etc.) */
.account-panel-wide .panel-pane.is-active {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  justify-content: flex-start;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}
/* Collection / fabrics keep internal layout (pager / fabric grid scroll) */
.account-panel-wide .panel-pane.pane-collection.is-active,
.account-panel-wide .panel-pane.pane-fabrics.is-active {
  overflow: hidden;
}

.panel-tabbed-head {
  flex: 0 0 auto;
  min-width: 0;
}
.panel-tabbed-head .brand-mark {
  margin-bottom: 0.15rem;
}
.panel-tabbed-head h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 5.2vw, 1.55rem);
}
.panel-tabbed-head .muted,
.panel-tabbed-head #shop-sub {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  line-height: 1.3;
}
.panel-tabbed-head .panel-back-top {
  margin: 0 0 0.2rem -0.2rem;
  min-height: 40px;
  padding: 0.35rem 0.65rem;
}

.panel-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  width: 100%;
  padding: 0.15rem 0 0.1rem;
}
.panel-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 0.4rem 0.2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-family: var(--font-d, inherit);
  font-size: clamp(0.62rem, 2.6vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.panel.account-panel-wide .account-tabs .panel-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.15rem;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  min-height: 44px;
}
.panel.account-panel-wide .account-tabs .panel-tab .material-symbols-outlined {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: inherit;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.panel.account-panel-wide .account-tabs .panel-tab[data-tab="safety"] .material-symbols-outlined {
  color: var(--cab-neon, var(--neon, #e879f9));
}
.panel.account-panel-wide .account-tabs .panel-tab.is-active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.recovery-box {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.recovery-title {
  margin-bottom: 0.25rem;
}
.recovery-show {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 168, 236, 0.35);
  background: rgba(40, 16, 36, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.recovery-show[hidden],
.recovery-show.hidden {
  display: none !important;
}
.recovery-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.72rem, 3vw, 0.88rem);
  word-break: break-all;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #f0a8ec;
  user-select: all;
  -webkit-user-select: all;
}

/* Full-screen mandatory recovery display (register / reset) */
.recovery-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}
.recovery-modal[hidden],
.recovery-modal.hidden {
  display: none !important;
}
.recovery-modal-inner {
  width: min(100%, 24rem);
  max-height: min(92dvh, 40rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1rem 1.15rem;
  border: 1px solid rgba(240, 168, 236, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.recovery-modal-inner h2 {
  margin: 0;
  font-size: clamp(1.05rem, 4.5vw, 1.25rem);
}
.recovery-modal-actions {
  flex-wrap: wrap;
  gap: 0.45rem;
}
.recovery-modal-actions .btn {
  flex: 1 1 auto;
  min-height: 2.75rem;
  touch-action: manipulation;
}
.login-gate-recover {
  margin-top: 0.65rem;
  max-width: 100%;
}
.login-gate-panel {
  max-height: min(94dvh, 48rem);
  overflow-y: auto;
}

.panel-tab-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.panel-pane {
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.panel-pane.is-active {
  display: flex;
}
.panel-pane[hidden]:not(.is-active) {
  display: none !important;
}

.panel-tabbed-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding-top: 0.35rem;
}
.panel-tabbed-foot .btn {
  min-height: 46px;
  min-width: 8.5rem;
  font-size: 0.9rem;
  padding: 0.55rem 1.2rem;
}

/* Buy: natural pack height — scroll pane instead of squishing cards */
.shop-panel.panel-tabbed .panel-tab-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.shop-panel .panel-pane.is-active {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  height: 100%;
  min-height: 0;
  justify-content: flex-start;
  gap: 0.55rem;
  padding-bottom: 0.25rem;
}
.np-button-grid-fit {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  gap: 0.55rem;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.np-button-grid-fit .np-pack {
  padding: 0.4rem 0.5rem 0.42rem;
  gap: 0.18rem;
  flex: 0 0 auto;
  min-height: auto;
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  box-sizing: border-box;
  border-radius: 10px;
}
.np-button-grid-fit .np-pack-pay-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.np-button-grid-fit .np-pack-tokens {
  flex: 0 0 auto;
  font-size: clamp(1.15rem, 5vw, 1.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #f3e8ff;
  white-space: nowrap;
}
.np-button-grid-fit .np-pack-price {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.np-button-grid-fit .np-pay-btn {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 7.5rem;
  margin: 0;
  padding: 0.15rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  transform: none;
  border-radius: 0;
  overflow: visible;
  /* No white/light crypto plate — transparent hit target around NP SVG */
  background: transparent;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.np-button-grid-fit .np-pay-btn:active {
  background: transparent;
  opacity: 0.88;
}
.np-button-grid-fit .np-pay-btn img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 5.25rem;
  min-height: 3.6rem;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
}
.np-button-grid-fit .np-pay-btn img.is-broken {
  display: none;
}
.np-button-grid-fit .np-pay-label {
  display: none;
}
.panel-pane[data-pane="buy"] .buy-pay-crypto-label {
  flex: 0 0 auto;
  margin: 0.35rem 0 0.15rem;
  padding: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 232, 255, 0.88);
  line-height: 1.2;
}
.buy-pay-crypto-label,
.quick-refill-crypto-label,
.shop-foot-crypto-label {
  margin: 0.45rem 0 0.35rem;
  padding: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 232, 255, 0.9);
  line-height: 1.2;
}
.shop-foot-crypto-label[hidden] {
  display: none !important;
}
.panel-tabbed-foot .shop-foot-crypto-label {
  width: 100%;
  order: -1;
}
.np-button-grid-fit .np-pack-foot,
.np-button-grid-fit .np-pack-blurb,
.np-button-grid-fit .np-pack-name,
.np-button-grid-fit .np-pack-top,
.np-button-grid-fit .np-pack-mid {
  display: none;
}
.panel-pane[data-pane="buy"] {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
}
.panel-pane[data-pane="buy"] .pack-grid,
.panel-pane[data-pane="buy"] .np-button-grid-fit {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}
.panel-pane[data-pane="buy"] .buy-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.55rem;
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
}
.panel-pane[data-pane="buy"] .buy-top-row .shop-banner {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.68rem, 2.8vw, 0.78rem);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-pane[data-pane="buy"] .buy-balance {
  flex: 0 0 auto;
  margin: 0;
  margin-left: auto;
  padding: 0.25rem 0.15rem;
  font-family: var(--font-d, var(--font-ui));
  font-weight: 800;
  font-size: clamp(0.95rem, 4vw, 1.1rem);
  letter-spacing: 0.02em;
  color: var(--cab-neon, var(--neon, #e879f9));
  text-align: right;
  white-space: nowrap;
}
.panel-pane[data-pane="buy"] .np-claim-row {
  margin: 0.15rem 0 0;
  padding: 0.35rem 0 0.45rem;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  border: none;
  background: transparent;
}
.panel-pane[data-pane="buy"] .np-claim-row .btn,
.panel-pane[data-pane="buy"] #btn-np-claim {
  width: auto;
  min-width: min(100%, 12.5rem);
  max-width: min(100%, 16rem);
  min-height: 46px;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cab-neon-soft, rgba(232, 121, 249, 0.45)) 40%, transparent);
  border: 1px solid var(--cab-border-active, rgba(232, 121, 249, 0.5));
  box-shadow: none;
}
.panel-pane[data-pane="buy"] .np-claim-row .muted {
  font-size: 0.68rem;
  max-width: 18rem;
}
.panel-pane[data-pane="buy"] .shop-banner {
  margin: 0;
  padding: 0.4rem 0.55rem;
  font-size: clamp(0.68rem, 2.8vw, 0.78rem);
  flex: 1 1 auto;
}
.shop-panel.panel-tabbed .panel-tabbed-foot .btn {
  min-height: 46px;
  min-width: 8.5rem;
  font-size: 0.88rem;
  border-radius: 12px;
}

.shop-title-gold,
.brand-mark-gold.shop-title-gold {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(1.35rem, 6.5vw, 1.85rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--cab-title, #f0a8ec);
  text-shadow:
    0 0 22px var(--neon-glow, rgba(232, 121, 249, 0.42)),
    0 0 6px color-mix(in srgb, var(--cab-title, #f0a8ec) 25%, transparent),
    0 1px 0 rgba(80, 20, 60, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.shop-spark {
  font-size: 0.55em;
  line-height: 1;
  opacity: 0.9;
  color: var(--cab-neon, var(--neon, #e879f9));
  text-shadow: 0 0 10px var(--neon-glow, rgba(232, 121, 249, 0.55));
  flex: 0 0 auto;
}
.shop-head-token .panel-tabs {
  margin-top: 0.05rem;
  gap: 0.28rem;
}
.shop-panel .panel-tab {
  min-height: 42px;
  font-size: clamp(0.64rem, 2.7vw, 0.74rem);
  padding: 0.42rem 0.22rem;
}
.shop-panel .shop-tabs-ico.panel-tabs {
  gap: 0.22rem;
}
.shop-panel .shop-tabs-ico .panel-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 52px;
  padding: 0.35rem 0.12rem 0.3rem;
  border-radius: 12px;
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.14));
  background: rgba(0, 0, 0, 0.32);
  color: color-mix(in srgb, var(--cab-title, #f0a8ec) 62%, transparent);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}
.shop-panel .shop-tabs-ico .panel-tab .material-symbols-outlined {
  font-size: 1.2rem;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  color: inherit;
}
.shop-panel .shop-tabs-ico .panel-tab .panel-tab-label {
  font-size: clamp(0.52rem, 2.2vw, 0.62rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.shop-panel .shop-tabs-ico .panel-tab.is-active {
  color: var(--cab-title-muted, #f5d0fe);
  border-color: var(--cab-border-active, rgba(232, 121, 249, 0.55));
  background:
    radial-gradient(ellipse at 50% 20%, var(--cab-neon-soft, rgba(232, 121, 249, 0.22)), transparent 70%),
    rgba(40, 16, 36, 0.72);
  box-shadow:
    0 0 0 1px var(--cab-neon-soft, rgba(232, 121, 249, 0.18)),
    0 0 16px var(--neon-glow, rgba(232, 121, 249, 0.28));
}
.shop-panel .shop-tabs-ico .panel-tab.is-active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  filter: drop-shadow(0 0 6px var(--cab-neon-mid, rgba(232, 121, 249, 0.55)));
}
.shop-panel .shop-close-btn {
  min-width: min(100%, 14rem);
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--cab-border-active, rgba(232, 121, 249, 0.42));
  color: var(--cab-title, #f0a8ec);
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 18px var(--neon-glow, rgba(232, 121, 249, 0.12));
}
.shop-panel .shop-close-btn .shop-spark {
  font-size: 0.7rem;
  opacity: 0.85;
}

@media (max-height: 700px) {
  .shop-title-gold,
  .brand-mark-gold.shop-title-gold {
    font-size: clamp(1.15rem, 5.2vw, 1.45rem);
    margin-bottom: 0.25rem;
  }
  .shop-panel .panel-tab {
    min-height: 38px;
  }
  .shop-panel .shop-tabs-ico .panel-tab {
    min-height: 46px;
    gap: 0.08rem;
  }
  .np-button-grid-fit .np-pack {
    padding: 0.32rem 0.4rem;
  }
  .np-button-grid-fit .np-pack-tokens {
    font-size: clamp(1rem, 4.6vw, 1.2rem);
  }
  .np-button-grid-fit .np-pay-btn {
    min-height: 5.5rem;
    padding: 0.1rem 0;
  }
  .np-button-grid-fit .np-pay-btn img {
    max-height: 4.2rem;
    min-height: 3rem;
  }
}
@media (max-width: 380px) {
  .panel.shop-panel.panel-tabbed {
    padding: 0.55rem 0.55rem 0.5rem;
  }
  .shop-panel .panel-tab {
    letter-spacing: 0.02em;
    font-size: 0.6rem;
    padding: 0.35rem 0.1rem;
  }
  .shop-panel .shop-tabs-ico .panel-tab .panel-tab-label {
    font-size: 0.48rem;
    letter-spacing: 0.03em;
  }
  .panel-pane[data-pane="buy"] .buy-top-row .shop-banner {
    white-space: normal;
    flex: 1 1 100%;
  }
  .panel-pane[data-pane="buy"] .buy-balance {
    width: 100%;
    text-align: right;
  }
}
@media (min-width: 720px) {
  .panel.shop-panel.panel-tabbed {
    width: min(100%, 30rem);
    max-height: min(100%, 820px);
    height: min(100%, 820px);
    margin: auto;
  }
  #shop.overlay-screen.overlay-fixed {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
}

.btn-watch-ad-lg {
  min-height: 50px !important;
  font-size: 0.92rem !important;
  font-weight: 700;
  padding: 0.65rem 1rem !important;
  border-radius: 12px !important;
}

.info-pane-eq {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  justify-content: space-between;
  gap: 0.65rem;
}
.info-legal-eq {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0 0;
  flex: 0 0 auto;
}
.info-legal-eq a {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cab-neon, var(--neon, #e879f9));
  text-decoration: none;
  padding: 0.45rem 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.22));
  background: rgba(0, 0, 0, 0.2);
}
.info-legal-eq a:active {
  background: color-mix(in srgb, var(--cab-neon-soft, rgba(232, 121, 249, 0.45)) 28%, transparent);
}

/* Age multi-step: scroll-to-agree legal */
.age-panel-flow {
  max-height: min(92dvh, 640px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  min-height: min-content;
  overscroll-behavior: contain;
}
.age-step {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 0 0 auto;
  gap: 0.45rem;
}
.age-step.is-active {
  display: flex;
  flex: 0 0 auto;
  min-height: min-content;
}
.age-step[hidden] {
  display: none !important;
}
.age-step h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.2rem, 5vw, 1.45rem);
}
.age-step h2 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--ink, #f3e8df);
}
.legal-scroll {
  /* Do not flex-shrink: min-height:0 + flex-basis 0 collapsed this to one line */
  flex: 0 0 auto;
  min-height: 14rem;
  height: min(48dvh, 22rem);
  max-height: min(54dvh, 26rem);
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted, #a89488);
}
#age-gate .legal-scroll,
#age-gate .legal-scroll * {
  touch-action: pan-y;
  pointer-events: auto;
}
#age-gate .legal-scroll {
  user-select: text;
  -webkit-user-select: text;
  flex: 0 0 auto;
  min-height: 14rem;
  height: min(48dvh, 22rem);
  max-height: min(54dvh, 26rem);
}
@media (max-height: 640px) {
  #age-gate .legal-scroll,
  .legal-scroll {
    min-height: 11rem;
    height: min(42dvh, 18rem);
    max-height: min(46dvh, 20rem);
  }
}
@media (max-height: 520px) {
  #age-gate .legal-scroll,
  .legal-scroll {
    min-height: 9rem;
    height: min(38dvh, 14rem);
    max-height: min(42dvh, 16rem);
  }
}
.legal-scroll p {
  margin: 0 0 0.55rem;
}
.legal-scroll .legal-note {
  font-size: 0.72rem;
  opacity: 0.85;
}
.legal-scroll-end {
  margin-top: 1rem !important;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-weight: 700;
  color: var(--cab-neon, var(--neon, #e879f9));
  font-size: 0.78rem;
}
.age-check input:disabled {
  opacity: 0.4;
}

.tool-shop-fit {
  margin: 0;
  padding: 0;
  border: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tool-shop-fit .tool-bay-head {
  flex: 0 0 auto;
  margin: 0 0 0.35rem;
}
.tool-shop-fit .tool-bay-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.tool-shop-fit .tool-bay-h {
  margin: 0;
  font-size: clamp(0.95rem, 3.8vw, 1.1rem);
  letter-spacing: 0.08em;
  color: var(--cab-title, #f0a8ec);
  text-shadow: 0 0 12px var(--neon-glow, rgba(232, 121, 249, 0.28));
  flex: 0 0 auto;
}
.tool-shop-fit .tool-bay-rule {
  flex: 1 1 auto;
  height: 1px;
  min-width: 1.25rem;
  background: linear-gradient(
    90deg,
    var(--cab-neon-mid, rgba(232, 121, 249, 0.45)),
    var(--cab-neon-soft, rgba(232, 121, 249, 0.08))
  );
}
.tool-shop-fit .tool-bay-title-row .shop-spark {
  font-size: 0.7rem;
  flex: 0 0 auto;
}
.tool-shop-fit .tool-sort {
  margin-left: auto;
  flex: 0 0 auto;
}
.tool-shop-fit .tool-sort-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.28));
  background: rgba(0, 0, 0, 0.35)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23e8c76a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E")
    no-repeat right 0.45rem center;
  color: var(--cab-neon, var(--neon, #e879f9));
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 1.35rem 0.28rem 0.5rem;
  border-radius: 8px;
  min-height: 32px;
  max-width: 7.5rem;
  cursor: pointer;
}
.tool-shop-fit .tool-shop-grid {
  flex: 1;
  min-height: 0;
  margin: 0.2rem 0 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--cab-neon-mid, rgba(232, 121, 249, 0.55)) transparent;
  padding-right: 0.15rem;
}
.tool-shop-fit .tool-shop-grid::-webkit-scrollbar {
  width: 3px;
}
.tool-shop-fit .tool-shop-grid::-webkit-scrollbar-thumb {
  background: var(--cab-neon-mid, rgba(232, 121, 249, 0.55));
  border-radius: 999px;
}
.tool-shop-fit .tool-shop-card {
  padding: 0.55rem 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-color: var(--cab-border, rgba(232, 121, 249, 0.22));
  background:
    linear-gradient(180deg, rgba(42, 18, 40, 0.55), rgba(0, 0, 0, 0.38));
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tool-shop-fit {
  position: relative;
}
.tool-detail {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: auto;
}
.tool-detail[hidden] {
  display: none !important;
}
.tool-detail-dismiss {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 0, 10, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tool-detail-card {
  position: relative;
  z-index: 1;
  margin: auto 0.35rem 0.35rem;
  max-height: calc(100% - 0.5rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.55rem 0.6rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--cab-border-active, rgba(232, 121, 249, 0.4));
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--cab-panel-tint, rgba(60, 20, 80, 0.92)) 100%, transparent),
      rgba(10, 4, 18, 0.96)
    );
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-sizing: border-box;
}
.tool-detail-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.tool-detail-back {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.35));
  background: rgba(0, 0, 0, 0.35);
  color: var(--cab-title, #f0a8ec);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.tool-detail-back .material-symbols-outlined {
  font-size: 1.15rem;
}
.tool-detail-ico {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.tool-detail-ico .material-symbols-outlined {
  font-size: 1.55rem;
}
.tool-detail-titles {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.tool-detail-titles strong {
  font-size: 0.95rem;
  color: #f3e8ff;
  letter-spacing: 0.04em;
}
.tool-detail-hint {
  margin: 0;
  line-height: 1.3;
}
.tool-detail-stats {
  display: grid;
  gap: 0.28rem;
  margin: 0.15rem 0;
}
.tool-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.22rem 0.3rem;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.12));
}
.tool-stat-label {
  font-size: 0.68rem;
  color: rgba(233, 213, 255, 0.8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tool-stat-val {
  font-family: var(--font-d, inherit);
  font-size: 0.82rem;
  font-weight: 800;
  color: #f3e8ff;
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
}
.tool-stat-num {
  transition: color 0.35s ease, transform 0.35s ease;
}
.tool-stat-row:has(.tool-stat-delta) .tool-stat-num {
  color: var(--cab-neon, var(--neon, #e879f9));
  transform: scale(1.06);
}
.tool-stat-delta {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--cab-neon-2, var(--accent-2, #c084fc));
  animation: tool-delta-pop 0.45s ease-out;
}
@keyframes tool-delta-pop {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.tool-detail-actions {
  margin-top: 0.15rem;
}
.tool-detail-actions .btn {
  width: 100%;
  min-height: 2.4rem;
  font-size: 0.85rem;
}
.tool-shop-fit .muted.sm {
  margin: 0.28rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(200, 190, 170, 0.72);
}
.tool-shop-fit .sys-h {
  margin: 0;
  font-size: 0.85rem;
}
.tool-shop-fit .tool-shop-rate {
  margin: 0;
  font-size: 0.68rem;
  color: var(--cab-neon, var(--neon, #e879f9));
  font-weight: 500;
  line-height: 1.25;
}
.tool-shop-fit .tool-shop-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.tool-shop-fit .tool-shop-ico-ring {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  border: 1px solid var(--cab-border-active, rgba(232, 121, 249, 0.38));
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 10px var(--cab-neon-soft, rgba(232, 121, 249, 0.08));
}
.tool-shop-fit .tool-shop-ico-ring .material-symbols-outlined,
.tool-shop-fit .tool-shop-ico-ring .tool-ico {
  font-size: 1.25rem;
  color: var(--cab-title, #f0a8ec);
  filter: drop-shadow(0 0 5px var(--neon-glow, rgba(232, 121, 249, 0.35)));
}
.tool-shop-fit .tool-shop-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.tool-shop-fit .tool-shop-meta strong {
  font-size: clamp(0.72rem, 3vw, 0.82rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff5fc;
  line-height: 1.15;
}
.tool-shop-fit .tool-shop-card .btn {
  width: 100%;
  min-height: 34px;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tool-shop-fit .tool-shop-card .btn-primary {
  background: linear-gradient(
    135deg,
    var(--cab-bar-a, var(--accent, #c026d3)),
    var(--cab-bar-b, var(--neon, #e879f9)) 55%,
    var(--cab-bar-c, var(--cab-title, #f0a8ec))
  );
  border-color: transparent;
  color: #1a0a16;
  font-weight: 800;
  box-shadow:
    0 8px 24px var(--neon-glow, rgba(232, 121, 249, 0.32)),
    0 0 18px var(--cab-neon-soft, rgba(192, 38, 211, 0.22));
}
.tool-shop-fit .tool-shop-card .btn-ghost[disabled] {
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  letter-spacing: 0.01em;
  white-space: normal;
  line-height: 1.2;
  min-height: 36px;
}
.shop-extras-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}
.shop-extras-stack .btn {
  width: 100%;
  min-height: 46px;
  font-size: 0.88rem;
  border-radius: 12px;
}
.shop-extras-stack .btn-watch-ad-lg {
  min-height: 50px;
  font-size: 0.92rem;
}

.market-panel-fit {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.market-panel-fit .market-chart {
  width: 100%;
  max-height: 110px;
  flex: 0 0 auto;
}
.market-panel-fit .market-leaders {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 12.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
}
.market-panel-fit .market-stats,
.market-panel-fit .market-stack {
  margin: 0;
  font-size: 0.7rem;
}

/* Token vault — allocation + fixed rarity (not a market chart) */
.vault-panel-fit {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.vault-panel {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.7rem 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--cab-border, rgba(192, 132, 252, 0.28));
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--cab-panel-tint, rgba(88, 28, 135, 0.28)) 100%, transparent), transparent 55%),
    rgba(12, 4, 20, 0.42);
  box-shadow: inset 0 0 24px var(--cab-neon-soft, rgba(168, 85, 247, 0.08));
}
.vault-head {
  flex: 0 0 auto;
}
.vault-title {
  margin: 0;
  font-family: var(--font-d);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.vault-sub {
  margin: 0.15rem 0 0;
  line-height: 1.25;
}
.vault-pool {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(24, 8, 40, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.18);
}
.vault-pool-label {
  font-size: 0.68rem;
  color: rgba(216, 180, 254, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vault-pool-size {
  font-family: var(--font-d);
  font-size: clamp(0.9rem, 4vw, 1.05rem);
  color: #f3e8ff;
}
.vault-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.vault-section-rarity {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.vault-section-h {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8b4fe;
  font-weight: 700;
}
.vault-rarity-note {
  margin: 0;
  font-size: 0.58rem;
}
.vault-allocation {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.vault-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.62rem;
}
.vault-row-label {
  color: rgba(233, 213, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vault-row-track,
.vault-rarity-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(24, 8, 40, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.15);
  overflow: hidden;
}
.vault-row-track i,
.vault-rarity-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cab-bar-a, #a855f7), var(--cab-bar-b, #e879f9));
}
.vault-row-paid .vault-row-track i {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}
.vault-row-free .vault-row-track i {
  background: linear-gradient(90deg, #059669, #6ee7b7);
}
.vault-row-wallets .vault-row-track i {
  background: linear-gradient(90deg, #2563eb, #93c5fd);
}
.vault-row-spent .vault-row-track i {
  background: linear-gradient(90deg, #be185d, #f9a8d4);
}
.vault-row-val {
  font-variant-numeric: tabular-nums;
  color: #f3e8ff;
  font-weight: 700;
  font-size: 0.58rem;
  white-space: nowrap;
}
.vault-rarity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.vault-rarity-item {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) auto;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.58rem;
}
.vault-rarity-name {
  color: rgba(233, 213, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vault-rarity-pct {
  font-variant-numeric: tabular-nums;
  color: #e9d5ff;
  font-weight: 700;
}
.vault-rarity-item.rar-common .vault-rarity-track i {
  background: linear-gradient(90deg, #a8a29e, #e7e5e4);
}
.vault-rarity-item.rar-uncommon .vault-rarity-track i {
  background: linear-gradient(90deg, #16a34a, #86efac);
}
.vault-rarity-item.rar-rare .vault-rarity-track i {
  background: linear-gradient(90deg, #2563eb, #93c5fd);
}
.vault-rarity-item.rar-super_rare .vault-rarity-track i {
  background: linear-gradient(90deg, #ea580c, #fdba74);
}
.vault-rarity-item.rar-ultra_rare .vault-rarity-track i {
  background: linear-gradient(90deg, #db2777, #f0abfc);
}
.vault-rarity-item.rar-legendary .vault-rarity-track i {
  background: linear-gradient(90deg, #ca8a04, #fde047);
}
.vault-rarity-item.rar-mythic .vault-rarity-track i {
  background: linear-gradient(90deg, #9333ea, #d8b4fe);
}
.vault-rarity-item.rar-ethos .vault-rarity-track i {
  background: linear-gradient(90deg, #0891b2, #f472b6);
}
.vault-foot {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.58rem;
  line-height: 1.3;
}

.redeem-box-fit {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.redeem-box-fit .sell-steps {
  margin: 0.25rem 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.redeem-box-fit .sell-howto-title {
  margin: 0;
  font-size: 0.85rem;
}

/* Collection · fixed grid + pager (no vertical scroll) */
.pane-collection {
  gap: 0.4rem;
}
.pane-collection .gallery-head {
  margin: 0;
}
.pane-collection .gallery-org {
  margin: 0;
  flex: 0 0 auto;
}
.gallery-grid.is-paged {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.gallery-grid.is-paged .gallery-card {
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
}
.gallery-grid.is-paged .gallery-empty {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}

.pane-pager {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 44px;
}
.pane-pager[hidden] {
  display: none !important;
}
.pane-pager-label {
  font-family: var(--font-d, inherit);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 4.5rem;
  text-align: center;
}
.pane-pager .btn {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.25rem;
  line-height: 1;
}

.sys-block-compact {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sys-block-compact .sys-h {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}
.sys-block-compact .sys-fam,
.sys-block-compact details {
  display: none;
}
.sys-block-compact .up-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 0;
  max-height: 28vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-content: flex-start;
}
.sys-block-compact .up-tool {
  font-size: 0.68rem;
  min-height: 32px;
  padding: 0.25rem 0.4rem;
}

.theme-packs-fit {
  flex: 1 1 auto;
  min-height: 0;
  /* Must scroll — overflow:hidden was clipping cabinet skins below the fold */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.5rem;
}
.theme-packs-fit .theme-intro {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.72rem;
}
.theme-packs-fit .theme-list,
.theme-packs-fit .theme-list-paged {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 0 0 auto;
  min-height: 0;
}
.theme-packs-fit .theme-row {
  flex: 0 0 auto;
  min-height: 4.5rem;
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.theme-packs-fit .cabinet-skin-block {
  flex: 0 0 auto;
  scroll-margin-bottom: 1rem;
}

.stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 0 0 auto;
}

.panel-pane.pane-stats {
  gap: 0.28rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.panel-pane.pane-stats .sys-block-compact,
.panel-pane.pane-stats #sys-hub {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
  margin-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.sys-block-compact {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sys-block-compact .up-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 0;
  max-height: 28vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-content: flex-start;
}
.panel-pane.pane-stats .title-track {
  margin: 0.05rem 0 0.2rem;
  flex: 0 0 auto;
}
.panel-pane.pane-stats .title-track .muted {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
}
.panel-pane.pane-stats .stats-actions {
  flex: 0 0 auto;
  margin: 0;
  gap: 0.3rem;
}
.panel-pane.pane-stats .stats-actions .btn {
  min-height: 40px;
  font-size: 0.75rem;
}
.panel-pane.pane-stats .stats-gift {
  margin: 0;
  flex: 0 0 auto;
}
.panel-pane.pane-stats .share-code-out {
  margin: 0;
  min-height: 0;
  max-height: 1.15em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  flex: 0 0 auto;
}
.panel-pane.pane-stats .stat-pop {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.25;
  max-height: 2.4em;
  overflow: hidden;
  flex: 0 0 auto;
}
.panel-pane.pane-stats .peeker-title {
  font-size: 0.95rem;
}
.panel-pane.pane-stats .stat-grid {
  gap: 0.3rem;
}
.panel-pane.pane-stats .stat-cell {
  min-height: 0;
  padding: 0.35rem 0.2rem;
}

.panel-pane.pane-themes {
  gap: 0.4rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  min-height: 0;
}
.panel-pane.pane-themes .gallery-head {
  margin: 0;
  flex: 0 0 auto;
}
.panel-pane.pane-themes .pane-pager {
  flex: 0 0 auto;
}

.panel-pane.pane-safety {
  justify-content: flex-start;
  gap: 0.45rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pane-safety .danger-zone {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: auto;
  min-height: 0;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.pane-safety .danger-title {
  margin: 0;
  font-family: var(--font-d, inherit);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff9a8a;
  flex: 0 0 auto;
}
.pane-safety .danger-blurb {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 121, 249, 0.35);
  background: rgba(80, 20, 16, 0.28);
}
.pane-safety .danger-note {
  margin: 0;
  color: #ffc3b8;
  font-size: 0.68rem;
  line-height: 1.35;
}
.pane-safety .danger-note strong {
  color: #ffe0d8;
  font-weight: 700;
}
.pane-safety #btn-delete-account {
  width: 100%;
  min-height: 46px;
  flex: 0 0 auto;
}
.pane-safety .delete-flow {
  flex: 0 0 auto;
}

.panel-pane[data-pane="login"] .auth-box {
  margin: 0;
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  overflow: visible;
}
.panel-pane[data-pane="login"] .auth-box.pane-scroll-safe {
  padding-bottom: 0.35rem;
}

@media (max-height: 620px) {
  .panel.panel-tabbed:not(.shop-panel) {
    height: 100%;
    max-height: 100%;
    padding: 0.55rem 0.65rem 0.45rem;
  }
  .panel-tab {
    min-height: 36px;
    font-size: 0.6rem;
  }
  .np-button-grid-fit .np-pack-name {
    font-size: 0.8rem;
  }
  .gallery-grid.is-paged {
    gap: 0.3rem;
  }
  .sys-block-compact {
    max-height: none;
  }
  .pane-safety .danger-note {
    font-size: 0.62rem;
    line-height: 1.3;
  }
  .theme-packs-fit .theme-row {
    min-height: 3.8rem;
    padding: 0.5rem 0.55rem;
  }
  .fabric-preview {
    max-height: min(12dvh, 96px);
  }
  .fabric-studio-hint {
    display: none;
  }
  .fabric-studio {
    gap: 0.28rem;
  }
}

.brand-mark {
  margin: 0 0 0.35rem;
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-2);
}

.panel-back-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -0.35rem 0 0.5rem -0.35rem;
  padding: 0.45rem 0.85rem;
  touch-action: manipulation;
}

.panel h1,
.panel h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  line-height: 1.1;
}

.muted {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.muted code {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  font-size: 0.85em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font-b);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--cab-bar-a, var(--accent, #e879f9)),
    var(--cab-neon-2, var(--accent-2, #a21caf))
  );
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px var(--neon-glow, rgba(232, 121, 249, 0.28));
}

.btn-ghost {
  background: transparent;
}

.btn.sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 14px;
  flex-shrink: 0;
}

.app {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  /* Always track the real viewport — never let footer/dock min-content widen the shell */
  width: 100%;
  max-width: min(var(--app-max), 100%);
  min-width: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  padding-left: max(var(--safe-l), var(--gutter-x, 0px));
  padding-right: max(var(--safe-r), var(--gutter-x, 0px));
  box-sizing: border-box;
  overflow: hidden;
  overflow-x: clip;
  justify-items: stretch;
}

/* Grid/flex children default min-width:auto — nowrap footer was expanding past the phone */
.app > * {
  min-width: 0;
  max-width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(4px, 2vw, 10px);
  /* top / right / bottom / left — do NOT swap safe-l/safe-r */
  padding: calc(10px + var(--safe-t)) clamp(6px, 2.5vw, 12px) 8px;
  z-index: 5;
  min-width: 0;
  position: relative;
  min-height: calc(52px + var(--safe-t));
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  z-index: 3;
}

.top-left-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.btn-gear {
  font-size: 1rem;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-name {
  display: none;
}

/* Gameplay wordmark — JS pins X to stage midline and Y so
   logo↔canvas gap ≈ canvas↔dock gap (no floating dead zone). */
.app > .play-logo-wrap.menu-logo-wrap {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-t) + 10px);
  transform: translateX(-50%);
  width: min(72%, 300px);
  max-width: calc(100% - 7.5rem);
  max-height: none;
  height: auto;
  aspect-ratio: 4.2 / 1;
  margin: 0;
  padding: 0;
  --logo-stroke-px: 2px;
  --logo-stroke-diag: 1.45px;
  z-index: 8;
  pointer-events: none;
  align-self: auto;
  flex: none;
}

.pack-meta {
  display: none !important;
  font-size: clamp(0.58rem, 2.6vw, 0.7rem);
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 11.5rem);
  line-height: 1.2;
}

.wallet-wrap {
  position: relative;
  flex: 0 1 auto;
  max-width: min(48%, 9rem);
  min-width: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.wallet {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-family: var(--font-data, var(--font-d));
  font-weight: 700;
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  overflow: hidden;
}
#token-count,
#menu-token-count,
#chrome-token-count {
  font-family: var(--font-token);
  font-style: italic;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.06em;
  display: inline-block;
  min-width: 1.6ch;
  text-align: right;
  color: var(--cab-neon, var(--neon, #e879f9));
  text-shadow: 0 0 8px var(--neon-glow, rgba(232, 121, 249, 0.42));
  transition: color 0.15s ease;
}
.token-ico,
.arcade-chrome-wallet .token-ico,
.wallet .token-ico,
.btn-wallet .token-ico,
.menu-wallet .token-ico {
  position: relative;
  z-index: 1;
  color: var(--cab-neon, var(--neon, #e879f9)) !important;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.8),
    0 0 3px var(--cab-neon-strong, rgba(232, 121, 249, 0.8)),
    0 0 8px var(--cab-neon-mid, rgba(192, 80, 220, 0.8)),
    0 0 14px var(--cab-neon-soft, rgba(168, 60, 210, 0.76)),
    0 0 26px var(--neon-glow, rgba(232, 121, 249, 0.52)) !important;
  filter: drop-shadow(0 0 2px var(--cab-neon-strong, rgba(232, 121, 249, 0.8)))
    drop-shadow(0 0 6px var(--cab-neon-mid, rgba(192, 80, 220, 0.76)))
    drop-shadow(0 0 13px var(--cab-neon-soft, rgba(168, 60, 210, 0.44))) !important;
  animation: token-ico-glow 1.25s ease-in-out infinite;
}
@keyframes token-ico-glow {
  0%,
  100% {
    opacity: 0.95;
  }
  50% {
    opacity: 1;
  }
}
body.peeper-vfx-off .token-ico,
body.peeper-vfx-off .arcade-chrome-wallet .token-ico {
  animation: none;
  opacity: 1;
  filter: drop-shadow(0 0 4px var(--cab-neon-strong, rgba(232, 121, 249, 0.9))) !important;
}
html.reduce-motion .token-ico,
body.reduce-motion .token-ico {
  animation: none;
  opacity: 1;
}
#token-count.token-tally-spin,
#menu-token-count.token-tally-spin,
#chrome-token-count.token-tally-spin {
  color: var(--neon, #e879f9);
  animation: token-tally-flicker 0.12s steps(2, end) infinite;
}
@keyframes token-tally-flicker {
  50% {
    opacity: 0.72;
  }
}
html.reduce-motion #token-count.token-tally-spin,
html.reduce-motion #menu-token-count.token-tally-spin,
html.reduce-motion #chrome-token-count.token-tally-spin {
  animation: none;
}

/* Large chunk gain: scrap → center (1.2×) → wallet */
.chunk-gain-fly {
  position: fixed;
  z-index: 240;
  pointer-events: none;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0.15em 0.35em;
  font-family: var(--font-data, var(--font-d));
  font-weight: 800;
  font-size: clamp(1.35rem, 6.2vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f5d0fe;
  text-shadow:
    0 0 12px rgba(232, 121, 249, 0.85),
    0 2px 10px rgba(0, 0, 0, 0.75),
    0 0 1px #fff;
  white-space: nowrap;
  will-change: transform, opacity;
  user-select: none;
}
/* Luxury letter: scrap → center → word slot */
.letter-gain-fly {
  position: fixed;
  z-index: 241;
  pointer-events: none;
  left: 0;
  top: 0;
  margin: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-data, var(--font-d));
  font-weight: 900;
  font-size: clamp(1.2rem, 5.5vw, 1.85rem);
  letter-spacing: 0.04em;
  color: #f8e7a0;
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 230, 140, 0.35), rgba(40, 20, 8, 0.75));
  border: 1px solid rgba(244, 208, 63, 0.65);
  box-shadow:
    0 0 14px rgba(244, 208, 63, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.65);
  text-shadow: 0 0 8px rgba(244, 208, 63, 0.8);
  will-change: transform, opacity;
  user-select: none;
}
html.reduce-motion .letter-gain-fly {
  display: none !important;
}
.wallet.wallet-chunk-hit,
#token-count.wallet-chunk-hit,
#chrome-token-count.wallet-chunk-hit,
.arcade-chrome-wallet.wallet-chunk-hit {
  animation: wallet-chunk-pop 0.38s ease-out;
}
@keyframes wallet-chunk-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14);
    color: #f0a8ec;
  }
  100% {
    transform: scale(1);
  }
}
html.reduce-motion .chunk-gain-fly {
  display: none !important;
}
html.reduce-motion .wallet.wallet-chunk-hit,
html.reduce-motion #token-count.wallet-chunk-hit,
html.reduce-motion #chrome-token-count.wallet-chunk-hit,
html.reduce-motion .arcade-chrome-wallet.wallet-chunk-hit {
  animation: none;
}
.wallet:active {
  transform: scale(0.97);
}
.wallet[aria-expanded="true"] {
  border-color: rgba(240, 160, 96, 0.55);
  background: rgba(240, 160, 96, 0.12);
}
.wallet-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: min(240px, 78%);
  max-width: min(280px, calc(var(--play-w, 100%) - 1.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: 14px;
  background: rgba(18, 12, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 40;
  box-sizing: border-box;
}
.wallet-drop[hidden] {
  display: none !important;
}
.wallet-np {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  font-family: var(--font-b);
}
.wallet-np:active {
  transform: scale(0.98);
  border-color: rgba(240, 160, 96, 0.5);
}
.wallet-np-name {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}
.wallet-np-meta {
  font-size: 0.72rem;
  color: var(--muted);
}
.wallet-np-price {
  color: var(--cab-neon, var(--neon, #e879f9));
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.8rem;
}

/* OUT OF TOKENS — fixed over viewport (never clipped by stage canvas) */
.oot-toast {
  position: fixed;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 12050;
  pointer-events: auto;
  max-width: min(100%, calc(100% - 1.5rem));
  width: max-content;
  box-sizing: border-box;
  animation: oot-pop 0.35s cubic-bezier(0.2, 1.1, 0.35, 1) both;
}
.oot-toast.hidden,
.oot-toast[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.oot-toast-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 8, 8, 0.92);
  color: #fff;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(0.95rem, 4.2vw, 1.15rem);
  letter-spacing: 0.12em;
  padding: 0.7rem 1.15rem;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(232, 121, 249, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 48px;
  white-space: nowrap;
}
.oot-toast-btn:active {
  transform: scale(0.97);
}
@keyframes oot-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Centered 3-pack strip (same content as ✦ wallet drop) */
.quick-refill {
  position: fixed;
  inset: 0;
  z-index: 12060;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px
    max(12px, env(safe-area-inset-bottom));
  pointer-events: auto;
}
.quick-refill.hidden,
.quick-refill[hidden] {
  display: none !important;
}
.quick-refill-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(6, 4, 4, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.quick-refill-panel {
  position: relative;
  z-index: 1;
  width: min(280px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.7rem 0.65rem;
  border-radius: 16px;
  background: rgba(18, 12, 14, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  animation: oot-panel-in 0.28s ease both;
}
@keyframes oot-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.quick-refill-title {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
}
.quick-refill-sub {
  margin: 0 0 0.2rem;
  text-align: center;
}
.quick-refill-packs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}
.quick-refill-packs.np-button-grid-fit .np-pack-foot {
  display: none;
}
#quick-refill-close {
  margin-top: 0.15rem;
  align-self: center;
}

@media (prefers-reduced-motion: reduce) {
  .oot-toast,
  .quick-refill-panel {
    animation: none;
  }
}

.token-ico {
  color: var(--cab-neon, var(--neon, #e879f9));
  font-size: 0.85rem;
}

.stage-wrap {
  min-height: 0;
  /* Logo + equal gaps are applied in JS (syncPlayLogoPosition) */
  padding: 4px var(--stage-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  gap: 0;
  justify-items: center;
}

/* No flex-grow spacer — vertical centering handles leftover height */
.stage-wrap::before {
  content: none;
  display: none;
}

.stage {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 420px);
  height: auto;
  max-width: 100%;
  /* JS sets exact height; keep stage from eating the dock band */
  max-height: calc(100% - 4px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0706;
  /* No cream (--line) frame — that read as a white rim on dark UI */
  border: none;
  outline: none;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55);
  touch-action: none;
  isolation: isolate;
  box-sizing: border-box;
  /* JS sets exact W×H from cropped aspect */
}

/* Clip scene art; edge crop strips fall outside this box */
.bg-clip {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #0a0706;
  pointer-events: none;
  border-radius: inherit;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Multi-edge crop: oversize img so top/bottom/left/right captions leave the frame.
   Stage aspect is matched to the remaining source rect (see fitStageToScene). */
.bg-scene,
.bg-scene.edge-cropped {
  position: absolute;
  left: calc(
    -100% * var(--crop-l) / (1 - var(--crop-l) - var(--crop-r))
  );
  top: calc(
    -100% * var(--crop-t) / (1 - var(--crop-t) - var(--crop-b))
  );
  width: calc(100% / (1 - var(--crop-l) - var(--crop-r)));
  height: calc(100% / (1 - var(--crop-t) - var(--crop-b)));
  max-width: none;
  max-height: none;
  object-fit: fill;
  object-position: center center;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  background: #0a0706;
  display: block;
}

/* Legacy */
.bg-scene.crop-inset {
  /* multi-edge crop via .bg-scene above */
}

/* While decoding, keep art clipped to stage (large GIF/WebP safe) */
.bg-scene.loading-scene {
  opacity: 0.001;
}
.bg-clip:has(.bg-scene.loading-scene) {
  background: #0a0706;
}

#tear-canvas {
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
  /* Stage listens for pointers; canvas must not steal/cancel them */
  pointer-events: none;
  /* Bleed past stage clip (JS must not pin left/top/width on this node) */
  inset: auto;
  left: -3px;
  top: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  right: auto;
  bottom: auto;
  border: 0;
  outline: none;
  box-shadow: none;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#fx-canvas {
  z-index: 3;
  pointer-events: none;
}

/* —— Scene clear ceremony: timer top-left · copy bottom —— */
.clear-fx {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: auto;
  cursor: default;
  display: block;
  animation: clear-jump 0.45s ease both;
  touch-action: manipulation;
  user-select: none;
}

.clear-fx.hidden {
  display: none;
}

.clear-fx.can-skip {
  cursor: pointer;
}

@keyframes clear-jump {
  0% { opacity: 0.55; }
  100% { opacity: 1; }
}

.clear-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 180, 0.28),
    inset 0 0 40px rgba(255, 160, 90, 0.28);
  animation: edge-glow 1.4s ease-out both;
  pointer-events: none;
}

@keyframes edge-glow {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0.75; }
}

/* Full-scene gleam band (was ~28% tall — looked like a partial swipe) */
.clear-gleam {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
.clear-gleam::after {
  content: "";
  position: absolute;
  top: -8%;
  left: -55%;
  width: 48%;
  height: 116%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 32%,
    rgba(255, 245, 220, 0.72) 50%,
    rgba(255, 255, 255, 0.14) 68%,
    transparent 100%
  );
  filter: blur(1.5px);
  transform: skewX(-14deg) translateX(0);
  opacity: 0;
  pointer-events: none;
}
/* Only fire when .fire toggled — allows replay each CLEAR */
.clear-gleam.fire::after {
  animation: gleam-ltr 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes gleam-ltr {
  0% {
    transform: skewX(-14deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: skewX(-14deg) translateX(320%);
    opacity: 0.12;
  }
}

/* Timer top-left · opacity driven by main.js after first 4s of CLEAR */
.clear-timer {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 10px;
  z-index: 2;
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(1.87rem, 10.2vw, 2.89rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff8ee;
  opacity: 0.95;
  min-width: 1.2em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  padding: 0.2rem 0.45rem;
  border-radius: 10px;
  background: rgba(8, 5, 5, 0.45);
  border: 1px solid rgba(255, 220, 180, 0.2);
  will-change: opacity;
}

.clear-timer.is-go {
  font-size: clamp(1.02rem, 5.1vw, 1.49rem);
  letter-spacing: 0.14em;
}

.clear-copy {
  position: absolute;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: min(92%, 360px);
  padding: 0.55rem 0.85rem 0.65rem;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(12, 8, 8, 0.15) 0%,
    rgba(8, 5, 5, 0.72) 40%,
    rgba(6, 4, 4, 0.88) 100%
  );
  border: 1px solid rgba(255, 220, 180, 0.18);
  backdrop-filter: blur(6px);
  will-change: opacity;
}
/* Timer / CLEAR / rarity chrome fade group (set by JS) */
.clear-fx .clear-edge {
  will-change: opacity;
}
.stage.clear-hold .rarity-badge {
  will-change: opacity;
  transition: none;
}

.clear-title {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: clamp(0.85rem, 3.6vw, 1.05rem);
  color: #fff0fb;
}

.clear-sub {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(255, 236, 210, 0.88);
  max-width: 100%;
}

.clear-first-stamp {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-7deg);
  z-index: 9;
  margin: 0;
  padding: 0.55rem 0.9rem 0.45rem;
  min-width: min(86%, 280px);
  text-align: center;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(0.92rem, 4.1vw, 1.28rem);
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #fff0fb;
  background: rgba(18, 8, 10, 0.82);
  border: 2px solid rgba(255, 210, 150, 0.7);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.clear-first-stamp.hidden {
  display: none;
}
.clear-first-skip {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--font-b);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(255, 226, 190, 0.75);
}
@media (max-height: 520px) and (orientation: landscape) {
  .clear-first-stamp {
    top: 36%;
    font-size: clamp(0.8rem, 3.2vw, 1.05rem);
    padding: 0.4rem 0.7rem 0.32rem;
  }
}

.tut-ghost {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}
.tut-ghost.hidden {
  display: none;
}
.tut-ghost-hand {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 46% 46% 46% 12%;
  background: rgba(255, 236, 210, 0.32);
  border: 2px solid rgba(255, 220, 180, 0.9);
  box-shadow: 0 0 18px rgba(255, 170, 110, 0.4);
  display: none;
}
.tut-ghost[data-mode="tap"] .tut-ghost-tap {
  display: block;
  top: 42%;
  left: 50%;
  animation: tut-ghost-tap 1.45s ease-in-out infinite;
}
.tut-ghost[data-mode="drag"] .tut-ghost-drag {
  display: block;
  top: 52%;
  animation: tut-ghost-drag 1.85s ease-in-out infinite;
}
.tut-ghost-label {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(12, 6, 8, 0.72);
  color: #ffe8d2;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 92%;
}
@keyframes tut-ghost-tap {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  42% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 1;
  }
}
@keyframes tut-ghost-drag {
  0% {
    left: 18%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
  }
  18% {
    opacity: 0.95;
  }
  82% {
    opacity: 0.95;
  }
  100% {
    left: 82%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
  }
}
.reduce-motion .tut-ghost-hand,
.reduce-motion .tut-ghost[data-mode="tap"] .tut-ghost-tap,
.reduce-motion .tut-ghost[data-mode="drag"] .tut-ghost-drag {
  animation: none;
  opacity: 0.85;
}
.reduce-motion .tut-ghost[data-mode="tap"] .tut-ghost-tap {
  transform: translate(-50%, -50%);
}
.reduce-motion .tut-ghost[data-mode="drag"] .tut-ghost-drag {
  left: 50%;
  transform: translate(-50%, -50%);
}

.tool-btn.tool-pulse {
  animation: tool-dock-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(255, 190, 120, 0.85);
  z-index: 2;
}
@keyframes tool-dock-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(255, 190, 120, 0.55);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(255, 190, 120, 0.95);
  }
}
.reduce-motion .tool-btn.tool-pulse {
  animation: none;
  outline: 2px solid rgba(255, 190, 120, 0.95);
  outline-offset: 2px;
}
@media (max-height: 520px) and (orientation: landscape) {
  .tut-ghost-label {
    bottom: 6%;
    font-size: 0.7rem;
  }
  .tut-ghost-hand {
    width: 40px;
    height: 40px;
  }
}

.reduce-motion .clear-fx {
  animation: none;
}
.reduce-motion .clear-gleam.fire::after {
  animation: none;
  left: 26%;
  opacity: 0.35;
  transform: skewX(-14deg);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(243, 232, 223, 0.75);
  background: rgba(0, 0, 0, 0.45);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hint.fade {
  opacity: 0;
}

.zone-flash {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 10px;
  right: auto;
  bottom: auto;
  transform: translateY(-6px);
  z-index: 6;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ok);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  max-width: min(55%, 12rem);
  text-align: left;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.zone-flash.show {
  opacity: 1;
  transform: translateY(0);
}

/* Never relocate for pack banners / crit — stay top-left of the scene */
.zone-flash.show.crit-gold,
.zone-flash.show.with-pack-banner,
.zone-flash.show.with-pack-banner.crit-gold {
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 10px;
  transform: translateY(0);
}

.zone-flash.crit-gold {
  color: #ffd700;
  font-size: 0.92rem;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.95),
    0 0 22px rgba(255, 180, 0, 0.65),
    0 2px 12px rgba(0, 0, 0, 0.75);
  animation: crit-flash-pulse 0.55s ease-in-out 2;
}

@keyframes crit-flash-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.35);
  }
}

.chunk-gain-fly.is-crit {
  color: #ffd700;
  font-size: clamp(1.5rem, 6.8vw, 2.65rem);
  text-shadow:
    0 0 14px rgba(255, 215, 0, 0.95),
    0 0 28px rgba(255, 160, 0, 0.75),
    0 2px 12px rgba(0, 0, 0, 0.8),
    0 0 2px #fff;
  animation: crit-chunk-shimmer 0.45s ease-in-out 3;
}

@keyframes crit-chunk-shimmer {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.4);
  }
}

/* VIP / ultra — dock tool slot (only shown when player owns charges) */
.tool-btn-vip,
.tool-btn-ultra {
  position: relative;
  border-color: rgba(255, 215, 0, 0.35);
  background: linear-gradient(145deg, rgba(40, 32, 8, 0.92), rgba(18, 14, 6, 0.96));
}

.tool-btn-vip .btn-vip-ico,
.tool-btn-vip .material-symbols-outlined {
  color: #ffd700 !important;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24 !important;
}

.tool-btn-vip .btn-vip-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffe066;
  line-height: 1;
}

.tool-btn-vip.has-charges {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.2);
}

.tool-btn-vip.is-armed {
  border-color: rgba(255, 220, 80, 0.75);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.35);
}

.tool-btn-vip.is-active,
.tool-btn-vip.active.is-active {
  border-color: #ffd700;
  background: linear-gradient(145deg, #6b4f00, #3a2800);
  box-shadow:
    0 0 14px rgba(255, 215, 0, 0.4),
    inset 0 0 8px rgba(255, 240, 120, 0.12);
  animation: vip-active-glow 1.2s ease-in-out infinite;
}

.tool-btn-vip.is-paused {
  border-color: rgba(255, 215, 0, 0.55);
  animation: none;
}

.tool-btn-vip.is-paused .vip-timer {
  opacity: 0.92;
}

.tool-btn-vip .vip-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.18rem;
  border-radius: 999px;
  background: #ffd700;
  color: #1a1200;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1rem;
  text-align: center;
  pointer-events: none;
}

@keyframes vip-active-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

html.reduce-motion .tool-btn-vip.is-active,
html.reduce-motion .tool-btn-vip.active.is-active {
  animation: none;
}

.vip-shop-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  background: linear-gradient(160deg, rgba(48, 36, 8, 0.55), rgba(12, 10, 6, 0.85));
  display: grid;
  gap: 10px;
}

.vip-shop-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.vip-shop-ring {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 14px rgba(255, 200, 0, 0.2);
}

.tool-shop-rate strong {
  color: #ffe066;
}

.tool-btn-vip .vip-timer {
  display: none;
  min-width: 1.4rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #ffd700;
  line-height: 1;
  pointer-events: none;
}

.tool-btn-vip .vip-timer.show {
  display: inline-block;
}

.vip-timer.panic,
.tool-btn-vip .vip-timer.panic {
  animation: vip-timer-panic 0.45s ease-in-out infinite;
  color: #fff6b0;
}

.vip-timer.paused,
.tool-btn-vip .vip-timer.paused {
  animation: none;
  color: #ffe9a8;
  opacity: 0.88;
}

@keyframes vip-timer-panic {
  0%,
  100% {
    filter: brightness(1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
  }
  50% {
    filter: brightness(1.25);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.65);
  }
}

html.reduce-motion .vip-timer.panic {
  animation: none;
  outline: 1px solid #ffd700;
}

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

.vip-pop-card strong {
  color: #ffe066;
}

/* hide hotspot labels when clear timer is up */
.stage.clear-hold .zone-flash {
  opacity: 0 !important;
  visibility: hidden;
}

.dock {
  /* App already applies safe-l/r — only add bottom home-indicator inset here */
  --dock-ico: clamp(36px, 11.5vw, 48px);
  padding: 6px clamp(6px, 2.5vw, 14px) max(10px, calc(var(--safe-b) + 6px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 8;
  position: relative;
  pointer-events: auto;
  overflow-x: clip;
  overflow-y: visible;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.dock-bar {
  display: grid;
  grid-template-columns: var(--dock-ico) minmax(0, 1fr) var(--dock-ico);
  align-items: end;
  gap: clamp(0.2rem, 1.2vw, 0.45rem);
  width: 100%;
  max-width: min(420px, 100%);
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.dock-ico-btn {
  appearance: none;
  width: var(--dock-ico);
  height: var(--dock-ico);
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
  flex-shrink: 1;
  overflow: hidden;
  box-sizing: border-box;
}
.dock-ico-btn .material-symbols-outlined {
  font-size: 1.45rem;
  color: var(--muted);
  max-width: none;
  line-height: 1;
  pointer-events: none;
}
.dock-ico-btn:active {
  transform: scale(0.96);
}
.dock-ico-shop {
  border-color: rgba(232, 121, 249, 0.45);
  background: linear-gradient(
    160deg,
    rgba(232, 121, 249, 0.35),
    rgba(40, 18, 14, 0.45)
  );
}
.dock-ico-shop .material-symbols-outlined {
  color: #fff;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.dock-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dock-row.thin {
  gap: 8px;
}

.dock-main {
  flex: 1;
  max-width: min(220px, 100%);
  min-width: 0;
}

.status-line {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1.1em;
}

.pack-grid {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

/* Shop offer cards — dense mobile list */
.shop-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cab-neon-soft, rgba(232, 121, 249, 0.45)) 36%, transparent);
  border: 1px solid var(--cab-border-active, rgba(232, 121, 249, 0.35));
  color: var(--cab-neon-2, var(--accent-2));
  font-size: 0.78rem;
  font-family: var(--font-d);
  letter-spacing: 0.06em;
  text-align: center;
}

/* NOWPayments labeled button packs */
.np-button-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  margin: 0.75rem 0 1rem;
}
.np-pack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.np-pack-pay-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}
.np-pack-top {
  display: none;
}
.np-pack-tokens {
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.np-pack-tokens .np-pack-name {
  display: none;
}
.np-pack-price {
  flex: 0 0 auto;
  margin-left: auto;
  font-family: var(--font-d, inherit);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.np-pack-mid {
  display: none;
}
.np-pack-name {
  display: none;
}
.np-pack-blurb {
  display: none;
}
.np-pay-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  min-height: 7.5rem;
  width: auto;
  max-width: none;
  border: none;
  padding: 0.15rem 0;
  cursor: pointer;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.np-pay-btn img {
  width: auto;
  max-width: 100%;
  max-height: 5.25rem;
  min-height: 3.6rem;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
}
.np-pay-btn img.is-broken {
  display: none;
}
.np-pay-label {
  display: none;
}
.np-pack-foot {
  margin: 0;
  text-align: center;
}
.np-claim-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}
.np-claim-row .btn {
  width: auto;
  align-self: center;
}

.shop-extras {
  margin-bottom: 0.75rem;
}

.pack-card {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.15rem 0.65rem;
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font-b);
  cursor: pointer;
  width: 100%;
}

.pack-card strong {
  font-family: var(--font-d);
  font-size: clamp(1rem, 4.2vw, 1.25rem);
  grid-row: 1 / 3;
  align-self: center;
}

.pack-card .pack-mid {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pack-card .pack-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.pack-card .pack-meta-line {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-card .pack-price {
  grid-column: 3;
  grid-row: 1 / 3;
  text-align: right;
  font-style: normal;
  font-weight: 700;
  color: var(--accent-2);
  font-family: var(--font-d);
  font-size: 0.95rem;
  line-height: 1.2;
}

.pack-card .pack-price small {
  display: block;
  font-weight: 500;
  font-size: 0.65rem;
  color: var(--muted);
  text-decoration: line-through;
}

.pack-card.hot {
  border-color: var(--cab-border-active, rgba(232, 121, 249, 0.45));
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--cab-neon-soft, rgba(232, 121, 249, 0.45)) 33%, transparent),
    rgba(255, 255, 255, 0.03)
  );
}

.pack-card.sale {
  border-color: rgba(240, 160, 60, 0.5);
}

.pack-card:active {
  transform: scale(0.98);
}

/* ad interstitial */
.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 12070;
  background: rgba(6, 3, 4, 0.92);
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow: hidden;
}
.ad-overlay-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(4, 2, 6, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.ad-overlay.hidden {
  display: none;
}
body.ad-open {
  overflow: hidden;
  touch-action: none;
}
.ad-panel {
  position: relative;
  z-index: 1;
  max-width: min(360px, 100%);
  width: 100%;
  text-align: center;
  padding: 1.5rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #1a1210;
  max-height: min(88dvh, calc(100dvh - 24px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ad-consent-step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-d);
}
.ad-panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-d);
}
.ad-slot {
  min-height: 100px;
  height: 100px;
  max-height: 120px;
  margin: 0.75rem auto;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 300px;
  max-width: 100%;
  box-sizing: content-box;
}
.ad-slot[hidden] {
  display: none !important;
}
.ad-slot .ad-frame-wrap,
.ad-slot iframe {
  display: block !important;
  margin: 0 auto;
  max-width: 100%;
  border: 0;
  background: transparent;
}
.ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.85rem;
}
.ad-sim-note {
  padding: 1rem;
}
.ad-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 1rem 0;
}
.ad-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-2);
  transition: width 0.1s linear;
}

/* desktop + large phone stretch */
@media (min-width: 640px) {
  :root {
    --app-max: 460px;
    --stage-pad-x: 16px;
  }
  .app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.22);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.35);
  }
  .btn {
    min-height: 44px;
  }
  .tool-btn {
    min-height: 40px;
    min-width: 2.75rem;
  }
}

@media (min-width: 900px) {
  :root {
    --app-max: 500px;
    --stage-pad-x: 18px;
  }
}

/* Short landscape (phone tilt / desktop short windows) */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --stage-pad-x: 8px;
  }
  .topbar {
    padding: calc(4px + var(--safe-t)) 10px 4px;
  }
  .dock {
    padding: 4px 10px calc(6px + var(--safe-b));
    gap: 4px;
  }
  .status-line {
    font-size: 0.65rem;
    min-height: 0.9em;
  }
  .hint {
    font-size: 0.7rem;
  }
  .dock-ico-btn {
    width: var(--dock-ico, 42px);
    height: var(--dock-ico, 42px);
  }
  .dock-bar {
    grid-template-columns: var(--dock-ico, 42px) minmax(0, 1fr) var(--dock-ico, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .hint,
  .zone-flash {
    transition: none;
  }
}

/* Material Symbols — global so dock/tool icons aren’t raw text */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 24;
  overflow: hidden;
  max-width: 1.5em;
  text-overflow: clip;
}

/* ——— Main menu (centered block · phone + desktop) ——— */
.menu-screen {
  z-index: 35;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  box-sizing: border-box;
  background:
    radial-gradient(80% 55% at 50% 42%, rgba(58, 24, 20, 0.75) 0%, transparent 62%),
    radial-gradient(120% 80% at 50% 100%, rgba(12, 6, 6, 0.9) 0%, transparent 50%),
    rgba(8, 5, 4, 0.96);
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(16px, var(--safe-r, 16px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, var(--safe-l, 16px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.menu-inner {
  width: min(92vw, 400px);
  max-width: 400px;
  text-align: center;
  padding: 0.25rem 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-inline: auto;
  box-sizing: border-box;
  overflow: visible;
}
.menu-inner > .site-foot {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 100%;
}

/*
 * Logo outline: even ring via 8-way drop-shadows on a same-size white silhouette.
 * (Scale-up masks look blotchy — thick on outer curves, thin in notches.)
 */
.menu-logo-wrap {
  --logo-stroke-px: 1.85px;
  --logo-stroke-diag: 1.35px;
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4.2 / 1;
  height: auto;
  max-height: min(24.2vh, 132px);
  margin-inline: auto;
  margin-block: 0.15rem 0;
  padding: 0;
  align-self: center;
  flex: 0 0 auto;
  line-height: 0;
  overflow: visible;
  isolation: isolate;
  -webkit-filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  transform-origin: center center;
}

/* Same crop/registration as .menu-logo — NO scale (scale ≠ true stroke) */
.menu-logo-stroke {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #ffffff;
  -webkit-mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;
  mask-mode: alpha;
  transform: none;
  transform-origin: center center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  animation: menu-logo-stroke-aura 12s linear infinite;
}

/* Breathe scale on inner layer — keeps stroke ring stable (no clip jitter) */
.menu-logo-breathe {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  animation: menu-logo-breathe 6.8s ease-in-out infinite;
  will-change: transform;
}

/* Slow inhale / exhale — scales holo + foil + sheen together */
@keyframes menu-logo-breathe {
  0%,
  100% {
    transform: scale(0.972) translateY(1px);
  }
  50% {
    transform: scale(1.034) translateY(-2px);
  }
}

/* Even white ring (cardinal + diagonal) + slow tinted aura on the stroke only */
@keyframes menu-logo-stroke-aura {
  0%,
  100% {
    -webkit-filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #ff9ad5);
    filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #ff9ad5);
  }
  33% {
    -webkit-filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #7ee0ff);
    filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #7ee0ff);
  }
  66% {
    -webkit-filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #c9a0ff);
    filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(0 0 2.5px #c9a0ff);
  }
}

/* Base art always on top of failed masks — some WebKits ignore luminance masks
 * and paint foil as a full rainbow rectangle over the wordmark. */
.menu-logo {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  /* Square PNG has empty vertical padding — cover fills the wide strip so the wordmark is readable */
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  pointer-events: none;
  z-index: 3;
  opacity: 1;
}

/* Optional lift — hidden; a failed mask turns this into a solid color slab. */
.menu-logo-white {
  display: none;
}

/*
 * Holo foil tints the PNG (overlay) instead of replacing it (multiply).
 * Alpha mask, not luminance — luminance is ignored on many mobile browsers
 * and then the gradient fills the whole box.
 */
.menu-logo-foil {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;
  mask-mode: alpha;
  mix-blend-mode: soft-light;
  opacity: 0.45;
}

.menu-logo-foil::before {
  content: "";
  position: absolute;
  top: -15%;
  left: 0;
  width: 300%;
  height: 130%;
  background: linear-gradient(
    100deg,
    #ff4d9a 0%,
    #ff8a3d 12%,
    #ffe14a 24%,
    #5dff9a 36%,
    #4dc9ff 48%,
    #b06bff 60%,
    #ff4d9a 72%,
    #ff8a3d 84%,
    #ffe14a 100%
  );
  animation: menu-foil-slide 10s linear infinite;
  will-change: transform;
}

.menu-logo-foil::after {
  content: none;
  display: none;
}

/* Traveling metal sheen */
.menu-logo-sheen {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  mask-image: url("/LOGO-INVERT.PNG.png?v=logo77");
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center center;
  mask-position: center center;
  mask-mode: alpha;
  mix-blend-mode: soft-light;
  opacity: 0.4;
}

.menu-logo-sheen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(200, 240, 255, 0.55) 54%,
    rgba(255, 255, 255, 0.12) 58%,
    transparent 65%,
    transparent 100%
  );
  animation: menu-foil-slide 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes menu-foil-slide {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-33.333%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-logo-stroke {
    animation: none;
    -webkit-filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff);
    filter:
      drop-shadow(var(--logo-stroke-px) 0 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-px)) 0 0 #fff)
      drop-shadow(0 var(--logo-stroke-px) 0 #fff)
      drop-shadow(0 calc(-1 * var(--logo-stroke-px)) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) var(--logo-stroke-diag) 0 #fff)
      drop-shadow(var(--logo-stroke-diag) calc(-1 * var(--logo-stroke-diag)) 0 #fff)
      drop-shadow(calc(-1 * var(--logo-stroke-diag)) calc(-1 * var(--logo-stroke-diag)) 0 #fff);
  }
  .menu-logo-breathe {
    animation: none;
    transform: none;
  }
  .menu-logo-foil::before,
  .menu-logo-sheen::before {
    animation: none;
    transform: translate3d(-12%, 0, 0);
  }
  .menu-logo-sheen {
    opacity: 0.4;
  }
}

.reduce-motion .menu-logo-wrap {
  animation: none !important;
}

.reduce-motion .menu-logo-stroke {
  animation: none !important;
}

.reduce-motion .menu-logo-breathe {
  animation: none !important;
  transform: none !important;
}

/* No mask support → thin fixed outline (same numbers on every engine) */
@supports not ((mask-image: url("/LOGO-INVERT.PNG.png")) or (-webkit-mask-image: url("/LOGO-INVERT.PNG.png"))) {
  .menu-logo-stroke,
  .menu-logo-foil,
  .menu-logo-sheen,
  .menu-logo-white {
    display: none !important;
  }
  .menu-logo-wrap {
    -webkit-filter:
      drop-shadow(0 0 1px #fff)
      drop-shadow(1px 0 0 #fff)
      drop-shadow(-1px 0 0 #fff)
      drop-shadow(0 1px 0 #fff)
      drop-shadow(0 -1px 0 #fff)
      drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
    filter:
      drop-shadow(0 0 1px #fff)
      drop-shadow(1px 0 0 #fff)
      drop-shadow(-1px 0 0 #fff)
      drop-shadow(0 1px 0 #fff)
      drop-shadow(0 -1px 0 #fff)
      drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  }
}

/* Phone / short viewport */
@media (max-width: 520px) {
  .menu-screen {
    place-items: center;
    justify-items: center;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  }
  .menu-inner {
    width: min(92vw, 360px);
    max-width: 360px;
    gap: 0.45rem;
  }
  /* Full column width · cropped wordmark ≈2× previous visual (+10%) */
  .menu-logo-wrap {
    width: 100%;
    max-width: 100%;
    max-height: min(22vh, 110px);
  }
  .menu-nav {
    gap: 0.4rem;
    width: 100%;
  }
  .menu-btn {
    min-height: 48px;
  }
  .menu-btn-top {
    padding: 0.68rem 0.85rem;
    font-size: 1rem;
    min-height: 44px;
  }
}

/* Landscape phones: still centered, fit height */
@media (max-height: 480px) and (orientation: landscape) {
  .menu-screen {
    place-items: center;
    align-content: center;
    justify-items: center;
  }
  .menu-inner {
    gap: 0.28rem;
    width: min(88vw, 360px);
    max-width: 360px;
  }
  .menu-logo-wrap {
    width: min(55vw, 280px);
    max-height: min(24.2vh, 79px);
    margin-inline: auto;
  }
  .menu-btn:not(.menu-btn-gold) {
    padding: 0 6px 10px;
    min-height: 44px;
  }
  .menu-btn-top {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
    min-height: 40px;
  }
  .menu-tag {
    font-size: 0.65rem;
  }
}

/* Desktop wide — logo ~2× old 220px desktop mark */
@media (min-width: 720px) {
  .menu-inner {
    width: min(92vw, 440px);
    max-width: 440px;
    gap: 0.65rem;
  }
  .menu-logo-wrap {
    width: 100%;
    max-width: 100%;
    max-height: min(19.8vh, 121px);
  }
  .menu-btn:not(.menu-btn-gold) {
    font-size: 1.2rem;
    padding: 0.9rem 1.1rem;
  }
}

/* Gameplay — slightly stronger even ring */
.app > .play-logo-wrap.menu-logo-wrap,
.topbar .play-logo-wrap.menu-logo-wrap {
  --logo-stroke-px: 2px;
  --logo-stroke-diag: 1.45px;
}

.menu-title {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(2.2rem, 11vw, 3rem);
  letter-spacing: 0.12em;
  padding-inline: 0.08em 0.14em;
  line-height: 1.05;
  overflow: visible;
  white-space: nowrap;
  background: linear-gradient(135deg, #f3e8df, #e879f9 55%, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.menu-tag {
  margin: 0 auto;
  width: 100%;
  text-align: center;
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.menu-wallet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-family: var(--font-d);
  font-weight: 700;
  margin: 0 auto;
}

.menu-nav {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.15rem;
  margin-inline: auto;
  justify-items: stretch;
}

.menu-btn {
  appearance: none;
  position: relative;
  border: 0;
  padding: 0 8px 12px;
  min-width: 10em;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 52px;
}

.menu-btn-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
  padding: 0.72rem 1rem;
  transform: translateY(0);
  text-align: center;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.85),
    0 0 8px rgba(0, 0, 0, 0.55);
  transition-property: transform;
  transition-duration: 0.2s;
  user-select: none;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  line-height: 1.15;
  width: 100%;
  min-height: 46px;
}

.menu-btn:active:not(:disabled) .menu-btn-top {
  transform: translateY(6px);
}

.menu-btn-top::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  box-sizing: content-box;
  background-image: radial-gradient(circle at 50% 18%, #b86bc4, #5a0d48 70%, #2a061f);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 2px 10px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  transition-property: border-radius, padding, width, transform;
  transition-duration: 0.2s;
}

.menu-btn-enter .menu-btn-top::after,
.menu-btn-3d .menu-btn-top::after {
  background-image: radial-gradient(
    circle at 50% 16%,
    #c27ad0 0%,
    #7a1688 48%,
    #3a0a32 100%
  );
}

.menu-btn:active:not(:disabled) .menu-btn-top::after {
  border-radius: 10px;
  padding: 0 2px;
}

.menu-btn-bottom {
  position: absolute;
  z-index: -1;
  bottom: 4px;
  left: 4px;
  border-radius: 8px / 16px 16px 8px 8px;
  padding-top: 6px;
  width: calc(100% - 8px);
  height: calc(100% - 10px);
  box-sizing: content-box;
  background-color: #340a2e;
  background-image:
    radial-gradient(4px 8px at 4px calc(100% - 8px), rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(4px 8px at calc(100% - 4px) calc(100% - 8px), rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(16px at -4px 0, rgba(255, 255, 255, 0.08), transparent),
    radial-gradient(16px at calc(100% + 4px) 0, rgba(255, 255, 255, 0.08), transparent);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.45),
    inset 0 -1px 3px 3px rgba(0, 0, 0, 0.4);
  transition-property: border-radius, padding-top;
  transition-duration: 0.2s;
}

.menu-btn:active:not(:disabled) .menu-btn-bottom {
  border-radius: 10px 10px 8px 8px / 8px;
  padding-top: 0;
}

.menu-btn-base {
  position: absolute;
  z-index: -2;
  top: 4px;
  left: 0;
  border-radius: 12px;
  width: 100%;
  height: calc(100% - 4px);
  background-color: rgba(0, 0, 0, 0.18);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 2px 2px rgba(0, 0, 0, 0.25);
}

/* Gold shimmer — Battle Pass + Luxury + Unlock Premium (same shell) */
.menu-btn-gold,
.btn-gold {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 2px;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  background: linear-gradient(
    to right,
    #553707,
    #b38f4e,
    #553707,
    #553707,
    #b38f4e,
    #553707
  );
  background-size: 250%;
  background-position: left;
  color: #b38f4e;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-position 0.85s ease, transform 0.15s ease;
  overflow: hidden;
  font: inherit;
  touch-action: manipulation;
}

.menu-btn-gold-inner,
.btn-gold-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.88);
  color: #b38f4e;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-shadow: 0 0 8px rgba(179, 143, 78, 0.35);
  padding: 0.55rem 1rem;
  box-sizing: border-box;
}

.menu-btn-gold:hover,
.menu-btn-gold:focus-visible,
.btn-gold:hover,
.btn-gold:focus-visible {
  background-position: right;
}

.menu-btn-gold:active:not(:disabled),
.btn-gold:active:not(:disabled) {
  transform: scale(0.97);
}

.menu-btn-gold .material-symbols-outlined,
.menu-btn-gold .menu-bp-ico {
  font-size: 1.15rem;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  color: #b38f4e;
  flex: 0 0 auto;
  line-height: 1;
}

/* Gold menu rows must not inherit 3D bottom padding */
.menu-nav > .menu-btn-gold {
  padding: 2px;
  min-height: 48px;
}

.bp-actions .btn-gold {
  min-width: min(100%, 18rem);
  padding: 2px;
}

.bp-actions .btn-gold .material-symbols-outlined {
  font-size: 1.1rem;
}

.mode-select-inner {
  position: relative;
  gap: 0.65rem;
}

.mode-back {
  align-self: flex-start;
  margin-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 40px;
}

.mode-select-nav {
  margin-top: 0.35rem;
}

.mode-select-blurb {
  max-width: 22rem;
  text-align: center;
  line-height: 1.45;
}

/* Run loadout — max 4 slots (VIP counts) */
.loadout-block {
  width: min(100%, 20rem);
  margin: 0.15rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.loadout-head {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem;
}
.loadout-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: rgba(240, 210, 255, 0.88);
}
.loadout-count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 220, 240, 0.9);
}
.loadout-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
@media (max-width: 360px) {
  .loadout-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.loadout-chip {
  appearance: none;
  border: 1px solid var(--cab-border, rgba(232, 121, 249, 0.28));
  background: rgba(18, 10, 20, 0.72);
  color: #f5e8ff;
  border-radius: 12px;
  min-height: 3.1rem;
  padding: 0.35rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font: inherit;
  line-height: 1.1;
}
.loadout-chip .material-symbols-outlined {
  font-size: 1.35rem;
  line-height: 1;
}
.loadout-chip-label {
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loadout-chip.is-on {
  border-color: color-mix(in srgb, var(--cab-neon, #e879f9) 85%, #fff);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--cab-panel-tint, rgba(120, 40, 110, 0.75)) 100%, transparent),
    color-mix(in srgb, var(--cab-btn-inner, rgba(40, 16, 48, 0.9)) 100%, transparent)
  );
  box-shadow:
    0 0 0 1px var(--cab-neon-soft, rgba(255, 200, 255, 0.2)),
    0 4px 12px rgba(0, 0, 0, 0.35);
}
.loadout-chip.is-vip.is-on {
  border-color: rgba(255, 210, 120, 0.85);
  background: linear-gradient(
    160deg,
    rgba(110, 80, 20, 0.8),
    rgba(40, 28, 8, 0.92)
  );
}
.loadout-chip:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.loadout-hint {
  margin: 0;
  text-align: center;
  line-height: 1.35;
  max-width: 18rem;
}
.mode-select-nav .menu-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* —— PVP experimental —— */
.menu-btn-pvp .menu-btn-top {
  letter-spacing: 0.14em;
}
.menu-btn-pvp.is-soon {
  opacity: 0.78;
  filter: grayscale(0.35) brightness(0.92);
  cursor: not-allowed;
}
.menu-btn-pvp.is-soon .menu-btn-top {
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
}
.menu-btn-pvp.is-soon:active {
  transform: none;
}
.menu-btn-pvp:not(.is-soon) {
  opacity: 1;
  filter: none;
  cursor: pointer;
}
.pvp-select-inner {
  max-width: min(26rem, 96vw);
}
.pvp-tutorial {
  margin: 0.65rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(
    165deg,
    rgba(40, 18, 28, 0.72),
    rgba(12, 10, 14, 0.55)
  );
  text-align: left;
}
.pvp-tut-line {
  margin: 0 0 0.45rem;
  font-size: clamp(0.78rem, 2.6vw, 0.9rem);
  line-height: 1.4;
  color: rgba(255, 236, 244, 0.88);
}
.pvp-tut-line:last-child {
  margin-bottom: 0;
}
.pvp-tut-line strong {
  color: #ffb7d0;
  font-weight: 700;
}
.pvp-hud {
  position: absolute;
  left: 50%;
  top: max(0.45rem, env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 28;
  width: min(96%, 22rem);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}
.pvp-hud:not(.hidden):not([hidden]) {
  pointer-events: none;
}
.pvp-hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.pvp-pill {
  flex: 1;
  min-width: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  font-size: clamp(0.68rem, 2.4vw, 0.78rem);
  letter-spacing: 0.04em;
  background: rgba(8, 6, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}
.pvp-pill b {
  font-variant-numeric: tabular-nums;
  margin-left: 0.2rem;
}
.pvp-you {
  border-color: rgba(120, 220, 160, 0.45);
}
.pvp-foe {
  border-color: rgba(255, 120, 140, 0.45);
}
.pvp-clock {
  flex: 0 0 auto;
  min-width: 2.4rem;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  color: #ffe8f0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.pvp-clock.panic {
  color: #ff6b8a;
  animation: timed-panic 0.45s steps(2, end) infinite;
}
.pvp-weapon-tray {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2rem;
}
.pvp-weapon-empty {
  margin: 0;
  opacity: 0.75;
  text-align: center;
  width: 100%;
}
.pvp-weapon-btn {
  appearance: none;
  border: 1px solid rgba(255, 180, 210, 0.4);
  background: linear-gradient(
    180deg,
    rgba(60, 24, 40, 0.92),
    rgba(20, 10, 16, 0.9)
  );
  color: #ffe8f0;
  border-radius: 10px;
  padding: 0.28rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 2.2rem;
}
.pvp-weapon-btn .material-symbols-outlined {
  font-size: 1.05rem;
}
.pvp-weapon-btn:active {
  transform: scale(0.96);
}
.pvp-smoke {
  position: absolute;
  z-index: 22;
  border-radius: 40% / 50%;
  pointer-events: auto;
  background: radial-gradient(
      ellipse at 40% 50%,
      rgba(180, 180, 190, 0.72),
      rgba(90, 90, 100, 0.55) 55%,
      rgba(40, 40, 50, 0.2) 100%
    ),
    repeating-linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.08) 0 6px,
      transparent 6px 14px
    );
  filter: blur(1.5px);
  animation: pvp-smoke-drift 6.5s ease-in-out both;
  touch-action: none;
}
@keyframes pvp-smoke-drift {
  0% {
    opacity: 0;
    transform: scaleX(0.85);
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: scaleX(1.05) translateX(4%);
  }
}
html.reduce-motion .pvp-smoke {
  animation: none;
  opacity: 0.75;
}
body.arcade-mode #pvp-select,
body.arcade-mode #pvp-select .menu-inner {
  /* inherit mode-select arcade treatment via shared classes */
}

/* Luxury mode — in-game HUD only (not main menu / shop) */
.app.luxury-mode {
  --lux-gold: #b38f4e;
  --lux-gold-2: #d4af6a;
  --lux-gold-dim: rgba(179, 143, 78, 0.18);
}

.app.luxury-mode .topbar {
  border-bottom-color: var(--lux-gold-dim);
  background: linear-gradient(
    180deg,
    rgba(40, 28, 6, 0.92),
    rgba(12, 10, 8, 0.88)
  );
}

.app.luxury-mode .wallet,
.app.luxury-mode .btn-menu,
.app.luxury-mode .btn-gear {
  border-color: rgba(244, 208, 63, 0.45);
  background: rgba(212, 175, 55, 0.12);
}

.app.luxury-mode .token-ico {
  color: var(--cab-neon, var(--neon, #e879f9));
  text-shadow:
    0 0 6px rgba(232, 121, 249, 0.85),
    0 0 14px rgba(192, 80, 220, 0.55);
}

.app.luxury-mode .tool-btn-vip.has-charges,
.app.luxury-mode .tool-btn-vip.is-armed,
.app.luxury-mode .tool-btn-vip.is-active {
  border-color: rgba(244, 208, 63, 0.65);
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.35), rgba(90, 60, 10, 0.5));
}

.app.luxury-mode .dock {
  border-top-color: var(--lux-gold-dim);
  background: linear-gradient(0deg, rgba(28, 20, 4, 0.96), rgba(12, 10, 8, 0.9));
}

.app.luxury-mode .dock-ico-btn,
.app.luxury-mode .tool-btn {
  border-color: rgba(232, 121, 249, 0.35);
}

.app.luxury-mode .tool-btn.is-active:not(.tool-btn-vip) {
  border-color: rgba(232, 121, 249, 0.65);
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.4);
  background: rgba(232, 121, 249, 0.18);
}

.app.luxury-mode .hint,
.app.luxury-mode .status-line {
  color: #f5e6b8;
}

.app.luxury-mode .hint::before {
  content: "LUXURY · ";
  color: var(--lux-gold-2);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.app.luxury-mode .zone-flash {
  border-color: rgba(244, 208, 63, 0.4);
  color: #ffe566;
}

.app.luxury-mode .tool-spend-panel {
  border-color: rgba(244, 208, 63, 0.45);
  background: rgba(40, 28, 6, 0.92);
}

.app.luxury-mode .timed-clock {
  color: var(--lux-gold-2);
}

.luxury-hud {
  width: min(100%, 420px);
  margin: 0.35rem auto 0;
  padding: 0 0.5rem;
}

.luxury-meter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.luxury-meter-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--lux-gold-2, #f4d03f);
  flex: 0 0 auto;
}

.luxury-meter {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  overflow: hidden;
}

.luxury-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b8860b, var(--lux-gold-2, #f4d03f));
  transition: width 0.2s ease;
  box-shadow: 0 0 8px rgba(244, 208, 63, 0.45);
}

.luxury-word-row {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.lux-word-cell {
  min-width: 1.35rem;
  padding: 0.12rem 0.2rem;
  border-radius: 4px;
  border: 1px solid rgba(244, 208, 63, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(245, 230, 184, 0.55);
  text-align: center;
}

.lux-word-cell.is-found {
  color: #fff8dc;
  border-color: rgba(244, 208, 63, 0.85);
  background: rgba(212, 175, 55, 0.22);
  box-shadow: 0 0 8px rgba(244, 208, 63, 0.35);
}

.luxury-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.lux-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 208, 63, 0.4);
  color: #f5e6b8;
  background: rgba(40, 28, 6, 0.65);
}

.lux-badge.is-done {
  border-color: rgba(125, 206, 138, 0.55);
  color: #c8f5d0;
}

.luxury-challenges {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.3rem;
}

.lux-challenge {
  font-size: 0.58rem;
  line-height: 1.3;
  color: rgba(245, 230, 184, 0.78);
  text-align: center;
}

.lux-challenge.is-done {
  color: #a8e8b4;
}

.luxury-hud-text {
  margin: 0.25rem 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
  text-align: center;
  color: #f5e6b8;
  word-break: break-word;
}

.luxury-pop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  overflow: hidden;
}

.luxury-pop {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  background: rgba(20, 12, 4, 0.82);
  border: 1px solid rgba(244, 208, 63, 0.55);
  color: #fff8dc;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.luxury-pop strong {
  font-size: 1rem;
  line-height: 1;
}

.luxury-pop small {
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  max-width: 6.5rem;
  text-align: center;
}

.luxury-pop.run {
  opacity: 1;
  transform: translate(-50%, -130%) scale(1);
}

.luxury-pop--jackpot,
.luxury-pop--mega {
  border-color: rgba(255, 215, 0, 0.85);
  box-shadow: 0 0 16px rgba(244, 208, 63, 0.45);
}

.luxury-pop--trap {
  border-color: rgba(255, 107, 129, 0.75);
  color: #ffc9d0;
}

.luxury-toast {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translate(-50%, -8px);
  z-index: 8;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff8dc;
  background: rgba(28, 18, 4, 0.88);
  border: 1px solid rgba(244, 208, 63, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
  max-width: min(92%, 16rem);
  text-align: center;
}

.luxury-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.luxury-toast--jackpot,
.luxury-toast--mega {
  border-color: rgba(255, 215, 0, 0.85);
  box-shadow: 0 0 18px rgba(244, 208, 63, 0.4);
  color: #ffe566;
}

.luxury-toast--trap {
  border-color: rgba(255, 107, 129, 0.65);
  color: #ffb8c4;
}

.app.luxury-mode .luxury-hud {
  display: block;
}

/* Login gate + install (mobile-first) */
#login-gate {
  z-index: 12080;
}
#login-gate .sys-actions .btn,
#btn-login-gate-login,
#btn-login-gate-register {
  min-height: 2.75rem;
  touch-action: manipulation;
}
#login-gate .gift-row input {
  min-height: 2.75rem;
  font-size: 16px;
}
/* Fade to black → main menu (login success) */
.view-fade {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.48s ease;
  will-change: opacity;
}
.view-fade:not([hidden]) {
  display: block;
}
.view-fade.is-on {
  opacity: 1;
  pointer-events: all;
}
.login-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin: 0.5rem 0;
  user-select: text;
  -webkit-user-select: text;
}
.login-gate-form input,
#auth-form input {
  user-select: text;
  -webkit-user-select: text;
}
#login-gate-status.auth-err {
  color: var(--accent);
}
#login-gate-status.auth-ok {
  color: var(--ok);
}
.install-banner {
  position: fixed;
  left: max(12px, var(--safe-l));
  right: max(12px, var(--safe-r));
  bottom: max(12px, var(--safe-b));
  z-index: 560;
  display: grid;
  place-items: center;
  pointer-events: none;
  isolation: isolate;
}
.install-banner:not([hidden]):not(.hidden) {
  pointer-events: none;
}
.install-banner-inner {
  pointer-events: auto !important;
  touch-action: manipulation;
  width: min(100%, 420px);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 14, 12, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
}
.install-banner-title {
  margin: 0 0 0.2rem;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1rem;
}
.install-actions {
  margin-top: 0.55rem;
  flex-wrap: wrap;
  gap: 0.45rem;
  position: relative;
  z-index: 3;
}
.install-actions .btn {
  min-height: 44px;
  min-width: 5.5rem;
  padding: 0.55rem 0.9rem;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-menu {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 1.1rem;
  margin-right: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.stats-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.stats-list li strong {
  color: var(--ink);
  font-family: var(--font-d);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.rarity-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  font-family: var(--font-d);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  color: var(--accent-2);
  pointer-events: none;
  max-width: min(48vw, 11rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rarity-badge.r-super_rare {
  color: #ffc8b0;
  border-color: rgba(255, 160, 130, 0.5);
}
.rarity-badge.r-ultra_rare {
  color: #ffb3f0;
  border-color: rgba(255, 107, 254, 0.55);
  box-shadow: 0 0 14px rgba(255, 107, 254, 0.22);
}
.rarity-badge.r-legendary {
  color: #ffd060;
  border-color: rgba(240, 176, 48, 0.55);
  box-shadow: 0 0 14px rgba(240, 176, 48, 0.25);
}
.rarity-badge.r-mythic {
  color: #d8a0ff;
  border-color: rgba(176, 96, 255, 0.55);
  box-shadow: 0 0 14px rgba(160, 80, 255, 0.28);
}
.rarity-badge.r-ethos {
  color: #a0fff0;
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow:
    0 0 10px rgba(0, 240, 255, 0.3),
    0 0 18px rgba(255, 0, 128, 0.2);
}

.auth-box {
  margin: 0.65rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}
.auth-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-d, inherit);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: #fff;
}
.auth-hint {
  margin: 0.5rem 0 0;
  line-height: 1.35;
}
#auth-status.auth-err {
  color: #ff8f7a;
  font-weight: 600;
}
#auth-status.auth-ok {
  color: #9ddea0;
  font-weight: 600;
}

.danger-zone {
  margin: 1.25rem 0 0.75rem;
  padding: 0.85rem 0.75rem;
  border-top: 1px solid rgba(255, 80, 60, 0.35);
}
.stat-grid-wrap {
  list-style: none;
  margin: 0.35rem 0 0.5rem;
  padding: 0;
}
.stats-list > li.title-line {
  line-height: 1.3;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.stat-cell {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0.55rem 0.35rem;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  touch-action: manipulation;
}
.stat-cell .material-symbols-outlined {
  font-size: 1.35rem;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.stat-cell .stat-sym {
  font-size: 1.2rem;
  line-height: 1;
  color: #f0d4a8;
  font-weight: 700;
}
.stat-cell .stat-val {
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
body.arcade-mode .stat-cell .stat-val {
  font-family: var(--font-token);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.05em;
}
body.arcade-mode .stat-cell .stat-sym {
  color: #ff5a78;
  text-shadow:
    0 0 4px rgba(255, 40, 70, 0.9),
    0 0 10px rgba(255, 20, 60, 0.55);
}
.stat-cell:active {
  transform: scale(0.97);
  border-color: rgba(240, 160, 96, 0.5);
}
.stat-pop {
  margin: 0.25rem 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(240, 160, 96, 0.12);
  border: 1px solid rgba(240, 160, 96, 0.35);
  color: #f3e8df;
  line-height: 1.35;
  font-size: 0.82rem;
}
.peeker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.peeker-title {
  font-family: var(--font-d);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.delete-flow {
  margin-top: 0.55rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 80, 60, 0.35);
  background: rgba(80, 10, 10, 0.35);
}
.delete-actions {
  margin-top: 0.45rem;
}
.tool-btn.tool-ico-only {
  min-width: 0;
  padding: 0.55rem 0.45rem;
  flex-direction: column;
}
.tool-btn.tool-ico-only .tool-ico,
.tool-btn.tool-ico-only .material-symbols-outlined {
  font-size: 1.35rem;
}
.tool-shop-top .material-symbols-outlined {
  font-size: 1.6rem;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.up-tool .material-symbols-outlined {
  font-size: 1.1rem;
  vertical-align: middle;
}
.btn-danger {
  width: 100%;
  background: #a81c1c;
  color: #fff;
  border: 1px solid #ff5a4a;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.btn-danger:hover,
.btn-danger:focus-visible {
  background: #c92222;
  outline: none;
}
.danger-note {
  margin: 0.45rem 0 0;
  color: #ff9a8a;
}

.tool-shop {
  margin: 1rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tool-shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.55rem;
}
@media (max-width: 320px) {
  .tool-shop-grid {
    grid-template-columns: 1fr;
  }
}
.tool-shop-card {
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  min-width: 0;
}
.tool-shop-card.owned,
.tool-shop-card.is-lit {
  opacity: 1;
  border-color: rgba(232, 121, 249, 0.55);
  box-shadow:
    inset 0 0 12px rgba(255, 120, 255, 0.12),
    0 0 12px rgba(232, 121, 249, 0.28);
}
.tool-shop-card.locked,
.tool-shop-card.need-buy {
  opacity: 0.5;
  filter: grayscale(0.4) brightness(0.72);
}
.tool-shop-ico-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}
.tool-shop-lvl {
  font-family: var(--font-d, var(--font-ui));
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #f0a8ec;
  text-shadow: 0 0 8px rgba(232, 121, 249, 0.45);
}
.tool-shop-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.tool-shop-rate {
  margin: 0.25rem 0 0.45rem;
  font-size: 0.78rem;
  color: var(--cab-neon, var(--neon, #e879f9));
  font-weight: 600;
}
.tool-btn.tool-locked {
  opacity: 0.45;
  filter: grayscale(0.35);
  pointer-events: none;
}
.tool-btn .lock-tag {
  font-size: 0.55rem;
  letter-spacing: 0.02em;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}
.gallery-head h3 {
  margin: 0;
  font-family: var(--font-d);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.gallery-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.gallery-org {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  width: 100%;
}
.gorg-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}
.gorg-field select {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: #f2e8e2;
  font: inherit;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}
.title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}
.peeker-title {
  font-family: var(--font-d, var(--font-ui), sans-serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #f4d8c4;
}
.peeker-rank {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.title-track {
  margin: 0.35rem 0 0.85rem;
  width: 100%;
}
.title-track-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.title-track-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8b1e2d, #e8a05a);
  transition: width 0.35s ease;
}
.title-track .muted {
  margin: 0.3rem 0 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.gallery-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  appearance: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: block;
  color: inherit;
  font: inherit;
  text-align: left;
}
.gallery-card.can-upgrade {
  box-shadow: 0 0 0 1px rgba(255, 160, 80, 0.5);
}
.g-count {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  min-width: 1.35rem;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 220, 160, 0.45);
  pointer-events: none;
  text-align: center;
}
.g-up {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.12rem 0.28rem;
  border-radius: 4px;
  background: rgba(180, 70, 30, 0.92);
  color: #fff;
  pointer-events: none;
}
.glb-up {
  margin-top: 0.5rem;
  width: 100%;
}
.reload-prompt {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.25rem;
  background: rgba(8, 4, 6, 0.84);
  text-align: center;
  box-sizing: border-box;
  pointer-events: auto;
}
.reload-prompt.hidden {
  display: none !important;
}
.reload-q {
  margin: 0;
  font-family: var(--font-d, var(--font-ui), sans-serif);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.reload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tool-btn.tool-bomb {
  border-color: rgba(255, 100, 40, 0.55);
  color: #ffb090;
}
.tool-btn.tool-knife {
  border-color: rgba(180, 200, 220, 0.4);
  color: #d8e4f0;
}
.tool-btn.tool-knife.active {
  border-color: rgba(200, 220, 240, 0.75);
  box-shadow: 0 0 0 1px rgba(180, 200, 220, 0.25);
}

.tool-btn.tool-auto {
  border-color: rgba(125, 206, 138, 0.75) !important;
  background: linear-gradient(
    160deg,
    rgba(125, 206, 138, 0.28),
    rgba(30, 40, 28, 0.45)
  ) !important;
  box-shadow: 0 0 0 1px rgba(125, 206, 138, 0.35);
  animation: auto-pulse 0.9s ease-in-out infinite;
}
.tool-btn .auto-tag {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #9fe3a8;
}
@keyframes auto-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}
body.auto-mode .status-line {
  color: #9fe3a8;
}
.tool-row.is-auto {
  touch-action: none;
}
.stage.reload-needed #tear-canvas {
  opacity: 0.35;
  pointer-events: none;
}
.gallery-card:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.2);
  transform-origin: center center;
  display: block;
  background: #1a1010;
}
.gallery-card .g-img-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.gallery-card .g-img-clip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gallery-card .g-rar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  font-family: var(--font-d);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  text-align: center;
  padding: 0.28rem 0.25rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffe8d0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.gallery-card.r-super_rare .g-rar {
  color: #ffc8b0;
  border-color: rgba(255, 160, 130, 0.45);
}
.gallery-card.r-ultra_rare .g-rar {
  color: #ffb3f0;
  border-color: rgba(255, 107, 254, 0.45);
}
.gallery-card.r-legendary .g-rar {
  color: #ffd060;
  border-color: rgba(240, 176, 48, 0.5);
}
.gallery-card.r-mythic .g-rar {
  color: #d8a0ff;
  border-color: rgba(176, 96, 255, 0.45);
}
.gallery-card.r-ethos .g-rar {
  color: #a0fff0;
  border-color: rgba(0, 240, 255, 0.45);
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem 0.5rem;
}

/* —— Systems hub / theme packs (mobile) —— */
.sys-block {
  margin: 0.75rem 0 1rem;
  text-align: left;
  width: 100%;
}
.sys-h {
  font-family: var(--font-display, var(--font-ui), sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.4rem;
  color: var(--muted, #a89890);
}
.theme-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.theme-row {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.theme-row.ready {
  border-color: rgba(255, 190, 100, 0.45);
}
.theme-row.done {
  opacity: 0.65;
}
.theme-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.theme-bar {
  height: 5px;
  margin: 0.35rem 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.theme-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8b1e2d, #e8a05a);
}
.sys-fam {
  margin: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--muted, #a89890);
}
.sys-fam summary {
  cursor: pointer;
  color: #e8dcd4;
  font-weight: 600;
}
.sys-fam ul {
  margin: 0.3rem 0 0.4rem 1rem;
  padding: 0;
}
.up-row,
.sys-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}
.gift-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  width: 100%;
}
.gift-row input {
  flex: 1 1 8rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font: inherit;
}
.tut-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  top: max(10px, env(safe-area-inset-top));
  bottom: auto;
  z-index: 100;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: rgba(28, 14, 16, 0.96);
  border: 1px solid rgba(255, 180, 120, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: min(520px, calc(100% - 24px));
  margin: 0 auto;
  pointer-events: none;
}
.tut-banner.hidden {
  display: none;
}
.tut-banner p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
@media (max-width: 520px) {
  .tut-banner p {
    font-size: 0.82rem;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .tut-banner {
    padding: 0.4rem 0.7rem;
    max-width: min(640px, calc(100% - 24px));
  }
  .tut-banner p {
    font-size: 0.76rem;
    line-height: 1.25;
  }
}

/* Sonar cost bar — only take height when open (don't steal scene space) */
.tool-spend-slot {
  flex: 0 0 auto;
  min-height: 0;
  width: min(100%, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 6;
}
.tool-spend-slot:has(.tool-spend-panel:not(.hidden)) {
  min-height: 2.35rem;
  margin-top: 0.15rem;
}
.tool-spend-panel {
  position: relative;
  inset: auto;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.7rem;
  row-gap: 0.08rem;
  width: auto;
  max-width: calc(100% - 8px);
  margin: 0;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(12, 8, 10, 0.92);
  border: 1px solid rgba(232, 121, 249, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: opacity 0.45s linear;
}
.tool-spend-panel.hidden {
  display: none;
}
.tool-spend-title {
  margin: 0;
  font-family: var(--font-d, var(--font-ui));
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #f3e8df;
  white-space: nowrap;
}
.tool-spend-line {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #ffb4a0;
  line-height: 1.2;
  white-space: nowrap;
}
.tool-spend-note {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.25;
  text-align: center;
  color: rgba(243, 232, 223, 0.72);
}
@media (max-height: 560px) {
  .tool-spend-note {
    display: none;
  }
}

/* First-run how-to (blocks until finished) */
.how-to-play {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px
    max(16px, env(safe-area-inset-bottom));
  background: rgba(6, 4, 5, 0.88);
}
.how-to-play.hidden {
  display: none;
}
.how-to-card {
  width: min(100%, 22rem);
  max-height: min(88dvh, 36rem);
  overflow: auto;
  padding: 1.25rem 1.15rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(165deg, #2a1418 0%, #0e0a12 70%);
  border: 1px solid rgba(232, 121, 249, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.how-to-brand {
  margin: 0;
  font-family: var(--font-d, var(--font-ui));
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.how-to-step {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(243, 232, 223, 0.55);
}
.how-to-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-d, var(--font-ui));
  font-size: 1.25rem;
  line-height: 1.2;
  color: #f3e8df;
}
.how-to-body {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(243, 232, 223, 0.88);
}
.how-to-next {
  width: 100%;
  min-height: 48px;
}
.muted.sm {
  font-size: 0.78rem;
}
.setting-row select {
  max-width: 11rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font: inherit;
}
html.region-strict body::after {
  content: "18+ · GEO / AGE ON";
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  z-index: 50;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  opacity: 0.55;
  pointer-events: none;
}
.timed-clock {
  display: inline-block;
  margin-left: 0.45rem;
  min-width: 2.4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-2, #c026d3);
}
.timed-clock.panic {
  color: #e07060;
  font-weight: 700;
  animation: timed-panic 0.45s steps(2, end) infinite;
}
html.reduce-motion .timed-clock.panic {
  animation: none;
  outline: 1px solid #e07060;
}
@keyframes timed-panic {
  50% { opacity: 0.35; }
}
.mode-pop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(8, 6, 5, 0.72);
}
.mode-pop.hidden { display: none; }
.mode-pop-card {
  width: min(22rem, 100%);
  background: #1c1814;
  border: 1px solid rgba(243, 235, 227, 0.14);
  border-radius: 14px;
  padding: 1rem 0.9rem 0.85rem;
  color: #f3ebe3;
}
.mode-pop-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.mode-pop-card p {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.mode-pop-card .btn {
  width: 100%;
  min-height: 2.6rem;
}

.unlock-pop {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  background: rgba(8, 6, 5, 0.78);
}
.unlock-pop.hidden,
.unlock-pop[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.unlock-pop-wrap {
  width: min(22rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.unlock-pop-card {
  background: #1c1814;
  border: 1px solid rgba(243, 235, 227, 0.16);
  border-radius: 14px;
  padding: 0.9rem 0.85rem 0.75rem;
  color: #f3ebe3;
  text-align: center;
  min-height: 12rem;
  touch-action: manipulation;
  cursor: pointer;
}
.unlock-pop-card:focus-visible {
  outline: 2px solid var(--accent-2, #e879f9);
  outline-offset: 2px;
}
.unlock-pop-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2, #c026d3);
}
.unlock-pop-art {
  width: min(9.5rem, 46vw);
  height: min(9.5rem, 46vw);
  margin: 0 auto 0.55rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
}
.unlock-pop-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}
.unlock-pop-sub { margin: 0 0 0.35rem; line-height: 1.4; }
.unlock-pop-count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  opacity: 0.8;
}
.unlock-pop-hint { margin: 0.35rem 0 0; }
.unlock-pop-all {
  width: 100%;
  min-height: 2.7rem;
}
.unlock-pop-list {
  background: #1c1814;
  border: 1px solid rgba(243, 235, 227, 0.16);
  border-radius: 14px;
  padding: 0.85rem 0.8rem 0.8rem;
  color: #f3ebe3;
  max-height: min(70dvh, 28rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.unlock-pop-list.hidden { display: none; }
.unlock-pop-list h3 {
  margin: 0;
  font-size: 1rem;
}
.unlock-pop-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.unlock-pop-li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  text-align: left;
}
.unlock-pop-dot {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08) center / cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.unlock-pop-li strong {
  display: block;
  font-size: 0.86rem;
}
.unlock-pop-li span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #a89488);
}
.unlock-pop-list .btn {
  width: 100%;
  min-height: 2.7rem;
}
html.reduce-motion .unlock-pop-card {
  transition: none;
}

/* —— Gallery lightbox close-up —— */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}
.gallery-lightbox.hidden {
  display: none;
}
.glb-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 2, 3, 0.88);
  cursor: pointer;
}
.glb-frame {
  position: relative;
  z-index: 1;
  width: min(96vw, 440px);
  max-height: min(88dvh, 780px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: #120c0c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: glb-pop 0.35s cubic-bezier(0.22, 1.15, 0.36, 1) both;
}
@keyframes glb-pop {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.glb-img-wrap {
  position: relative;
  width: 100%;
  max-height: min(68dvh, 560px);
  min-height: 140px;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #0a0706;
  z-index: 1;
}
/* Examine: multi-edge crop, aspect locked to cropped source → no warp */
.glb-img-wrap.is-cropped #glb-img,
.glb-frame .glb-img-wrap.is-cropped img {
  position: absolute;
  left: calc(
    -100% * var(--crop-l) / (1 - var(--crop-l) - var(--crop-r))
  );
  top: calc(
    -100% * var(--crop-t) / (1 - var(--crop-t) - var(--crop-b))
  );
  width: calc(100% / (1 - var(--crop-l) - var(--crop-r)));
  height: calc(100% / (1 - var(--crop-t) - var(--crop-b)));
  max-width: none;
  max-height: none;
  object-fit: fill;
  object-position: center center;
  display: block;
  border-radius: 0;
  background: #0a0706;
  z-index: 1;
}
.glb-frame img,
.glb-frame #glb-img {
  position: relative;
  max-width: 100%;
  max-height: min(68dvh, 560px);
  object-fit: contain;
  display: block;
  background: #0a0706;
  z-index: 1;
}
.glb-name {
  display: none !important;
}
.glb-gleam {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  background: radial-gradient(
    ellipse at 50% 40%,
    var(--glb-glow, rgba(255, 180, 120, 0.35)) 0%,
    transparent 62%
  );
  animation: glb-pulse 2.4s ease-in-out infinite;
}
.glb-gleam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    var(--glb-sheen, rgba(255, 255, 255, 0.4)) 50%,
    transparent 65%
  );
  background-size: 220% 100%;
  animation: glb-sheen 2.8s ease-in-out infinite;
  mix-blend-mode: soft-light;
}
@keyframes glb-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}
@keyframes glb-sheen {
  0% {
    background-position: 130% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

/* Rarity gleam colors on enlarged view */
.glb-frame.r-common {
  --glb-glow: rgba(200, 180, 160, 0.28);
  --glb-sheen: rgba(255, 240, 220, 0.35);
  border-color: rgba(200, 180, 160, 0.35);
}
.glb-frame.r-uncommon {
  --glb-glow: rgba(120, 200, 140, 0.35);
  --glb-sheen: rgba(180, 255, 200, 0.4);
  border-color: rgba(100, 200, 130, 0.45);
}
.glb-frame.r-rare {
  --glb-glow: rgba(90, 150, 255, 0.4);
  --glb-sheen: rgba(160, 200, 255, 0.45);
  border-color: rgba(90, 150, 255, 0.5);
}
.glb-frame.r-super_rare {
  --glb-glow: rgba(255, 160, 130, 0.48);
  --glb-sheen: rgba(255, 210, 190, 0.55);
  border-color: rgba(255, 160, 130, 0.55);
  box-shadow: 0 0 28px rgba(255, 140, 110, 0.35);
}
.glb-frame.r-ultra_rare {
  --glb-glow: rgba(255, 107, 254, 0.45);
  --glb-sheen: rgba(0, 249, 248, 0.4);
  border-color: rgba(255, 107, 254, 0.55);
  box-shadow: 0 0 32px rgba(255, 107, 254, 0.35);
}
.glb-frame.r-legendary {
  --glb-glow: rgba(255, 200, 60, 0.5);
  --glb-sheen: rgba(255, 240, 160, 0.55);
  border-color: rgba(240, 176, 48, 0.6);
  box-shadow: 0 0 34px rgba(240, 176, 48, 0.4);
}
.glb-frame.r-mythic {
  --glb-glow: rgba(176, 96, 255, 0.5);
  --glb-sheen: rgba(220, 160, 255, 0.5);
  border-color: rgba(176, 96, 255, 0.55);
  box-shadow: 0 0 34px rgba(160, 80, 255, 0.4);
}
.glb-frame.r-ethos {
  --glb-glow: rgba(0, 240, 255, 0.45);
  --glb-sheen: rgba(255, 0, 128, 0.4);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.35),
    0 0 36px rgba(255, 0, 128, 0.28);
}

.glb-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}
.glb-rar {
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #ffe8d0;
}
.glb-name {
  display: none !important;
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glb-done {
  position: relative;
  z-index: 1;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .glb-frame,
  .glb-gleam,
  .glb-gleam::after {
    animation: none;
  }
}

#tear-canvas {
  opacity: 1;
}
.stage.clear-hold #tear-canvas {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none !important;
}

/* Tools — fixed 3 columns, wrap to next row */
.tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 1.5vw, 8px);
  margin: 0 auto;
  width: 100%;
  max-width: min(220px, 100%);
  min-width: 0;
  justify-items: center;
  box-sizing: border-box;
}

.tool-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.45rem 0.35rem;
  min-width: 0;
  min-height: 48px;
  width: 100%;
  max-width: 68px;
  font-family: var(--font-b);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tool-btn .tool-ico,
.tool-btn .material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif !important;
  font-weight: 300;
  font-style: normal;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  color: #9a92a8;
  user-select: none;
  max-width: none;
  pointer-events: none;
}

.tool-btn.active {
  border-color: rgba(232, 121, 249, 0.55);
  background: linear-gradient(
    160deg,
    rgba(232, 121, 249, 0.18),
    rgba(30, 18, 40, 0.45)
  );
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.35);
}

.tool-btn.active .tool-ico,
.tool-btn.active .material-symbols-outlined {
  color: #f3e8ff;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  filter: drop-shadow(0 0 4px rgba(232, 121, 249, 1))
    drop-shadow(0 0 10px rgba(192, 80, 220, 0.85));
}

.tool-btn.tool-bomb .tool-ico {
  color: #9a92a8;
}

.tool-btn.tool-knife .tool-ico {
  color: #9a92a8;
}

.tool-btn.tool-bomb.active .tool-ico,
.tool-btn.tool-knife.active .tool-ico {
  color: #f3e8ff;
}

.tool-btn:active {
  transform: scale(0.97);
}


/* Content prefs quiz + settings toggles */
.prefs-panel {
  max-width: min(420px, 100%);
  width: 100%;
  max-height: min(92dvh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
}
/* Settings: long filter grid must clear the bottom Back button */
#settings-panel .panel {
  max-height: min(92dvh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
}
#settings-panel .prefs-grid-settings {
  max-height: none;
}
.prefs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  width: 100%;
}
.prefs-grid-settings,
.prefs-grid-primary,
#prefs-quiz-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}
.pref-chip-cell {
  min-width: 0;
}
.prefs-grid-settings .pref-chip,
.prefs-grid-primary .pref-chip,
#prefs-quiz-grid .pref-chip {
  aspect-ratio: auto;
  min-height: 2.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem 0.35rem;
  width: 100%;
  overflow: hidden;
}
.prefs-grid-settings .pref-chip strong,
.prefs-grid-primary .pref-chip strong,
#prefs-quiz-grid .pref-chip strong {
  font-size: clamp(0.58rem, 2.6vw, 0.72rem);
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prefs-grid-settings .pref-chip span,
.prefs-grid-primary .pref-chip span,
#prefs-quiz-grid .pref-chip span {
  display: none;
}
@media (max-width: 360px) {
  .prefs-grid:not(.prefs-grid-settings):not(.prefs-grid-primary) {
    grid-template-columns: 1fr;
  }
  .prefs-grid-settings,
  .prefs-grid-primary,
  #prefs-quiz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pref-grid-detail {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(125, 206, 138, 0.35);
  background: rgba(125, 206, 138, 0.08);
}
.pref-grid-detail.hidden,
.pref-grid-detail[hidden] {
  display: none !important;
}
.pref-detail-title {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b8f0c0;
  font-family: var(--font-d);
}
.pref-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.pref-detail-chip {
  display: inline-block;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 206, 138, 0.4);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.58rem;
  line-height: 1.2;
  color: #d8f5dc;
}
.pref-chip-cell.is-expanded .pref-chip {
  border-color: rgba(125, 206, 138, 0.75);
  box-shadow: 0 0 0 1px rgba(125, 206, 138, 0.25);
}
.setting-row--vol small.muted {
  display: block;
  font-size: 0.58rem;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 0.08rem;
}
.arcade-chrome-wallet {
  position: relative;
}
.token-run-net {
  position: absolute;
  left: 50%;
  right: auto;
  top: calc(100% + 0.2rem);
  transform: translateX(-50%);
  font-family: var(--font-d);
  font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  transition: color 0.2s ease;
}
.token-run-net.is-zero {
  color: rgba(220, 210, 230, 0.85);
}
.token-run-net.is-gain {
  color: #b8f0c0;
}
.token-run-net.is-loss {
  color: #ff8a8a;
}
.token-run-net.is-tick {
  animation: token-run-tick 0.28s ease-out;
}
@keyframes token-run-tick {
  0% {
    transform: translateX(-50%) scale(1.18);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}
html.reduce-motion .token-run-net.is-tick {
  animation: none;
}
.pref-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.65rem 0.55rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-b);
  min-height: 3.2rem;
  transition: border-color 0.15s, background 0.15s;
}
.pref-chip strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pref-chip span {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.25;
}
.pref-chip.on {
  border-color: rgba(125, 206, 138, 0.55);
  background: linear-gradient(
    160deg,
    rgba(125, 206, 138, 0.18),
    rgba(40, 28, 20, 0.35)
  );
}
.pref-chip.on strong {
  color: #b8f0c0;
}
.set-section {
  margin: 1rem 0 0.25rem;
  font-family: var(--font-d);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.set-section-blurb {
  margin: 0 0 0.5rem;
}
.prefs-grid-settings {
  margin-bottom: 0.5rem;
}
.shop-pool-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.72rem;
  line-height: 1.4;
}
.legal-links a {
  color: var(--accent-2);
}

/* Site legal footer · full on menu / embeds · half-size in gameplay */
.site-foot {
  flex: 0 0 auto;
  width: 100%;
  max-width: 22rem;
  margin: 0.65rem auto 0;
  padding: 0.55rem 0.35rem 0.15rem;
  text-align: center;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 8;
  pointer-events: auto;
}
.site-foot-line {
  margin: 0 0 0.28rem;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--muted, #a89488);
  opacity: 0.92;
}
.app-ver {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.app-ver--stale {
  color: var(--accent-2, #c026d3);
  opacity: 1;
}
.site-foot-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1.45;
}
.site-foot-nav a {
  color: var(--accent-2, #c026d3);
  text-decoration: none;
  touch-action: manipulation;
  pointer-events: auto !important;
  position: relative;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.35rem 0.45rem;
  user-select: text;
  -webkit-user-select: text;
  cursor: pointer;
}
.site-foot-nav a:hover,
.site-foot-nav a:focus-visible {
  text-decoration: underline;
}
.site-foot-nav span[aria-hidden="true"] {
  color: var(--muted, #a89488);
  opacity: 0.55;
  user-select: none;
}
.site-foot--embed {
  margin-top: 0.85rem;
  max-width: none;
}
/* Gameplay: one tiny legal line flush to the bottom */
.site-foot--play {
  margin: 0 auto;
  padding: 0 0.2rem 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-top: none;
  transform: none;
  overflow: hidden;
  box-sizing: border-box;
}
.site-foot--play .site-foot-line {
  display: none;
}
.site-foot--play .site-foot-nav--one,
.site-foot--play .site-foot-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.12rem 0.22rem;
  font-size: clamp(0.48rem, 2.4vw, 0.58rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.site-foot--play .site-foot-nav--one::-webkit-scrollbar {
  display: none;
}
.site-foot--play .site-foot-meta {
  color: var(--muted, #a89488);
  opacity: 0.88;
  flex: 0 0 auto;
}
.site-foot--play .site-foot-nav a {
  color: var(--accent-2, #c026d3);
  min-height: 0;
  min-width: 0;
  padding: 0.12rem 0.15rem;
  font-size: inherit;
  line-height: inherit;
}
.site-foot--play .site-foot-nav span[aria-hidden="true"] {
  opacity: 0.45;
  padding: 0;
}
.dock > .site-foot--play {
  order: 3;
  margin-top: 0;
}

.muted.sm {
  font-size: 0.78rem;
}

/* Live TOKEN market chart in shop */
.market-panel {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.7rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  background:
    linear-gradient(165deg, rgba(88, 28, 135, 0.28), transparent 55%),
    rgba(12, 4, 20, 0.42);
  box-shadow: inset 0 0 24px rgba(168, 85, 247, 0.08);
}
.market-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.market-sym {
  margin: 0;
  font-family: var(--font-d);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--cab-neon, var(--neon, #e879f9));
}
.market-spot {
  margin: 0.15rem 0 0;
  font-family: var(--font-d);
  font-size: 0.95rem;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: 0.02em;
}
.market-tag {
  margin: 0.2rem 0 0.35rem;
  font-size: 0.62rem;
  line-height: 1.25;
  color: rgba(216, 180, 254, 0.85);
}
.market-side {
  text-align: right;
}
.market-idx {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e9d5ff;
}
.market-chg {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
}
.market-chg.up {
  color: #d8b4fe;
}
.market-chg.down {
  color: #f9a8d4;
}
.market-chart {
  display: block;
  width: 100%;
  height: 112px;
  border-radius: 8px;
  background: rgba(24, 8, 40, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.18);
  box-sizing: border-box;
}
.market-stats {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
}
.market-range {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}
.mrange-btn {
  flex: 1;
  min-height: 36px;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background: rgba(40, 12, 60, 0.35);
  color: var(--muted);
  font-family: var(--font-d);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  touch-action: manipulation;
  cursor: pointer;
}
.mrange-btn[aria-selected="true"] {
  color: #f3e8ff;
  border-color: rgba(232, 121, 249, 0.55);
  background: rgba(168, 85, 247, 0.22);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}
.market-stack {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
}
.market-feed-h {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8b4fe;
}
.market-leaders {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
}
.market-leaders li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.market-leaders .ml-rank {
  opacity: 0.7;
  margin-right: 0.25rem;
}
.market-leaders .ml-user {
  color: var(--ink);
  font-weight: 600;
}
.market-receipt {
  display: none !important;
}
.market-receipt-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-d);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #7dce8a;
}
.market-receipt-body {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-line;
}
.sell-howto {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 160, 96, 0.35);
  background: rgba(60, 28, 20, 0.35);
}
.sell-howto-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}
.sell-steps {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink);
}
.sell-steps li {
  margin: 0.2rem 0;
}
.sell-payline {
  margin: 0 0 0.35rem;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-word;
}
.sell-payline a {
  color: var(--accent-2);
}
.redeem-box {
  margin-top: 0.75rem;
}
.market-soldout {
  margin: 0.5rem 0 0;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 121, 249, 0.45);
  background: rgba(80, 20, 16, 0.35);
  color: var(--ink);
  font-family: var(--font-d);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

/* Age / jurisdiction affirmations */
.age-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.age-check input {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-2, #c026d3);
}
.age-check span {
  flex: 1;
  min-width: 0;
}
/* Compact save-login checkbox under auth forms (mobile-friendly tap target) */
.login-save-check {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.78rem;
  min-height: 2.4rem;
  align-items: center;
}
.login-save-check input {
  margin-top: 0;
  width: 1.25rem;
  height: 1.25rem;
}
#age-yes:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Multi-rail payment list */
.pay-rails {
  list-style: none;
  margin: 0.65rem 0 0.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pay-rails li {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
}
.pay-rails li strong {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
  margin-bottom: 0.15rem;
}
.pay-rails a {
  color: var(--accent-2, #c026d3);
  word-break: break-word;
}
#region-block {
  z-index: 210;
}
#region-block.hidden,
#region-block[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* BTC pay block */
.btc-box {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(192, 38, 211, 0.35);
  background: rgba(40, 16, 36, 0.45);
}
.btc-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2, #c026d3);
  font-family: var(--font-d);
  font-weight: 700;
}
.btc-addr {
  margin: 0 0 0.65rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  word-break: break-all;
  color: var(--ink, #f3e8df);
  user-select: all;
}
.btc-actions {
  margin: 0 0 0.35rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.btc-box[hidden] {
  display: none !important;
}

/* ——— Secure view (best-effort capture guard) ——— */
html.secure-view-on #stage,
html.secure-view-on #bg-scene,
html.secure-view-on #tear-canvas,
html.secure-view-on #fx-canvas {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none;
  user-drag: none;
}

html.secure-play-active #stage {
  /* soft signal; watermark + blackout do real work */
  touch-action: none;
}

.secure-blackout {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background: #0a0608;
  color: #f3e8df;
  pointer-events: all;
}

.secure-blackout[hidden] {
  display: none !important;
}

.secure-blackout-inner {
  text-align: center;
  padding: 1.5rem;
}

.secure-blackout-brand {
  margin: 0;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  opacity: 0.55;
  font-family: var(--font-d, system-ui, sans-serif);
}

.secure-blackout-msg {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
}

.secure-mark {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  pointer-events: none;
  font-size: clamp(0.62rem, 2.2vw, 0.78rem);
  letter-spacing: 0.04em;
  color: rgba(243, 232, 223, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-16deg);
  transform-origin: center center;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-d, system-ui, sans-serif);
  /* Stay under HUD chrome; above scene/canvas so peep shots include mark */
}

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

html.secure-capture-guard #app {
  filter: brightness(0);
}

/* —— Season / Battle Pass (shop Pass tab) —— */
.bp-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  position: relative;
}
.bp-head {
  flex: 0 0 auto;
}
.bp-season-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.bp-season-tabs[hidden],
.bp-season-tabs.hidden {
  display: none !important;
}
.bp-season-tab {
  flex: 1 1 0;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--cab-border, rgba(240, 168, 236, 0.28));
  background: rgba(0, 0, 0, 0.35);
  color: var(--cab-title-muted, #f3d9f5);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bp-season-tab.is-active {
  border-color: var(--cab-border-active, rgba(240, 168, 236, 0.7));
  background: linear-gradient(165deg, var(--cab-panel-tint, rgba(120, 40, 100, 0.55)), rgba(40, 24, 14, 0.85));
  color: var(--cab-title, #f0a8ec);
}
.bp-banner-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cab-border-active, rgba(240, 168, 236, 0.38));
  background:
    radial-gradient(ellipse at 50% 60%, rgba(120, 70, 28, 0.45), transparent 62%),
    #100812;
  margin-bottom: 0.45rem;
  aspect-ratio: 2.4 / 1;
  max-height: min(28vw, 9rem);
  box-shadow:
    0 0 0 1px var(--cab-neon-soft, rgba(232, 121, 249, 0.08)),
    0 8px 22px rgba(0, 0, 0, 0.4);
}
.bp-banner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  outline: none;
  background: #100812;
  opacity: 0.78;
  filter: hue-rotate(255deg) saturate(1.35) brightness(0.72);
}
.bp-banner-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      transparent 0 42%,
      var(--cab-neon-soft, rgba(232, 121, 249, 0.14)) 42% 43%,
      transparent 43% 57%,
      var(--cab-neon-soft, rgba(232, 121, 249, 0.14)) 57% 58%,
      transparent 58%
    ),
    linear-gradient(
      45deg,
      transparent 0 42%,
      var(--cab-neon-soft, rgba(232, 121, 249, 0.12)) 42% 43%,
      transparent 43% 57%,
      var(--cab-neon-soft, rgba(232, 121, 249, 0.12)) 57% 58%,
      transparent 58%
    ),
    radial-gradient(circle at 50% 50%, transparent 28%, var(--cab-neon-soft, rgba(232, 121, 249, 0.16)) 29%, transparent 31%);
  box-shadow: inset 0 0 0 1px var(--cab-neon-soft, rgba(232, 121, 249, 0.18));
}
.bp-banner-crown {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  color: var(--cab-title, #f0a8ec);
  filter: drop-shadow(0 0 10px var(--cab-neon-mid, rgba(232, 121, 249, 0.55)));
  font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 24;
}
.bp-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.bp-title {
  font-family: var(--font-d, var(--font-ui), system-ui, sans-serif);
  font-size: clamp(1.12rem, 4.6vw, 1.35rem);
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--cab-title, #f0a8ec);
  text-shadow: 0 0 14px var(--neon-glow, rgba(232, 121, 249, 0.28));
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: nowrap;
}
.bp-title .bp-title-ico,
.bp-title .material-symbols-outlined {
  font-size: 1.05em;
  line-height: 1;
  flex: 0 0 auto;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  color: var(--cab-title, #f0a8ec);
}
.menu-btn-gold-inner .menu-bp-word {
  flex: 0 0 auto;
}
.bp-lvl {
  font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  font-weight: 800;
  color: var(--cab-title-muted, #fae8ff);
  opacity: 0.95;
}
.bp-bar-wrap {
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--cab-border, rgba(240, 168, 236, 0.22));
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.bp-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cab-bar-a, #c026d3), var(--cab-bar-b, #d946ef) 55%, var(--cab-bar-c, #fce7f3));
  box-shadow: 0 0 10px var(--neon-glow, rgba(232, 121, 249, 0.45));
  transition: width 0.35s ease;
}
.bp-xp,
.bp-hint {
  margin: 0.28rem 0 0;
  line-height: 1.35;
  color: rgba(210, 198, 178, 0.78);
  font-size: 0.7rem;
}
.bp-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.bp-actions .btn,
.bp-actions .btn-bp-premium {
  flex: 1 1 auto;
  min-height: 46px;
  min-width: 0;
  border-radius: 999px;
  letter-spacing: 0.06em;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(
    135deg,
    var(--cab-bar-a, #c026d3),
    var(--cab-bar-b, #e879f9) 55%,
    var(--cab-bar-a, #c026d3)
  );
  border: 1px solid rgba(255, 210, 140, 0.3);
  box-shadow:
    0 0 18px var(--neon-glow, rgba(200, 80, 40, 0.28)),
    0 4px 14px rgba(0, 0, 0, 0.35);
}
.btn-bp-premium .material-symbols-outlined {
  font-size: 1.15rem;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}
.bp-prem-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #1a0a16;
  background: linear-gradient(135deg, #f0a8ec, #d946ef);
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.35);
}
.bp-rail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
}
.bp-rail-labels {
  display: none;
}
.bp-carousel {
  flex: 1 1 auto;
  min-height: 15.5rem;
  max-height: min(48dvh, 380px);
  display: flex;
  flex-direction: row;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.15rem 0.35rem;
  touch-action: pan-x;
  scrollbar-width: none;
}
.bp-carousel::-webkit-scrollbar {
  display: none;
}
.bp-rail-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.1rem 0.1rem;
}
.bp-rail-btn {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--cab-neon-mid, rgba(232, 121, 249, 0.35));
  background: rgba(0, 0, 0, 0.35);
  color: var(--cab-title, #f0a8ec);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bp-rail-btn .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}
.bp-rail-scrub {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}
.bp-rail-scrub i {
  display: block;
  height: 100%;
  width: 20%;
  margin-left: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cab-bar-a, #c026d3), var(--cab-title, #f0a8ec));
  box-shadow: 0 0 8px var(--neon-glow, rgba(232, 121, 249, 0.45));
}
/* Level reward preview — liquid glass (frost + edge light) */
.bp-preview {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  isolation: isolate;
}
.bp-preview[hidden] {
  display: none !important;
}
.bp-preview-dismiss {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(6, 2, 12, 0.28);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
  backdrop-filter: blur(6px) saturate(1.15);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bp-preview-card {
  position: relative;
  z-index: 1;
  width: min(100% - 0.7rem, 22rem);
  max-height: calc(100% - 0.6rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.3rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(232, 121, 249, 0.08) 38%,
      rgba(12, 6, 20, 0.22) 100%
    );
  -webkit-backdrop-filter: blur(22px) saturate(1.55) brightness(1.05);
  backdrop-filter: blur(22px) saturate(1.55) brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 18px 42px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 121, 249, 0.12);
  box-sizing: border-box;
  color: #f8f4ff;
}
.bp-preview-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 21px;
  pointer-events: none;
  background:
    radial-gradient(
      120% 70% at 18% 0%,
      rgba(255, 255, 255, 0.38),
      rgba(255, 255, 255, 0.06) 42%,
      transparent 68%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      transparent 28%
    );
  opacity: 0.95;
  mix-blend-mode: soft-light;
}
.bp-preview-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.75),
    transparent
  );
  pointer-events: none;
  opacity: 0.85;
}
.bp-preview-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  margin-bottom: 0.55rem;
  text-align: center;
}
.bp-preview-head strong {
  font-size: 1.12rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.bp-preview-head .muted {
  color: rgba(235, 225, 255, 0.72) !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.bp-preview-tracks {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.bp-preview-col {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.35rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 8px 18px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  backdrop-filter: blur(10px) saturate(1.25);
}
.bp-preview-tag {
  align-self: flex-start;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.bp-preview-tag.free {
  color: #c8f0d2;
  border-color: rgba(160, 220, 180, 0.35);
  background: rgba(70, 140, 95, 0.22);
}
.bp-preview-tag.pro {
  color: #f6d9ff;
  border-color: rgba(232, 180, 255, 0.4);
  background: rgba(160, 70, 190, 0.22);
}
.bp-preview-col .bp-tile {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}
.bp-preview-col .bp-swatch {
  aspect-ratio: 1 / 1.05;
  min-height: 6.5rem;
}
.bp-preview-col .bp-tile-name {
  font-size: 0.72rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.bp-preview-name {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 250, 255, 0.92);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bp-preview-dismiss {
    background: rgba(6, 2, 12, 0.55);
  }
  .bp-preview-card {
    background: rgba(28, 14, 36, 0.88);
  }
  .bp-preview-col {
    background: rgba(20, 10, 28, 0.72);
  }
}
html.reduce-motion .bp-preview-dismiss,
body.reduce-motion .bp-preview-dismiss,
html.reduce-motion .bp-preview-card,
body.reduce-motion .bp-preview-card,
html.reduce-motion .bp-preview-col,
body.reduce-motion .bp-preview-col {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.reduce-motion .bp-preview-card,
body.reduce-motion .bp-preview-card {
  background: rgba(24, 12, 32, 0.92);
}
.bp-card {
  flex: 0 0 auto;
  width: min(48vw, 9.2rem);
  scroll-snap-align: center;
  border-radius: 14px;
  border: 1px solid var(--cab-border, rgba(240, 168, 236, 0.28));
  background:
    linear-gradient(180deg, rgba(48, 20, 48, 0.55), rgba(12, 6, 14, 0.92));
  padding: 0.4rem 0.32rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.bp-card.is-focus {
  border-color: var(--cab-border-active, rgba(240, 168, 236, 0.85));
  box-shadow:
    0 0 0 1px var(--cab-border, rgba(240, 168, 236, 0.28)),
    0 0 18px var(--neon-glow, rgba(232, 121, 249, 0.22)),
    0 10px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px) scale(1.02);
}
.bp-card.locked {
  opacity: 0.82;
}
.bp-lv-num {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1a0a16;
  margin-bottom: 0.05rem;
}
.bp-lv-num span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  min-height: 1.55rem;
  padding: 0.12rem 0.45rem;
  clip-path: polygon(50% 0%, 92% 50%, 50% 100%, 8% 50%);
  background: linear-gradient(145deg, var(--cab-lv-badge-a, #fce7f3), var(--cab-lv-badge-b, #c026d3) 55%, var(--cab-lv-badge-c, #8a6a18));
  border: 0;
  box-shadow: 0 0 10px var(--neon-glow, rgba(232, 121, 249, 0.35));
}
.bp-slot {
  position: relative;
  border-radius: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  border: 1px solid var(--cab-neon-soft, rgba(232, 121, 249, 0.2));
  background: rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
.bp-slot.is-fabric {
  border-color: var(--cab-neon-mid, rgba(232, 121, 249, 0.42));
}
.bp-slot.is-token {
  border-color: var(--cab-border-active, rgba(240, 168, 236, 0.5));
}
.bp-track-tag {
  position: absolute;
  z-index: 5;
  top: 0;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.12rem 0.26rem;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 1;
}
.bp-free .bp-track-tag {
  left: 0;
  color: #9fd4a8;
  border: 0;
  border-bottom: 1px solid rgba(120, 200, 140, 0.35);
  border-right: 1px solid rgba(120, 200, 140, 0.35);
  border-bottom-right-radius: 5px;
}
.bp-prem .bp-track-tag {
  right: 0;
  left: auto;
  color: var(--cab-title, #f0a8ec);
  border: 0;
  border-bottom: 1px solid var(--cab-neon-mid, rgba(232, 121, 249, 0.4));
  border-left: 1px solid var(--cab-neon-mid, rgba(232, 121, 249, 0.4));
  border-bottom-left-radius: 5px;
}
.bp-tile {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
}
.bp-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  background-size: 128% 128%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a100c;
  border: none;
  outline: none;
  box-shadow: none;
}
.bp-tile-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(8, 4, 2, 0.92), transparent);
  pointer-events: none;
}
.bp-tile-name {
  position: absolute;
  left: 0.18rem;
  right: 0.18rem;
  bottom: 0.12rem;
  z-index: 2;
  font-size: clamp(0.58rem, 2.4vw, 0.7rem);
  font-weight: 750;
  line-height: 1.15;
  color: #fff0fb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  word-break: break-word;
}
.bp-swatch-token {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 230, 140, 0.45), transparent 55%),
    linear-gradient(145deg, #3a2810, #120c08 70%);
}
.bp-token-burst {
  font-size: 1.65rem;
  font-weight: 900;
  color: #f0a8ec;
  filter: drop-shadow(0 0 8px rgba(240, 168, 236, 0.55));
  animation: bp-token-pulse 2.4s ease-in-out infinite;
}
@keyframes bp-token-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}
.bp-swatch-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      -28deg,
      rgba(255, 255, 255, 0.04) 0 6px,
      transparent 6px 12px
    ),
    linear-gradient(160deg, #2a1c18, #100a08);
}
.bp-soon-mark {
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(240, 168, 236, 0.35);
}
.bp-swatch-scene {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 40% 28%, rgba(180, 90, 120, 0.45), transparent 55%),
    linear-gradient(145deg, #3a1824, #12080c 70%);
}
.bp-scene-mark {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f0a8ec;
  letter-spacing: 0.04em;
}
.bp-lock-chip {
  position: absolute;
  z-index: 4;
  top: 0.12rem;
  left: 0.12rem;
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  color: #1a0a16;
  background: linear-gradient(135deg, #f0a8ec, #d946ef);
  box-shadow: 0 0 8px rgba(232, 121, 249, 0.35);
  padding: 0;
}
.bp-lock-chip .material-symbols-outlined {
  font-size: 0.78rem;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20;
  line-height: 1;
}
.bp-slot.is-locked .bp-swatch {
  filter: grayscale(0.35) brightness(0.72);
}
.bp-slot.is-claimed .bp-swatch {
  filter: saturate(0.75) brightness(0.85);
}
.bp-slot.is-claimed .bp-tile-name::before {
  content: "✓ ";
  color: #9fd4a8;
}
.bp-slot.needs-prem .bp-swatch {
  filter: grayscale(0.92) brightness(0.28) contrast(0.85);
}
.bp-slot.needs-prem .bp-tile-name {
  color: #9a9088;
}
.bp-slot.needs-prem::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(6, 4, 4, 0.58);
  pointer-events: none;
  z-index: 3;
}
.bp-reward {
  display: none;
}
.fabric-badge.is-buy {
  background: #c026d3;
  color: #1a0a16;
}

/* —— Fabric studio (Account → Fabric) —— */
.pane-fabrics {
  min-height: 0;
  height: 100%;
}
.pane-fabrics.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.fabric-studio {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.fabric-preview-wrap {
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.38);
  background: #100812;
  position: relative;
  box-shadow: 0 0 18px rgba(232, 121, 249, 0.12);
}
.fabric-preview-expand {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(232, 121, 249, 0.4);
  background: rgba(0, 0, 0, 0.45);
  color: #f0a8ec;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fabric-preview-expand .material-symbols-outlined {
  font-size: 1.05rem;
  line-height: 1;
}
.fabric-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: min(20dvh, 148px);
  touch-action: none;
  transition: max-height 0.2s ease;
}
.fabric-preview-wrap.is-expanded .fabric-preview {
  max-height: min(42dvh, 280px);
}
.fabric-preview-label {
  margin: 0;
  padding: 0.4rem 0.65rem 0.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.62);
  color: #f0a8ec;
  font-size: clamp(0.72rem, 2.8vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fabric-studio-hint {
  margin: 0;
  line-height: 1.3;
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(200, 180, 210, 0.72);
}
.fabric-section-rail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0.1rem 0 0;
}
.fabric-section-nav {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 121, 249, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cab-neon, var(--neon, #e879f9));
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fabric-section-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.fabric-section-nav .material-symbols-outlined {
  font-size: 1.35rem;
  line-height: 1;
}
.fabric-section-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
}
.fabric-section-title::before,
.fabric-section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(232, 121, 249, 0.45),
    transparent
  );
}
.fabric-section-spark {
  color: var(--cab-neon, var(--neon, #e879f9));
  font-size: 0.55rem;
  text-shadow: 0 0 8px rgba(232, 121, 249, 0.55);
}
.fabric-section-rail .pane-pager-label {
  flex: 0 1 auto;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0a8ec;
  font-size: clamp(0.72rem, 3vw, 0.85rem);
  text-shadow: 0 0 10px rgba(232, 121, 249, 0.35);
  white-space: nowrap;
}
.fabric-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 0.55rem;
  padding: 0.15rem 0.1rem 0.85rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  align-content: start;
  align-items: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 121, 249, 0.55) transparent;
}
.fabric-grid::-webkit-scrollbar {
  width: 3px;
}
.fabric-grid::-webkit-scrollbar-thumb {
  background: rgba(232, 121, 249, 0.55);
  border-radius: 999px;
}
.fabric-tile {
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(240, 168, 236, 0.22);
  background: rgba(0, 0, 0, 0.38);
  color: var(--ink, #f8eef8);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.fabric-tile.owned:active {
  transform: scale(0.97);
}
.fabric-tile.is-equipped {
  border-color: rgba(232, 121, 249, 0.85);
  box-shadow:
    0 0 0 1px rgba(232, 121, 249, 0.35),
    0 0 16px rgba(232, 121, 249, 0.32);
}
.fabric-tile.locked {
  cursor: default;
}
.fabric-tile.locked .fabric-swatch {
  filter: grayscale(0.55) brightness(0.45);
}
.fabric-swatch {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 11px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #2a1428;
  overflow: hidden;
  isolation: isolate;
}
.fabric-swatch::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(8, 4, 10, 0.92), transparent);
  pointer-events: none;
  z-index: 1;
}
.fabric-tile-foot {
  position: absolute;
  left: 0.28rem;
  right: 0.28rem;
  bottom: 0.3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  pointer-events: none;
}
.fabric-name {
  font-size: clamp(0.58rem, 2.4vw, 0.68rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff5fc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  min-height: 0;
}
.fabric-req {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cab-neon, var(--neon, #e879f9));
  text-shadow: 0 0 8px rgba(232, 121, 249, 0.45);
}
.fabric-lock {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 121, 249, 0.55);
  background: rgba(12, 6, 16, 0.72);
  color: var(--cab-neon, var(--neon, #e879f9));
  display: grid;
  place-items: center;
  font-size: 1rem !important;
  line-height: 1;
  box-shadow: 0 0 10px rgba(232, 121, 249, 0.28);
}
.fabric-check {
  font-size: 1.05rem !important;
  color: var(--cab-neon, var(--neon, #e879f9));
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(232, 121, 249, 0.55));
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20;
}
.fabric-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  margin: 0;
  padding: 0.14rem 0.35rem;
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  pointer-events: none;
  background: rgba(12, 6, 14, 0.78);
  color: #f0a8ec;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(232, 121, 249, 0.25);
}
.fabric-badge.is-pass {
  color: var(--cab-neon, var(--neon, #e879f9));
  border-color: rgba(232, 121, 249, 0.35);
}
.fabric-badge.is-own {
  color: #1a0a16;
  background: linear-gradient(135deg, #f0d4a8, #e8b87a);
  border-color: transparent;
}
.fabric-badge.is-on {
  color: #1a0a16;
  background: linear-gradient(135deg, #e879f9, #c026d3);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(232, 121, 249, 0.45);
}
.fabric-badge.is-buy {
  color: #1a0a16;
  background: linear-gradient(135deg, #c026d3, #e879f9);
  border-color: transparent;
}
.fabric-state {
  display: none !important;
}

.account-back-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 0.15rem;
  border-radius: 999px !important;
  border: 1px solid rgba(232, 121, 249, 0.45) !important;
  color: #f0a8ec !important;
  letter-spacing: 0.1em;
  min-height: 36px;
  padding: 0.3rem 0.75rem 0.3rem 0.4rem !important;
}
.account-back-pill .material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
}
.account-title {
  font-family: var(--font-d);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.account-close-btn {
  min-width: min(100%, 14rem);
}

@media (max-width: 340px) {
  .fabric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bp-slot.is-claimed {
  opacity: 0.88;
}
.bp-slot.needs-prem {
  border-style: solid;
  border-color: rgba(90, 90, 90, 0.7);
  background: #0e0a08;
}
.panel-pane[data-pane="pass"] {
  display: none;
  min-height: 0;
  height: 100%;
}
.panel-pane[data-pane="pass"].is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (max-width: 380px) {
  .bp-card {
    width: min(50vw, 7.8rem);
  }
  .bp-actions .btn,
  .bp-actions .btn-bp-premium {
    font-size: 0.74rem;
    min-height: 44px;
  }
  .bp-carousel {
    min-height: 14.5rem;
  }
  .bp-banner-wrap {
    max-height: min(26vw, 7.5rem);
  }
}




/* —— Neon chrome (global overlays — follows cabinet theme) —— */
.panel {
  background:
    radial-gradient(ellipse at 50% 0%, var(--cab-neon-soft, rgba(232, 121, 249, 0.1)), transparent 55%),
    linear-gradient(165deg, var(--cab-panel-tint, rgba(72, 28, 78, 0.45)), transparent 50%),
    var(--panel);
  border-color: var(--cab-border, rgba(240, 168, 236, 0.22));
  box-shadow:
    0 0 0 1px var(--cab-neon-soft, rgba(232, 121, 249, 0.06)),
    0 24px 60px rgba(0, 0, 0, 0.55);
}
.panel.account-panel-wide.panel-tabbed,
.panel.shop-panel.panel-tabbed,
#settings-panel .panel {
  background:
    radial-gradient(ellipse at 50% 0%, var(--cab-neon-soft, rgba(232, 121, 249, 0.1)), transparent 55%),
    linear-gradient(180deg, rgba(32, 14, 40, 0.97), rgba(10, 6, 14, 0.98));
  border-color: var(--cab-border-active, rgba(232, 121, 249, 0.28));
}
.panel-tabbed-head .brand-mark,
.brand-mark-gold,
.shop-title-gold {
  color: var(--cab-title, #f0a8ec) !important;
  text-shadow:
    0 0 22px var(--neon-glow, rgba(232, 121, 249, 0.45)),
    0 0 8px var(--cab-neon-soft, rgba(192, 38, 211, 0.35)) !important;
}
.account-panel-wide .account-tabs .panel-tab.is-active,
.shop-panel .shop-tabs-ico .panel-tab.is-active,
.panel-tab.is-active {
  color: var(--cab-title-muted, #f5d0fe);
  border-color: var(--cab-border-active, rgba(232, 121, 249, 0.6));
  background:
    radial-gradient(ellipse at 50% 20%, var(--cab-neon-soft, rgba(232, 121, 249, 0.28)), transparent 70%),
    rgba(40, 14, 48, 0.78);
  box-shadow:
    0 0 0 1px var(--cab-neon-soft, rgba(232, 121, 249, 0.22)),
    0 0 16px var(--neon-glow, rgba(232, 121, 249, 0.35));
}
.menu-btn:not(.menu-btn-gold) {
  border-color: transparent;
  background: transparent;
}
.menu-btn:hover .menu-btn-top::after,
.menu-btn:not(.menu-btn-gold):focus-visible .menu-btn-top::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 10px rgba(162, 85, 174, 0.2);
}
.menu-btn-gold:hover .menu-btn-gold-inner,
.menu-btn-gold:focus-visible .menu-btn-gold-inner {
  color: #d4af6a;
}
#settings-panel h2,
#account-panel h2,
.sys-h,
.bp-title {
  color: var(--cab-title, #f0a8ec);
  text-shadow: 0 0 12px var(--neon-glow, rgba(232, 121, 249, 0.3));
}
.buy-balance,
.np-button-grid-fit .np-pack-price,
.market-sym,
.market-spot {
  color: var(--cab-neon, var(--neon, #e879f9)) !important;
  text-shadow: 0 0 10px var(--neon-glow, rgba(232, 121, 249, 0.35));
}
.shop-panel .shop-close-btn,
.panel-tabbed-foot .btn-ghost {
  border-color: var(--cab-border-active, rgba(232, 121, 249, 0.45));
  color: var(--cab-title, #f0a8ec);
  box-shadow: 0 0 18px var(--neon-glow, rgba(232, 121, 249, 0.14));
}
.bp-actions .btn-bp-premium.btn-gold {
  background: linear-gradient(
    to right,
    #553707,
    #b38f4e,
    #553707,
    #553707,
    #b38f4e,
    #553707
  ) !important;
  background-size: 250% !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 2px !important;
  border-radius: 999px !important;
  min-width: min(100%, 18rem);
}
.bp-actions .btn-bp-premium.btn-gold .btn-gold-inner {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.88);
  color: #b38f4e;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: 0.1em;
}


/* —— Typography roles (Bodoni = titles only) —— */
body,
button,
.btn,
.panel-tab,
.menu-btn,
.tab,
.card-title,
.description,
.tool-shop-meta strong,
.fabric-name,
.gallery-card,
input,
select,
textarea,
label {
  font-family: var(--font-ui);
}

h1,
h2,
h3.sys-h,
.sys-h,
.brand-mark,
.brand-mark-gold,
.shop-title-gold,
.bp-title,
.account-title,
.menu-title,
.panel-tabbed-head h2,
#settings-panel h2,
#account-panel h2,
#main-menu .menu-wordmark,
.title,
.section-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}

.price,
.level,
.xp,
.stat,
.progress-text,
.bp-lvl,
.bp-xp,
.bp-lv-num,
.buy-balance,
.np-pack-tokens,
.np-pack-price,
.market-spot,
.market-idx,
.market-chg,
.tool-shop-rate,
.tool-shop-card .btn,
.fabric-badge,
.fabric-req,
.g-count,
.g-rar,
.bp-bar-wrap + .bp-xp,
[data-app-ver],
.app-ver {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif !important;
}
