:root {
  --bg: #060a14;
  --panel: rgba(10, 18, 34, 0.72);
  --line: #3bd4ff;
  --green: #31e49d;
  --amber: #ffc95a;
  --red: #ff5f6d;
  --text: #eef6ff;
  --muted: #93a7c5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 0%, rgba(44, 106, 201, 0.2), transparent 38%),
    radial-gradient(circle at 85% 0%, rgba(65, 232, 210, 0.17), transparent 36%),
    linear-gradient(160deg, #05070d 0%, #071020 58%, #05070f 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body.login-open .login-portal {
  display: grid;
}

.withdraw-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(3, 8, 16, 0.55);
}

body.withdraw-modal-open .withdraw-modal {
  display: grid;
}

.cashout-popup {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 62;
  pointer-events: none;
  opacity: 0;
}

.cashout-popup-card {
  min-width: 220px;
  max-width: 92vw;
  text-align: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(128, 252, 183, 0.55);
  background: linear-gradient(160deg, rgba(16, 43, 28, 0.92), rgba(11, 31, 24, 0.95));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.referral-claim-modal {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(3, 8, 16, 0.58);
}

body.referral-claim-open .referral-claim-modal {
  display: grid;
}

.referral-claim-card {
  width: min(100%, 420px);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border-color: rgba(92, 201, 255, 0.34);
}

.referral-claim-card h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.02rem;
}

.referral-claim-stats {
  margin: 2px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
  color: #d6e7ff;
  font-size: 0.84rem;
}

.referral-claim-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.crash-history-modal {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(3, 8, 16, 0.62);
}

body.crash-history-open .crash-history-modal {
  display: grid;
}

.crash-history-card {
  width: min(100%, 540px);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border-color: rgba(92, 201, 255, 0.34);
}

.crash-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crash-history-head h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
}

.crash-history-list {
  max-height: min(56vh, 460px);
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.crash-history-item {
  border-radius: 10px;
  border: 1px solid rgba(82, 130, 191, 0.4);
  background: linear-gradient(180deg, rgba(17, 28, 45, 0.95), rgba(13, 22, 37, 0.95));
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crash-history-item strong {
  font-family: "Orbitron", sans-serif;
  font-size: 0.96rem;
}

.crash-history-item .slot {
  font-size: 0.74rem;
  color: #9eb4d3;
}

.crash-history-item.low strong {
  color: #ff8f96;
}

.crash-history-item.mid strong {
  color: #9ad9ff;
}

.crash-history-item.high strong {
  color: #6ef3af;
}

.crash-history-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cashout-popup h3 {
  margin: 4px 0 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.2rem, 3.6vw, 1.8rem);
  color: #b6ffd0;
  text-shadow: 0 0 18px rgba(97, 255, 156, 0.45);
}

.cashout-popup-meta {
  margin: 3px 0 0;
  color: #d2ffe4;
  font-size: 0.8rem;
}

body.cashout-popup-open .cashout-popup {
  animation: cashoutPop 1.7s ease forwards;
}

@keyframes cashoutPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.9);
  }
  12% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.04);
  }
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px) scale(0.96);
  }
}

.withdraw-modal-card {
  width: min(100%, 360px);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.withdraw-modal-card h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.02rem;
}

.withdraw-modal-message {
  margin: 0;
  color: #d1e2fa;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-line;
}

.withdraw-modal-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.withdraw-modal-spinner {
  width: 30px;
  height: 30px;
  margin: 2px auto 4px;
  border-radius: 50%;
  border: 3px solid rgba(140, 193, 255, 0.24);
  border-top-color: #56bbff;
  animation: withdrawSpin 0.85s linear infinite;
}

#withdraw-modal-close {
  justify-self: center;
  min-width: 96px;
}

body.withdraw-modal-loading #withdraw-modal-close {
  display: none;
}

body.withdraw-modal-loading .withdraw-modal-actions {
  display: none;
}

body.withdraw-modal-confirm .withdraw-modal-spinner,
body.withdraw-modal-confirm #withdraw-modal-close {
  display: none;
}

body.withdraw-modal-confirm .withdraw-modal-actions {
  display: grid;
}

body.withdraw-modal-result .withdraw-modal-spinner {
  display: none;
}

body.withdraw-modal-result .withdraw-modal-actions {
  display: none;
}

@keyframes withdrawSpin {
  to {
    transform: rotate(360deg);
  }
}

#bg-vanta,
#bg-particles,
.bg-noise,
.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#bg-vanta {
  z-index: 0;
  opacity: 0.48;
}

#bg-particles {
  z-index: 1;
}

.bg-noise {
  z-index: 2;
  opacity: 0.16;
  background-image: url("assets/textures/cartographer.png");
  animation: noiseDrift 18s linear infinite;
}

.bg-vignette {
  z-index: 3;
  background: radial-gradient(circle at center, transparent 35%, rgba(0, 0, 0, 0.38) 100%);
}

.app-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
  position: relative;
  z-index: 4;
}

.login-portal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 10%, rgba(59, 212, 255, 0.2), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(49, 228, 157, 0.18), transparent 42%),
    rgba(3, 6, 14, 0.74);
  backdrop-filter: blur(6px);
}

.login-card {
  width: min(100%, 380px);
  padding: 18px;
  border-radius: 16px;
  display: grid;
  gap: 9px;
}

.login-card h2 {
  margin: 0;
}

.login-brand-lockup {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
}

.login-brand-logo {
  width: 34px;
  height: 34px;
  grid-row: 1 / span 2;
  border-radius: 11px;
  box-shadow: 0 0 16px rgba(67, 200, 255, 0.3);
}

.login-brand-word {
  grid-column: 2;
  grid-row: 1;
  font-family: "Orbitron", sans-serif;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.login-brand-tag {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8ca5c9;
}

.login-mode-title {
  margin: 4px 0 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  color: #e5f3ff;
  letter-spacing: 0.02em;
}

.login-copy {
  margin: 0 0 4px;
  color: #bfd1eb;
  font-size: 0.84rem;
}

.login-create-only {
  display: none;
}

.login-reset-only {
  display: none;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.password-field input {
  min-width: 0;
}

.password-toggle-btn {
  min-width: 72px;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.74rem;
}

#login-confirm-password-wrap {
  display: none;
}

body.auth-create-mode #login-confirm-password-wrap {
  display: grid;
}

body.auth-reset-mode #login-confirm-password-wrap {
  display: grid;
}

body.auth-create-mode .login-create-only {
  display: block;
}

body.auth-reset-mode .login-create-only {
  display: none;
}

body.auth-reset-mode .login-reset-only {
  display: block;
}

.auth-mode-toggle {
  margin-top: -2px;
}

.auth-forgot-toggle {
  margin-top: -6px;
}

body.auth-create-mode .auth-forgot-toggle,
body.auth-reset-mode .auth-forgot-toggle {
  display: none;
}

.mode-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(6, 12, 24, 0.76);
  border: 1px solid rgba(125, 163, 214, 0.26);
}

.mode-switch .btn {
  min-height: 40px;
  padding: 5px 10px;
  font-size: 0.72rem;
}

.mode-switch .btn.active {
  background: linear-gradient(135deg, rgba(49, 228, 157, 0.35), rgba(59, 212, 255, 0.35));
  border-color: rgba(152, 232, 255, 0.5);
  color: #dff9ff;
}

#open-login-btn {
  font-size: 0.74rem;
  min-height: 44px;
  padding: 6px 10px;
}

body.authenticated #open-login-btn {
  display: none;
}

.logout-btn {
  padding: 5px 9px;
  font-size: 0.72rem;
}

.quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(8, 14, 27, 0.78);
  border: 1px solid rgba(116, 157, 220, 0.32);
  backdrop-filter: blur(6px);
}

.quick-actions .btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 2px 1px;
  display: grid;
  grid-template-rows: 16px auto;
  align-items: center;
  justify-items: center;
  gap: 2px;
  justify-content: initial;
  border-radius: 10px;
  position: relative;
}

.quick-actions .quick-label {
  display: block;
  font-size: 0.56rem;
  line-height: 1;
  color: #d7e8ff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.accounts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 12px;
  font-size: 0.84rem;
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  font-size: 0.84rem;
}

.notifications-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 12px;
  font-size: 0.84rem;
}

.quick-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(176, 208, 246, 0.72);
  background: linear-gradient(180deg, rgba(121, 170, 235, 0.42), rgba(88, 124, 181, 0.38));
  position: relative;
}

.quick-icon-notice::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 7px;
  border: 1.5px solid rgba(229, 239, 255, 0.95);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom: 0;
}

.quick-icon-notice::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(229, 239, 255, 0.95);
}

.quick-icon-sound::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 4px;
  height: 6px;
  background: rgba(229, 239, 255, 0.95);
  clip-path: polygon(0 20%, 55% 20%, 100% 0, 100% 100%, 55% 80%, 0 80%);
}

.quick-icon-sound::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 4px;
  width: 5px;
  height: 6px;
  border-right: 1.5px solid rgba(229, 239, 255, 0.95);
  border-top: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  border-radius: 0 8px 8px 0;
}

.quick-icon-refresh::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(229, 239, 255, 0.95);
  border-right-color: transparent;
  border-radius: 999px;
}

.quick-icon-refresh::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 4px;
  width: 0;
  height: 0;
  border-left: 4px solid rgba(229, 239, 255, 0.95);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.notifications-unread {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #072114;
  background: #44f6a4;
}

.accounts-toggle-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(227, 240, 255, 0.98) 18%, transparent 19%),
    radial-gradient(circle at 50% 82%, rgba(227, 240, 255, 0.98) 29%, transparent 30%),
    rgba(95, 133, 182, 0.35);
  border: 1px solid rgba(174, 205, 244, 0.75);
}

.accounts-bonus-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #41f29d;
  box-shadow: 0 0 0 0 rgba(65, 242, 157, 0.7);
  animation: accountBonusPulse 1.5s ease-out infinite;
}

@keyframes accountBonusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(65, 242, 157, 0.68);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(65, 242, 157, 0);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(65, 242, 157, 0);
    transform: scale(1);
  }
}

body.accounts-open .accounts-toggle {
  background: rgba(36, 52, 79, 0.95);
  border-color: rgba(164, 199, 255, 0.55);
}

.accounts-panel {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 25;
  width: min(420px, 94vw);
  max-height: calc(100dvh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(8, 13, 24, 0.94), rgba(9, 15, 28, 0.94));
  border-color: rgba(96, 132, 185, 0.34);
  display: none;
  gap: 10px;
}

.notifications-panel {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px));
  right: calc(440px + env(safe-area-inset-right, 0px));
  z-index: 25;
  width: min(360px, 92vw);
  max-height: calc(100dvh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(8, 13, 24, 0.94), rgba(9, 15, 28, 0.94));
  border-color: rgba(96, 132, 185, 0.34);
  display: none;
}

body.notifications-open .notifications-panel {
  display: block;
}

body.accounts-open .accounts-panel {
  display: grid;
  align-content: start;
}

.accounts-overlay {
  position: fixed;
  inset: 0;
  z-index: 23;
  border: 0;
  background: rgba(3, 8, 16, 0.42);
  display: none;
}

body.accounts-open #accounts-overlay {
  display: block;
}

body.notifications-open #notifications-overlay {
  display: block;
}

.accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 0;
}

.notif-refresh-btn.is-loading {
  opacity: 0.84;
  pointer-events: none;
}

.notif-refresh-btn.is-loading .quick-icon-refresh {
  animation: spinRefresh 0.7s linear infinite;
}

.notif-refresh-btn.is-success {
  border-color: rgba(99, 247, 184, 0.68);
  box-shadow: 0 0 0 1px rgba(56, 219, 151, 0.22) inset;
}

.notifications-actions {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
}

.notif-mark-all-btn {
  min-height: 32px;
  font-size: 0.72rem;
  padding: 4px 8px;
}

.notification-item-text {
  margin: 0;
}

.notification-item-action {
  margin-top: 6px;
  min-height: 28px;
  font-size: 0.68rem;
  padding: 4px 8px;
}

@keyframes spinRefresh {
  to {
    transform: rotate(360deg);
  }
}

.accounts-head .label {
  margin: 0;
}

.accounts-card {
  border-radius: 12px;
  padding: 10px;
  background: rgba(10, 18, 33, 0.72);
  border: 1px solid rgba(112, 149, 205, 0.24);
  display: grid;
  gap: 7px;
}

.account-stat {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #d7e7ff;
}

.account-note {
  margin: 0;
  color: #97acd0;
  font-size: 0.78rem;
}

.account-withdraw-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.accounts-panel input {
  min-height: 44px;
  font-size: 0.92rem;
  padding: 9px 10px;
}

.account-withdraw-row .btn {
  min-width: 0;
  min-height: 44px;
  font-size: 0.86rem;
}

.accounts-activity-label {
  margin-top: 0;
  margin-bottom: 2px;
}

.accounts-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}

.accounts-filters .btn {
  padding: 5px 6px;
  font-size: 0.76rem;
}

.accounts-filters .btn.active {
  background: rgba(47, 181, 0, 0.32);
  border-color: rgba(146, 255, 125, 0.58);
  color: #d7ffcf;
  box-shadow: 0 0 14px rgba(102, 233, 72, 0.2) inset;
}

.account-activity {
  max-height: 152px;
  overflow: auto;
  border-radius: 10px;
  padding: 6px;
  background: rgba(6, 13, 25, 0.85);
  border: 1px solid rgba(145, 183, 255, 0.2);
  font-size: 0.8rem;
  line-height: 1.35;
}

.activity-item {
  margin: 0;
  padding: 4px 0;
  border-bottom: 1px solid rgba(132, 164, 208, 0.12);
  color: #bfd2ee;
}

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

.activity-deposit {
  color: #9dffcf;
}

.activity-withdraw {
  color: #ffd0b3;
}

.growth-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: grid;
  gap: 7px;
}

.growth-inline {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
}

.growth-inline-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.growth-inline-form {
  grid-template-columns: 1fr auto;
}

.growth-inline .btn {
  min-width: 0;
}

.growth-missions {
  margin: 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 4px;
  color: #c6d8f3;
  font-size: 0.8rem;
  line-height: 1.35;
}

.growth-board {
  max-height: 150px;
  overflow: auto;
  border-radius: 10px;
  padding: 6px;
  background: rgba(6, 13, 25, 0.85);
  border: 1px solid rgba(145, 183, 255, 0.2);
}

.growth-board-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(12, 20, 35, 0.65);
}

.growth-board-row + .growth-board-row {
  margin-top: 4px;
}

.growth-board-row.me {
  border-color: rgba(93, 247, 170, 0.38);
  background: rgba(18, 43, 30, 0.55);
}

.growth-board-rank {
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  color: #a2badf;
}

.growth-board-user {
  font-size: 0.72rem;
  color: #d5e4fa;
}

.growth-board-points {
  font-size: 0.72rem;
  color: #9ff7c8;
}

@media (max-width: 980px) {
  .accounts-panel {
    top: calc(40px + env(safe-area-inset-top, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: none;
    overflow: auto;
    z-index: 45;
  }

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

  .growth-inline-buttons,
  .growth-inline-form {
    grid-template-columns: 1fr;
  }

  .accounts-overlay {
    display: none;
    z-index: 43;
  }
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(145, 183, 255, 0.18);
  backdrop-filter: blur(8px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.top-bar {
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  position: relative;
}

.top-bar > div:first-child {
  min-width: 0;
}

.meta {
  justify-self: end;
}

.quick-actions {
  justify-self: end;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

h1 img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(59, 212, 255, 0.5));
}

.brand-title {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  grid-row: 1 / span 2;
  grid-column: 1;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(67, 200, 255, 0.28);
}

.brand-word {
  grid-column: 2;
  grid-row: 1;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.03em;
  font-weight: 700;
  line-height: 1;
}

.brand-crash {
  color: #eaf4ff;
  text-shadow: 0 0 10px rgba(152, 204, 255, 0.32);
}

.brand-lift {
  background: linear-gradient(90deg, #2df3a8, #52d0ff 64%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(57, 211, 255, 0.3);
}

.brand-tag {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8ca5c9;
  opacity: 0.95;
}

.meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
}

.pill.waiting {
  background: rgba(255, 201, 90, 0.14);
  color: var(--amber);
}

.pill.running {
  background: rgba(49, 228, 157, 0.14);
  color: var(--green);
}

.pill.crashed {
  background: rgba(255, 95, 109, 0.16);
  color: var(--red);
}

.pill.timer {
  background: rgba(59, 212, 255, 0.14);
  color: #bcf2ff;
}

.meta-history-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.72rem;
}

.layout {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 12px;
  align-items: start;
}

.game-panel {
  border-radius: 18px;
  height: clamp(420px, 66dvh, 680px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 28px 50px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(191, 226, 255, 0.08) inset;
}

.game-panel::before,
.game-panel::after {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
  filter: blur(26px);
  opacity: 0.34;
}

.game-panel::before {
  background:
    radial-gradient(circle at 16% 22%, rgba(89, 172, 255, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(7, 22, 38, 0.62), rgba(3, 11, 22, 0.24));
  animation: panelDriftA 24s ease-in-out infinite alternate;
}

.game-panel::after {
  background:
    linear-gradient(0deg, rgba(0, 179, 255, 0.06), transparent 60%),
    repeating-linear-gradient(
      90deg,
      rgba(92, 154, 224, 0.07) 0,
      rgba(92, 154, 224, 0.07) 1px,
      transparent 1px,
      transparent 24px
    );
  animation: panelDriftB 28s ease-in-out infinite alternate;
}

#flight-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.panel-anim {
  position: absolute;
  inset: -28%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 22% 26%, rgba(59, 212, 255, 0.22), transparent 33%),
    radial-gradient(circle at 78% 74%, rgba(51, 228, 172, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(23, 68, 112, 0.12), rgba(9, 27, 52, 0.06));
  animation: panelAnimOrbit 18s linear infinite, panelAnimPulse 5.2s ease-in-out infinite;
}

.game-panel .scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 45%,
    transparent 100%
  );
  mix-blend-mode: soft-light;
  animation: scanlineSweep 6.5s linear infinite;
}

.panel-anim::before,
.panel-anim::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel-anim::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(100, 176, 244, 0.14) 0,
      rgba(100, 176, 244, 0.14) 1px,
      transparent 1px,
      transparent 22px
    );
  opacity: 0.28;
  animation: radarRings 9s linear infinite;
}

.panel-anim::after {
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(175, 220, 255, 0.15) 45%,
    rgba(72, 179, 255, 0.24) 50%,
    transparent 56%
  );
  transform: translateX(-120%);
  opacity: 0.34;
  animation: lightSweep 6.4s ease-in-out infinite;
}

.multiplier {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  font-weight: 700;
  text-shadow: 0 10px 28px rgba(59, 212, 255, 0.35);
  z-index: 3;
  transition: color 160ms ease, text-shadow 220ms ease, transform 220ms ease;
}

.center-wait {
  position: absolute;
  left: 50%;
  top: calc(45% - 56px);
  transform: translateX(-50%);
  font-size: 0.84rem;
  font-weight: 700;
  color: #bfeeff;
  background: rgba(59, 212, 255, 0.12);
  border: 1px solid rgba(59, 212, 255, 0.28);
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 3;
}

.risk-pause-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 178, 0.56);
  background: rgba(125, 27, 27, 0.78);
  color: #ffe8e8;
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.account-restriction-banner {
  position: absolute;
  top: 48px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 198, 124, 0.46);
  background: linear-gradient(120deg, rgba(88, 46, 18, 0.9), rgba(51, 27, 11, 0.9));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.account-restriction-copy .label {
  margin: 0;
  color: #ffd9aa;
  letter-spacing: 0.02em;
}

.account-restriction-copy .tiny {
  margin: 3px 0 0;
  color: #ffe7c8;
  font-size: 0.74rem;
}

.account-restriction-banner .btn {
  min-width: 108px;
  min-height: 31px;
  padding: 6px 10px;
  border-color: rgba(255, 220, 174, 0.44);
  background: rgba(21, 12, 6, 0.82);
  color: #fff2dc;
}

.account-restriction-banner[hidden] {
  display: none !important;
}

.message {
  position: absolute;
  left: 50%;
  top: calc(45% + 58px);
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.88rem;
  color: #d2e3fb;
  z-index: 3;
}

.strategy-strip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: min(280px, calc(100% - 24px));
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(114, 165, 230, 0.36);
  background: linear-gradient(135deg, rgba(6, 18, 33, 0.84), rgba(10, 29, 53, 0.72));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.strategy-kicker {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8ab4dd;
}

.strategy-line {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #dcecff;
}

.strategy-line strong {
  color: #6fe4ff;
  text-shadow: 0 0 10px rgba(70, 204, 255, 0.3);
}

.strategy-adjustment {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #a9c5e8;
}

.risk-pause-banner:not([hidden]) ~ .strategy-strip {
  top: 48px;
}

.account-restriction-banner:not([hidden]) ~ .strategy-strip {
  top: 106px;
}

.history-row {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  z-index: 3;
}

@keyframes panelDriftA {
  0% {
    transform: translate(-3%, -2%) scale(1);
  }
  100% {
    transform: translate(4%, 3%) scale(1.08);
  }
}

@keyframes panelDriftB {
  0% {
    transform: translate(2%, -3%) scale(1.02);
  }
  100% {
    transform: translate(-4%, 4%) scale(1.1);
  }
}

@keyframes panelAnimOrbit {
  0% {
    transform: translate(-6%, -5%) rotate(0deg) scale(1);
    filter: hue-rotate(0deg) saturate(115%);
  }
  50% {
    transform: translate(5%, 5%) rotate(180deg) scale(1.16);
    filter: hue-rotate(85deg) saturate(150%);
  }
  100% {
    transform: translate(-6%, -5%) rotate(360deg) scale(1);
    filter: hue-rotate(0deg) saturate(115%);
  }
}

@keyframes panelAnimPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.82;
  }
}

@keyframes radarRings {
  0% {
    transform: scale(0.88);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.14);
    opacity: 0.08;
  }
}

@keyframes lightSweep {
  0% {
    transform: translateX(-120%) skewX(-8deg);
    opacity: 0;
  }
  18% {
    opacity: 0.5;
  }
  50% {
    transform: translateX(25%) skewX(-8deg);
    opacity: 0.7;
  }
  100% {
    transform: translateX(150%) skewX(-8deg);
    opacity: 0;
  }
}

@keyframes scanlineSweep {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  18% {
    opacity: 0.65;
  }
  55% {
    transform: translateY(35%);
    opacity: 0.35;
  }
  100% {
    transform: translateY(120%);
    opacity: 0;
  }
}

.side-panel {
  display: grid;
  gap: 8px;
  align-content: start;
}

.card {
  border-radius: 14px;
  padding: 9px 10px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(13, 24, 43, 0.9), rgba(9, 17, 32, 0.84));
  border-color: rgba(145, 183, 255, 0.22);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(59, 212, 255, 0.9), rgba(49, 228, 157, 0.7));
  opacity: 0.65;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 229, 255, 0.45);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  background: linear-gradient(160deg, rgba(14, 28, 50, 0.95), rgba(9, 17, 31, 0.9));
}

.label {
  margin: 0 0 7px;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-label img {
  width: 14px;
  height: 14px;
  opacity: 0.9;
  filter: drop-shadow(0 0 5px rgba(59, 212, 255, 0.35));
}

.balance {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.28rem;
}

.row {
  display: grid;
  gap: 5px;
}

.row input[type="number"] {
  width: 100%;
}

.bet-card .row:first-of-type {
  grid-template-columns: 1fr auto auto;
}

.bet-card .amount-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.bet-card .amount-row .quick-amounts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.bet-card .amount-row .quick-amounts > .btn {
  min-width: 0;
  width: 100%;
}

.auto-row {
  margin-top: 4px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggles-row {
  margin-top: 4px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.toggles-row label,
.auto-row label {
  font-size: 0.75rem;
  color: #c7dcfa;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.actions {
  margin-top: 6px;
  grid-template-columns: 1fr;
}

input,
button {
  border-radius: 10px;
  border: 1px solid rgba(145, 183, 255, 0.28);
  font: inherit;
}

input {
  background: rgba(15, 28, 48, 0.8);
  color: var(--text);
  padding: 7px 8px;
}

input[type="checkbox"] {
  accent-color: #3bd4ff;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(125, 210, 255, 0.9);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(60, 164, 255, 0.25);
}

.btn {
  padding: 7px 8px;
  min-height: 44px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(15, 28, 48, 0.8);
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.22s ease, box-shadow 0.2s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--green);
  color: #062417;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(49, 228, 157, 0.25);
}

.btn.accent {
  background: var(--line);
  color: #051523;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(59, 212, 255, 0.24);
}

.btn.ghost {
  background: rgba(23, 35, 55, 0.95);
}

.meta .meta-history-btn.btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.72rem;
}

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

.verify {
  margin-top: 6px;
}

.house-edge {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.house-edge input {
  width: 88px;
}

.substatus {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 16px;
}

.tiny {
  margin: 3px 0;
  font-size: 0.82rem;
  color: #d1e4ff;
  overflow-wrap: anywhere;
  word-break: normal;
}

.feed {
  margin-top: 6px;
  height: 90px;
  overflow: auto;
  border-radius: 10px;
  padding: 6px;
  background: rgba(6, 13, 25, 0.85);
  border: 1px solid rgba(145, 183, 255, 0.2);
  font-size: 0.72rem;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 16px 16px;
}

.feed-item {
  margin: 0;
  padding: 3px 0;
}

.good {
  color: var(--green);
}

.bad {
  color: var(--red);
}

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

.crash-strip {
  margin-top: 6px;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid rgba(90, 138, 204, 0.34);
}

.crash-strip-head {
  display: none;
}

.crash-strip-head .label {
  margin: 0;
}

.crash-strip .chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.crash-strip .chip {
  flex: 0 0 auto;
}

.chip {
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(17, 28, 49, 0.95);
}

.chip.low { color: var(--red); }
.chip.mid { color: var(--amber); }
.chip.high { color: var(--green); }

.chip-new {
  animation: chipEnter 520ms cubic-bezier(0.22, 0.88, 0.28, 1) both;
}

@keyframes chipEnter {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
    filter: blur(1.8px);
  }
  55% {
    opacity: 1;
    transform: translateY(1px) scale(1.05);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #b6dcff;
}

@keyframes noiseDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-120px, -100px, 0);
  }
}

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

  .game-panel {
    height: clamp(360px, 58dvh, 520px);
  }
}

@media (min-width: 1180px) {
  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel > .card:nth-child(1),
  .side-panel > .card:nth-child(4) {
    grid-column: 1 / -1;
  }
}

/* Aviator-style layout theme */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body {
  background: #05070c;
}

#bg-vanta {
  opacity: 0.2;
}

#bg-particles {
  opacity: 0.4;
}

.ticker-strip {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 8;
  min-height: 27px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(2, 4, 10, 0.94);
  border-bottom: 1px solid rgba(79, 115, 173, 0.2);
  scrollbar-width: none;
}

@media (max-width: 980px) {
  .ticker-strip {
    padding-top: max(4px, env(safe-area-inset-top, 0px));
    min-height: 32px;
  }

  body.native-app .ticker-strip {
    top: 0;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    min-height: 37px;
  }

  body.native-app .ticker-track {
    font-size: 0.9rem;
    padding-left: 10px;
  }
}

.ticker-strip::-webkit-scrollbar {
  display: none;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  padding-left: 14px;
  font-size: 0.96rem;
  animation: none;
}

.tick-chip {
  font-family: "Orbitron", sans-serif;
}

.tick-low {
  color: #56bbff;
}

.tick-mid {
  color: #8f7fff;
}

.tick-high {
  color: #f65cff;
}

@keyframes tickerSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-45%);
  }
}

.app-shell {
  max-width: 1380px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 10px;
}

.top-bar {
  margin: 0 0 6px;
  padding: 8px 10px;
  height: auto;
  min-height: 0;
  border: 1px solid rgba(88, 124, 180, 0.34);
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
}

#round {
  display: none !important;
}

.eyebrow,
h1 {
  display: inline-flex;
}

.eyebrow {
  display: block;
}

.brand-title {
  display: inline-grid;
}

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

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-areas:
    "game wallet"
    "bets info";
  align-items: start;
  gap: 6px;
}

.wallet-panel {
  grid-area: wallet;
}

.info-grid {
  grid-area: info;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.info-card {
  border-radius: 14px;
  padding: 8px;
  border-color: rgba(96, 132, 185, 0.34);
  background: linear-gradient(160deg, rgba(8, 13, 24, 0.92), rgba(9, 15, 28, 0.92));
}

.players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.players-head .label {
  margin: 0;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9bffca;
  border: 1px solid rgba(101, 255, 170, 0.55);
  background: rgba(21, 84, 49, 0.32);
  box-shadow: 0 0 16px rgba(59, 227, 129, 0.22) inset;
}

.live-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3af08f;
  box-shadow: 0 0 0 rgba(58, 240, 143, 0.7);
  animation: livePulse 1.5s ease-out infinite;
}

.live-note {
  color: #95f4bf;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(58, 240, 143, 0.68);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(58, 240, 143, 0);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(58, 240, 143, 0);
    transform: scale(1);
  }
}

.hero-balance {
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  margin-bottom: 6px;
}

.wallet-balance-breakdown {
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(105, 156, 224, 0.28);
  background: rgba(9, 18, 33, 0.72);
}

.wallet-balance-breakdown .tiny {
  margin: 0;
}

.deposit-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 4px;
}

.deposit-row .btn {
  min-width: 104px;
}

.withdraw-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 6px;
}

.withdraw-row .btn {
  min-width: 150px;
}

.feedback-row {
  margin-top: 4px;
  grid-template-columns: 1fr;
}

.feedback-row select,
.feedback-row textarea,
.feedback-row input[type="file"] {
  border-radius: 10px;
  border: 1px solid rgba(145, 183, 255, 0.28);
  background: rgba(15, 28, 48, 0.8);
  color: var(--text);
  padding: 7px 8px;
  font: inherit;
}

.feedback-attach-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.feedback-screenshot-preview {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(129, 170, 235, 0.28);
  border-radius: 10px;
  padding: 7px;
  background: rgba(8, 18, 33, 0.62);
}

.feedback-screenshot-preview img,
.feedback-screenshot-preview video,
.feedback-attachment-preview-media {
  width: min(220px, 100%);
  border-radius: 8px;
  border: 1px solid rgba(122, 164, 231, 0.35);
  max-height: 180px;
  object-fit: cover;
}

.feedback-screenshot-meta {
  font-size: 0.72rem;
  color: #9eb4d3;
}

.feedback-row textarea {
  resize: vertical;
  min-height: 84px;
}

.support-card {
  border-color: rgba(106, 158, 232, 0.35);
}

.support-requests-head {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.support-requests-head .label {
  margin: 0;
}

.support-requests-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.support-requests-list {
  margin-top: 6px;
  max-height: 196px;
}

.support-request-attachment {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7fd4ff;
  font-size: 0.74rem;
  text-decoration: none;
}

.support-request-attachment:hover {
  text-decoration: underline;
}

.support-request-item {
  display: grid;
  gap: 3px;
}

.support-request-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.support-request-status {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-request-status.is-open {
  color: #ffd57a;
}

.support-request-status.is-resolved {
  color: #8df4ba;
}

.support-request-text {
  color: #d6e5fb;
  font-size: 0.8rem;
  line-height: 1.35;
}

.support-request-note {
  color: #9fd2ff;
  font-size: 0.76rem;
}

body.account-restricted .support-card {
  box-shadow: 0 0 0 1px rgba(255, 201, 120, 0.36) inset, 0 0 20px rgba(255, 169, 67, 0.2);
}

.game-panel {
  grid-area: game;
  height: clamp(340px, 56dvh, 460px);
  border-radius: 18px;
  border-color: rgba(84, 122, 177, 0.26);
  background: rgba(6, 10, 18, 0.9);
}

.panel-anim {
  opacity: 0.26;
  mix-blend-mode: soft-light;
}

.scanline {
  opacity: 0.45;
}

.multiplier {
  top: 48%;
  color: #f3f7ff;
  font-size: clamp(2.4rem, 7.8vw, 6rem);
  text-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.center-wait {
  top: calc(48% - 70px);
  background: rgba(13, 23, 38, 0.75);
  border-color: rgba(154, 193, 255, 0.3);
}

.message {
  top: calc(48% + 72px);
  color: #c8d6eb;
}

.history-row {
  display: none;
}

.viewer-pill {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  border: 1px solid rgba(114, 154, 209, 0.35);
  background: rgba(8, 13, 25, 0.85);
  color: #dbe9ff;
  font-size: 0.92rem;
}

.avatars {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
}

.avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(180, 219, 255, 0.7);
  margin-left: -4px;
}

.avatar:first-child {
  margin-left: 0;
}

.a1 {
  background: radial-gradient(circle at 30% 25%, #ffdb7d, #ba4f22);
}

.a2 {
  background: radial-gradient(circle at 30% 25%, #96f3ff, #2a5bb2);
}

.a3 {
  background: radial-gradient(circle at 30% 25%, #ffd8ee, #973194);
}

.bets-row {
  grid-area: bets;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.bet-card {
  border-radius: 16px;
  padding: 10px 10px 8px;
  min-height: 128px;
  background: linear-gradient(180deg, rgba(23, 27, 35, 0.96), rgba(16, 20, 28, 0.96));
  border-color: rgba(88, 107, 141, 0.36);
}

.bet-card .row:first-of-type {
  grid-template-columns: minmax(0, 1fr) repeat(5, auto);
}

.bet-card .label {
  font-size: 0.78rem;
  color: #9ab0d0;
}

.toggles-row {
  grid-template-columns: 1fr 1fr;
  background: rgba(7, 10, 18, 0.66);
  border: 1px solid rgba(72, 91, 126, 0.5);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}

.toggles-row label {
  justify-content: center;
  font-size: 0.76rem;
  color: #cad9ef;
  border-radius: 999px;
  background: rgba(29, 34, 46, 0.7);
  padding: 4px 6px;
}

.toggles-row input {
  margin: 0;
}

.auto-row label {
  color: #afc0db;
}

.row input[type="number"] {
  background: rgba(10, 15, 24, 0.88);
}

.btn.primary {
  background: #2fb500;
  color: #f6fff3;
  box-shadow: 0 0 0 1px rgba(172, 255, 147, 0.45) inset, 0 0 20px rgba(80, 236, 59, 0.25);
}

.btn.accent {
  background: #ec5f2a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 194, 177, 0.35) inset;
}

.substatus {
  color: #9cb0cf;
}

.mobile-balance-overlay,
.mobile-balance-toggle {
  display: none;
}

@media (max-width: 980px) {
  .arena {
    position: relative;
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 0;
  }

  .game-panel {
    grid-area: game;
    height: clamp(320px, 50dvh, 400px);
  }

  .account-restriction-banner {
    top: 44px;
    grid-template-columns: 1fr;
    gap: 7px;
    text-align: left;
  }

  .account-restriction-banner .btn {
    width: 100%;
  }

  .bets-row {
    grid-area: bets;
    grid-template-columns: 1fr 1fr;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .info-grid {
    grid-area: info;
    grid-template-columns: 1fr;
  }

  .notifications-panel {
    right: calc(10px + env(safe-area-inset-right, 0px));
    width: min(420px, 94vw);
  }

  .wallet-panel {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 34;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 0 6px;
    padding: 8px 10px;
    border-radius: 12px;
    border-color: rgba(109, 149, 209, 0.45);
    background: rgba(7, 14, 27, 0.94);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    min-height: 96px;
  }

  .mobile-balance-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(124, 198, 255, 0.36);
    background: rgba(8, 19, 33, 0.92);
    color: #d8ebff;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
  }

  .wallet-panel .label {
    margin: 0 0 2px;
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 0.66rem;
  }

  .wallet-panel .hero-balance {
    margin: 0;
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 1.02rem;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #d8e9ff;
    min-width: 0;
  }

  .wallet-panel .hero-balance::before {
    content: none;
  }

  .wallet-panel .mobile-balance-toggle {
    grid-column: 2;
    grid-row: 3;
  }

  .wallet-panel .mobile-withdraw-toggle {
    grid-column: 3;
    grid-row: 3;
  }

  .wallet-panel .row,
  .wallet-panel .substatus {
    display: none;
  }

  .mobile-balance-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 32;
    border: 0;
    background: rgba(4, 10, 18, 0.52);
  }

  body.mobile-balance-open .mobile-balance-overlay {
    display: block;
  }

  body.mobile-balance-open {
    overflow: hidden;
  }

  body.mobile-balance-open .wallet-panel {
    max-height: calc(72dvh - env(safe-area-inset-bottom, 0px));
    overflow: auto;
    grid-template-columns: 1fr 1fr;
    row-gap: 6px;
    z-index: 35;
  }

  body.mobile-balance-open .wallet-panel .label {
    margin: 0;
    grid-column: 1 / -1;
  }

  body.mobile-balance-open .wallet-panel .hero-balance {
    margin-bottom: 2px;
    font-size: 1.08rem;
    padding-right: 0;
    grid-column: 1 / -1;
  }

  body.mobile-balance-open .wallet-panel .mobile-balance-toggle {
    justify-self: stretch;
    grid-column: 1;
    grid-row: 3;
  }

  body.mobile-balance-open .wallet-panel .mobile-withdraw-toggle {
    justify-self: stretch;
    grid-column: 2;
    grid-row: 3;
  }

  body.mobile-balance-open .wallet-panel .row {
    display: grid;
    grid-column: 1 / -1;
  }

  body.mobile-balance-open .wallet-panel .substatus {
    display: block;
    grid-column: 1 / -1;
  }

  .bet-card .row:first-of-type {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .deposit-row .btn {
    min-width: 0;
  }

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

  .withdraw-row .btn {
    min-width: 0;
  }
}

@media (max-width: 390px) {
  .arena {
    grid-template-areas:
      "game"
      "bets"
      "info";
  }

  .bets-row {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    padding: 0;
    background: transparent;
    border-left: 0;
    box-shadow: none;
    transform: none;
    transition: none;
    z-index: auto;
    grid-template-columns: 1fr;
  }

  .game-panel {
    height: clamp(300px, 48dvh, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-noise,
  .panel-anim,
  .scanline,
  .live-badge .dot,
  .cashout-popup,
  .mobile-balance-toggle {
    animation: none !important;
    transition: none !important;
  }

  .card:hover,
  .btn:not(:disabled):hover {
    transform: none;
    filter: none;
  }
}

body.low-power-mode #bg-vanta,
body.low-power-mode #bg-particles,
body.low-power-mode .bg-noise,
body.low-power-mode .panel-anim,
body.low-power-mode .scanline {
  display: none !important;
}

body.lite-visual-mode #bg-vanta,
body.lite-visual-mode #bg-particles,
body.lite-visual-mode .bg-noise {
  display: none !important;
}

body.lite-visual-mode .panel-anim,
body.lite-visual-mode .scanline {
  opacity: 0.08;
}

body.lite-visual-mode .live-badge .dot,
body.lite-visual-mode .accounts-bonus-dot {
  animation: none !important;
}

body.low-power-mode .game-panel::before,
body.low-power-mode .game-panel::after {
  animation: none !important;
  opacity: 0.12;
}

body.low-power-mode .cashout-popup,
body.low-power-mode .live-badge .dot {
  animation: none !important;
}

body.low-power-mode .download-apk-link,
body.lite-visual-mode .download-apk-link {
  animation: none !important;
  box-shadow:
    0 6px 16px rgba(16, 162, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.native-app.low-power-mode .streak-premium::after,
body.native-app.lite-visual-mode .streak-premium::after {
  display: none;
}

body.native-app.low-power-mode .streak-progress-fill,
body.native-app.lite-visual-mode .streak-progress-fill {
  box-shadow: 0 0 8px rgba(78, 212, 246, 0.26);
}

body.safe-mode .glass {
  backdrop-filter: none !important;
}

body.safe-mode .top-bar,
body.safe-mode .game-panel,
body.safe-mode .bet-card,
body.safe-mode .wallet-panel,
body.safe-mode .info-card {
  box-shadow: 0 0 0 1px rgba(66, 118, 180, 0.22) inset !important;
}

@keyframes depositCtaPulse {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px);
    filter: brightness(1.08);
  }
}

/* Responsive layout stabilizer */
.top-bar > div:first-child {
  min-width: 0;
}

.quick-actions {
  position: static;
  z-index: 5;
  margin: 0;
}

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

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-areas: none;
  align-items: start;
  gap: 6px;
}

.arena-main,
.arena-side {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.arena-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.arena-main .game-panel,
.arena-main .bets-row,
.arena-side .wallet-panel,
.arena-side .info-grid {
  grid-area: auto;
}

.arena-side > .wallet-panel,
.arena-side > .info-grid {
  width: 100%;
  min-width: 0;
  position: relative;
}

.arena-side .info-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.arena-side .info-card {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell {
    max-width: 100%;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 10px;
  }

  .top-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "meta meta";
    row-gap: 6px;
    padding: 8px;
  }

  .top-bar > div:first-child {
    grid-area: brand;
  }

  .meta {
    grid-area: meta;
    justify-self: start;
    width: 100%;
    gap: 6px;
  }

  .pill {
    padding: 4px 7px;
    font-size: 0.66rem;
  }

  .quick-actions {
    grid-area: actions;
    justify-self: end;
    align-self: start;
    gap: 4px;
    padding: 3px 4px;
  }

  .accounts-toggle,
  .notifications-toggle,
  .music-toggle {
    width: 46px;
    min-width: 46px;
    height: 40px;
    min-height: 40px;
    padding: 3px 2px;
    border-radius: 10px;
    display: grid;
    grid-template-rows: 16px auto;
    align-items: center;
    justify-items: center;
    gap: 2px;
    font-size: 0.6rem;
  }

  .quick-actions .quick-label {
    display: block;
    font-size: 0.56rem;
    line-height: 1;
    color: #d7e8ff;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .music-toggle .quick-label {
    max-width: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout {
    display: block;
  }

  .arena {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 6px;
  }

  .arena-main {
    order: 1;
  }

  .arena-side {
    order: 2;
  }

  .game-panel {
    min-height: 250px;
    height: clamp(250px, 39dvh, 320px);
  }

  .strategy-strip {
    top: 8px;
    left: 8px;
    right: auto;
    bottom: auto;
    width: min(230px, calc(100% - 16px));
    padding: 7px 8px;
  }

  .strategy-kicker {
    font-size: 0.56rem;
  }

  .strategy-line {
    font-size: 0.74rem;
  }

  .strategy-adjustment {
    font-size: 0.64rem;
  }

  .risk-pause-banner:not([hidden]) ~ .strategy-strip,
  .account-restriction-banner:not([hidden]) ~ .strategy-strip {
    top: 48px;
    bottom: auto;
  }

  .bets-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: none;
    overflow: visible;
  }

  .bet-card {
    padding: 8px 8px 7px;
    min-height: 0;
  }

  .bet-card .label {
    margin-bottom: 5px;
    font-size: 0.7rem;
  }

  .bet-card .row:first-of-type {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .bet-card .row:first-of-type input[type="number"] {
    flex: 1 1 100%;
    min-width: 0;
    padding: 5px 6px;
    font-size: 0.82rem;
  }

  .bet-card .row:first-of-type .btn {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    min-height: 30px;
    padding: 4px;
    font-size: 0.72rem;
  }

  .toggles-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 2px;
  }

  .toggles-row label {
    font-size: 0.66rem;
    padding: 3px 5px;
  }

  .actions .btn {
    width: 100%;
    min-height: 34px;
    font-size: 0.78rem;
  }

  .auto-row label,
  .substatus {
    font-size: 0.68rem;
  }

  .wallet-panel {
    position: relative;
    top: auto;
    z-index: 20;
    width: 100%;
    margin: 0;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 8px;
  }

  .wallet-panel .label,
  .wallet-panel .hero-balance {
    grid-column: 1 / -1;
  }

  .wallet-panel .hero-balance {
    font-size: 1.02rem;
    min-width: 0;
  }

  .wallet-panel .row,
  .wallet-panel .substatus {
    display: none;
  }

  body.mobile-balance-open .wallet-panel .row {
    display: grid;
    grid-column: 1 / -1;
  }

  body.mobile-balance-open .wallet-panel .substatus {
    display: block;
    grid-column: 1 / -1;
  }

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

  .accounts-panel,
  .notifications-panel {
    top: calc(56px + env(safe-area-inset-top, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    width: auto;
    max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  .brand-tag {
    display: none;
  }

  .brand-word {
    font-size: 1.08rem;
  }

  .multiplier {
    font-size: clamp(2.1rem, 12vw, 3.4rem);
  }

  .strategy-strip {
    width: min(215px, calc(100% - 14px));
    top: 7px;
    left: 7px;
    right: auto;
    bottom: auto;
    padding: 6px 7px;
  }

  .top-bar {
    padding: 7px;
  }

  .accounts-toggle,
  .notifications-toggle,
  .music-toggle {
    width: 41px;
    min-width: 41px;
    height: 37px;
    min-height: 37px;
    padding: 2px;
  }

  .quick-actions .quick-label {
    font-size: 0.5rem;
  }

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

  .bets-row {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .bet-card {
    padding: 7px 7px 6px;
  }

  .bet-card .row:first-of-type .btn {
    min-height: 28px;
    font-size: 0.68rem;
  }
}

/* Mobile polish for restricted-account banner and support card */
@media (max-width: 980px) {
  .account-restriction-banner {
    top: 42px;
    padding: 7px 8px;
    border-radius: 10px;
    gap: 6px;
  }

  .account-restriction-copy .label {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .account-restriction-copy .tiny {
    font-size: 0.66rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .account-restriction-banner .btn {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  body.account-banned .center-wait {
    top: calc(45% - 44px);
  }

  .support-card {
    padding: 8px 9px;
    border-radius: 11px;
  }

  .support-card > .label {
    font-size: 0.7rem;
  }

  .feedback-row {
    margin-top: 3px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
  }

  .feedback-row select,
  .feedback-row input,
  .feedback-row textarea {
    font-size: 0.78rem;
    padding: 6px 8px;
  }

  .feedback-row textarea,
  .feedback-row .btn {
    grid-column: 1 / -1;
  }

  .feedback-row textarea {
    min-height: 70px;
  }

  .feedback-row .btn {
    min-height: 34px;
    font-size: 0.74rem;
  }

  .support-requests-head {
    margin-top: 6px;
    gap: 6px;
  }

  .support-requests-actions {
    gap: 4px;
  }

  .support-requests-head .btn {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .support-requests-list {
    margin-top: 4px;
    max-height: 150px;
    padding: 5px;
  }

  .support-request-text {
    font-size: 0.76rem;
  }

  .support-request-note {
    font-size: 0.72rem;
  }
}

@media (max-width: 560px) {
  .feedback-row {
    grid-template-columns: 1fr;
  }

  .account-restriction-banner {
    top: 40px;
    padding: 6px 7px;
  }

  .account-restriction-copy .tiny {
    -webkit-line-clamp: 1;
  }
}

/* Final brand lockup styling (compact badge + wordmark) */
.login-brand-lockup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 2px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 28% 20%, rgba(101, 248, 214, 0.34), transparent 60%),
    linear-gradient(150deg, rgba(20, 43, 69, 0.94), rgba(9, 21, 40, 0.96));
  border: 1px solid rgba(105, 160, 233, 0.38);
  box-shadow:
    0 0 0 1px rgba(218, 242, 255, 0.07) inset,
    0 0 14px rgba(65, 185, 255, 0.24);
}

.brand-badge-icon {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(80, 220, 255, 0.36));
}

.login-brand-badge {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.brand-wordmark {
  grid-column: 2;
  grid-row: 1;
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.login-brand-wordmark {
  font-size: 1.08rem;
}

.brand-wordmark-crash {
  color: #eaf4ff;
  text-shadow: 0 0 10px rgba(152, 204, 255, 0.32);
}

.brand-wordmark-lift {
  background: linear-gradient(90deg, #2df3a8, #52d0ff 64%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(57, 211, 255, 0.3);
}

.login-brand-tag {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #8ca5c9;
}

.top-bar .brand-title {
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
}

.top-bar .brand-title .brand-badge {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.top-bar .brand-title .brand-badge-icon {
  width: 20px;
  height: 20px;
}

.top-bar .brand-title .brand-wordmark {
  font-size: 1rem;
}

.brand-tagline {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8ca5c9;
  opacity: 0.95;
}

@media (max-width: 980px) {
  .brand-wordmark {
    font-size: 1.08rem;
  }

  .login-brand-wordmark {
    font-size: 1rem;
  }

  .top-bar .brand-title .brand-badge {
    width: 28px;
    height: 28px;
  }

  .top-bar .brand-title .brand-badge-icon {
    width: 18px;
    height: 18px;
  }

  .top-bar .brand-title .brand-wordmark {
    font-size: 0.95rem;
  }

  .brand-tagline {
    font-size: 0.49rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 520px) {
  .brand-tagline {
    display: none;
  }

  .brand-badge {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

.brand-badge-icon {
  width: 21px;
  height: 21px;
}
}

/* Strategy dashboard polish + install CTA */
.install-app-cta {
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(104, 171, 236, 0.36);
  background:
    radial-gradient(circle at 18% 18%, rgba(81, 183, 255, 0.14), transparent 55%),
    radial-gradient(circle at 82% 84%, rgba(53, 238, 177, 0.1), transparent 52%),
    linear-gradient(160deg, rgba(9, 20, 34, 0.9), rgba(8, 16, 28, 0.92));
  box-shadow: inset 0 0 0 1px rgba(122, 185, 245, 0.12);
}

.install-app-copy {
  margin: 0 0 8px;
  color: #d4e8ff;
  line-height: 1.35;
}

#install-app-btn {
  width: 100%;
  min-height: 40px;
}

.download-apk-link,
.download-apk-link.btn,
.download-apk-link.btn.ghost {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 7px;
  border-radius: 12px;
  border: 1px solid rgba(117, 228, 255, 0.72);
  background: linear-gradient(96deg, #1562ff 0%, #00a6ff 54%, #00d6cc 100%);
  color: #f5fbff;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 1px rgba(6, 20, 42, 0.55);
  box-shadow:
    0 9px 26px rgba(16, 141, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  overflow: hidden;
}

.download-apk-link::before {
  content: "\2193";
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.download-apk-link::after {
  content: "Recommended";
  position: absolute;
  top: 5px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 233, 127, 0.95);
  color: #453200;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.download-apk-link:hover {
  transform: translateY(-1px);
  box-shadow:
    0 13px 32px rgba(16, 141, 255, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  filter: saturate(1.12) brightness(1.02);
}

.download-apk-link:active {
  transform: translateY(0);
}

.download-apk-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(5, 22, 38, 0.8),
    0 0 0 4px rgba(67, 223, 188, 0.58),
    0 12px 28px rgba(16, 162, 227, 0.28);
}

@media (prefers-reduced-motion: no-preference) {
  .download-apk-link {
    animation: apkPulse 2.3s ease-in-out infinite;
  }
}

@keyframes apkPulse {
  0%, 100% {
    box-shadow:
      0 9px 24px rgba(16, 141, 255, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }
  50% {
    box-shadow:
      0 13px 34px rgba(16, 141, 255, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.42);
  }
}

.game-panel::after {
  background:
    radial-gradient(circle at 18% 28%, rgba(93, 167, 245, 0.12), transparent 46%),
    radial-gradient(circle at 76% 72%, rgba(70, 214, 190, 0.1), transparent 42%),
    linear-gradient(130deg, rgba(6, 18, 31, 0.62), rgba(3, 10, 20, 0.38));
}

.message {
  font-size: 0.84rem;
  color: #d6e3f8;
}

@media (max-width: 980px) {
  .game-panel {
    height: clamp(240px, 34dvh, 300px);
  }

  .center-wait {
    top: calc(48% - 54px);
    font-size: 0.74rem;
    padding: 5px 8px;
  }

  .message {
    top: calc(48% + 58px);
    font-size: 0.72rem;
  }

  .install-app-cta {
    padding: 7px;
  }

  .download-apk-link {
    min-height: 38px;
    font-size: 0.78rem;
    border-radius: 10px;
  }

  .download-apk-link::after {
    top: 4px;
    right: 6px;
    font-size: 0.5rem;
    padding: 2px 5px;
  }
}

/* Native app update prompt + final layout guardrails */
.app-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 28%, rgba(24, 60, 112, 0.38), rgba(3, 7, 14, 0.96));
}

.app-boot-card {
  width: min(100%, 340px);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.app-boot-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.app-boot-loader {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(110, 164, 243, 0.2);
  overflow: hidden;
}

.app-boot-loader > span {
  display: block;
  height: 100%;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fd0ff, #75ff8f);
  animation: bootLoad 1.15s ease-in-out infinite;
}

@keyframes bootLoad {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

body:not(.boot-open) .app-boot-splash {
  display: none;
}

.offline-banner {
  position: fixed;
  left: 50%;
  top: calc(8px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 66;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: #ffe1c2;
  border: 1px solid rgba(255, 162, 76, 0.42);
  background: rgba(54, 24, 6, 0.9);
}

.web-update-banner {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1250;
  width: min(92vw, 560px);
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(86, 147, 227, 0.6);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 31, 56, 0.98), rgba(8, 21, 40, 0.98));
  box-shadow: 0 16px 30px rgba(5, 14, 28, 0.55);
}

.web-update-banner p {
  margin: 0;
  color: #e7f2ff;
  font-size: 0.92rem;
}

.web-update-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.app-update-modal {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(3, 8, 16, 0.58);
}

body.app-update-open .app-update-modal {
  display: grid;
}

body.force-update-required .app-update-modal {
  background: rgba(3, 8, 16, 0.78);
}

.app-update-card {
  width: min(100%, 420px);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border-color: rgba(106, 176, 244, 0.44);
}

.app-update-card h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.02rem;
}

.app-update-actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.native-app .install-app-cta {
  display: none !important;
}

body.native-app .download-apk-link {
  display: none !important;
}

@media (min-width: 981px) and (max-width: 1320px) {
  .top-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "meta meta";
    row-gap: 6px;
  }

  .top-bar > div:first-child {
    grid-area: brand;
  }

  .quick-actions {
    grid-area: actions;
    align-self: start;
    justify-self: end;
  }

  .meta {
    grid-area: meta;
    justify-self: start;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .top-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "meta meta";
    row-gap: 6px;
  }

  .top-bar > div:first-child {
    grid-area: brand;
  }

  .quick-actions {
    grid-area: actions;
    align-self: start;
    justify-self: end;
  }

  .meta {
    grid-area: meta;
    width: 100%;
    justify-self: start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .meta::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-update-actions {
    grid-template-columns: 1fr;
  }

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

/* Header overlap guard: keep quick tabs in a dedicated header slot on all desktop/tablet widths */
.top-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "meta actions";
  align-items: start;
  row-gap: 8px;
}

.top-bar > div:first-child {
  grid-area: brand;
  min-width: 0;
}

.meta {
  grid-area: meta;
  min-width: 0;
  width: 100%;
  justify-self: start;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-actions {
  grid-area: actions;
  justify-self: end;
  align-self: start;
  position: static;
  margin: 0;
  z-index: 5;
  flex-shrink: 0;
}

/* Top action tabs: account / notifications / sound */
.top-bar .quick-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #142e50, #0d223d);
  border: 1px solid rgba(123, 175, 243, 0.34);
  box-shadow:
    0 8px 18px rgba(2, 7, 16, 0.32),
    0 1px 0 rgba(203, 226, 255, 0.08) inset;
}

.top-bar .quick-actions .btn {
  width: 72px;
  min-width: 72px;
  height: 48px;
  min-height: 48px;
  border: 0;
  border-right: 1px solid rgba(138, 186, 248, 0.2);
  border-radius: 0;
  background: transparent;
  color: #d8e8ff;
  display: grid;
  grid-template-rows: 16px auto;
  align-items: center;
  justify-items: center;
  gap: 4px;
  padding: 4px 8px 6px;
}

.top-bar .quick-actions .btn:last-child {
  border-right: 0;
}

.top-bar .quick-actions .btn:hover {
  transform: none;
  filter: none;
  background: rgba(152, 195, 255, 0.12);
}

.top-bar .quick-actions .btn.is-muted {
  background: rgba(255, 113, 113, 0.08);
}

.top-bar .quick-actions .quick-label {
  font-size: 0.55rem;
  line-height: 1;
  color: #d6e7ff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.top-bar .quick-icon,
.top-bar .accounts-toggle-icon {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
}

.top-bar .accounts-toggle-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(228, 241, 255, 0.96);
}

.top-bar .accounts-toggle-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 11px;
  height: 6px;
  border: 1.5px solid rgba(228, 241, 255, 0.96);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.top-bar .quick-icon-notice::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 9px;
  height: 10px;
  border: 1.5px solid rgba(228, 241, 255, 0.96);
  border-radius: 3px;
}

.top-bar .quick-icon-notice::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid rgba(228, 241, 255, 0.96);
  border-right: 1.5px solid rgba(228, 241, 255, 0.96);
  border-bottom: 1.5px solid rgba(228, 241, 255, 0.96);
  transform: rotate(180deg);
}

.top-bar .quick-icon-sound::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 4px;
  width: 6px;
  height: 7px;
  background: rgba(228, 241, 255, 0.96);
  clip-path: polygon(0 26%, 55% 26%, 100% 0, 100% 100%, 55% 74%, 0 74%);
}

.top-bar .quick-icon-sound::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 4px;
  width: 6px;
  height: 7px;
  border-right: 1.5px solid rgba(228, 241, 255, 0.96);
  border-top: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  border-radius: 0 8px 8px 0;
}

.top-bar .quick-icon-streak::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border: 1.5px solid rgba(228, 241, 255, 0.96);
  border-radius: 50%;
}

.top-bar .quick-icon-streak::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(77, 245, 169, 0.95);
  box-shadow: 0 0 7px rgba(77, 245, 169, 0.5);
}

.top-bar .music-toggle.is-muted .quick-icon-sound::before,
.top-bar .music-toggle.is-muted .quick-icon-sound::after {
  opacity: 0.5;
}

.top-bar .notifications-unread {
  position: absolute;
  right: 4px;
  top: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 0.56rem;
  line-height: 1;
}

body.accounts-open .top-bar .accounts-toggle,
body.streak-open .top-bar .streak-toggle,
body.notifications-open .top-bar .notifications-toggle {
  background: rgba(120, 171, 241, 0.14);
}

@media (max-width: 980px) {
  .top-bar .quick-actions .btn {
    width: 66px;
    min-width: 66px;
    height: 44px;
    min-height: 44px;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.52rem;
  }
}

.streak-panel {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 25;
  width: min(390px, 94vw);
  max-height: calc(100dvh - 84px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(8, 13, 24, 0.94), rgba(9, 15, 28, 0.94));
  border: 1px solid rgba(96, 132, 185, 0.34);
  display: none;
  gap: 10px;
}

.streak-premium {
  display: none;
}

body.native-app .streak-premium {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(113, 180, 255, 0.38);
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 171, 255, 0.24), transparent 46%),
    radial-gradient(circle at 82% 84%, rgba(76, 255, 181, 0.18), transparent 52%),
    linear-gradient(160deg, rgba(10, 24, 43, 0.95), rgba(8, 15, 31, 0.96));
  overflow: hidden;
}

body.native-app .streak-premium::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -60%;
  width: 78%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
  opacity: 0;
}

body.native-app .streak-premium.is-burst::after {
  animation: streakSweep 820ms ease;
}

.streak-premium-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.streak-premium-kicker {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #9cc2f0;
}

.streak-premium-tier {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: #c5e8ff;
}

.streak-progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(117, 168, 235, 0.35);
  background: rgba(7, 15, 30, 0.82);
  overflow: hidden;
}

.streak-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d9dff 0%, #47ddf5 45%, #5dffb4 100%);
  box-shadow: 0 0 18px rgba(78, 212, 246, 0.45);
  transition: width 240ms ease;
}

.streak-premium-next {
  margin: 0;
  color: #cde7ff;
  line-height: 1.35;
}

.streak-milestones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.streak-milestones span {
  text-align: center;
  font-size: 0.63rem;
  padding: 4px 0;
  border-radius: 999px;
  border: 1px solid rgba(107, 149, 212, 0.36);
  color: #93b4de;
  background: rgba(10, 20, 38, 0.82);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.streak-milestones span.is-hit {
  color: #d8fff0;
  border-color: rgba(108, 239, 184, 0.62);
  background: rgba(20, 90, 68, 0.44);
}

.streak-milestones span.is-next {
  color: #f2fbff;
  border-color: rgba(120, 206, 255, 0.75);
  background: rgba(21, 81, 135, 0.45);
  transform: scale(1.03);
}

body.native-app .streak-premium[data-tier="bronze"] .streak-premium-tier {
  color: #ffd09f;
}

body.native-app .streak-premium[data-tier="silver"] .streak-premium-tier {
  color: #ddf3ff;
}

body.native-app .streak-premium[data-tier="gold"] .streak-premium-tier {
  color: #ffe995;
}

body.native-app .streak-premium[data-tier="legend"] .streak-premium-tier {
  color: #afffe2;
}

@keyframes streakSweep {
  0% {
    transform: translateX(0) rotate(18deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translateX(230%) rotate(18deg);
    opacity: 0;
  }
}

body.streak-open .streak-panel {
  display: grid;
  align-content: start;
}

#streak-overlay {
  display: none;
}

body.streak-open #streak-overlay {
  display: block;
}

@media (max-width: 980px) {
  .streak-panel {
    top: calc(56px + env(safe-area-inset-top, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    width: auto;
    max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

/* Hard layout lock to prevent right-column overlap on desktop/tablet */
@media (min-width: 981px) {
  .arena {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
  }

  .arena-main {
    flex: 1 1 auto;
    min-width: 0;
  }

  .arena-side {
    flex: 0 0 360px;
    width: 360px;
    max-width: 38vw;
    min-width: 300px;
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }

  .arena-side .wallet-panel,
  .arena-side .info-grid {
    position: static !important;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
}

/* Mobile UI reset (website + APK webview) */
@media (max-width: 980px) {
  .app-shell {
    max-width: 100%;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 10px;
  }

  .top-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "meta meta";
    gap: 6px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .top-bar .brand-title {
    column-gap: 6px;
  }

  .top-bar .brand-title .brand-wordmark {
    font-size: 0.88rem;
  }

  .brand-tagline {
    font-size: 0.46rem;
    letter-spacing: 0.08em;
  }

  .top-bar .quick-actions {
    justify-self: end;
    align-self: start;
  }

  .top-bar .quick-actions .btn {
    width: 56px;
    min-width: 56px;
    height: 42px;
    min-height: 42px;
    padding: 3px 4px 5px;
    grid-template-rows: 14px auto;
    gap: 3px;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.48rem;
  }

  .top-bar .quick-icon,
  .top-bar .accounts-toggle-icon {
    width: 14px;
    height: 14px;
  }

  .top-bar .notifications-unread {
    min-width: 13px;
    height: 13px;
    font-size: 0.54rem;
    right: 3px;
    top: 2px;
  }

  .meta {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .meta::-webkit-scrollbar {
    display: none;
  }

  .pill {
    padding: 4px 6px;
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .layout {
    display: block;
  }

  .arena {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
  }

  .arena-main,
  .arena-side {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 6px;
  }

  .game-panel {
    height: clamp(236px, 40dvh, 300px);
    min-height: 236px;
    border-radius: 14px;
  }

  #flight-canvas {
    border-radius: 14px;
  }

  .multiplier {
    font-size: clamp(2.1rem, 12vw, 3.8rem);
    top: 49%;
  }

  .center-wait {
    top: calc(49% - 56px);
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .message {
    top: calc(49% + 56px);
    font-size: 0.83rem;
    padding: 0 8px;
    text-align: center;
  }

  .strategy-strip {
    width: min(220px, calc(100% - 14px));
    top: 7px;
    left: 7px;
    right: auto;
    bottom: auto;
    padding: 6px 7px;
  }

  .strategy-kicker {
    font-size: 0.54rem;
  }

  .strategy-line {
    font-size: 0.72rem;
  }

  .strategy-adjustment {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .viewer-pill {
    right: 8px;
    bottom: 8px;
    padding: 3px 8px 3px 5px;
    font-size: 0.82rem;
  }

  .avatar {
    width: 15px;
    height: 15px;
  }

  .crash-strip {
    margin-top: 0;
    padding: 6px;
    border-radius: 10px;
  }

  .crash-strip-head {
    margin-bottom: 4px;
  }

  .crash-strip .chip {
    font-size: 0.66rem;
    padding: 3px 6px;
  }

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

  .bet-card {
    padding: 7px;
    border-radius: 12px;
  }

  .bet-card .label {
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .bet-card .row:first-of-type input[type="number"] {
    padding: 5px 6px;
    font-size: 0.8rem;
  }

  .bet-card .row:first-of-type .btn {
    min-height: 30px;
    font-size: 0.68rem;
    padding: 4px;
  }

  .toggles-row label {
    font-size: 0.64rem;
    padding: 3px 5px;
  }

  .auto-row label,
  .substatus {
    font-size: 0.66rem;
  }

  .actions .btn {
    min-height: 34px;
    font-size: 0.76rem;
  }

  .wallet-panel {
    position: relative !important;
    top: auto !important;
    width: 100%;
    margin: 0;
    min-width: 0;
    border-radius: 12px;
    padding: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    row-gap: 4px;
  }

  .wallet-panel .label,
  .wallet-panel .hero-balance {
    grid-column: 1 / -1;
  }

  .wallet-panel .hero-balance {
    font-size: 1rem;
  }

  .wallet-panel .row,
  .wallet-panel .substatus {
    display: none;
  }

  body.mobile-balance-open .wallet-panel .row {
    display: grid;
    grid-column: 1 / -1;
  }

  body.mobile-balance-open .wallet-panel .substatus {
    display: block;
    grid-column: 1 / -1;
  }

  .mobile-balance-toggle {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

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

  .info-card {
    border-radius: 12px;
    padding: 7px;
  }

  .feed {
    height: 96px;
  }

  .support-requests-list {
    max-height: 140px;
  }
}

@media (max-width: 560px) {
  .top-bar .quick-actions .btn {
    width: 52px;
    min-width: 52px;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.45rem;
  }

  .brand-tagline {
    display: none;
  }
}

@media (max-width: 430px) {
  .bets-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .game-panel {
    height: clamp(220px, 36dvh, 280px);
    min-height: 220px;
  }
}

/* Final compact-fit layer: enforce margins and sizing consistency (web + APK) */
.app-shell {
  box-sizing: border-box;
  max-width: 1260px !important;
  width: 100%;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 10px !important;
}

.layout,
.arena,
.arena-main,
.arena-side,
.wallet-panel,
.info-grid,
.info-card,
.game-panel,
.bets-row,
.bet-card {
  min-width: 0 !important;
  box-sizing: border-box;
}

.top-bar {
  margin: 0 0 4px !important;
  padding: 6px 8px !important;
  row-gap: 6px !important;
}

.top-bar .quick-actions {
  border-radius: 9px !important;
}

.top-bar .quick-actions .btn {
  width: 60px !important;
  min-width: 60px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 3px 4px 5px !important;
  gap: 2px !important;
}

.top-bar .quick-actions .quick-label {
  font-size: 0.46rem !important;
}

.meta {
  gap: 5px !important;
}

.pill {
  padding: 4px 6px !important;
  font-size: 0.64rem !important;
}

@media (min-width: 981px) {
  .arena {
    gap: 6px !important;
  }

  .arena-side {
    flex: 0 0 312px !important;
    width: 312px !important;
    min-width: 280px !important;
    max-width: 34vw !important;
    gap: 5px !important;
  }

  .game-panel {
    height: clamp(300px, 50dvh, 420px) !important;
  }

  .wallet-panel,
  .info-card {
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .hero-balance {
    font-size: clamp(1.16rem, 1.8vw, 1.48rem) !important;
  }

  .bets-row {
    gap: 5px !important;
  }

  .bet-card {
    padding: 7px !important;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: calc(5px + env(safe-area-inset-top, 0px)) 6px 9px !important;
  }

  .top-bar {
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .top-bar .quick-actions .btn {
    width: 48px !important;
    min-width: 48px !important;
    height: 36px !important;
    min-height: 36px !important;
    grid-template-rows: 12px auto !important;
    padding: 2px 3px 4px !important;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.41rem !important;
  }

  .top-bar .quick-icon,
  .top-bar .accounts-toggle-icon {
    width: 12px !important;
    height: 12px !important;
  }

  .top-bar .notifications-unread {
    min-width: 12px !important;
    height: 12px !important;
    font-size: 0.5rem !important;
  }

  .meta {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  .meta::-webkit-scrollbar {
    display: none;
  }

  .pill {
    font-size: 0.6rem !important;
    padding: 3px 5px !important;
    white-space: nowrap;
  }

  .arena {
    gap: 5px !important;
  }

  .game-panel {
    height: clamp(205px, 33dvh, 260px) !important;
    min-height: 205px !important;
    border-radius: 12px !important;
  }

  .multiplier {
    font-size: clamp(1.85rem, 10vw, 3.2rem) !important;
  }

  .center-wait {
    font-size: 0.72rem !important;
    padding: 5px 8px !important;
  }

  .message {
    font-size: 0.76rem !important;
  }

  .crash-strip,
  .wallet-panel,
  .info-card,
  .bet-card {
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .hero-balance {
    font-size: 0.94rem !important;
  }

  .feed {
    height: 88px !important;
  }

  .support-requests-list {
    max-height: 120px !important;
  }

  .bets-row {
    gap: 5px !important;
  }

  .actions .btn,
  .mobile-balance-toggle {
    min-height: 32px !important;
    font-size: 0.68rem !important;
  }
}

/* Critical anti-overlap lock (desktop + mobile) */
/* Authoritative arena layout lock (prevents right-column overlap on desktop/tablet) */
@media (min-width: 981px) {
  body .app-shell > main.layout {
    display: block !important;
  }

  body .app-shell > main.layout > section.arena {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    gap: 6px !important;
    position: relative !important;
    isolation: isolate !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    display: grid !important;
    gap: 6px !important;
    align-content: start !important;
    position: relative !important;
    z-index: 1 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-side {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid !important;
    gap: 6px !important;
    align-content: start !important;
    position: relative !important;
    z-index: 2 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel,
  body .app-shell > main.layout > section.arena > .arena-main > .crash-strip,
  body .app-shell > main.layout > section.arena > .arena-main > .bets-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-side > .wallet-panel,
  body .app-shell > main.layout > section.arena > .arena-side > .info-grid,
  body .app-shell > main.layout > section.arena > .arena-side > .info-grid > .info-card {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 980px) {
  body .app-shell > main.layout > section.arena {
    display: block !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main,
  body .app-shell > main.layout > section.arena > .arena-side {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    align-content: start !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > *,
  body .app-shell > main.layout > section.arena > .arena-side > * {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Mobile rescue layer: eliminate overflow and improve first-screen fit */
@media (max-width: 980px) {
  body {
    overflow-x: hidden !important;
  }

  body .app-shell {
    padding: 4px 5px 8px !important;
  }

  body .app-shell > .top-bar {
    padding: 5px 6px !important;
    row-gap: 5px !important;
  }

  body .app-shell > .top-bar .brand-tagline {
    display: none !important;
  }

  body .app-shell > .top-bar .quick-actions .btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 2px 2px 3px !important;
    grid-template-rows: 10px auto !important;
  }

  body .app-shell > .top-bar .quick-actions .quick-label {
    font-size: 0.4rem !important;
    line-height: 1 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel {
    height: clamp(190px, 30dvh, 230px) !important;
    min-height: 190px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel > .strategy-strip {
    width: min(184px, calc(100% - 12px)) !important;
    padding: 5px 6px !important;
    top: 6px !important;
    left: 6px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel > .strategy-strip .strategy-kicker {
    font-size: 0.5rem !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel > .strategy-strip .strategy-line {
    font-size: 0.68rem !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel > .strategy-strip .strategy-adjustment {
    font-size: 0.58rem !important;
    line-height: 1.18 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .crash-strip {
    padding: 5px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .crash-strip .chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .crash-strip .chips::-webkit-scrollbar {
    display: none;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: visible !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card {
    min-width: 0 !important;
    width: 100% !important;
    padding: 6px !important;
    overflow: hidden !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > input[type="number"] {
    min-width: 0 !important;
    width: 100% !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > .quick-amounts {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > .quick-amounts > .btn {
    flex: none !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 3px !important;
    font-size: 0.66rem !important;
    min-height: 28px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-side > .wallet-panel {
    padding: 6px !important;
  }
}

@media (max-width: 560px) {
  body .app-shell > main.layout > section.arena > .arena-main > .bets-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card {
    padding: 5px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > .quick-amounts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > .quick-amounts > .btn {
    min-height: 24px !important;
    padding: 2px !important;
    font-size: 0.62rem !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card .toggles-row label {
    font-size: 0.6rem !important;
    padding: 2px 4px !important;
  }

  body .app-shell > .top-bar .quick-actions .btn {
    width: 42px !important;
    min-width: 42px !important;
  }
}

/* Launch stabilization pass: normalize spacing/readability and prevent cross-device drift */
.panel-anim,
.scanline {
  display: none !important;
}

.crash-strip-head,
#history-text {
  display: none !important;
}

.ticker-strip {
  top: 0 !important;
  padding-top: 0 !important;
  min-height: 26px !important;
}

body.native-app .ticker-strip {
  top: 0 !important;
  padding-top: max(2px, env(safe-area-inset-top, 0px)) !important;
  min-height: 30px !important;
}

.ticker-track {
  padding-left: 10px !important;
  gap: 12px !important;
}

.app-shell {
  padding-top: 6px !important;
}

.top-bar {
  margin-top: 0 !important;
}

.top-bar .quick-actions .btn {
  width: 66px !important;
  min-width: 66px !important;
  height: 42px !important;
  min-height: 42px !important;
}

.top-bar .quick-actions .quick-label {
  font-size: 0.5rem !important;
}

@media (max-width: 980px) {
  .app-shell {
    padding-top: 4px !important;
  }

  .top-bar .quick-actions .btn {
    width: 52px !important;
    min-width: 52px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.44rem !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .game-panel {
    height: clamp(198px, 32dvh, 240px) !important;
    min-height: 198px !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 430px) {
  body .app-shell > main.layout > section.arena > .arena-main > .bets-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .app-shell > main.layout > section.arena > .arena-main > .bets-row > .bet-card > .amount-row > .quick-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .top-bar .quick-actions .btn {
    width: 48px !important;
    min-width: 48px !important;
  }

  .top-bar .quick-actions .quick-label {
    font-size: 0.42rem !important;
  }
}
