/* Player H5 Day 1 foundation. Intentionally scoped so Admin V2/legacy admin do not inherit it. */
.player-ui {
  --player-brand: #246bfd;
  --player-brand-strong: #1452d6;
  --player-game: #15264a;
  --player-game-deep: #09162f;
  --player-gold: #f4a51c;
  --player-gold-soft: #fff3d8;
  --player-multiplier: #ffca45;
  --player-bg: #f4f7fc;
  --player-surface: #ffffff;
  --player-surface-alt: #eef3fb;
  --player-success: #16865d;
  --player-warning: #b96506;
  --player-danger: #d63b45;
  --player-disabled: #aeb9ca;
  --player-text: #17233c;
  --player-text-soft: #60708a;
  --player-text-faint: #8793a7;
  --player-line: #dfe7f3;
  --player-font-xs: 12px;
  --player-font-sm: 14px;
  --player-font-md: 16px;
  --player-font-lg: 20px;
  --player-font-xl: 28px;
  --player-weight-regular: 400;
  --player-weight-medium: 600;
  --player-weight-bold: 800;
  --player-space-1: 4px;
  --player-space-2: 8px;
  --player-space-3: 12px;
  --player-space-4: 16px;
  --player-space-5: 20px;
  --player-space-6: 24px;
  --player-space-8: 32px;
  --player-radius-sm: 10px;
  --player-radius-md: 16px;
  --player-radius-lg: 22px;
  --player-radius-pill: 999px;
  --player-shadow-sm: 0 6px 18px rgba(38, 68, 120, 0.08);
  --player-shadow-md: 0 18px 44px rgba(38, 68, 120, 0.13);
  --player-shadow-game: 0 22px 54px rgba(9, 22, 47, 0.28);
  --player-z-nav: 50;
  --player-z-modal: 100;
  --player-z-toast: 120;
  --player-touch: 48px;
  color: var(--player-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(36, 107, 253, 0.1), transparent 28%),
    radial-gradient(circle at 94% 12%, rgba(244, 165, 28, 0.12), transparent 24%),
    var(--player-bg);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.player-ui::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(36, 107, 253, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(36, 107, 253, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.player-ui .bg-orbit {
  opacity: 0.3;
  border-color: rgba(36, 107, 253, 0.14);
}

.player-ui .shell {
  width: min(1180px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
  max-width: calc(100vw - var(--safe-left) - var(--safe-right));
  padding-top: max(var(--player-space-4), var(--safe-top));
  padding-bottom: calc(104px + var(--safe-bottom));
}

.player-ui .panel {
  color: var(--player-text);
  background: var(--player-surface);
  border: 1px solid rgba(216, 226, 241, 0.9);
  border-radius: var(--player-radius-lg);
  box-shadow: var(--player-shadow-sm);
  backdrop-filter: none;
}

.player-ui h1,
.player-ui h2,
.player-ui h3,
.player-ui strong {
  color: var(--player-text);
}

.player-ui .muted {
  color: var(--player-text-soft);
}

.player-ui .eyebrow {
  margin-bottom: var(--player-space-2);
  color: var(--player-brand);
  font-size: var(--player-font-xs);
  font-weight: var(--player-weight-bold);
  letter-spacing: 0.12em;
}

.player-ui .app-shell {
  display: grid;
  gap: var(--player-space-4);
}

.player-ui .shell,
.player-ui .app-shell,
.player-ui .view-panel,
.player-ui .game-layout,
.player-ui .game-panel,
.player-ui .me-layout,
.player-ui .record-layout,
.player-ui .cashier-shell,
.player-ui .broadcast-panel {
  min-width: 0;
  max-width: 100%;
}

.player-ui .player-topbar {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--player-space-4);
  padding: 0 var(--player-space-2);
}

.player-ui #appPanel .player-topbar {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(88px, 1fr) auto;
}

.player-ui .brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--player-space-3);
}

.player-ui .brand-lockup > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.player-ui .brand-lockup strong {
  font-size: 18px;
  font-weight: var(--player-weight-bold);
  letter-spacing: -0.02em;
}

.player-ui .brand-lockup span:not(.brand-mark) {
  color: var(--player-text-soft);
  font-size: var(--player-font-xs);
}

.player-ui .brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 23px;
  background: linear-gradient(145deg, var(--player-brand), #5593ff);
  box-shadow: 0 9px 22px rgba(36, 107, 253, 0.3);
}

.player-ui .topbar-live-multiplier {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 2px 8px;
  text-align: center;
}

.player-ui .topbar-live-multiplier span {
  color: var(--player-text-soft);
  font-size: 10px;
  font-weight: var(--player-weight-medium);
  line-height: 1;
}

.player-ui .topbar-live-multiplier strong {
  color: var(--player-gold);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-shadow: 0 7px 20px rgba(244, 165, 28, 0.25);
  font-variant-numeric: tabular-nums;
}

.player-ui .topbar-status {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--player-space-3);
}

.player-ui .balance-pill {
  min-width: 132px;
  display: grid;
  justify-items: end;
  padding: 8px 14px;
  border: 1px solid #f5dfaa;
  border-radius: var(--player-radius-md);
  background: var(--player-gold-soft);
}

.player-ui .balance-pill span {
  color: #8c6516;
  font-size: 11px;
}

.player-ui .balance-pill strong {
  max-width: 180px;
  overflow: hidden;
  color: #8c5c00;
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.player-ui .status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--player-text-soft);
  font-size: var(--player-font-xs);
  font-weight: var(--player-weight-medium);
  white-space: nowrap;
  border: 1px solid var(--player-line);
  border-radius: var(--player-radius-pill);
  background: var(--player-surface);
}

.player-ui .status-chip i,
.player-ui .status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--player-warning);
  box-shadow: 0 0 0 4px rgba(185, 101, 6, 0.1);
}

.player-ui .status-chip[data-state="online"] i,
.player-ui .status-chip[data-state="safe"] i,
.player-ui .stage-status-wrap[data-state="idle"] .status-dot,
.player-ui .stage-status-wrap[data-state="success"] .status-dot {
  background: var(--player-success);
  box-shadow: 0 0 0 4px rgba(22, 134, 93, 0.1);
}

.player-ui .status-chip[data-state="error"] i,
.player-ui .stage-status-wrap[data-state="error"] .status-dot {
  background: var(--player-danger);
  box-shadow: 0 0 0 4px rgba(214, 59, 69, 0.12);
}

.player-ui .broadcast-panel {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--player-space-5);
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(120deg, var(--player-game-deep), var(--player-game));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--player-shadow-game);
  order: 0;
}

.player-ui .broadcast-head {
  min-width: max-content;
}

.player-ui .broadcast-head .eyebrow {
  margin: 0;
  color: var(--player-multiplier);
}

.player-ui .broadcast-head .muted,
.player-ui .marquee-item .muted {
  color: #aebbd2;
}

.player-ui .marquee-shell {
  min-width: 0;
}

.player-ui .marquee-item {
  color: #eef4ff;
}

.player-ui .marquee-item strong {
  color: var(--player-multiplier);
}

.player-ui .game-panel {
  padding: var(--player-space-4);
  overflow: hidden;
  color: #f3f7ff;
  background:
    radial-gradient(circle at 80% -10%, rgba(255, 202, 69, 0.14), transparent 30%),
    linear-gradient(160deg, #172d57 0%, var(--player-game-deep) 54%, #071226 100%);
  border: 1px solid rgba(109, 151, 224, 0.24);
  box-shadow: var(--player-shadow-game);
}

.player-ui .game-panel strong,
.player-ui .game-panel h3 {
  color: #ffffff;
}

.player-ui .room-tabs {
  padding: 4px;
  border-radius: 14px;
  background: rgba(4, 14, 32, 0.54);
}

.player-ui .room-tab {
  min-height: 42px;
  color: #b7c5dd;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.player-ui .room-tab.active {
  color: #10203c;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}

.player-ui .game-guide-strip {
  color: #c8d5e9;
  border-color: rgba(151, 181, 231, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

.player-ui .stage-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.player-ui .metric-inline,
.player-ui .stage-status-wrap {
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  color: #b8c6db;
  border: 1px solid rgba(177, 202, 239, 0.13);
  border-radius: var(--player-radius-md);
  background: rgba(255, 255, 255, 0.055);
}

.player-ui .metric-inline > span,
.player-ui .stage-status-wrap .muted {
  color: #aebdd5;
  font-size: var(--player-font-xs);
}

.player-ui .metric-inline strong {
  overflow-wrap: anywhere;
}

.player-ui .metric-action {
  color: #ffffff;
  cursor: pointer;
}

.player-ui .metric-action:hover {
  border-color: rgba(255, 202, 69, 0.42);
  background: rgba(255, 255, 255, 0.09);
}

.player-ui .metric-hint {
  color: #8fa3c2;
}

.player-ui .stage-status-wrap {
  grid-column: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  gap: 4px 8px;
}

.player-ui .stage-status-wrap .muted {
  grid-column: 2;
}

.player-ui .status-text {
  color: #ffffff;
  font-weight: var(--player-weight-bold);
}

.player-ui .scene-stage {
  min-height: 360px;
  border: 1px solid rgba(177, 202, 239, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 0 60px rgba(1, 8, 22, 0.18);
  contain: layout paint style;
}

.player-ui .flight-pack {
  pointer-events: none;
  backface-visibility: hidden;
  contain: layout style;
}

.player-ui .rocket-sprite {
  transform: translate3d(-50%, 0, 0);
}

.player-ui .rocket-trail {
  transform: translate3d(-50%, 0, 0) scaleY(0.86);
  transform-origin: 50% 0;
}

.player-ui .scene-stage.running .rocket-trail {
  animation-name: player-rocket-trail-pulse;
}

.player-ui .controls {
  padding-top: var(--player-space-2);
}

.player-ui .btn {
  min-height: var(--player-touch);
  padding: 12px 18px;
  color: var(--player-text);
  font-weight: var(--player-weight-bold);
  line-height: 1.2;
  border-radius: 14px;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.player-ui .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.player-ui .btn:active:not(:disabled) {
  transform: translateY(1px);
}

.player-ui .btn:focus-visible,
.player-ui input:focus-visible,
.player-ui select:focus-visible,
.player-ui textarea:focus-visible,
.player-ui .room-tab:focus-visible {
  outline: 3px solid rgba(36, 107, 253, 0.22);
  outline-offset: 2px;
}

.player-ui .btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--player-brand), var(--player-brand-strong));
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(36, 107, 253, 0.24);
}

.player-ui .btn-secondary {
  color: var(--player-brand-strong);
  background: #e8f0ff;
  border-color: #cbdcff;
}

.player-ui .btn-outline {
  color: var(--player-brand-strong);
  background: #ffffff;
  border: 1px solid #b9d0ff;
}

.player-ui .btn-ghost {
  color: var(--player-text-soft);
  background: transparent;
  border-color: transparent;
}

.player-ui .btn-danger {
  color: #ffffff;
  background: linear-gradient(135deg, #ed4c55, var(--player-danger));
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(214, 59, 69, 0.22);
}

.player-ui .btn-xl {
  min-height: 56px;
  font-size: 17px;
}

.player-ui .btn:disabled,
.player-ui .btn[aria-busy="true"] {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.player-ui .btn[aria-busy="true"]::before {
  content: "";
  width: 15px;
  height: 15px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: player-spin 0.7s linear infinite;
}

@keyframes player-spin {
  to { transform: rotate(360deg); }
}

@keyframes player-rocket-trail-pulse {
  from { transform: translate3d(-50%, 0, 0) scaleY(0.82); opacity: 0.76; }
  to { transform: translate3d(-50%, 0, 0) scaleY(1.16); opacity: 1; }
}

.player-ui label {
  color: var(--player-text-soft);
  font-weight: var(--player-weight-medium);
}

.player-ui input,
.player-ui textarea,
.player-ui select {
  min-height: var(--player-touch);
  color: var(--player-text);
  border: 1px solid #ced9e9;
  border-radius: 13px;
  background: #fbfcff;
  box-shadow: inset 0 1px 2px rgba(26, 45, 79, 0.03);
}

.player-ui input::placeholder,
.player-ui textarea::placeholder {
  color: var(--player-text-faint);
}

.player-ui .section-head {
  gap: var(--player-space-4);
}

.player-ui .section-head h3 {
  font-size: var(--player-font-lg);
  letter-spacing: -0.02em;
}

.player-ui .sub-card,
.player-ui .stat-card,
.player-ui .product-card,
.player-ui .custom-recharge-card,
.player-ui .wallet-action-card,
.player-ui .wallet-identity-card,
.player-ui .admin-card,
.player-ui .hint-box,
.player-ui .list-item {
  color: var(--player-text);
  border-color: var(--player-line);
  background: var(--player-surface-alt);
  box-shadow: none;
}

.player-ui .stat-card,
.player-ui .product-card {
  border-radius: var(--player-radius-md);
}

.player-ui .stat-card span,
.player-ui .product-card .muted {
  color: var(--player-text-soft);
}

.player-ui .stat-card strong,
.player-ui .product-card strong {
  overflow-wrap: anywhere;
  color: var(--player-text);
}

.player-ui .wallet-overview-panel {
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 202, 69, 0.2), transparent 32%),
    linear-gradient(135deg, #183463, #102242);
  border-color: rgba(83, 129, 202, 0.26);
  box-shadow: var(--player-shadow-game);
}

.player-ui .wallet-overview-panel h3,
.player-ui .wallet-overview-panel strong {
  color: #ffffff;
}

.player-ui .wallet-overview-panel .eyebrow {
  color: var(--player-multiplier);
}

.player-ui .wallet-overview-panel .stat-card {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
}

.player-ui .wallet-overview-panel .stat-card span {
  color: #b8c8df;
}

.player-ui .wallet-overview-panel .stat-card strong {
  color: #ffffff;
}

.player-ui .privacy-note {
  padding: 7px 10px;
  color: #c2d1e6;
  font-size: var(--player-font-xs);
  border-radius: var(--player-radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.player-ui .wallet-operations-panel {
  display: grid;
  gap: var(--player-space-4);
}

.player-ui .product-card .pay-btn {
  color: var(--player-brand-strong);
  background: #ffffff;
  border: 1px solid #b9d0ff;
  box-shadow: none;
}

.player-ui .list-item {
  min-width: 0;
  border-radius: var(--player-radius-md);
}

.player-ui .list-item > div {
  min-width: 0;
}

.player-ui .long-id {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-ui .long-id code {
  max-width: min(52vw, 420px);
  overflow: hidden;
  color: var(--player-text-soft);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-ui .copy-id-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 7px 9px;
  flex: 0 0 auto;
  color: var(--player-brand);
  border: 0;
  border-radius: 10px;
  background: #e5eeff;
}

.player-ui .field-feedback {
  margin-top: var(--player-space-3);
  padding: 11px 13px;
  border-radius: 12px;
  font-size: var(--player-font-sm);
  line-height: 1.5;
}

.player-ui .field-feedback.error {
  color: #a22631;
  background: #fff0f1;
  border: 1px solid #ffd2d6;
}

.player-ui .inline-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: var(--player-space-4);
  color: var(--player-text-soft);
  text-align: center;
  border: 1px dashed #cfdbea;
  border-radius: var(--player-radius-md);
  background: #f8faff;
}

.player-ui .inline-state-error {
  color: #a22631;
  border-color: #f2c3c8;
  background: #fff4f5;
}

.player-ui .boot-panel,
.player-ui .auth-recovery-panel {
  width: min(560px, 100%);
  margin: 7vh auto 0;
  padding: clamp(22px, 5vw, 36px);
}

.player-ui .boot-brand {
  margin-bottom: var(--player-space-5);
}

.player-ui .state-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: var(--player-space-4);
  border-radius: 14px;
  font-size: 22px;
  font-weight: var(--player-weight-bold);
}

.player-ui .state-icon-warning {
  color: #9d5a00;
  background: #fff0ce;
}

.player-ui .boot-block {
  background: linear-gradient(90deg, #eaf0fa 25%, #f8faff 48%, #eaf0fa 72%);
  background-size: 200% 100%;
}

.player-ui .modal {
  z-index: var(--player-z-modal);
  padding: max(var(--player-space-4), var(--safe-top)) max(var(--player-space-4), var(--safe-right)) max(var(--player-space-4), var(--safe-bottom)) max(var(--player-space-4), var(--safe-left));
  background: rgba(12, 25, 48, 0.55);
  backdrop-filter: blur(8px);
}

.player-ui .modal-card {
  color: var(--player-text);
  background: var(--player-surface);
  border: 1px solid var(--player-line);
  border-radius: var(--player-radius-lg);
  box-shadow: 0 28px 72px rgba(7, 20, 45, 0.28);
}

.player-ui .confirm-card {
  width: min(430px, 100%);
  display: grid;
  gap: var(--player-space-4);
}

.player-ui .confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.player-ui .toast {
  z-index: var(--player-z-toast);
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  color: #ffffff;
  border: 0;
  border-radius: 14px;
  background: #15233e;
  box-shadow: 0 18px 40px rgba(11, 28, 59, 0.28);
}

.player-ui .toast.toast-error {
  background: #a92d38;
}

.player-ui .bottom-nav {
  z-index: var(--player-z-nav);
  width: min(600px, calc(100% - 24px - var(--safe-left) - var(--safe-right)));
  left: 50%;
  right: auto;
  bottom: max(10px, var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(210, 222, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 38px rgba(31, 56, 101, 0.18);
  backdrop-filter: blur(18px);
}

.player-ui .bottom-nav .view-btn {
  min-width: 0;
  min-height: 56px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 3px;
  color: var(--player-text-soft);
  font-size: 11px;
  border-radius: 16px;
}

.player-ui .bottom-nav .view-btn.active {
  color: var(--player-brand-strong);
  background: #e9f1ff;
}

.player-ui .nav-icon {
  display: block;
  font-size: 19px;
  line-height: 1;
  filter: grayscale(0.5);
}

.player-ui .view-btn.active .nav-icon {
  filter: none;
}

.player-ui .cashier-topbar {
  margin-bottom: var(--player-space-4);
}

.player-ui .cashier-shell {
  margin: 0 auto;
  display: grid;
  gap: var(--player-space-4);
}

.player-ui .cashier-head {
  padding-bottom: var(--player-space-2);
}

.player-ui .cashier-hero-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 107, 253, 0.13), transparent 38%),
    var(--player-surface-alt);
  border-color: var(--player-line);
}

.player-ui .cashier-qr-image {
  box-shadow: var(--player-shadow-md);
}

.player-ui .cashier-status-line {
  background: transparent;
  border: 0;
}

.player-ui .badge-success,
.player-ui .badge-danger,
.player-ui .badge-warn,
.player-ui .mini-pill {
  border-radius: var(--player-radius-pill);
}

@media (max-width: 860px) {
  .player-ui .stage-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .player-ui .shell {
    width: calc(100vw - 20px - var(--safe-left) - var(--safe-right));
    max-width: calc(100vw - var(--safe-left) - var(--safe-right));
    padding-top: max(10px, var(--safe-top));
    padding-bottom: calc(88px + var(--safe-bottom));
  }

  .player-ui .app-shell {
    gap: 10px;
  }

  .player-ui .player-topbar {
    min-height: 54px;
    padding: 0 2px;
  }

  .player-ui #appPanel .player-topbar {
    grid-template-columns: minmax(100px, 1fr) minmax(66px, auto) auto;
    gap: 6px;
  }

  .player-ui .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
    font-size: 19px;
  }

  .player-ui .brand-lockup strong {
    font-size: 16px;
  }

  .player-ui #appPanel .brand-lockup {
    gap: 8px;
  }

  .player-ui .topbar-live-multiplier {
    padding-inline: 2px;
  }

  .player-ui .topbar-live-multiplier strong {
    font-size: clamp(21px, 6.5vw, 27px);
  }

  .player-ui .brand-lockup span:not(.brand-mark) {
    display: none;
  }

  .player-ui .topbar-status {
    gap: 6px;
  }

  .player-ui .balance-pill {
    min-width: 92px;
    padding: 6px 10px;
  }

  .player-ui .balance-pill strong {
    max-width: 112px;
    font-size: 15px;
  }

  .player-ui .status-chip {
    width: 32px;
    min-height: 32px;
    justify-content: center;
    padding: 6px 9px;
  }

  .player-ui .status-chip span {
    display: none;
  }

  .player-ui .broadcast-panel {
    min-height: 44px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border-radius: 15px;
  }

  .player-ui .broadcast-head .muted {
    display: none;
  }

  .player-ui .panel {
    padding: 14px;
    border-radius: 18px;
  }

  .player-ui .game-panel {
    padding: 10px;
    border-radius: 18px;
  }

  .player-ui .room-tabs {
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .player-ui .room-tab {
    min-width: 94px;
    min-height: 40px;
  }

  .player-ui .game-guide-strip {
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.45;
  }

  .player-ui .stage-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .player-ui .metric-inline,
  .player-ui .stage-status-wrap {
    grid-column: auto;
    min-height: 66px;
    padding: 9px;
    border-radius: 12px;
  }

  .player-ui .metric-inline strong {
    font-size: 17px;
  }

  .player-ui .metric-hint,
  .player-ui .stage-status-wrap .muted {
    display: none;
  }

  .player-ui .scene-stage {
    min-height: 300px;
    border-radius: 14px;
  }

  .player-ui .twin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .player-ui .btn-xl {
    min-height: 54px;
    padding-inline: 10px;
  }

  .player-ui .stats-grid,
  .player-ui .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-ui .wallet-overview-panel .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-ui .list-item {
    gap: 10px;
  }

  .player-ui .long-id code {
    max-width: 42vw;
  }

  .player-ui .modal {
    align-items: flex-end;
    padding: max(10px, var(--safe-top)) max(10px, var(--safe-right)) max(10px, var(--safe-bottom)) max(10px, var(--safe-left));
  }

  .player-ui .modal-card {
    width: 100%;
    max-height: min(90vh, calc(var(--app-vh) - var(--safe-top) - var(--safe-bottom) - 20px));
    border-radius: 22px;
  }

  .player-ui .bottom-nav {
    width: calc(100% - 16px - var(--safe-left) - var(--safe-right));
    bottom: max(6px, var(--safe-bottom));
    border-radius: 19px;
  }

  body.player-ui.game-fit-active #appPanel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  body.player-ui.game-fit-active .bottom-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    transform: none;
  }

  .player-ui .bottom-nav .view-btn {
    min-height: 54px;
  }

  .player-ui.cashier-ui .shell {
    padding-bottom: calc(22px + var(--safe-bottom));
  }
}

@media (max-width: 390px) {
  .player-ui .shell {
    width: calc(100vw - 16px - var(--safe-left) - var(--safe-right));
  }

  .player-ui .stage-stats {
    gap: 5px;
  }

  .player-ui #appPanel .player-topbar {
    grid-template-columns: minmax(96px, 1fr) minmax(62px, auto) auto;
    gap: 4px;
  }

  .player-ui .topbar-live-multiplier span {
    font-size: 9px;
  }

  .player-ui .topbar-live-multiplier strong {
    font-size: 21px;
  }

  .player-ui .metric-inline,
  .player-ui .stage-status-wrap {
    padding: 8px 7px;
  }

  .player-ui .status-text,
  .player-ui .metric-inline > span {
    font-size: 11px;
  }

  .player-ui .metric-inline strong {
    font-size: 15px;
  }

  .player-ui .bottom-nav .view-btn {
    font-size: 10px;
  }
}

/*
 * The galaxy home intentionally uses a vertically scrollable seven-row game
 * composition at every breakpoint.  The legacy fit mode assumes five rows
 * and otherwise compresses the room tabs, status and navigation together on
 * tablets/desktops as well as phones.
 */
html.game-fit-active:has(body.player-ui.galaxy-ui) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.player-ui.galaxy-ui.game-fit-active {
  height: auto;
  min-height: var(--app-vh);
  overflow-x: hidden;
  overflow-y: visible;
}

body.player-ui.galaxy-ui.game-fit-active .shell {
  height: auto;
  min-height: var(--app-vh);
  padding-bottom: max(18px, var(--safe-bottom));
}

body.player-ui.galaxy-ui.game-fit-active #appPanel,
body.player-ui.galaxy-ui.game-fit-active #viewGame,
body.player-ui.galaxy-ui.game-fit-active .game-layout,
body.player-ui.galaxy-ui.game-fit-active .game-panel {
  height: auto;
  min-height: 0;
}

body.player-ui.galaxy-ui.game-fit-active #appPanel {
  grid-template-rows: none;
  align-content: start;
  overflow: visible;
}

body.player-ui.galaxy-ui.game-fit-active .game-panel {
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-content: start;
  overflow: visible;
}

body.player-ui.galaxy-ui.game-fit-active .bottom-nav {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: min(660px, 100%);
  margin: 2px auto 0;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .player-ui *,
  .player-ui *::before,
  .player-ui *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Day 2 secondary player views and launcher. Keep every selector player-scoped. */
.player-ui .secondary-page {
  width: min(1080px, 100%);
  min-width: 0;
  margin: 0 auto;
  display: grid;
  gap: var(--player-space-4);
}

.player-ui .view-hero {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--player-space-6);
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 202, 69, 0.22), transparent 31%),
    linear-gradient(135deg, #19396c, #102448);
  border-color: rgba(77, 126, 199, 0.34);
  box-shadow: var(--player-shadow-game);
}

.player-ui .view-hero h2,
.player-ui .view-hero strong {
  color: #ffffff;
}

.player-ui .view-hero .eyebrow {
  color: var(--player-multiplier);
}

.player-ui .view-hero-copy {
  min-width: 0;
  max-width: 660px;
}

.player-ui .view-hero-copy h2 {
  margin: 0 0 var(--player-space-2);
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.035em;
}

.player-ui .view-hero-copy p {
  margin: 0;
  color: #c9d7ea;
  line-height: 1.7;
}

.player-ui .view-hero-status {
  min-width: 150px;
  flex: 0 0 auto;
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--player-radius-md);
  background: rgba(255, 255, 255, 0.08);
}

.player-ui .view-hero-status span {
  color: #b9cbe3;
  font-size: var(--player-font-xs);
}

.player-ui .view-hero-status strong {
  font-size: 18px;
}

.player-ui .secondary-content-panel {
  padding: var(--player-space-4);
}

.player-ui .activity-card-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--player-space-4);
}

.player-ui .feature-card,
.player-ui .record-card,
.player-ui .account-settings-panel,
.player-ui .content-reading-panel,
.player-ui .preference-panel,
.player-ui .info-help-panel {
  min-width: 0;
}

.player-ui .feature-card {
  display: grid;
  align-content: start;
  gap: var(--player-space-4);
  padding: clamp(16px, 2vw, 22px);
  border-radius: 18px;
}

.player-ui .signin-feature-card {
  background: linear-gradient(155deg, #edf4ff, #fff8e7);
}

.player-ui .feature-card > .btn {
  width: 100%;
  margin-top: auto;
}

.player-ui .card-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--player-brand);
  font-size: 11px;
  font-weight: var(--player-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-ui .card-title {
  display: block;
  margin-bottom: 4px;
  font-size: var(--player-font-lg);
}

.player-ui .feature-card .list-item {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.player-ui .feature-card .button-row {
  width: 100%;
  justify-content: space-between;
}

.player-ui .feature-card .button-row .btn {
  margin-left: auto;
}

.player-ui .record-layout,
.player-ui .settings-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1080px;
}

.player-ui .record-hero,
.player-ui .settings-hero,
.player-ui .rounds-panel {
  grid-column: 1 / -1;
}

.player-ui .record-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  align-items: end;
}

.player-ui .record-hero .view-hero-copy {
  grid-column: 1 / -1;
}

.player-ui .record-hero .section-head {
  margin: 0;
  align-self: center;
}

.player-ui .record-summary-text {
  color: #c9d7ea;
  line-height: 1.55;
}

.player-ui .record-hero .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-ui .record-hero .stat-card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
}

.player-ui .record-hero .stat-card span {
  color: #b9cbe3;
}

.player-ui .record-hero .stat-card strong {
  color: #ffffff;
  font-size: clamp(18px, 2vw, 24px);
}

.player-ui .record-card {
  display: grid;
  align-content: start;
  gap: var(--player-space-3);
}

.player-ui .rank-item {
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) minmax(74px, auto);
  background: var(--player-surface-alt);
  border-color: var(--player-line);
}

.player-ui .rank-position {
  color: var(--player-brand);
  font-size: 17px;
}

.player-ui .rank-player {
  min-width: 0;
}

.player-ui .rank-player > strong,
.player-ui .rank-player p {
  overflow-wrap: anywhere;
}

.player-ui .rank-profit {
  max-width: 150px;
  overflow-wrap: anywhere;
  color: var(--player-success);
  text-align: right;
}

.player-ui .profile-summary-row,
.player-ui .profile-tag-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.player-ui .profile-summary-row .pill-row,
.player-ui .profile-tag-row > strong {
  justify-self: start;
}

.player-ui .settings-hero .status-chip {
  color: #d9e5f4;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
}

.player-ui .settings-hero .status-chip[data-state="online"] {
  color: #c8f6e3;
}

.player-ui .account-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-ui .account-info-item {
  min-width: 0;
  background: var(--player-surface-alt);
  border-color: var(--player-line);
}

.player-ui .account-info-item span {
  color: var(--player-text-soft);
}

.player-ui .account-info-item strong {
  color: var(--player-text);
  overflow-wrap: anywhere;
}

.player-ui .account-info-item.success strong {
  color: var(--player-success);
}

.player-ui .account-info-item.warn strong {
  color: var(--player-warning);
}

.player-ui .account-info-hint {
  color: var(--player-text-soft);
}

.player-ui .announcement-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid #f1d894;
  border-radius: var(--player-radius-md);
  background: #fff8e8;
}

.player-ui .announcement-card > span {
  color: #8c6516;
  font-size: var(--player-font-xs);
  font-weight: var(--player-weight-bold);
}

.player-ui .announcement-card p,
.player-ui .info-list li {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.72;
}

.player-ui .announcement-card p {
  color: #111827;
}

.player-ui .rules-list,
.player-ui .info-list {
  min-width: 0;
  margin: var(--player-space-4) 0 0;
  padding-left: 22px;
}

.player-ui .rules-list li,
.player-ui .info-list li {
  padding: 9px 3px;
  color: var(--player-text-soft);
  border-bottom: 1px solid var(--player-line);
}

.player-ui .rules-list li:last-child,
.player-ui .info-list li:last-child {
  border-bottom: 0;
}

.player-ui .preference-panel,
.player-ui .info-help-panel {
  align-self: stretch;
}

.player-ui .settings-grid {
  grid-template-columns: 1fr;
}

.player-ui .toggle-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--player-space-4);
  min-height: 52px;
  padding: 4px 0;
}

.player-ui .toggle-row input {
  min-height: 0;
  flex: 0 0 auto;
}

.player-ui.launcher-ui .shell {
  width: min(1040px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
  padding-bottom: max(28px, var(--safe-bottom));
}

.player-ui .launcher-topbar {
  margin-bottom: var(--player-space-4);
}

.player-ui .launcher-shell {
  display: grid;
  gap: clamp(22px, 4vw, 38px);
  padding: clamp(20px, 4vw, 40px);
}

.player-ui .launcher-copy {
  max-width: 720px;
}

.player-ui .launcher-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(29px, 5vw, 46px);
  letter-spacing: -0.045em;
}

.player-ui .launcher-copy p {
  margin: 0;
  line-height: 1.7;
}

.player-ui .launcher-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

.player-ui .launcher-qr-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(18px, 3vw, 28px);
  text-align: center;
  border: 1px solid var(--player-line);
  border-radius: var(--player-radius-lg);
  background: var(--player-surface-alt);
}

.player-ui .launcher-qr,
.player-ui .launcher-qr-state {
  width: min(100%, 270px);
  aspect-ratio: 1;
  border-radius: 18px;
}

.player-ui .launcher-qr {
  display: block;
  object-fit: contain;
  background: #ffffff;
  box-shadow: var(--player-shadow-sm);
}

.player-ui .launcher-qr-state {
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--player-text-soft);
  border: 1px dashed #c7d5e8;
  background: #ffffff;
}

.player-ui .launcher-detail-column,
.player-ui .launcher-info {
  min-width: 0;
  display: grid;
  gap: var(--player-space-3);
}

.player-ui .launcher-info-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--player-line);
}

.player-ui .launcher-info-row:last-child {
  border-bottom: 0;
}

.player-ui .launcher-info-row > span,
.player-ui .launcher-info-row > em {
  color: var(--player-text-soft);
  font-size: var(--player-font-xs);
  font-style: normal;
}

.player-ui .launcher-info-row > strong,
.player-ui .launcher-long-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.player-ui .launcher-safe-hint {
  margin: 0;
  padding: 11px 12px;
  color: var(--player-warning);
  line-height: 1.55;
  border-radius: 12px;
  background: #fff3dc;
}

.player-ui .launcher-safe-hint.success {
  color: var(--player-success);
  background: #e8f7f1;
}

.player-ui .launcher-primary-actions,
.player-ui .launcher-secondary-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-ui .launcher-primary-actions .btn,
.player-ui .launcher-secondary-actions .btn {
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.player-ui .launcher-more-actions {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--player-line);
  border-radius: 14px;
  background: #fbfcff;
}

.player-ui .launcher-more-actions summary {
  color: var(--player-brand);
  font-weight: var(--player-weight-medium);
  cursor: pointer;
}

.player-ui .launcher-more-actions[open] summary {
  margin-bottom: 12px;
}

@media (min-width: 1280px) {
  .player-ui .secondary-page {
    gap: var(--player-space-5);
  }

  .player-ui .feature-card,
  .player-ui .record-card {
    padding: var(--player-space-6);
  }
}

@media (max-width: 1023px) {
  .player-ui .activity-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-ui .promo-feature-card {
    grid-column: 1 / -1;
  }

  .player-ui .account-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .player-ui .record-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .player-ui .view-hero,
  .player-ui .record-hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--player-space-4);
  }

  .player-ui .view-hero-status {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .player-ui .record-hero .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-ui .record-layout,
  .player-ui .settings-layout,
  .player-ui .launcher-grid {
    grid-template-columns: 1fr;
  }

  .player-ui .launcher-qr,
  .player-ui .launcher-qr-state {
    width: min(70vw, 260px);
  }

  .player-ui.launcher-ui .status-chip {
    width: auto;
  }

  .player-ui.launcher-ui .status-chip span {
    display: inline;
  }
}

@media (max-width: 430px) {
  .player-ui .secondary-page {
    gap: 10px;
  }

  .player-ui .view-hero {
    padding: 18px;
  }

  .player-ui .activity-card-grid,
  .player-ui .account-info-grid,
  .player-ui .launcher-primary-actions,
  .player-ui .launcher-secondary-actions {
    grid-template-columns: 1fr;
  }

  .player-ui .promo-feature-card {
    grid-column: auto;
  }

  .player-ui .record-hero .stats-grid {
    grid-template-columns: 1fr;
  }

  .player-ui .rank-item {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .player-ui .rank-profit {
    grid-column: 2;
    max-width: 100%;
    text-align: left;
  }

  .player-ui .launcher-shell {
    padding: 16px;
  }

  .player-ui .launcher-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .player-ui .launcher-detail-column > .btn {
    width: 100%;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .player-ui .view-hero {
    padding-block: 15px;
  }

  .player-ui.launcher-ui .launcher-grid {
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  }

  .player-ui .launcher-qr,
  .player-ui .launcher-qr-state {
    width: min(42vh, 210px);
  }
}

/* Galaxy Flight R3: player-home-only visual system and motion layer. */
.player-ui.galaxy-ui {
  --player-brand: #2f6bff;
  --player-brand-strong: #1851e8;
  --player-game: #0b1d46;
  --player-game-deep: #050c22;
  --player-gold: #f7c94a;
  --player-gold-soft: rgba(247, 201, 74, 0.12);
  --player-multiplier: #ffdc72;
  --player-bg: #050d20;
  --player-surface: #0d1c3b;
  --player-surface-alt: #102750;
  --player-success: #25e4aa;
  --player-warning: #ffbd4a;
  --player-danger: #ff5674;
  --player-disabled: #657495;
  --player-text: #f7f9ff;
  --player-text-soft: #a8b7d8;
  --player-text-faint: #7383a8;
  --player-line: rgba(133, 164, 226, 0.16);
  --player-radius-sm: 12px;
  --player-radius-md: 18px;
  --player-radius-lg: 24px;
  --player-shadow-sm: 0 12px 30px rgba(0, 8, 34, 0.2);
  --player-shadow-md: 0 22px 54px rgba(0, 8, 34, 0.34);
  --player-shadow-game: 0 28px 72px rgba(0, 5, 24, 0.48);
  color-scheme: dark;
  min-height: 100%;
  color: var(--player-text);
  background:
    radial-gradient(circle at 50% -12%, rgba(37, 94, 255, 0.3), transparent 34%),
    radial-gradient(circle at 8% 32%, rgba(36, 98, 255, 0.12), transparent 27%),
    radial-gradient(circle at 92% 68%, rgba(60, 40, 190, 0.12), transparent 30%),
    linear-gradient(180deg, #03091b 0%, #071329 40%, #05102a 100%);
}

.player-ui.galaxy-ui::before {
  opacity: 0.72;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.35px),
    radial-gradient(circle, rgba(101, 162, 255, 0.45) 0 1px, transparent 1.4px),
    linear-gradient(rgba(60, 112, 224, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 112, 224, 0.026) 1px, transparent 1px);
  background-position: 12px 18px, 58px 74px, 0 0, 0 0;
  background-size: 112px 112px, 156px 156px, 32px 32px, 32px 32px;
}

.player-ui.galaxy-ui .bg-orbit {
  opacity: 0.12;
  border-color: rgba(72, 125, 255, 0.2);
}

.player-ui.galaxy-ui .shell {
  width: min(980px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
  padding-top: max(18px, var(--safe-top));
  padding-bottom: calc(112px + var(--safe-bottom));
}

.player-ui.galaxy-ui .app-shell {
  gap: 14px;
}

.player-ui.galaxy-ui .panel {
  color: var(--player-text);
  border-color: var(--player-line);
  background: linear-gradient(145deg, rgba(15, 36, 76, 0.96), rgba(7, 19, 45, 0.96));
  box-shadow: var(--player-shadow-sm);
}

.player-ui.galaxy-ui h1,
.player-ui.galaxy-ui h2,
.player-ui.galaxy-ui h3,
.player-ui.galaxy-ui strong {
  color: var(--player-text);
}

.player-ui.galaxy-ui .muted,
.player-ui.galaxy-ui label {
  color: var(--player-text-soft);
}

.player-ui.galaxy-ui .player-topbar {
  position: relative;
  min-height: 82px;
  padding: 0 2px;
}

.player-ui.galaxy-ui #appPanel .player-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.player-ui.galaxy-ui .brand-lockup {
  gap: 14px;
}

.player-ui.galaxy-ui .brand-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border: 1px solid rgba(123, 177, 255, 0.44);
  border-radius: 19px;
  font-size: 30px;
  background:
    radial-gradient(circle at 68% 18%, rgba(255, 255, 255, 0.42), transparent 13%),
    linear-gradient(145deg, #368cff, #1546da 70%, #102c9e);
  box-shadow: 0 14px 34px rgba(25, 93, 255, 0.38), inset 0 1px rgba(255, 255, 255, 0.28);
}

.player-ui.galaxy-ui .brand-lockup strong {
  font-size: clamp(23px, 4vw, 31px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-shadow: 0 5px 18px rgba(73, 124, 255, 0.18);
}

.player-ui.galaxy-ui .brand-lockup span:not(.brand-mark) {
  color: #a8b8dd;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.player-ui.galaxy-ui .topbar-status {
  gap: 9px;
}

.player-ui.galaxy-ui .balance-pill {
  min-width: 178px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(255, 211, 90, 0.78);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 216, 100, 0.18), transparent 35%),
    linear-gradient(135deg, rgba(48, 42, 52, 0.92), rgba(14, 25, 53, 0.96));
  box-shadow: inset 0 0 24px rgba(255, 190, 51, 0.08), 0 12px 30px rgba(0, 6, 25, 0.34);
}

.player-ui.galaxy-ui .balance-coin {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: #8c5700;
  font-size: 22px;
  font-weight: 900;
  border: 3px solid #ffe18a;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff09d, #ffad2f);
  box-shadow: inset 0 0 0 2px rgba(190, 102, 0, 0.35), 0 0 20px rgba(255, 191, 45, 0.24);
}

.player-ui.galaxy-ui .balance-copy {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 1px;
}

.player-ui.galaxy-ui .balance-copy small {
  color: #f3d67a;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.player-ui.galaxy-ui .balance-pill .balance-copy strong {
  max-width: 120px;
  color: #ffe071;
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 198, 55, 0.28);
}

.player-ui.galaxy-ui .topup-shortcut {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  color: #5d4100;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1a7, #ffc64e);
  box-shadow: 0 9px 24px rgba(255, 185, 36, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.player-ui.galaxy-ui .topup-shortcut:active {
  transform: scale(0.94);
}

.player-ui.galaxy-ui .status-chip {
  width: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
  border-color: rgba(98, 137, 207, 0.3);
  background: rgba(10, 27, 59, 0.88);
}

.player-ui.galaxy-ui .status-chip span {
  display: none;
}

.player-ui.galaxy-ui .status-chip i,
.player-ui.galaxy-ui .status-dot {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
  background: #ffc556;
  box-shadow: 0 0 0 6px rgba(255, 197, 86, 0.09), 0 0 14px rgba(255, 197, 86, 0.42);
}

.player-ui.galaxy-ui .status-chip[data-state="online"] i,
.player-ui.galaxy-ui .status-chip[data-state="safe"] i,
.player-ui.galaxy-ui .stage-status-wrap[data-state="idle"] .status-dot,
.player-ui.galaxy-ui .stage-status-wrap[data-state="success"] .status-dot {
  background: #2ae6a5;
  box-shadow: 0 0 0 6px rgba(42, 230, 165, 0.1), 0 0 18px rgba(42, 230, 165, 0.55);
}

.player-ui.galaxy-ui .broadcast-panel {
  min-height: 50px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 8px 14px;
  overflow: hidden;
  border-color: rgba(75, 121, 218, 0.18);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(10, 32, 80, 0.98), rgba(9, 25, 60, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 12px 30px rgba(0, 6, 28, 0.28);
}

.player-ui.galaxy-ui .broadcast-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.player-ui.galaxy-ui .broadcast-head .eyebrow {
  color: #ffc44c;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.player-ui.galaxy-ui .broadcast-flame {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(255, 95, 62, 0.48));
}

.player-ui.galaxy-ui .broadcast-arrow {
  color: #8da5d8;
  font-size: 29px;
  line-height: 1;
}

.player-ui.galaxy-ui .marquee-item {
  min-height: 34px;
  color: #d8e2fa;
  font-size: 13px;
}

.player-ui.galaxy-ui .game-panel {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.player-ui.galaxy-ui .room-tabs {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(73, 121, 234, 0.5);
  border-radius: 22px;
  background: rgba(9, 29, 69, 0.94);
  box-shadow: inset 0 0 28px rgba(31, 82, 190, 0.14);
}

.player-ui.galaxy-ui .room-tab {
  min-width: 0;
  min-height: 48px;
  padding: 10px 8px;
  color: #a8b8d8;
  font-size: 16px;
  font-weight: 700;
  border-radius: 18px;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.player-ui.galaxy-ui .room-tab.active {
  color: #ffffff;
  background:
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.4), transparent 9%),
    linear-gradient(135deg, #3789ff, #1856ec);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 7px 22px rgba(36, 105, 255, 0.45);
}

.player-ui.galaxy-ui .game-guide-strip {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  color: #aebedf;
  font-size: 13px;
  line-height: 1.45;
  border: 0;
  background: transparent;
}

.player-ui.galaxy-ui .guide-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  color: #dce8ff;
  font-size: 14px;
  font-weight: 800;
  font-style: normal;
  border: 1px solid rgba(86, 143, 255, 0.55);
  border-radius: 50%;
  background: linear-gradient(145deg, #2b73ff, #1744b6);
  box-shadow: 0 5px 16px rgba(36, 103, 255, 0.3);
}

.player-ui.galaxy-ui .multiplier-card {
  --multiplier-intensity: 0;
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px 30px;
  overflow: hidden;
  text-align: left;
  border: 2px solid rgba(255, 207, 83, 0.9);
  border-radius: 25px;
  background:
    radial-gradient(circle at 88% 45%, rgba(255, 175, 68, 0.24), transparent 30%),
    radial-gradient(circle at 26% 50%, rgba(25, 95, 255, 0.28), transparent 42%),
    linear-gradient(120deg, rgba(13, 40, 97, 0.98), rgba(21, 33, 72, 0.98));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    inset 0 0 46px rgba(37, 97, 233, 0.12),
    0 0 26px rgba(255, 196, 51, calc(0.1 + var(--multiplier-intensity) * 0.2)),
    0 20px 48px rgba(0, 6, 29, 0.38);
}

.player-ui.galaxy-ui .multiplier-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(88, 139, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 139, 255, 0.11) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 76%);
}

.player-ui.galaxy-ui .multiplier-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3f6ff;
  font-size: 18px;
  font-weight: 700;
}

.player-ui.galaxy-ui .multiplier-label i {
  width: 24px;
  height: 20px;
  display: inline-block;
  background:
    linear-gradient(135deg, transparent 0 44%, #7ea3ff 45% 54%, transparent 55%),
    linear-gradient(90deg, #557bd6 0 16%, transparent 17% 28%, #7299f2 29% 46%, transparent 47% 58%, #9cb7ff 59% 78%, transparent 79%);
  opacity: 0.9;
}

.player-ui.galaxy-ui .multiplier-card strong {
  position: relative;
  z-index: 1;
  min-width: 245px;
  color: #ffe16c;
  font-size: clamp(58px, 8vw, 84px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 10px rgba(255, 224, 114, 0.44),
    0 0 calc(18px + var(--multiplier-intensity) * 26px) rgba(255, 181, 45, 0.5);
  transform: translateZ(0) scale(calc(1 + var(--multiplier-intensity) * 0.018));
  transform-origin: right center;
  transition: transform 120ms ease-out, text-shadow 180ms ease;
}

.player-ui.galaxy-ui .multiplier-glint {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #fff7cc;
  box-shadow: 0 0 18px #ffd34d;
  opacity: calc(0.45 + var(--multiplier-intensity) * 0.5);
}

.player-ui.galaxy-ui .stage-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-ui.galaxy-ui .metric-inline {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  color: var(--player-text-soft);
  text-align: left;
  border: 1px solid rgba(83, 132, 231, 0.34);
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(18, 50, 105, 0.95), rgba(10, 30, 67, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 13px 28px rgba(0, 6, 28, 0.26);
}

.player-ui.galaxy-ui .metric-inline:nth-child(2) {
  border-color: rgba(39, 205, 178, 0.28);
  background: linear-gradient(135deg, rgba(11, 61, 95, 0.96), rgba(7, 37, 68, 0.97));
}

.player-ui.galaxy-ui .metric-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  color: #8b5a00;
  font-size: 28px;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff2a7, #ffb631);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.28), 0 9px 22px rgba(255, 178, 39, 0.17);
}

.player-ui.galaxy-ui .wallet-icon {
  color: #005f4c;
  border-radius: 15px;
  background: linear-gradient(145deg, #45f2c6, #0ab795);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 9px 22px rgba(20, 220, 170, 0.15);
}

.player-ui.galaxy-ui .metric-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.player-ui.galaxy-ui .metric-copy > span {
  color: #aab8d8;
  font-size: 15px;
}

.player-ui.galaxy-ui .metric-copy strong {
  color: #ffffff;
  font-size: 31px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.player-ui.galaxy-ui .metric-inline:nth-child(2) strong {
  color: #43e5b9;
}

.player-ui.galaxy-ui .metric-hint {
  color: #7186b0;
  font-size: 10px;
}

.player-ui.galaxy-ui .metric-action:hover,
.player-ui.galaxy-ui .metric-action:focus-visible {
  border-color: rgba(255, 205, 78, 0.62);
  background: linear-gradient(135deg, rgba(24, 61, 126, 0.98), rgba(12, 37, 80, 0.98));
}

.player-ui.galaxy-ui .stage-status-wrap {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  color: #9cadcf;
  border: 1px solid rgba(76, 124, 224, 0.32);
  border-radius: 19px;
  background: linear-gradient(90deg, rgba(17, 49, 106, 0.94), rgba(9, 28, 67, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.player-ui.galaxy-ui .status-clock {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #779dff;
  font-size: 25px;
}

.player-ui.galaxy-ui .status-label {
  font-size: 14px;
}

.player-ui.galaxy-ui .status-text {
  color: #f8faff;
  font-size: 20px;
  font-weight: 800;
}

.player-ui.galaxy-ui .stage-status-wrap[data-state="running"] .status-dot {
  background: #3a8cff;
  animation: player-galaxy-status-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(58, 140, 255, 0.12), 0 0 18px rgba(58, 140, 255, 0.62);
}

.player-ui.galaxy-ui .scene-stage {
  --flight-intensity: 0;
  --flight-cycle: 2.4s;
  position: relative;
  width: 100%;
  min-height: 340px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(139, 174, 237, 0.72);
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 83%, rgba(45, 113, 255, 0.34), transparent 34%),
    linear-gradient(180deg, #020716 0%, #06184d 42%, #123678 72%, #071a44 100%);
  box-shadow:
    inset 0 0 70px rgba(25, 76, 184, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 22px 54px rgba(0, 5, 27, 0.44);
  contain: layout paint style;
}

body.player-ui.galaxy-ui.game-fit-active .scene-stage,
html.game-fit-active body.player-ui.galaxy-ui .scene-stage {
  min-height: 340px;
  align-self: auto;
}

.player-ui.galaxy-ui .scene-sunrise,
.player-ui.galaxy-ui .scene-nebula,
.player-ui.galaxy-ui .scene-stars,
.player-ui.galaxy-ui .scene-planet,
.player-ui.galaxy-ui .scene-earth-arc,
.player-ui.galaxy-ui .scene-orbit-line,
.player-ui.galaxy-ui .scene-stratosphere,
.player-ui.galaxy-ui .scene-cloud,
.player-ui.galaxy-ui .scene-atmosphere,
.player-ui.galaxy-ui .scene-ground,
.player-ui.galaxy-ui .scene-mountains,
.player-ui.galaxy-ui .scene-launchpad,
.player-ui.galaxy-ui .scene-launch-glow,
.player-ui.galaxy-ui .scene-speed-lines,
.player-ui.galaxy-ui .scene-markers {
  pointer-events: none;
}

.player-ui.galaxy-ui .scene-stars {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(103, 167, 255, 0.88) 0 1.1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 216, 121, 0.78) 0 0.8px, transparent 1.5px);
  background-position: 10% 16%, 72% 26%, 42% 68%;
  background-size: 94px 94px, 141px 141px, 177px 177px;
  opacity: calc(0.48 + var(--stage-progress) * 0.58);
  transform: translate3d(0, calc(var(--stage-progress) * 52px), 0) scale(calc(1 + var(--stage-progress) * 0.05));
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .scene-stage.running .scene-stars {
  animation: player-galaxy-star-drift var(--flight-cycle) linear infinite;
}

.player-ui.galaxy-ui .scene-nebula {
  opacity: calc(0.05 + var(--stage-progress) * 0.76);
  background:
    radial-gradient(ellipse at 18% 10%, rgba(72, 64, 214, 0.42), transparent 30%),
    radial-gradient(ellipse at 80% 24%, rgba(15, 118, 228, 0.32), transparent 27%),
    radial-gradient(ellipse at 54% 4%, rgba(205, 96, 255, 0.12), transparent 26%);
  transform: translate3d(0, calc(var(--stage-progress) * 28px), 0) scale(calc(1 + var(--stage-progress) * 0.06));
}

.player-ui.galaxy-ui .scene-planet {
  inset: 42px auto auto 38px;
  width: 50px;
  height: 50px;
  opacity: calc(0.12 + var(--stage-progress) * 0.76);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.34), transparent 17%),
    linear-gradient(145deg, rgba(61, 151, 255, 0.95), rgba(34, 56, 158, 0.98));
  box-shadow: 0 0 30px rgba(60, 139, 255, 0.25);
  transform: translate3d(0, calc(var(--stage-progress) * 80px), 0) scale(calc(0.72 + var(--stage-progress) * 0.42));
}

.player-ui.galaxy-ui .scene-earth-arc {
  position: absolute;
  z-index: 0;
  inset: auto -16% -42% -16%;
  height: 58%;
  border-radius: 50% 50% 0 0;
  opacity: calc(var(--stage-progress) * 1.18 - 0.24);
  background:
    radial-gradient(ellipse at 50% 0, rgba(57, 135, 255, 0.24), transparent 36%),
    linear-gradient(180deg, rgba(22, 86, 190, 0.78), rgba(3, 16, 50, 0.95));
  border-top: 2px solid rgba(96, 190, 255, 0.54);
  box-shadow: 0 -14px 34px rgba(52, 156, 255, 0.18);
  transform: translate3d(0, calc(var(--stage-progress) * 110px), 0);
}

.player-ui.galaxy-ui .scene-cloud {
  background: radial-gradient(ellipse, rgba(219, 235, 255, 0.42), rgba(125, 171, 238, 0.08) 64%, transparent 72%);
  opacity: calc(0.82 - var(--stage-progress) * 0.98);
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .scene-stage.running .scene-cloud-a {
  animation: player-galaxy-cloud-pass-a calc(var(--flight-cycle) * 1.8) linear infinite;
}

.player-ui.galaxy-ui .scene-stage.running .scene-cloud-b {
  animation: player-galaxy-cloud-pass-b calc(var(--flight-cycle) * 2.15) linear -0.8s infinite;
}

.player-ui.galaxy-ui .scene-stage.running .scene-cloud-c {
  animation: player-galaxy-cloud-pass-c calc(var(--flight-cycle) * 1.6) linear -1.4s infinite;
}

.player-ui.galaxy-ui .scene-ground {
  height: 106px;
  opacity: calc(1 - var(--stage-progress) * 0.9);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 179, 57, 0.28), transparent 35%),
    linear-gradient(180deg, #153877 0, #091f51 32%, #050e28 100%);
  transform: translate3d(0, calc(var(--stage-progress) * 165px), 0);
}

.player-ui.galaxy-ui .scene-mountains {
  height: 112px;
  bottom: 76px;
  opacity: calc(0.94 - var(--stage-progress) * 0.82);
  background: linear-gradient(180deg, rgba(34, 76, 154, 0.92), rgba(7, 22, 65, 0.98));
  clip-path: polygon(0 100%, 0 72%, 10% 44%, 19% 76%, 31% 32%, 42% 78%, 55% 38%, 68% 72%, 80% 30%, 91% 68%, 100% 50%, 100% 100%);
  transform: translate3d(0, calc(var(--stage-progress) * 148px), 0);
}

.player-ui.galaxy-ui .scene-launchpad {
  z-index: 2;
  bottom: 46px;
  width: 156px;
  height: 46px;
  opacity: calc(1 - var(--stage-progress) * 0.88);
  background: linear-gradient(180deg, #4a6da8, #132b59);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.42));
  transform: translate3d(50%, calc(var(--stage-progress) * 178px), 0);
}

.player-ui.galaxy-ui .scene-launchpad::before {
  content: "";
  position: absolute;
  left: -58px;
  bottom: 22px;
  width: 26px;
  height: 108px;
  opacity: 0.86;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(88, 136, 219, 0.75) 9px 11px),
    linear-gradient(90deg, #183977, #496cb0 50%, #17336b);
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
}

.player-ui.galaxy-ui .scene-launch-glow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  width: 180px;
  height: 92px;
  border-radius: 50%;
  opacity: 0.3;
  background: radial-gradient(ellipse, rgba(255, 193, 75, 0.76), rgba(255, 92, 45, 0.16) 48%, transparent 72%);
  transform: translate3d(-50%, calc(var(--stage-progress) * 160px), 0) scale(calc(0.8 + var(--flight-intensity) * 0.4));
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .scene-stage.launching .scene-launch-glow,
.player-ui.galaxy-ui .scene-stage.running .scene-launch-glow {
  opacity: calc(0.55 - var(--stage-progress) * 0.42);
  animation: player-galaxy-launch-glow 0.36s ease-in-out infinite alternate;
}

.player-ui.galaxy-ui .scene-speed-lines {
  position: absolute;
  z-index: 3;
  inset: -40% 4% -40% 4%;
  opacity: calc(var(--flight-intensity) * 0.5);
  background: repeating-linear-gradient(88deg, transparent 0 34px, rgba(119, 184, 255, 0.28) 35px 36px, transparent 37px 72px);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  transform: translate3d(0, -18%, 0) skewY(-6deg);
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .scene-stage.running .scene-speed-lines {
  animation: player-galaxy-speed-lines calc(var(--flight-cycle) * 0.42) linear infinite;
}

.player-ui.galaxy-ui .scene-markers {
  z-index: 8;
  inset: 20px 12px 20px auto;
  width: 112px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  color: #92a3c7;
  opacity: 1;
  transform: none;
}

.player-ui.galaxy-ui .scene-markers::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 13px;
  right: 80px;
  width: 2px;
  background: repeating-linear-gradient(180deg, rgba(139, 169, 226, 0.58) 0 4px, transparent 4px 11px);
}

.player-ui.galaxy-ui .scene-markers span {
  position: relative;
  min-height: 29px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 3px 6px;
  color: #8fa0c3;
  font-size: 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(3, 10, 30, 0.72);
  transition: color 240ms ease, background 240ms ease, opacity 240ms ease;
}

.player-ui.galaxy-ui .scene-markers span i {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 4px;
  justify-self: center;
  border-radius: 999px;
  background: #b6c5e6;
  box-shadow: 0 0 0 3px rgba(4, 13, 37, 0.9);
}

.player-ui.galaxy-ui .scene-markers span b {
  font-weight: 600;
}

.player-ui.galaxy-ui .scene-markers span.is-complete {
  opacity: 0.5;
}

.player-ui.galaxy-ui .scene-markers span.is-complete i {
  background: #4b76c7;
}

.player-ui.galaxy-ui .scene-markers span.is-active {
  color: #ffe27a;
  background: rgba(19, 46, 97, 0.58);
  text-shadow: 0 0 12px rgba(255, 211, 79, 0.34);
}

.player-ui.galaxy-ui .scene-markers span.is-active i {
  height: 7px;
  background: #ffd54f;
  box-shadow: 0 0 0 3px rgba(4, 13, 37, 0.9), 0 0 14px #ffcf3d;
}

.player-ui.galaxy-ui .flight-pack {
  z-index: 6;
  bottom: 42px;
  width: 142px;
  height: 228px;
  backface-visibility: hidden;
  contain: layout style;
  will-change: transform;
}

.player-ui.galaxy-ui .rocket-sprite {
  width: 92px;
  filter: drop-shadow(0 18px 26px rgba(0, 7, 30, 0.48)) drop-shadow(0 0 13px rgba(70, 155, 255, 0.2));
  transform: translate3d(-50%, 0, 0);
  transform-origin: 50% 70%;
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .scene-stage.launching .rocket-sprite {
  animation: player-galaxy-ignition-shiver 0.11s ease-in-out infinite alternate;
}

.player-ui.galaxy-ui .scene-stage.running .rocket-sprite {
  animation: player-galaxy-rocket-float 1.65s ease-in-out infinite;
}

.player-ui.galaxy-ui .rocket-trail {
  bottom: -16px;
  width: 25px;
  height: 86px;
  border-radius: 50% 50% 70% 70%;
  opacity: 0;
  filter: none;
  background:
    linear-gradient(180deg, #ffffff 0 7%, #fff3a1 18%, #ffba3e 48%, rgba(255, 73, 42, 0.74) 72%, transparent 100%);
  box-shadow: 0 0 16px rgba(255, 204, 74, 0.78), 0 22px 28px rgba(255, 88, 44, 0.42);
  transform: translate3d(-50%, 0, 0) scaleY(0.86);
  transform-origin: 50% 0;
  will-change: transform, opacity;
}

.player-ui.galaxy-ui .rocket-trail::before,
.player-ui.galaxy-ui .rocket-trail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  border-radius: 50%;
  transform: translateX(-50%);
}

.player-ui.galaxy-ui .rocket-trail::before {
  width: 11px;
  height: 64px;
  background: linear-gradient(180deg, #ffffff, #fff28b 42%, transparent 100%);
  filter: blur(1px);
}

.player-ui.galaxy-ui .rocket-trail::after {
  top: 52px;
  width: 58px;
  height: 52px;
  opacity: 0.44;
  background: radial-gradient(circle, rgba(255, 126, 48, 0.62), rgba(255, 80, 38, 0.18) 48%, transparent 72%);
}

.player-ui.galaxy-ui .scene-stage.launching .rocket-trail,
.player-ui.galaxy-ui .scene-stage.running .rocket-trail {
  opacity: 1;
  animation: player-galaxy-trail-pulse 0.14s ease-in-out infinite alternate;
}

.player-ui.galaxy-ui .rocket-particles {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -18px;
  width: 76px;
  height: 112px;
  opacity: 0;
  transform: translateX(-50%);
}

.player-ui.galaxy-ui .scene-stage.running .rocket-particles,
.player-ui.galaxy-ui .scene-stage.launching .rocket-particles {
  opacity: 0.82;
}

.player-ui.galaxy-ui .rocket-particles i {
  position: absolute;
  left: calc(50% - 2px);
  top: 20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd56b;
  box-shadow: 0 0 8px rgba(255, 165, 52, 0.8);
  animation: player-galaxy-particle-drop 0.72s linear infinite;
}

.player-ui.galaxy-ui .rocket-particles i:nth-child(2) {
  margin-left: -18px;
  animation-delay: -0.24s;
}

.player-ui.galaxy-ui .rocket-particles i:nth-child(3) {
  margin-left: 19px;
  animation-delay: -0.48s;
}

.player-ui.galaxy-ui .explosion-fx {
  bottom: 64px;
  filter: drop-shadow(0 0 24px rgba(255, 107, 45, 0.74));
}

.player-ui.galaxy-ui .round-outcome-fx {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 46%;
  min-width: 210px;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 18px 24px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(5, 14, 38, 0.82);
  box-shadow: 0 20px 50px rgba(0, 4, 22, 0.5);
  backdrop-filter: blur(12px);
  transform: translate3d(-50%, -36%, 0) scale(0.88);
}

.player-ui.galaxy-ui .round-outcome-fx.visible {
  animation: player-galaxy-outcome-in 1.12s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.player-ui.galaxy-ui .round-outcome-fx strong {
  color: #49ebba;
  font-size: 25px;
}

.player-ui.galaxy-ui .round-outcome-fx span {
  color: #ffe071;
  font-size: 20px;
  font-weight: 800;
}

.player-ui.galaxy-ui .round-outcome-fx.busted strong,
.player-ui.galaxy-ui .round-outcome-fx.busted span {
  color: #ff7a8f;
}

.player-ui.galaxy-ui .controls {
  padding-top: 2px;
}

.player-ui.galaxy-ui .twin-actions {
  gap: 14px;
}

.player-ui.galaxy-ui #startRoundBtn,
.player-ui.galaxy-ui #cashoutBtn {
  position: relative;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 18px;
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 23px;
  text-shadow: 0 2px 8px rgba(0, 20, 70, 0.3);
  transition: transform 150ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.player-ui.galaxy-ui #startRoundBtn {
  background: linear-gradient(135deg, #37a2ff 0%, #2769ff 52%, #1647dc 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 16px 34px rgba(35, 104, 255, 0.38), 0 0 22px rgba(35, 104, 255, 0.16);
}

.player-ui.galaxy-ui #cashoutBtn {
  background: linear-gradient(135deg, #ff667d 0%, #eb3e5f 54%, #c9284a 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 16px 34px rgba(237, 55, 87, 0.32), 0 0 22px rgba(237, 55, 87, 0.14);
}

.player-ui.galaxy-ui #startRoundBtn::before,
.player-ui.galaxy-ui #cashoutBtn::before {
  position: absolute;
  left: 24px;
  margin: 0;
  font-size: 27px;
}

.player-ui.galaxy-ui #startRoundBtn::before {
  content: "🚀";
}

.player-ui.galaxy-ui #cashoutBtn::before {
  content: "◇";
  font-size: 34px;
}

.player-ui.galaxy-ui #startRoundBtn::after,
.player-ui.galaxy-ui #cashoutBtn::after {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.74;
}

.player-ui.galaxy-ui #startRoundBtn::after {
  content: "火箭升空后随时可止盈";
}

.player-ui.galaxy-ui #cashoutBtn::after {
  content: "爆掉前止盈收入钱包";
}

.player-ui.galaxy-ui #startRoundBtn:active:not(:disabled),
.player-ui.galaxy-ui #cashoutBtn:active:not(:disabled) {
  transform: scale(0.975);
  filter: brightness(1.06);
}

.player-ui.galaxy-ui #startRoundBtn:disabled,
.player-ui.galaxy-ui #cashoutBtn:disabled {
  opacity: 0.46;
  filter: saturate(0.55);
  box-shadow: none;
}

.player-ui.galaxy-ui #startRoundBtn[aria-busy="true"]::before,
.player-ui.galaxy-ui #cashoutBtn[aria-busy="true"]::before {
  content: "";
  position: static;
  width: 15px;
  height: 15px;
  margin: 0 7px 0 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: player-spin 0.7s linear infinite;
}

.player-ui.galaxy-ui .bottom-nav {
  width: min(660px, calc(100% - 20px - var(--safe-left) - var(--safe-right)));
  padding: 7px;
  border: 1px solid rgba(69, 115, 213, 0.34);
  border-radius: 24px;
  background: rgba(8, 24, 57, 0.92);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 18px 44px rgba(0, 5, 27, 0.48);
  backdrop-filter: blur(18px);
}

.player-ui.galaxy-ui .bottom-nav .view-btn {
  min-height: 62px;
  color: #93a3c6;
  border-radius: 17px;
}

.player-ui.galaxy-ui .bottom-nav .view-btn.active {
  color: #51a9ff;
  background: linear-gradient(145deg, rgba(35, 104, 234, 0.35), rgba(16, 54, 128, 0.42));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 0 20px rgba(35, 108, 255, 0.14);
}

.player-ui.galaxy-ui .nav-icon {
  font-size: 22px;
  filter: grayscale(0.45) saturate(0.72);
}

.player-ui.galaxy-ui .view-btn.active .nav-icon {
  filter: none;
}

.player-ui.galaxy-ui .sub-card,
.player-ui.galaxy-ui .stat-card,
.player-ui.galaxy-ui .product-card,
.player-ui.galaxy-ui .custom-recharge-card,
.player-ui.galaxy-ui .wallet-action-card,
.player-ui.galaxy-ui .wallet-identity-card,
.player-ui.galaxy-ui .hint-box,
.player-ui.galaxy-ui .list-item,
.player-ui.galaxy-ui input,
.player-ui.galaxy-ui textarea,
.player-ui.galaxy-ui select {
  color: var(--player-text);
  border-color: rgba(101, 138, 207, 0.2);
  background: rgba(12, 33, 72, 0.82);
}

.player-ui.galaxy-ui input::placeholder,
.player-ui.galaxy-ui textarea::placeholder {
  color: var(--player-text-faint);
}

@keyframes player-galaxy-status-pulse {
  50% { transform: scale(0.76); opacity: 0.72; }
}

@keyframes player-galaxy-star-drift {
  from { transform: translate3d(0, calc(var(--stage-progress) * 52px - 5%), 0) scale(calc(1 + var(--stage-progress) * 0.05)); }
  to { transform: translate3d(0, calc(var(--stage-progress) * 52px + 5%), 0) scale(calc(1.02 + var(--stage-progress) * 0.05)); }
}

@keyframes player-galaxy-cloud-pass-a {
  from { transform: translate3d(-20px, calc(var(--stage-progress) * 236px - 30px), 0); }
  to { transform: translate3d(26px, calc(var(--stage-progress) * 236px + 170px), 0); }
}

@keyframes player-galaxy-cloud-pass-b {
  from { transform: translate3d(24px, calc(var(--stage-progress) * 236px - 70px), 0); }
  to { transform: translate3d(-30px, calc(var(--stage-progress) * 236px + 190px), 0); }
}

@keyframes player-galaxy-cloud-pass-c {
  from { transform: translate3d(-8px, calc(var(--stage-progress) * 236px - 50px), 0); }
  to { transform: translate3d(18px, calc(var(--stage-progress) * 236px + 160px), 0); }
}

@keyframes player-galaxy-launch-glow {
  from { opacity: 0.42; }
  to { opacity: 0.68; }
}

@keyframes player-galaxy-speed-lines {
  from { transform: translate3d(0, -22%, 0) skewY(-6deg); }
  to { transform: translate3d(0, 22%, 0) skewY(-6deg); }
}

@keyframes player-galaxy-ignition-shiver {
  from { transform: translate3d(-50%, -1px, 0) rotate(-0.28deg); }
  to { transform: translate3d(-50%, 1px, 0) rotate(0.28deg); }
}

@keyframes player-galaxy-rocket-float {
  0%, 100% { transform: translate3d(-50%, 0, 0) rotate(-0.18deg); }
  50% { transform: translate3d(-50%, -3px, 0) rotate(0.18deg); }
}

@keyframes player-galaxy-trail-pulse {
  from { transform: translate3d(-50%, 0, 0) scaleY(0.86); opacity: 0.82; }
  to { transform: translate3d(-50%, 0, 0) scaleY(calc(1.08 + var(--flight-intensity) * 0.46)); opacity: 1; }
}

@keyframes player-galaxy-particle-drop {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.7); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, 88px, 0) scale(0.2); }
}

@keyframes player-galaxy-outcome-in {
  0% { opacity: 0; transform: translate3d(-50%, -28%, 0) scale(0.82); }
  18%, 76% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-50%, -64%, 0) scale(1.04); }
}

@media (max-width: 720px) {
  .player-ui.galaxy-ui .shell {
    width: calc(100vw - 22px - var(--safe-left) - var(--safe-right));
    padding-top: max(12px, var(--safe-top));
    padding-bottom: calc(94px + var(--safe-bottom));
  }

  .player-ui.galaxy-ui .app-shell {
    gap: 11px;
  }

  .player-ui.galaxy-ui .player-topbar {
    min-height: 66px;
  }

  .player-ui.galaxy-ui #appPanel .player-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .player-ui.galaxy-ui .brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 16px;
    font-size: 25px;
  }

  .player-ui.galaxy-ui .brand-lockup {
    gap: 10px;
  }

  .player-ui.galaxy-ui .brand-lockup strong {
    font-size: 20px;
  }

  .player-ui.galaxy-ui .brand-lockup span:not(.brand-mark) {
    display: block;
    font-size: 10px;
  }

  .player-ui.galaxy-ui .topbar-status {
    gap: 5px;
  }

  .player-ui.galaxy-ui .balance-pill {
    min-width: 118px;
    min-height: 51px;
    gap: 7px;
    padding: 6px 9px 6px 7px;
    border-radius: 17px;
  }

  .player-ui.galaxy-ui .balance-coin {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 17px;
    border-width: 2px;
  }

  .player-ui.galaxy-ui .balance-copy small {
    font-size: 9px;
  }

  .player-ui.galaxy-ui .balance-pill .balance-copy strong {
    max-width: 72px;
    font-size: 19px;
  }

  .player-ui.galaxy-ui .topup-shortcut {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 24px;
  }

  .player-ui.galaxy-ui .status-chip {
    width: 28px;
    min-height: 28px;
  }

  .player-ui.galaxy-ui .broadcast-panel {
    min-height: 46px;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 16px;
  }

  .player-ui.galaxy-ui .broadcast-head .eyebrow,
  .player-ui.galaxy-ui .marquee-item {
    font-size: 11px;
  }

  .player-ui.galaxy-ui .broadcast-flame {
    font-size: 15px;
  }

  .player-ui.galaxy-ui .game-panel {
    gap: 11px;
  }

  .player-ui.galaxy-ui .room-tabs {
    min-height: 54px;
    border-radius: 19px;
  }

  .player-ui.galaxy-ui .room-tab {
    min-width: 0;
    min-height: 44px;
    font-size: 15px;
    border-radius: 15px;
  }

  .player-ui.galaxy-ui .game-guide-strip {
    min-height: 34px;
    gap: 8px;
    padding: 3px 5px;
    font-size: 11px;
  }

  .player-ui.galaxy-ui .guide-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 12px;
  }

  .player-ui.galaxy-ui .multiplier-card {
    min-height: 110px;
    padding: 18px 19px;
    border-radius: 22px;
  }

  .player-ui.galaxy-ui .multiplier-label {
    font-size: 15px;
  }

  .player-ui.galaxy-ui .multiplier-card strong {
    min-width: 150px;
    font-size: clamp(48px, 14vw, 63px);
  }

  .player-ui.galaxy-ui .stage-stats {
    gap: 9px;
  }

  .player-ui.galaxy-ui .metric-inline {
    min-height: 82px;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .player-ui.galaxy-ui .metric-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 22px;
    border-radius: 14px;
  }

  .player-ui.galaxy-ui .bet-icon {
    border-radius: 50%;
  }

  .player-ui.galaxy-ui .metric-copy > span {
    font-size: 12px;
  }

  .player-ui.galaxy-ui .metric-copy strong {
    font-size: 24px;
  }

  .player-ui.galaxy-ui .stage-status-wrap {
    min-height: 58px;
    gap: 7px;
    padding: 10px 13px;
    border-radius: 17px;
  }

  .player-ui.galaxy-ui .status-text {
    font-size: 17px;
  }

  .player-ui.galaxy-ui .scene-stage,
  body.player-ui.galaxy-ui.game-fit-active .scene-stage {
    min-height: 340px;
    border-radius: 21px;
  }

  .player-ui.galaxy-ui .scene-markers {
    width: 96px;
    right: 7px;
  }

  .player-ui.galaxy-ui .scene-markers::before {
    right: 70px;
  }

  .player-ui.galaxy-ui .scene-markers span {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 5px;
    padding-inline: 4px;
    font-size: 10px;
  }

  .player-ui.galaxy-ui .flight-pack {
    bottom: 35px;
    width: 126px;
    height: 205px;
  }

  .player-ui.galaxy-ui .rocket-sprite {
    width: 82px;
  }

  .player-ui.galaxy-ui .twin-actions {
    gap: 9px;
  }

  .player-ui.galaxy-ui #startRoundBtn,
  .player-ui.galaxy-ui #cashoutBtn {
    min-height: 70px;
    padding-inline: 8px;
    font-size: 18px;
    border-radius: 20px;
  }

  .player-ui.galaxy-ui #startRoundBtn::before,
  .player-ui.galaxy-ui #cashoutBtn::before {
    position: static;
    margin: 0;
    font-size: 20px;
  }

  .player-ui.galaxy-ui #cashoutBtn::before {
    font-size: 24px;
  }

  .player-ui.galaxy-ui #startRoundBtn::after,
  .player-ui.galaxy-ui #cashoutBtn::after {
    font-size: 9px;
  }

  .player-ui.galaxy-ui .bottom-nav {
    width: 100%;
    border-radius: 21px;
  }

  body.player-ui.galaxy-ui.game-fit-active .bottom-nav {
    position: sticky;
    left: auto;
    right: auto;
    bottom: max(6px, var(--safe-bottom));
    width: 100%;
    transform: none;
  }
}

@media (max-width: 430px) {
  .player-ui.galaxy-ui .shell {
    width: calc(100vw - 18px - var(--safe-left) - var(--safe-right));
  }

  .player-ui.galaxy-ui .brand-lockup strong {
    font-size: 18px;
  }

  .player-ui.galaxy-ui .brand-lockup span:not(.brand-mark) {
    letter-spacing: 0.04em;
  }

  .player-ui.galaxy-ui .balance-pill {
    min-width: 105px;
  }

  .player-ui.galaxy-ui .status-chip {
    display: none;
  }

  .player-ui.galaxy-ui .multiplier-card {
    min-height: 102px;
    padding: 16px;
  }

  .player-ui.galaxy-ui .multiplier-card strong {
    min-width: 132px;
  }

  .player-ui.galaxy-ui .metric-inline {
    gap: 7px;
    padding: 10px;
  }

  .player-ui.galaxy-ui .metric-hint {
    display: none;
  }
}

@media (max-width: 370px) {
  .player-ui.galaxy-ui .brand-mark {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    font-size: 22px;
  }

  .player-ui.galaxy-ui .brand-lockup strong {
    font-size: 17px;
  }

  .player-ui.galaxy-ui .balance-coin {
    display: none;
  }

  .player-ui.galaxy-ui .balance-pill {
    min-width: 74px;
    justify-content: center;
  }

  .player-ui.galaxy-ui .topup-shortcut {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .player-ui.galaxy-ui .multiplier-label {
    font-size: 13px;
  }

  .player-ui.galaxy-ui .multiplier-card strong {
    min-width: 116px;
    font-size: 43px;
  }

  .player-ui.galaxy-ui #startRoundBtn::after,
  .player-ui.galaxy-ui #cashoutBtn::after {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .player-ui.galaxy-ui .player-topbar {
    min-height: 54px;
  }

  .player-ui.galaxy-ui .scene-stage,
  body.player-ui.galaxy-ui.game-fit-active .scene-stage {
    min-height: 240px;
  }
}

.player-ui.galaxy-ui.motion-lite .scene-speed-lines,
.player-ui.galaxy-ui.motion-lite .rocket-particles {
  display: none;
}

.player-ui.galaxy-ui.motion-lite .scene-cloud,
.player-ui.galaxy-ui.motion-lite .rocket-sprite {
  filter: none;
}

.player-ui.galaxy-ui.motion-reduced .scene-speed-lines,
.player-ui.galaxy-ui.motion-reduced .rocket-particles {
  display: none;
}

.player-ui.galaxy-ui.motion-reduced .scene-cloud,
.player-ui.galaxy-ui.motion-reduced .scene-stars,
.player-ui.galaxy-ui.motion-reduced .rocket-sprite,
.player-ui.galaxy-ui.motion-reduced .rocket-trail,
.player-ui.galaxy-ui.motion-reduced .scene-launch-glow {
  animation: none !important;
}

/*
 * R3 mobile viewport fit.
 * The game home is a bounded four-row app shell. Inside the game view the
 * seven visual blocks are packed into six rows by placing bet, potential and
 * status on one shared row. The flight scene owns every remaining pixel, so
 * the complete game and navigation stay visible without scaling the page.
 */
@media (max-width: 720px) and (orientation: portrait) {
  html.player-ui-root.game-fit-active,
  html.game-fit-active body.player-ui.galaxy-ui,
  body.player-ui.galaxy-ui.game-fit-active {
    width: 100%;
    height: var(--app-vh);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .shell,
  html.game-fit-active body.player-ui.galaxy-ui .shell {
    width: calc(100vw - 12px - var(--safe-left) - var(--safe-right));
    height: var(--app-vh);
    min-height: 0;
    padding-top: max(4px, var(--safe-top));
    padding-bottom: max(4px, var(--safe-bottom));
    overflow: hidden;
  }

  body.player-ui.galaxy-ui.game-fit-active #appPanel,
  html.game-fit-active body.player-ui.galaxy-ui #appPanel {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(4px, calc(var(--app-vh) * 0.007), 7px);
    align-content: stretch;
    overflow: hidden;
  }

  body.player-ui.galaxy-ui.game-fit-active #viewGame,
  body.player-ui.galaxy-ui.game-fit-active .game-layout,
  body.player-ui.galaxy-ui.game-fit-active .game-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.player-ui.galaxy-ui.game-fit-active .player-topbar {
    min-height: clamp(44px, calc(var(--app-vh) * 0.068), 58px);
  }

  body.player-ui.galaxy-ui.game-fit-active .brand-mark {
    width: clamp(36px, calc(var(--app-vh) * 0.054), 44px);
    height: clamp(36px, calc(var(--app-vh) * 0.054), 44px);
    flex-basis: clamp(36px, calc(var(--app-vh) * 0.054), 44px);
    border-radius: 13px;
    font-size: clamp(19px, calc(var(--app-vh) * 0.03), 23px);
  }

  body.player-ui.galaxy-ui.game-fit-active .brand-lockup {
    gap: 7px;
  }

  body.player-ui.galaxy-ui.game-fit-active .brand-lockup strong {
    font-size: clamp(15px, 4.5vw, 18px);
    white-space: nowrap;
  }

  body.player-ui.galaxy-ui.game-fit-active .brand-lockup span:not(.brand-mark) {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .balance-pill {
    min-width: 96px;
    min-height: clamp(40px, calc(var(--app-vh) * 0.057), 46px);
    gap: 5px;
    padding: 4px 7px 4px 5px;
    border-radius: 15px;
  }

  body.player-ui.galaxy-ui.game-fit-active .balance-coin {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    font-size: 15px;
    border-width: 2px;
  }

  body.player-ui.galaxy-ui.game-fit-active .balance-copy small {
    font-size: 8px;
  }

  body.player-ui.galaxy-ui.game-fit-active .balance-pill .balance-copy strong {
    max-width: 60px;
    font-size: 17px;
  }

  body.player-ui.galaxy-ui.game-fit-active .topup-shortcut {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 23px;
  }

  body.player-ui.galaxy-ui.game-fit-active .broadcast-panel {
    min-height: clamp(32px, calc(var(--app-vh) * 0.047), 40px);
    gap: 7px;
    padding: 4px 8px;
    border-radius: 13px;
  }

  body.player-ui.galaxy-ui.game-fit-active .broadcast-head .eyebrow,
  body.player-ui.galaxy-ui.game-fit-active .marquee-item {
    font-size: 10px;
  }

  body.player-ui.galaxy-ui.game-fit-active .marquee-item {
    min-height: 24px;
    padding-block: 3px;
  }

  body.player-ui.galaxy-ui.game-fit-active .broadcast-flame {
    font-size: 14px;
  }

  body.player-ui.galaxy-ui.game-fit-active .broadcast-arrow {
    font-size: 22px;
  }

  body.player-ui.galaxy-ui.game-fit-active .game-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    grid-auto-rows: initial;
    gap: clamp(4px, calc(var(--app-vh) * 0.006), 7px);
    padding: 0;
    align-content: stretch;
  }

  body.player-ui.galaxy-ui.game-fit-active .room-tabs,
  body.player-ui.galaxy-ui.game-fit-active .game-guide-strip,
  body.player-ui.galaxy-ui.game-fit-active .multiplier-card,
  body.player-ui.galaxy-ui.game-fit-active .scene-stage,
  body.player-ui.galaxy-ui.game-fit-active .sticky-actions {
    grid-column: 1 / -1;
  }

  body.player-ui.galaxy-ui.game-fit-active .room-tabs {
    grid-row: 1;
    min-height: clamp(40px, calc(var(--app-vh) * 0.058), 48px);
    padding: 3px;
    border-radius: 16px;
  }

  body.player-ui.galaxy-ui.game-fit-active .room-tab {
    min-height: 36px;
    padding: 5px 4px;
    border-radius: 13px;
    font-size: clamp(13px, 3.8vw, 15px);
  }

  body.player-ui.galaxy-ui.game-fit-active .game-guide-strip {
    grid-row: 2;
    min-height: 24px;
    gap: 6px;
    padding: 1px 4px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
  }

  body.player-ui.galaxy-ui.game-fit-active .game-guide-strip > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.player-ui.galaxy-ui.game-fit-active .guide-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    font-size: 11px;
  }

  body.player-ui.galaxy-ui.game-fit-active .multiplier-card {
    grid-row: 3;
    min-height: clamp(62px, calc(var(--app-vh) * 0.09), 78px);
    gap: 8px;
    padding: 8px 13px;
    border-width: 1px;
    border-radius: 17px;
  }

  body.player-ui.galaxy-ui.game-fit-active .multiplier-label {
    font-size: clamp(12px, 3.8vw, 15px);
  }

  body.player-ui.galaxy-ui.game-fit-active .multiplier-label i {
    transform: scale(0.78);
    transform-origin: left center;
  }

  body.player-ui.galaxy-ui.game-fit-active .multiplier-card strong {
    min-width: 0;
    font-size: clamp(34px, 12vw, 48px);
  }

  body.player-ui.galaxy-ui.game-fit-active .multiplier-glint {
    right: 11px;
    top: 10px;
    width: 8px;
    height: 8px;
  }

  body.player-ui.galaxy-ui.game-fit-active .stage-stats {
    position: relative;
    z-index: 2;
    grid-column: 1 / span 2;
    grid-row: 4;
    min-height: clamp(52px, calc(var(--app-vh) * 0.073), 62px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-inline {
    min-width: 0;
    min-height: 0;
    height: 100%;
    gap: 5px;
    padding: 6px;
    border-radius: 14px;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
    font-size: 15px;
  }

  body.player-ui.galaxy-ui.game-fit-active .bet-icon {
    border-radius: 50%;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-copy {
    gap: 1px;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-copy > span {
    font-size: clamp(9px, 2.7vw, 11px);
    line-height: 1.05;
    white-space: nowrap;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-copy strong {
    font-size: clamp(17px, 5.2vw, 22px);
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-hint {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .stage-status-wrap {
    position: relative;
    z-index: 2;
    grid-column: 3;
    grid-row: 4;
    min-width: 0;
    min-height: 0;
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 4px;
    padding: 6px 7px;
    border-radius: 14px;
  }

  body.player-ui.galaxy-ui.game-fit-active .status-clock {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .status-label {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    font-size: clamp(8px, 2.5vw, 10px);
    line-height: 1;
    white-space: nowrap;
  }

  body.player-ui.galaxy-ui.game-fit-active .status-text {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    font-size: clamp(12px, 3.6vw, 15px);
    line-height: 1.1;
    white-space: nowrap;
  }

  body.player-ui.galaxy-ui.game-fit-active .status-dot {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: 8px;
    height: 8px;
    flex-basis: 8px;
  }

  body.player-ui.galaxy-ui.game-fit-active .scene-stage,
  html.game-fit-active body.player-ui.galaxy-ui .scene-stage {
    position: relative;
    z-index: 1;
    grid-row: 5;
    width: 100%;
    height: auto !important;
    min-height: 0;
    align-self: stretch;
    border-radius: 16px;
  }

  body.player-ui.galaxy-ui.game-fit-active .scene-markers {
    width: 78px;
    right: 4px;
  }

  body.player-ui.galaxy-ui.game-fit-active .scene-markers::before {
    top: 7px;
    right: 57px;
    bottom: 7px;
  }

  body.player-ui.galaxy-ui.game-fit-active .scene-markers span {
    min-height: 18px;
    grid-template-columns: 13px minmax(0, 1fr);
    gap: 3px;
    padding: 1px 2px;
    font-size: 9px;
    border-radius: 7px;
  }

  body.player-ui.galaxy-ui.game-fit-active .scene-markers span i {
    width: 8px;
    height: 3px;
  }

  body.player-ui.galaxy-ui.game-fit-active .flight-pack {
    bottom: 6%;
    width: min(29%, 104px);
    height: min(70%, 168px);
  }

  body.player-ui.galaxy-ui.game-fit-active .rocket-sprite {
    width: min(70%, 70px);
  }

  body.player-ui.galaxy-ui.game-fit-active .rocket-trail {
    bottom: -10px;
    width: 18px;
    height: min(52%, 58px);
  }

  body.player-ui.galaxy-ui.game-fit-active .explosion-fx {
    filter: none;
    contain: layout paint style;
    will-change: transform, opacity;
  }

  body.player-ui.galaxy-ui.game-fit-active .round-outcome-fx {
    backdrop-filter: none;
    will-change: transform, opacity;
  }

  body.player-ui.galaxy-ui.motion-lite.game-fit-active .explosion-fx span:nth-child(even) {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .sticky-actions {
    position: relative;
    z-index: 2;
    grid-row: 6;
    padding-top: 0;
  }

  body.player-ui.galaxy-ui.game-fit-active .twin-actions {
    gap: 6px;
  }

  body.player-ui.galaxy-ui.game-fit-active #startRoundBtn,
  body.player-ui.galaxy-ui.game-fit-active #cashoutBtn {
    min-height: clamp(46px, calc(var(--app-vh) * 0.065), 54px);
    padding: 5px 7px;
    gap: 1px;
    border-radius: 15px;
    font-size: clamp(15px, 4.5vw, 18px);
  }

  body.player-ui.galaxy-ui.game-fit-active #startRoundBtn::before,
  body.player-ui.galaxy-ui.game-fit-active #cashoutBtn::before {
    font-size: 17px;
  }

  body.player-ui.galaxy-ui.game-fit-active #startRoundBtn::after,
  body.player-ui.galaxy-ui.game-fit-active #cashoutBtn::after {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .bottom-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 0;
    padding: 3px;
    border-radius: 16px;
    transform: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .bottom-nav .view-btn {
    min-height: clamp(44px, calc(var(--app-vh) * 0.059), 50px);
    gap: 1px;
    padding: 3px 2px;
    border-radius: 12px;
    font-size: 10px;
  }

  body.player-ui.galaxy-ui.game-fit-active .nav-icon {
    font-size: 17px;
    line-height: 1;
  }
}

@media (max-width: 390px) and (orientation: portrait) {
  body.player-ui.galaxy-ui.game-fit-active .balance-pill {
    min-width: 84px;
  }

  body.player-ui.galaxy-ui.game-fit-active .balance-coin {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .metric-inline {
    gap: 3px;
    padding-inline: 4px;
  }
}

@media (max-width: 720px) and (max-height: 700px) and (orientation: portrait) {
  body.player-ui.galaxy-ui.game-fit-active .game-guide-strip {
    display: none;
  }

  body.player-ui.galaxy-ui.game-fit-active .game-panel {
    grid-template-rows: auto 0 auto auto minmax(0, 1fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-ui.galaxy-ui .scene-speed-lines,
  .player-ui.galaxy-ui .rocket-particles {
    display: none;
  }

  .player-ui.galaxy-ui .scene-stars,
  .player-ui.galaxy-ui .scene-cloud,
  .player-ui.galaxy-ui .rocket-sprite,
  .player-ui.galaxy-ui .rocket-trail,
  .player-ui.galaxy-ui .scene-launch-glow {
    animation: none !important;
  }

  .player-ui.galaxy-ui .rocket-trail {
    transform: translate3d(-50%, 0, 0) scaleY(0.94);
  }
}
