:root {
  --app-vh: 100vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --text: #fff5dd;
  --muted: #9eb4c4;
  --gold: #ffbe4d;
  --orange: #ff7c2f;
  --red: #ff5a5f;
  --green: #58e889;
  --cyan: #62d9ff;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: var(--app-vh);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 190, 77, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(98, 217, 255, 0.14), transparent 28%),
    linear-gradient(145deg, #020b12 0%, #071523 45%, #06121c 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-orbit {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  filter: blur(2px);
  opacity: 0.5;
}

.orbit-a {
  top: 6%;
  left: -4%;
  width: 260px;
  height: 260px;
  border-color: rgba(255, 190, 77, 0.18);
}

.orbit-b {
  right: -4%;
  bottom: 10%;
  width: 320px;
  height: 320px;
  border-color: rgba(98, 217, 255, 0.16);
}

.shell {
  width: min(1380px, calc(100% - 24px - var(--safe-left) - var(--safe-right)));
  margin: 0 auto;
  padding: max(18px, var(--safe-top)) 0 calc(96px + var(--safe-bottom));
}

.panel {
  background: linear-gradient(180deg, rgba(8, 24, 37, 0.92), rgba(5, 16, 27, 0.94));
  border: 1px solid rgba(255, 190, 77, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(14px);
}

.hidden {
  display: none !important;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

h1, h2, h3, p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.auth-panel {
  width: min(560px, 100%);
  margin: 40px auto 0;
  display: grid;
  gap: 20px;
}

.narrow {
  width: min(460px, 100%);
}

.cashier-shell {
  width: min(980px, 100%);
}

.cashier-minimal {
  gap: 18px;
}

.cashier-head {
  display: grid;
  gap: 6px;
}

.cashier-card {
  gap: 16px;
}

.cashier-hero-card {
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 190, 77, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.cashier-placeholder {
  min-height: 320px;
  display: grid;
  align-items: center;
}

.cashier-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cashier-stat {
  min-width: 0;
}

.cashier-stat-wide {
  grid-column: 1 / -1;
}

.cashier-stat strong {
  font-size: clamp(16px, 2.2vw, 24px);
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.cashier-actions {
  justify-content: flex-start;
}

.cashier-info-list {
  display: grid;
  gap: 10px;
}

.cashier-mini-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cashier-qr-wrap {
  display: flex;
  justify-content: center;
}

.cashier-qr-image {
  width: min(240px, 100%);
  max-width: 240px;
  background: #ffffff;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.cashier-status-line {
  padding-top: 0;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.inline-form > label {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(14, 31, 48, 0.98), rgba(9, 22, 36, 0.98));
  color: var(--text);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

select {
  color-scheme: dark;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

select option,
select optgroup {
  background: #102235;
  color: #eef6ff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  padding: 0;
}

input[type="range"] {
  padding: 0;
  background: transparent;
}

.btn {
  border: 0;
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1c1206;
}

.btn-secondary {
  background: linear-gradient(135deg, #1b4660, #2c88b8);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ff8a67, #ff4859);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-xl {
  min-height: 56px;
  padding: 15px 20px;
}

.auth-actions,
.button-row,
.top-bar-right,
.room-tabs,
.section-head,
.broadcast-head,
.settings-grid,
.nav-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.game-guide-strip {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 190, 77, 0.08);
  border: 1px solid rgba(255, 190, 77, 0.12);
  color: #ffe9bf;
  font-size: 13px;
  line-height: 1.45;
}

.hint-box,
.list-block,
.admin-card,
.metric-inline,
.custom-recharge-card,
.table-wrap {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 16px;
}

.hint-box ul,
.info-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.app-shell {
  display: grid;
  gap: 14px;
  opacity: 1;
  transition: opacity 0.18s ease;
}

body.app-booting .app-shell,
html.app-booting .app-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.game-fit-active,
html.game-fit-active {
  overflow: hidden;
}

body.game-fit-active .shell,
html.game-fit-active .shell {
  height: calc(var(--app-vh) - var(--safe-top) - var(--safe-bottom));
  padding-top: max(10px, var(--safe-top));
  padding-bottom: max(10px, var(--safe-bottom));
}

body.game-fit-active #appPanel,
html.game-fit-active #appPanel {
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-content: stretch;
}

.top-most {
  order: -2;
}

.broadcast-panel {
  overflow: hidden;
  width: min(980px, 100%);
  margin: 0 auto;
}

body.game-fit-active .broadcast-panel,
html.game-fit-active .broadcast-panel {
  padding: 12px 16px;
}

body.game-fit-active .broadcast-head,
html.game-fit-active .broadcast-head {
  gap: 10px;
}

body.game-fit-active .marquee-item,
html.game-fit-active .marquee-item {
  padding: 10px 14px;
}

.marquee-shell {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, white 7%, white 93%, transparent);
}

.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.marquee-item strong {
  color: var(--gold);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

.top-bar.compact-top {
  display: none !important;
}

.compact-top {
  padding-top: 16px;
  padding-bottom: 16px;
}

.compact-brand h2 {
  font-size: 26px;
}

.compact-wallet {
  justify-content: flex-end;
}

.balance-pill,
.user-chip {
  min-width: 126px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 4px;
}

.balance-pill strong {
  font-size: 22px;
  color: var(--gold);
}

.balance-pill.subtle strong {
  color: var(--cyan);
}

.user-chip strong {
  font-size: 15px;
}

.view-panel {
  display: block;
  width: min(980px, 100%);
  margin: 0 auto;
}

body.game-fit-active #viewGame,
html.game-fit-active #viewGame {
  height: 100%;
  min-height: 0;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
  justify-items: center;
}

body.game-fit-active .game-layout,
html.game-fit-active .game-layout {
  height: 100%;
  min-height: 0;
}

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

.game-panel,
.me-layout,
.side-stack {
  display: grid;
  gap: 14px;
}

.game-panel {
  width: min(760px, 100%);
}

body.game-fit-active .game-panel,
html.game-fit-active .game-panel {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  align-content: stretch;
  overflow: hidden;
}

.me-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
  margin: 0 auto;
}

.record-layout {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

.game-panel {
  max-width: 980px;
  margin: 0 auto;
}

.span-2 {
  grid-column: 1 / -1;
}

.room-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.room-tab.active {
  background: rgba(255, 190, 77, 0.14);
  border-color: rgba(255, 190, 77, 0.28);
  color: var(--gold);
}

.stage-stats {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr auto;
  gap: 10px;
  align-items: stretch;
}

body.game-fit-active .metric-inline,
html.game-fit-active .metric-inline {
  padding: 12px 14px;
}

.metric-inline {
  display: grid;
  gap: 4px;
}

.metric-inline span {
  color: var(--muted);
  font-size: 13px;
}

.metric-inline strong {
  color: var(--text);
  font-size: 24px;
}

.metric-main strong {
  font-size: 42px;
  line-height: 1;
  color: #fff8dc;
  text-shadow: 0 0 22px rgba(255, 190, 77, 0.3);
}

body.game-fit-active .metric-main strong,
html.game-fit-active .metric-main strong {
  font-size: 36px;
}

body.game-fit-active .metric-inline strong,
html.game-fit-active .metric-inline strong {
  font-size: 22px;
}

body.game-fit-active .status-text,
html.game-fit-active .status-text {
  font-size: 16px;
}

.metric-action {
  width: 100%;
  text-align: left;
  color: inherit;
  position: relative;
  border-color: rgba(255, 190, 77, 0.22);
  background: linear-gradient(180deg, rgba(255, 190, 77, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 190, 77, 0.05);
}

.metric-action strong {
  color: var(--gold);
}

.metric-hint {
  display: block;
  color: #ffe2a8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  word-break: keep-all;
}

.stage-status-wrap {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 6px;
}

.status-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
}

.scene-stage {
  --stage-progress: 0;
  position: relative;
  height: 400px;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #040912 0%, #0a1730 14%, #173865 34%, #4f83b5 57%, #f1a365 79%, #663517 100%);
  background-size: 100% 132%;
  background-position: center calc(var(--stage-progress) * -30px);
}

body.game-fit-active .scene-stage,
html.game-fit-active .scene-stage {
  height: 100%;
  min-height: 0;
  align-self: stretch;
}

.scene-sunrise,
.scene-nebula,
.scene-stars,
.scene-planet,
.scene-orbit-line,
.scene-stratosphere,
.scene-cloud,
.scene-atmosphere,
.scene-ground,
.scene-mountains,
.scene-launchpad,
.scene-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-sunrise {
  background:
    radial-gradient(circle at 50% 85%, rgba(255, 183, 98, 0.62), transparent 20%),
    radial-gradient(circle at 50% 74%, rgba(255, 135, 75, 0.28), transparent 32%);
  opacity: calc(0.92 - var(--stage-progress) * 0.74);
  transform: translateY(calc(var(--stage-progress) * 88px));
}

.scene-nebula {
  background:
    radial-gradient(circle at 20% 12%, rgba(146, 98, 255, 0.38), transparent 18%),
    radial-gradient(circle at 80% 16%, rgba(98, 217, 255, 0.28), transparent 18%);
  opacity: calc(0.12 + var(--stage-progress) * 0.95);
  transform: translateY(calc(var(--stage-progress) * 34px)) scale(calc(1 + var(--stage-progress) * 0.08));
}

.scene-stars {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,255,255,0.55) 1px, transparent 1.5px);
  background-position: 10% 16%, 72% 26%;
  background-size: 120px 120px, 160px 160px;
  opacity: calc(0.1 + var(--stage-progress) * 1);
  transform: translateY(calc(var(--stage-progress) * 76px)) scale(calc(1 + var(--stage-progress) * 0.08));
}

.scene-planet {
  inset: auto -80px 190px auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 35%, rgba(255,255,255,0.28), transparent 18%),
    linear-gradient(145deg, rgba(98, 217, 255, 0.8), rgba(18, 66, 117, 0.95));
  opacity: calc(var(--stage-progress) * 0.9);
  box-shadow: 0 0 40px rgba(98, 217, 255, 0.22);
  transform: translateY(calc(var(--stage-progress) * 108px)) scale(calc(0.9 + var(--stage-progress) * 0.22));
}

.scene-orbit-line {
  inset: 118px 24px auto 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(120, 220, 255, 0.82), transparent);
  box-shadow: 0 0 18px rgba(120, 220, 255, 0.25);
  opacity: calc(var(--stage-progress) * 1.25 - 0.18);
  transform: translateY(calc(var(--stage-progress) * 184px)) scaleX(calc(0.82 + var(--stage-progress) * 0.22));
}

.scene-stratosphere {
  inset: 176px 0 auto 0;
  height: 52px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, transparent 100%);
  opacity: calc(0.14 + var(--stage-progress) * 0.72);
  transform: translateY(calc(var(--stage-progress) * 170px));
}

.scene-cloud {
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  filter: blur(8px);
  opacity: calc(0.95 - var(--stage-progress) * 1.2);
  transform: translateY(calc(var(--stage-progress) * 236px));
}

.scene-cloud-a {
  inset: 94px auto auto 36px;
  width: 180px;
  height: 48px;
}

.scene-cloud-b {
  inset: 160px 56px auto auto;
  width: 220px;
  height: 62px;
}

.scene-cloud-c {
  inset: 232px auto auto 120px;
  width: 160px;
  height: 44px;
}

.scene-atmosphere {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  transform: translateY(calc(var(--stage-progress) * 120px));
  opacity: calc(0.82 - var(--stage-progress) * 0.42);
}

.scene-ground {
  inset: auto 0 0 0;
  height: 92px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 190, 77, 0.16), transparent 42%),
    linear-gradient(180deg, #5a3117 0%, #22140c 100%);
  transform: translateY(calc(var(--stage-progress) * 154px));
  opacity: calc(1 - var(--stage-progress) * 0.36);
}

.scene-mountains {
  inset: auto 0 74px 0;
  height: 78px;
  background:
    linear-gradient(90deg, rgba(24, 33, 46, 0.5), rgba(24, 33, 46, 0.2)),
    linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0));
  clip-path: polygon(0 100%, 10% 62%, 18% 84%, 28% 44%, 40% 78%, 54% 30%, 67% 72%, 79% 40%, 90% 86%, 100% 58%, 100% 100%);
  opacity: calc(0.74 - var(--stage-progress) * 0.42);
  transform: translateY(calc(var(--stage-progress) * 166px));
}

.scene-ground::before,
.scene-ground::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  background-repeat: repeat-x;
}

.scene-ground::before {
  height: 34px;
  background-image: linear-gradient(140deg, transparent 0 44%, rgba(0,0,0,0.24) 45% 55%, transparent 56% 100%);
  background-size: 80px 34px;
}

.scene-ground::after {
  bottom: 18px;
  height: 24px;
  background-image: linear-gradient(90deg, transparent 0 6%, rgba(0,0,0,0.28) 7% 11%, transparent 12% 22%, rgba(0,0,0,0.28) 23% 28%, transparent 29% 100%);
  background-size: 180px 24px;
  opacity: 0.5;
}

.scene-launchpad {
  inset: auto 50% 56px auto;
  width: 136px;
  height: 54px;
  transform: translateX(50%);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)),
    linear-gradient(90deg, #4a5667, #263241);
  clip-path: polygon(18% 100%, 82% 100%, 92% 0, 8% 0);
  transform: translate(50%, calc(var(--stage-progress) * 176px));
  opacity: calc(1 - var(--stage-progress) * 0.52);
}

.scene-markers {
  display: grid;
  align-content: space-between;
  justify-items: end;
  padding: 16px 16px 18px;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  transform: translateY(calc(var(--stage-progress) * 148px));
  opacity: calc(0.92 - var(--stage-progress) * 0.24);
}

.scene-markers span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 19, 31, 0.26);
  backdrop-filter: blur(6px);
}

.flight-pack {
  position: absolute;
  left: 50%;
  bottom: 38px;
  width: 114px;
  height: 214px;
  transform: translate3d(-50%, 0, 0);
  transition: none;
  will-change: transform;
}

.rocket-sprite {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 78px;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 24px rgba(255, 122, 47, 0.28));
  will-change: transform, filter;
}

.rocket-trail {
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 18px;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 208, 102, 0.9), rgba(255, 123, 47, 0.08));
  filter: blur(3px);
  opacity: 0.88;
  will-change: opacity, transform;
}

.explosion-fx {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: 120px;
  height: 120px;
  transform: translateX(-50%) scale(0.3);
  opacity: 0;
}

.explosion-fx::before,
.explosion-fx::after,
.explosion-fx span {
  content: "";
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.explosion-fx::before {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,235,170,0.95) 0, rgba(255,145,70,0.82) 48%, transparent 70%);
}

.explosion-fx::after {
  width: 68px;
  height: 68px;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0, rgba(255,180,77,0.85) 46%, transparent 72%);
}

.explosion-fx span:nth-child(1) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(0deg) translateY(-58px); }
.explosion-fx span:nth-child(2) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(60deg) translateY(-58px); }
.explosion-fx span:nth-child(3) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(120deg) translateY(-58px); }
.explosion-fx span:nth-child(4) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(180deg) translateY(-58px); }
.explosion-fx span:nth-child(5) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(240deg) translateY(-58px); }
.explosion-fx span:nth-child(6) { width: 14px; height: 56px; background: linear-gradient(180deg, #fff3d3, transparent); transform: translate(-50%, -50%) rotate(300deg) translateY(-58px); }

.scene-stage.running .rocket-trail {
  animation: trailPulse 0.18s linear infinite alternate;
}

.scene-stage.busted .rocket-sprite,
.scene-stage.busted .rocket-trail {
  opacity: 0;
}

.scene-stage.busted .explosion-fx {
  animation: explodeBurst 0.72s ease-out forwards;
}

@keyframes trailPulse {
  from { height: 56px; opacity: 0.76; }
  to { height: 82px; opacity: 1; }
}

@keyframes explodeBurst {
  0% { opacity: 1; transform: translateX(-50%) scale(0.2); }
  60% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.3); }
}

.sticky-actions {
  display: grid;
  margin: 0;
}

body.game-fit-active .sticky-actions,
html.game-fit-active .sticky-actions {
  align-self: end;
}

.twin-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.game-side-info {
  display: none;
}

.stats-grid,
.product-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card,
.product-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card strong,
.product-card strong {
  font-size: 24px;
  color: var(--gold);
}

.dashboard-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-kpi-card {
  min-height: 108px;
}

.dashboard-kpi-card small {
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-chart-card {
  min-height: 330px;
}

.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dashboard-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dashboard-line-wrap {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
}

.dashboard-line-chart {
  width: 100%;
  min-width: 520px;
  height: 240px;
}

.dashboard-line-grid line,
.dashboard-line-axis line {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.dashboard-line-grid text,
.dashboard-line-day {
  fill: var(--muted);
  font-size: 11px;
}

.dashboard-line-series polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.24));
}

.dashboard-line-series circle {
  stroke: rgba(4, 13, 24, 0.95);
  stroke-width: 2;
}

.dashboard-line-hitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-line-hitlist span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.account-info-item {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.account-info-item span {
  color: var(--muted);
  font-size: 12px;
}

.account-info-item strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.account-info-item.warn strong {
  color: var(--gold);
}

.account-info-hint {
  margin-top: 12px;
  color: #ffe8b6;
  line-height: 1.55;
}

.account-info-actions {
  margin-top: 12px;
}

.custom-recharge-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.recharge-history-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.wallet-action-card,
.wallet-identity-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 190, 77, 0.16);
  background: rgba(255, 190, 77, 0.055);
}

.wallet-action-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.wallet-action-card strong {
  color: var(--gold);
}

.wallet-action-card p {
  margin: 4px 0 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.list-item:first-child {
  padding-top: 0;
}

.compact-list .list-item {
  padding: 10px 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.bottom-nav {
  position: sticky;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  z-index: 10;
  width: min(980px, 100%);
  margin: 0 auto;
}

body.game-fit-active .bottom-nav,
html.game-fit-active .bottom-nav {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  padding: 10px;
}

.view-btn {
  min-height: 54px;
  padding: 12px 10px;
}

body.game-fit-active .view-btn,
html.game-fit-active .view-btn {
  min-height: 50px;
  padding: 10px 8px;
}

body.game-fit-compact .broadcast-panel,
html.game-fit-compact .broadcast-panel {
  padding: 10px 12px;
}

body.game-fit-compact .broadcast-head .muted,
html.game-fit-compact .broadcast-head .muted {
  display: none;
}

body.game-fit-compact .marquee-item,
html.game-fit-compact .marquee-item {
  padding: 8px 12px;
  gap: 8px;
  font-size: 13px;
}

body.game-fit-compact .game-panel,
html.game-fit-compact .game-panel {
  padding: 12px;
  gap: 8px;
}

body.game-fit-compact .room-tab,
html.game-fit-compact .room-tab {
  padding: 8px 12px;
}

body.game-fit-compact .metric-inline,
html.game-fit-compact .metric-inline {
  padding: 10px 12px;
}

body.game-fit-compact .metric-main strong,
html.game-fit-compact .metric-main strong {
  font-size: 30px;
}

body.game-fit-compact .metric-inline strong,
html.game-fit-compact .metric-inline strong {
  font-size: 18px;
}

body.game-fit-compact .metric-inline span,
html.game-fit-compact .metric-inline span {
  font-size: 12px;
}

body.game-fit-compact .status-text,
html.game-fit-compact .status-text {
  font-size: 15px;
}

body.game-fit-compact .btn-xl,
html.game-fit-compact .btn-xl {
  min-height: 48px;
  padding: 12px 16px;
}

body.game-fit-compact .scene-markers span,
html.game-fit-compact .scene-markers span {
  padding: 3px 7px;
}

body.game-fit-tight .broadcast-panel,
html.game-fit-tight .broadcast-panel {
  padding: 8px 10px;
}

body.game-fit-tight .broadcast-head,
html.game-fit-tight .broadcast-head {
  gap: 8px;
}

body.game-fit-tight .marquee-item,
html.game-fit-tight .marquee-item {
  padding: 7px 10px;
  gap: 7px;
  font-size: 12px;
}

body.game-fit-tight .game-panel,
html.game-fit-tight .game-panel {
  padding: 10px;
  gap: 7px;
}

body.game-fit-tight .room-tabs,
html.game-fit-tight .room-tabs {
  gap: 8px;
}

body.game-fit-tight .room-tab,
html.game-fit-tight .room-tab {
  padding: 7px 10px;
  font-size: 13px;
}

body.game-fit-tight .metric-inline,
html.game-fit-tight .metric-inline {
  padding: 7px 9px;
}

body.game-fit-tight .metric-main strong,
html.game-fit-tight .metric-main strong {
  font-size: 26px;
}

body.game-fit-tight .metric-inline strong,
html.game-fit-tight .metric-inline strong {
  font-size: 16px;
}

body.game-fit-tight .metric-inline span,
html.game-fit-tight .metric-inline span {
  font-size: 11px;
}

body.game-fit-tight .status-text,
html.game-fit-tight .status-text {
  font-size: 14px;
}

body.game-fit-tight .scene-markers,
html.game-fit-tight .scene-markers {
  font-size: 10px;
  padding: 10px 10px 8px;
}

body.game-fit-tight .scene-markers span,
html.game-fit-tight .scene-markers span {
  padding: 2px 6px;
}

body.game-fit-tight .btn-xl,
html.game-fit-tight .btn-xl {
  min-height: 44px;
  padding: 10px 14px;
}

body.game-fit-tight .bottom-nav,
html.game-fit-tight .bottom-nav {
  padding: 6px;
}

body.game-fit-tight .view-btn,
html.game-fit-tight .view-btn {
  min-height: 44px;
  padding: 8px 4px;
}

.view-btn.active {
  background: rgba(255, 190, 77, 0.14);
  border-color: rgba(255, 190, 77, 0.26);
  color: var(--gold);
}

.bet-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.bet-picker-grid .btn {
  min-height: 52px;
  font-size: 17px;
  font-weight: 900;
}

.bet-selected-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bet-selected-hint strong {
  color: var(--gold);
  font-size: 22px;
}

.bet-custom-card {
  border-color: rgba(255, 190, 77, 0.14);
}

.identity-card {
  max-height: min(92vh, 720px);
  overflow: auto;
}

.withdraw-modal-card,
.recharge-history-card,
.account-save-card,
.promotion-card {
  width: min(760px, calc(100vw - 24px));
  max-height: min(92vh, 820px);
  overflow: auto;
}

.identity-mode-row,
.identity-code-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.identity-safe-hint {
  color: #ffe8b6;
  line-height: 1.55;
}

.identity-code-helper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-color: rgba(255, 190, 77, 0.18);
}

.identity-code-helper strong {
  color: var(--gold);
  font-size: 22px;
  letter-spacing: 0;
}

.account-save-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 190, 77, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.account-save-preview strong {
  color: var(--gold);
  font-size: 22px;
}

.account-save-preview .save-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.account-save-preview .save-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.promotion-share-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.promotion-qr-box {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
}

.promotion-qr-box img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  object-fit: contain;
}

.promotion-qr-box img.is-loading,
.promotion-qr-box img.is-error {
  opacity: 0.08;
}

.promotion-qr-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  color: #203044;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.promotion-qr-status.hidden {
  display: none;
}

.promotion-copy-box {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 190, 77, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.promotion-copy-box span {
  color: var(--muted);
  font-size: 12px;
}

.promotion-copy-box strong {
  color: var(--gold);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.promotion-copy-box p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.generated-image-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(98, 217, 255, 0.18);
  background: rgba(98, 217, 255, 0.055);
}

.generated-image-preview img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.badge-success { color: var(--green); }
.badge-danger { color: #ff8c8c; }
.badge-warn { color: var(--gold); }

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 8, 14, 0.72);
  z-index: 40;
}

.modal-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, rgba(11, 28, 44, 0.98), rgba(7, 18, 29, 0.98));
  border: 1px solid rgba(255, 190, 77, 0.16);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 24px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(7, 20, 34, 0.96);
  border: 1px solid rgba(255, 190, 77, 0.28);
  box-shadow: var(--shadow);
  z-index: 50;
}

.admin-body .shell {
  width: min(1480px, calc(100% - 24px));
}

.admin-body {
  color-scheme: dark;
}

.admin-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: max(24px, var(--safe-top));
  max-height: calc(var(--app-vh) - max(24px, var(--safe-top)) - 24px);
  display: grid;
  gap: 18px;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.admin-content {
  min-height: 520px;
}

.nav-grid {
  display: grid;
  gap: 10px;
}

.nav-btn.active {
  background: rgba(255, 190, 77, 0.12);
  border-color: rgba(255, 190, 77, 0.24);
  color: var(--gold);
}

.admin-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-card:last-child {
  margin-bottom: 0;
}

.compact-card {
  padding: 14px;
}

.admin-meta-list {
  gap: 0;
}

.admin-meta-list .list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.curve-grid,
.bucket-grid,
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-grid.single {
  grid-template-columns: 1fr;
}

.sub-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 10px;
}

.trace-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trace-card-grid .sub-card strong {
  line-height: 1.4;
  word-break: break-word;
}

.permission-group-card strong {
  color: var(--gold);
}

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

.code-box {
  font-family: Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
  margin: 0;
}

.tag-cloud,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 190, 77, 0.12);
  border: 1px solid rgba(255, 190, 77, 0.18);
  color: var(--gold);
  font-size: 13px;
}

.mini-pill.danger {
  background: rgba(255, 91, 91, 0.12);
  border-color: rgba(255, 91, 91, 0.18);
  color: #ff9c9c;
}

.mini-pill.success {
  background: rgba(64, 214, 156, 0.12);
  border-color: rgba(64, 214, 156, 0.18);
  color: #8bf2c8;
}

.rank-list,
.metric-list {
  display: grid;
  gap: 10px;
}

.rank-item,
.metric-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-item strong,
.metric-item strong {
  color: var(--gold);
}

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

.simulator-summary-card {
  gap: 16px;
}

.simulator-room-list {
  display: grid;
  gap: 14px;
}

.simulator-room-card .table-scroll table {
  min-width: 620px;
}

.simulator-kpi-grid .metric-item {
  min-height: 100px;
}

.admin-note {
  font-size: 13px;
  color: var(--muted);
}

.code-box.lines-box {
  min-height: 90px;
}

@media (max-width: 1100px) {
  .game-layout,
  .admin-layout,
  .me-layout,
  .activity-layout,
  .curve-grid,
  .bucket-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }

  .trace-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .top-bar,
  .top-bar-right {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-filter-row,
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

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

  .stage-status-wrap {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  html.game-view-active,
  body.game-view-active {
    overflow-x: hidden;
  }

  .shell {
    width: calc(100% - 12px - var(--safe-left) - var(--safe-right));
    padding-top: max(10px, var(--safe-top));
    padding-bottom: calc(88px + var(--safe-bottom));
  }

  .panel {
    padding: 14px;
    border-radius: 20px;
  }

  .modal {
    align-items: start;
    padding: max(8px, var(--safe-top)) max(8px, var(--safe-right)) max(8px, var(--safe-bottom)) max(8px, var(--safe-left));
    overflow-y: auto;
  }

  .modal-card {
    width: 100%;
    max-width: calc(100vw - max(16px, var(--safe-left) + var(--safe-right)));
    padding: 14px;
    border-radius: 20px;
  }

  .promotion-card {
    max-height: none;
    width: calc(100vw - max(16px, var(--safe-left) + var(--safe-right)));
  }

  body.game-fit-active .shell,
  html.game-fit-active .shell {
    padding-top: max(6px, var(--safe-top));
    padding-bottom: max(6px, var(--safe-bottom));
  }

  body.game-fit-active #appPanel,
  html.game-fit-active #appPanel {
    height: 100%;
    gap: 8px;
  }

  .auth-panel {
    margin-top: 12px;
  }

  .compact-top {
    padding: 12px;
  }

  .top-bar {
    display: grid;
    grid-template-columns: minmax(112px, 0.82fr) minmax(0, 1.18fr);
    gap: 10px;
    align-items: stretch;
  }

  .compact-brand h2 {
    font-size: 20px;
  }

  .top-bar-right,
  .compact-wallet {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
  }

  .balance-pill,
  .user-chip {
    min-width: 0;
    width: auto;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .balance-pill strong {
    font-size: 18px;
  }

  .user-chip {
    grid-column: 1 / -1;
  }

  .stage-stats {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
  }

  .game-guide-strip {
    min-height: 0;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
  }

  body.game-fit-active .stage-stats,
  html.game-fit-active .stage-stats {
    gap: 6px;
  }

  .stage-status-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .metric-inline {
    padding: 10px 12px;
  }

  body.game-fit-active .metric-inline,
  html.game-fit-active .metric-inline {
    padding: 8px 10px;
  }

  .metric-main strong {
    font-size: 30px;
  }

  .metric-inline strong {
    font-size: 18px;
  }

  body:not(.game-fit-active) .scene-stage,
  html:not(.game-fit-active) .scene-stage {
    height: 228px;
  }

  .scene-launchpad {
    bottom: 36px;
    width: 112px;
    height: 44px;
  }

  .scene-ground {
    height: 68px;
  }

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

  .scene-orbit-line {
    inset: 66px 18px auto 18px;
  }

  .scene-stratosphere {
    inset: 104px 0 auto 0;
    height: 34px;
  }

  .scene-mountains {
    inset: auto 0 54px 0;
    height: 48px;
  }

  .flight-pack {
    bottom: 24px;
    width: 96px;
    height: 160px;
  }

  .rocket-sprite {
    width: 64px;
  }

  .promotion-share-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .promotion-qr-box {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1;
    padding: 12px;
  }

  .promotion-qr-box img {
    max-width: min(220px, 72vw);
  }

  .promotion-copy-box {
    padding: 14px;
  }

  .promotion-card .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .twin-actions {
    gap: 10px;
  }

  body.game-fit-active .twin-actions,
  html.game-fit-active .twin-actions {
    gap: 8px;
  }

  .btn,
  .btn-xl {
    width: 100%;
  }

  .game-side-info {
    display: none;
  }

  .me-layout {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: max(6px, var(--safe-bottom));
    padding: 10px;
    background: rgba(5, 16, 27, 0.96);
    backdrop-filter: blur(14px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  body.game-fit-active .bottom-nav,
  html.game-fit-active .bottom-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 8px;
  }

  .view-btn {
    min-height: 48px;
    padding: 10px 4px;
    font-size: 13px;
  }

  .bet-picker-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cashier-summary-grid {
    grid-template-columns: 1fr;
  }

  .cashier-mini-summary {
    grid-template-columns: 1fr;
  }

  .cashier-actions {
    grid-template-columns: 1fr;
  }

  .cashier-qr-image {
    max-width: 220px;
  }

  .cashier-hero-card {
    padding: 16px;
  }
}

@media (max-height: 760px) {
  body.game-fit-active .game-panel,
  html.game-fit-active .game-panel {
    padding: 12px;
    gap: 8px;
  }

  body.game-fit-active .metric-main strong,
  html.game-fit-active .metric-main strong {
    font-size: 28px;
  }

  body.game-fit-active .metric-inline strong,
  html.game-fit-active .metric-inline strong {
    font-size: 17px;
  }

  body.game-fit-active .btn-xl,
  html.game-fit-active .btn-xl {
    min-height: 46px;
    padding: 11px 14px;
  }
}

.boot-panel {
  display: none;
  width: min(820px, 100%);
  margin: 0 auto;
  gap: 14px;
}

body.app-booting #appBootSkeleton,
html.app-booting #appBootSkeleton {
  display: grid;
}

body.app-booting #authPanel,
body.app-booting #appPanel,
html.app-booting #authPanel,
html.app-booting #appPanel {
  display: none !important;
}

.boot-block {
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 190, 77, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: bootShimmer 1.2s linear infinite;
}

.boot-title {
  height: 56px;
}

.boot-marquee {
  height: 72px;
}

.boot-stage {
  height: min(52vh, 420px);
}

.boot-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.boot-button {
  height: 58px;
}

@keyframes bootShimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -20% 0;
  }
}

.withdraw-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.withdraw-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.withdraw-fee-hint {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.withdraw-tip-box {
  display: grid;
  gap: 8px;
}

.withdraw-tip-box ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.compact-preview {
  display: grid;
  gap: 10px;
}

.compact-preview img,
.admin-inline-qr {
  width: min(180px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff;
  padding: 8px;
}

.saved-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.withdraw-account-cell {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.withdraw-account-cell .qr-preview summary {
  cursor: pointer;
  color: #ffc556;
}

.cashier-save-row {
  display: flex;
  justify-content: center;
}

@media (max-width: 720px) {
  .identity-mode-row,
  .identity-code-row,
  .identity-code-helper,
  .bet-selected-hint {
    grid-template-columns: 1fr;
  }

  .bet-selected-hint {
    display: grid;
  }

  .withdraw-amount-row {
    grid-template-columns: 1fr;
  }

  .wallet-action-card {
    grid-template-columns: 1fr;
  }

  .wallet-action-card .btn {
    width: 100%;
  }

  .account-save-preview .save-line {
    display: grid;
  }

  .withdraw-form-grid {
    grid-template-columns: 1fr;
  }

  .withdraw-fee-hint {
    padding: 12px 14px;
  }

  .boot-stage {
    height: min(40vh, 300px);
  }

  .boot-button-row {
    grid-template-columns: 1fr 1fr;
  }
}
