/* Scope new helpers explicitly. Keep existing site fonts, CTA and scene assets. */
.up-stake-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: #0e171ce6;
  border: 1px solid #8a633b80;
  border-radius: 7px;
  max-width: 260px;
  width: 100%;
}
.up-stake-switch button {
  min-height: 36px;
  padding: 6px 16px;
  font: inherit;
  color: #d8d5cf;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.up-stake-switch button[aria-pressed="true"] {
  background: #ff8000;
  color: #17110a;
}
.up-stake-switch button:disabled { cursor: default; opacity: .65; }
.up-stake-switch button:focus-visible,
.up-balance-input:focus-visible { outline: 2px solid #ff9c35; outline-offset: 3px; }
.up-balance-input {
  box-sizing: border-box;
  width: 100%;
  max-width: 260px;
  min-height: 44px;
  padding: 10px 12px;
  background: #101b22;
  border: 1px solid #8a633b80;
  border-radius: 5px;
  color: #f5f0e6;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

/* This area MUST begin at the visible bottom edge of the pier and end at
   the top of the inventory panels. No extra margins on these boundaries. */
.up-action-gap {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-block-size: clamp(104px, 9vw, 144px);
  padding: 18px 16px;
  position: relative;
}
.up-action-gap > .up-upgrade-button {
  margin: 0;
  position: static;
  inset: auto;
  translate: none;
  transform: none;
  max-inline-size: min(100%, 360px);
  inline-size: 100%;
  min-block-size: 48px;
  /* Color, texture, type and hover feedback come from the existing CTA class. */
}

/* Dedicated wrapper, separate from position / fit / existing motion layers. */
.up-skin-visual { position: relative; isolation: isolate; overflow: visible; }
.up-result-fx {
  position: absolute;
  inset: -30% -28% -26%;
  z-index: 0;
  pointer-events: none;
  border: 0;
  background: none;
  box-shadow: none;
}
.up-skin-motion { position: relative; z-index: 1; }
.up-skin-motion img { display: block; max-width: 100%; height: auto; }
.up-result-status { color: #d6d9d6; text-align: center; }
.up-result-status[data-outcome="win"] { color: #77d3aa; }
.up-result-status[data-outcome="loss"] { color: #dc8c82; }
.up-result-status:empty { visibility: hidden; }
@media (max-width: 600px) {
  .up-action-gap { min-block-size: 100px; }
  .up-stake-switch button { min-height: 44px; }
}
