:root {
  --hall-bg: #080b17;
  --hall-bg-2: #10182a;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --soft: rgba(255, 255, 255, 0.38);
  --gold: #f6c453;
  --teal: #25d0a0;
  --cyan: #49c7ff;
  --red: #ff5e66;
  --blue: #5578ff;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body[data-app="hall"] {
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(160deg, #070a15 0%, #141a2c 46%, #0b1925 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  overflow-x: hidden;
}

body[data-app="hall"].booting .auth-screen,
body[data-app="hall"].booting .hall-shell {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
}

.login-card {
  width: min(380px, 100%);
  padding: 30px 20px;
}

.login-brand {
  text-align: center;
  margin-bottom: 26px;
}

.login-brand img {
  width: 132px;
  margin: 0 auto 16px;
}

.login-brand h1 {
  margin: 0;
  font-size: 22px;
}

.login-brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tabs button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.auth-tabs button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form input,
.text-input,
.amount-input-wrap input,
.search-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.auth-form input,
.text-input,
.search-wrap input {
  padding: 0 14px;
}

.auth-form input::placeholder,
.text-input::placeholder,
.search-wrap input::placeholder,
.amount-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.auth-form input:focus,
.text-input:focus,
.search-wrap input:focus,
.amount-input-wrap input:focus {
  border-color: rgba(73, 199, 255, 0.72);
}

.auth-msg {
  min-height: 20px;
  margin-top: 14px;
  text-align: center;
  color: var(--red);
  font-size: 13px;
}

.auth-msg.success {
  color: var(--teal);
}

.hall-shell {
  min-height: 100vh;
}

.page-content {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 28px;
}

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

.logo img {
  width: 96px;
  max-height: 38px;
  object-fit: contain;
}

.top-right {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-bar {
  min-width: 0;
  max-width: calc(100vw - 160px);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 5px;
  border: 1px solid rgba(246, 196, 83, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.balance-icon,
.usdt-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #07130e;
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.balance-icon.rmb {
  color: #fff;
  background: var(--red);
}

.usdt-dot.tcpay-dot {
  color: #fff;
  background: linear-gradient(135deg, #ffbd2e, #ff5e66);
}

.balance-amount {
  min-width: 52px;
  max-width: 92px;
  overflow: hidden;
  color: var(--gold);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.bal-recharge-btn,
.small-btn,
.primary-btn,
.secondary-btn,
.copy-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  font-weight: 800;
}

.bal-recharge-btn,
.primary-btn,
.small-btn {
  background: linear-gradient(135deg, #315eff, #16b889);
}

.secondary-btn,
.copy-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.small-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.top-avatar,
.my-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(circle at 50% 32%, #ffffff 0 15%, transparent 16%),
    radial-gradient(circle at 50% 76%, #ffffff 0 25%, transparent 26%),
    linear-gradient(135deg, #315eff, #25d0a0);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.quick-action {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quick-action span:last-child {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.qa-icon img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.platform-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.platform-tab {
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.platform-tab.active {
  border-color: rgba(246, 196, 83, 0.7);
  background: rgba(246, 196, 83, 0.13);
}

.platform-tab img {
  max-height: 32px;
  object-fit: contain;
}

.search-bar {
  margin-bottom: 14px;
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  padding-right: 48px;
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
}

.game-container {
  min-height: 220px;
  padding-bottom: 18px;
}

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

.game-card {
  min-width: 0;
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.game-card button {
  width: 100%;
  padding: 0;
  color: #fff;
  background: transparent;
  text-align: left;
}

.img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.game-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.game-info {
  padding: 8px;
}

.game-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-plat {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.favorite-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px !important;
  height: 28px;
  border-radius: 50%;
  color: var(--gold) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  text-align: center !important;
}

.loading,
.empty,
.load-more {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.load-more {
  min-height: 54px;
  font-size: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(160deg, #070a15 0%, #151d30 52%, #0b1f27 100%);
}

.screen-overlay.show {
  display: flex;
}

.overlay-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 56px;
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 21, 0.94);
}

.overlay-header strong {
  text-align: center;
  font-size: 18px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
}

.plain-link {
  min-height: 30px;
  padding: 0;
  color: var(--cyan);
  background: transparent;
  font-size: 13px;
  text-align: right;
}

.plain-link.left {
  justify-self: start;
  text-align: left;
}

.overlay-body {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 18px 14px 26px;
  overflow-y: auto;
}

.amount-step,
.pay-step,
.income-section,
.my-vip-card,
.my-invite-card,
.my-list-section,
.record-card,
.report-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.amount-step,
.pay-step,
.income-section,
.my-vip-card,
.my-invite-card {
  padding: 14px;
}

.amount-label,
.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.method-option {
  min-width: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
}

.method-option.active {
  border-color: rgba(255, 212, 0, 0.40);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.48), rgba(68, 138, 255, 0.34));
}

.method-option span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.method-option strong,
.method-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-option strong {
  font-size: 13px;
  font-weight: 900;
}

.method-option small {
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  font-weight: 700;
}

.method-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.method-icon.usdt {
  background: #26a17b;
}

.method-icon.tcpay {
  background: linear-gradient(135deg, #ffbd2e, #ff5e66);
}

.amount-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.amount-input-wrap input {
  min-height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 800;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.amount-presets button {
  min-height: 40px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.pay-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.pay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.qr-wrap {
  width: 156px;
  min-height: 156px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  color: rgba(0, 0, 0, 0.66);
  background: #fff;
  text-align: center;
  word-break: break-all;
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pay-amount {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.danger-note {
  margin: 0;
  color: var(--red);
  font-size: 12px;
}

.wallet-address,
.income-link-box {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.notes {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  line-height: 1.45;
}

.notes p {
  margin: 0;
}

.withdraw-balance {
  width: min(560px, calc(100% - 28px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px auto 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(37, 208, 160, 0.11);
}

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

.select-row,
.my-list-section button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.all-btn {
  min-width: 84px;
  min-height: 34px;
  border-radius: 8px;
  color: #fff;
  background: rgba(73, 199, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.income-section {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.income-row,
.income-claim-row,
.income-info-row,
.my-vip-top,
.my-invite-top,
.my-invite-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.income-row span {
  font-weight: 900;
}

.income-row small,
.income-info-row span {
  color: var(--muted);
}

.income-value {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.income-value strong,
.income-info-row strong,
.income-stats-grid strong {
  color: var(--gold);
}

.income-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.income-stats-grid div {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.income-stats-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.income-stats-grid small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
}

.income-claim-log {
  display: grid;
  gap: 8px;
}

.income-claim-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.income-claim-item div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.income-claim-item strong {
  color: #fff;
}

.income-claim-item span {
  color: var(--muted);
  font-size: 11px;
}

.income-claim-item b {
  flex: 0 0 auto;
  color: var(--gold);
}

.income-rule-tip {
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 216, 128, 0.92);
  background: rgba(246, 196, 83, 0.08);
  font-size: 12px;
  line-height: 1.45;
}

.my-profile-wrap {
  position: relative;
  min-height: 132px;
  margin-bottom: 14px;
}

.my-mascot {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 118px;
  max-height: 128px;
  object-fit: contain;
  opacity: 0.92;
}

.my-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 110px;
}

.my-profile strong {
  display: block;
  max-width: 210px;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
}

.my-vip-card p {
  margin: 8px 0 10px;
  color: var(--muted);
}

.vip-progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
}

.vip-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.vip-detail-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vip-detail-head div,
.vip-level-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.vip-detail-head div {
  min-width: 0;
  padding: 10px 6px;
  text-align: center;
}

.vip-detail-head span,
.vip-level-row span {
  color: var(--muted);
  font-size: 11px;
}

.vip-detail-head strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 14px;
}

.vip-page-body {
  display: grid;
  gap: 16px;
  padding-top: 10px;
}

.vip-page-head {
  display: grid;
  gap: 10px;
}

.vip-page-head strong {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
}

.vip-page-head span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.vip-page-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.vip-page-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffd400;
}

.vip-card-strip {
  display: flex;
  gap: 14px;
  margin: 0 -14px;
  padding: 0 14px 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.vip-card-strip::-webkit-scrollbar {
  display: none;
}

.vip-card-slide {
  flex: 0 0 min(344px, 86%);
  min-height: 214px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 20px;
  border: 2px solid rgba(255, 212, 0, 0.72);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #843af4 0%, #c04bc0 45%, #e55e9d 100%);
  text-align: left;
  scroll-snap-align: center;
  box-shadow: 0 16px 42px rgba(74, 24, 140, 0.35);
}

.vip-card-slide.active {
  border-color: #ffd400;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.18), 0 16px 42px rgba(74, 24, 140, 0.45);
}

.vip-card-slide strong {
  font-size: 30px;
  line-height: 1;
}

.vip-card-slide span {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #7a3a00;
  background: #ffd400;
  font-size: 12px;
  font-weight: 900;
}

.vip-card-slide b,
.vip-card-slide em {
  color: rgba(255, 255, 255, 0.9);
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
}

.vip-card-slide em {
  color: #ffe36e;
  font-weight: 900;
}

.vip-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vip-stat-grid article {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
}

.vip-stat-grid article:nth-child(1) {
  background: #54b769;
}

.vip-stat-grid article:nth-child(2) {
  background: #ff931c;
}

.vip-stat-grid article:nth-child(3) {
  background: #a84abe;
}

.vip-stat-grid span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.vip-stat-grid strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.vip-detail-progress {
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.vip-detail-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7b39ff, #4a8bff);
}

.vip-weekly-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(246, 196, 83, 0.22);
  border-radius: 12px;
  background: rgba(246, 196, 83, 0.08);
}

.vip-weekly-card > div:first-child,
.vip-weekly-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vip-weekly-card strong,
.vip-weekly-data b {
  color: var(--gold);
}

.vip-weekly-card span {
  color: var(--muted);
  font-size: 11px;
}

.vip-weekly-card button:disabled {
  width: 100%;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
}

.vip-rebate-section {
  display: grid;
  gap: 12px;
}

.vip-rebate-section h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.vip-rebate-table {
  width: 100%;
  border-collapse: collapse;
}

.vip-rebate-table th,
.vip-rebate-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.vip-rebate-table th {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 800;
}

.vip-rebate-table td {
  color: #fff;
  font-weight: 900;
}

.vip-rebate-table td:last-child {
  color: #ffd400;
}

.vip-level-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
}

.vip-level-row.active {
  border-color: rgba(246, 196, 83, 0.55);
  background: rgba(246, 196, 83, 0.1);
}

.vip-level-row strong {
  color: #fff;
}

.my-action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.my-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.my-menu-grid button {
  min-height: 62px;
  padding: 6px;
  border-radius: 8px;
  color: #fff;
  background: var(--panel);
  font-size: 12px;
  font-weight: 800;
}

.my-invite-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.my-invite-link-row span:not(.my-invite-gift) {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-list-section {
  overflow: hidden;
}

.my-list-section button {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
}

.my-list-section button:last-child {
  border-bottom: 0;
}

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

.record-card,
.report-card {
  padding: 12px;
}

.record-card-top,
.record-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.record-card-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-card-row {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.status-pill.ok {
  color: var(--teal);
  background: rgba(37, 208, 160, 0.12);
}

.status-pill.warn {
  color: var(--gold);
  background: rgba(246, 196, 83, 0.12);
}

.status-pill.bad {
  color: var(--red);
  background: rgba(255, 94, 102, 0.12);
}

.record-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  min-height: 52px;
  max-height: 52px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.record-tab {
  width: 100%;
  height: 44px;
  min-height: 38px;
  max-height: 44px;
  align-self: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  font-weight: 800;
  line-height: 1;
}

.record-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #7b39ff, #3c7bff);
}

.finance-records {
  display: grid;
  gap: 10px;
}

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

.report-summary-card,
.report-day-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.report-summary-card {
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.report-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.report-summary-card strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-day-card {
  padding: 12px;
}

.report-day-date {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.report-day-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 13px;
}

.report-day-row + .report-day-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profit-pos {
  color: #5bea9b;
}

.profit-neg {
  color: #ff6874;
}

.bet-record-card .record-card-top span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 0 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.page-btn {
  min-height: 34px;
  min-width: 74px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

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

.agent-panel-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.agent-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.agent-metric-grid div,
.agent-claim-row {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.agent-metric-grid div {
  padding: 10px;
}

.agent-metric-grid span,
.agent-claim-row span,
.list-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.agent-metric-grid strong,
.agent-claim-row strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
}

.agent-claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.list-subtitle {
  padding: 2px 2px 0;
  font-weight: 900;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.66);
}

.modal-card {
  width: min(420px, 100%);
  max-height: 88vh;
  overflow: hidden;
}

.modal-card header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.modal-card header button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
}

.game-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
}

.game-mask div {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.game-mask p {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: var(--shadow);
}

@media (max-width: 380px) {
  .page-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .game-grid {
    gap: 8px;
  }

  .balance-bar {
    max-width: calc(100vw - 136px);
  }

  .bal-recharge-btn {
    padding: 0 9px;
  }

  .quick-action span:last-child,
  .my-menu-grid button {
    font-size: 11px;
  }
}

@media (min-width: 720px) {
  .page-content,
  .overlay-body {
    width: min(720px, 100%);
  }

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

  .withdraw-balance {
    width: min(720px, calc(100% - 28px));
  }
}

/* ymxpg-style skin */
body[data-app="hall"] {
  background: linear-gradient(160deg, #0c0e2b 0%, #1a1044 30%, #0e1a3a 60%, #141230 100%);
}

.auth-screen {
  background: linear-gradient(160deg, #0c0e2b 0%, #1a1044 30%, #0e1a3a 60%, #141230 100%);
}

.login-card {
  max-width: 380px;
  padding: 40px 24px;
}

.login-brand img {
  width: 116px;
}

.login-brand h1 {
  font-size: 22px;
  font-weight: 700;
}

.auth-tabs,
.auth-form input {
  border-radius: 10px;
}

.auth-tabs {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

.auth-tabs button.active {
  background: rgba(255, 255, 255, 0.10);
}

.primary-btn,
.bal-recharge-btn,
.small-btn {
  background: linear-gradient(135deg, #7c4dff, #448aff);
}

.page-content {
  width: min(430px, 100%);
  padding: 12px 0 24px;
}

.top-bar {
  min-height: 52px;
  padding: 10px 12px 6px;
}

.logo img {
  width: 88px;
  max-height: 34px;
}

.balance-bar {
  min-height: 32px;
  max-width: calc(100vw - 144px);
  border-color: rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.06);
}

.balance-icon,
.usdt-dot {
  width: 20px;
  height: 20px;
  color: #fff;
  background: linear-gradient(135deg, #26c6da, #00897b);
  font-size: 11px;
}

.balance-icon.rmb {
  background: linear-gradient(135deg, #ef5350, #c62828);
}

.balance-amount {
  color: #fff;
  font-size: 16px;
}

.icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
}

.bal-recharge-btn {
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
}

.top-avatar,
.my-avatar {
  width: 32px;
  height: 32px;
  background:
    radial-gradient(circle at 50% 32%, #fff 0 15%, transparent 16%),
    radial-gradient(circle at 50% 76%, #fff 0 25%, transparent 26%),
    linear-gradient(135deg, #7c4dff, #651fff);
}

.quick-actions {
  display: flex;
  justify-content: space-around;
  gap: 0;
  margin: 0;
  padding: 14px 10px 10px;
}

.quick-action {
  flex: 1;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-action .qa-icon,
.qa-icon {
  width: 50px;
  height: 50px;
}

.quick-action span:last-child {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
}

.qa-icon img {
  max-width: 50px;
  max-height: 50px;
}

.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 8px 16px;
}

.platform-tab {
  flex: 1;
  height: 36px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.platform-tab.active {
  border-color: rgba(171, 43, 251, 0.4);
  background: linear-gradient(135deg, #ab2bfb 0%, #6930fb 50%, #270bfc 100%);
  box-shadow: 0 0 20px rgba(171, 43, 251, 0.20);
}

.search-bar {
  margin: 0;
  padding: 6px 16px 10px;
}

.search-wrap {
  height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 10px 0 14px;
  background: rgba(255, 255, 255, 0.05);
}

.search-wrap input {
  min-height: 40px;
  border: 0;
  padding: 0 42px 0 0;
  background: transparent;
}

.search-btn {
  top: 3px;
  right: 6px;
  width: 34px;
  height: 34px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
}

.game-container {
  min-height: 260px;
  padding-bottom: 24px;
}

.game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 24px;
}

.game-card {
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.game-card:active {
  transform: scale(0.94);
}

.img-wrap {
  aspect-ratio: 128 / 168;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(18, 22, 54, 0.98), rgba(18, 12, 48, 0.98) 55%, rgba(10, 34, 58, 0.96));
}

.img-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.06) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: none;
  pointer-events: none;
}

.img-wrap.image-ready::before,
.img-wrap.image-error::before {
  display: none;
}

.img-wrap.image-near:not(.image-ready):not(.image-error)::before {
  animation: cardImagePulse 1.6s ease-in-out infinite;
}

/* Skip layout/paint for cards outside the viewport; their aspect ratio reserves space. */
body[data-app="hall"] .game-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 128px auto 168px;
}

@media (prefers-reduced-motion: reduce) {
  .img-wrap.image-near:not(.image-ready):not(.image-error)::before { animation: none; }
}

.game-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.img-wrap.image-ready .game-img {
  opacity: 1;
}

.game-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  transition: opacity 0.18s ease;
}

.img-wrap.image-ready .game-placeholder {
  opacity: 0;
  pointer-events: none;
}

.game-placeholder .gp-name {
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

.game-placeholder .gp-plat {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.game-info,
.game-name,
.game-plat,
.favorite-btn {
  display: none;
}

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

.loading,
.empty,
.load-more {
  color: rgba(255, 255, 255, 0.34);
}

.screen-overlay {
  background: linear-gradient(160deg, #0c0e2b 0%, #1a1044 30%, #0e1a3a 60%, #141230 100%);
}

.overlay-header {
  min-height: 58px;
  border-bottom: 0;
  background: transparent;
}

.overlay-header strong {
  font-size: 18px;
}

.back-btn {
  background: transparent;
  font-size: 22px;
}

.amount-step,
.pay-step,
.income-section,
.my-vip-card,
.my-invite-card,
.my-list-section,
.record-card,
.report-card {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.amount-input-wrap,
.select-row,
.my-list-section button,
.auth-form input,
.text-input,
.search-wrap input {
  border-color: rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.amount-presets {
  grid-template-columns: repeat(4, 1fr);
}

.amount-presets button {
  border-radius: 10px;
}

.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 30, 0.88);
}

@media (min-width: 720px) {
  .page-content,
  .overlay-body {
    width: min(430px, 100%);
  }

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

  .withdraw-balance {
    width: min(430px, calc(100% - 28px));
  }
}

/* polished mobile hall */
body[data-app="hall"] {
  background: linear-gradient(160deg, #0f1034 0%, #151039 34%, #111933 68%, #12142f 100%);
}

body[data-app="hall"] .auth-screen {
  background: linear-gradient(160deg, #0f1034 0%, #151039 34%, #111933 68%, #12142f 100%);
}

body[data-app="hall"] .page-content {
  width: min(392px, 100%);
  padding: 12px 12px 28px;
}

body[data-app="hall"] .top-bar {
  min-height: 44px;
  padding: 2px 4px 10px;
  gap: 10px;
}

body[data-app="hall"] .logo {
  min-width: 0;
}

body[data-app="hall"] .logo img {
  width: 92px;
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}

body[data-app="hall"] .top-right {
  gap: 8px;
}

body[data-app="hall"] .balance-bar {
  min-height: 36px;
  max-width: calc(100vw - 150px);
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-app="hall"] .balance-icon,
body[data-app="hall"] .usdt-dot {
  width: 21px;
  height: 21px;
  color: #ffffff;
  background: linear-gradient(135deg, #26d2d0, #008b7b);
  font-size: 11px;
}

body[data-app="hall"] .balance-icon.rmb {
  background: linear-gradient(135deg, #ef5350, #c62828);
}

body[data-app="hall"] .balance-amount {
  min-width: 52px;
  max-width: 78px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

body[data-app="hall"] .icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  font-size: 14px;
}

body[data-app="hall"] .bal-recharge-btn {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 10px;
  background: linear-gradient(135deg, #7762ff, #3677ff);
  font-size: 12px;
  line-height: 26px;
  box-shadow: 0 5px 14px rgba(75, 96, 255, 0.28);
}

body[data-app="hall"] .top-avatar {
  width: 34px;
  height: 34px;
  border: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(25, 15, 55, 0.9) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 78%, rgba(25, 15, 55, 0.9) 0 26%, transparent 27%),
    linear-gradient(135deg, #8e46ff, #4f2dde);
  box-shadow: 0 8px 18px rgba(84, 51, 230, 0.28);
}

body[data-app="hall"] .quick-actions {
  display: flex;
  justify-content: space-around;
  gap: 0;
  margin: 0;
  padding: 16px 0 9px;
}

body[data-app="hall"] .quick-action {
  flex: 1 1 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

body[data-app="hall"] .quick-action:active .qa-icon {
  transform: scale(0.92);
}

body[data-app="hall"] .quick-action .qa-icon,
body[data-app="hall"] .qa-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  transition: transform 0.16s ease;
}

body[data-app="hall"] .qa-icon img {
  width: 50px;
  height: 50px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 7px 14px rgba(0, 0, 0, 0.22));
}

body[data-app="hall"] .quick-action span:last-child {
  max-width: 76px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-app="hall"] .platform-tabs {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 6px 0 10px;
}

body[data-app="hall"] .platform-tab {
  flex: 1 1 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  overflow: hidden;
}

body[data-app="hall"] .platform-tab.active {
  border-color: rgba(173, 53, 255, 0.48);
  background: linear-gradient(135deg, #b42cff 0%, #7434ff 52%, #3127ff 100%);
  box-shadow: 0 9px 22px rgba(116, 52, 255, 0.25);
}

body[data-app="hall"] .platform-tab img {
  max-width: 66px;
  max-height: 31px;
  object-fit: contain;
}

body[data-app="hall"] .search-bar {
  margin: 0;
  padding: 0 0 12px;
}

body[data-app="hall"] .search-wrap {
  height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  padding: 0 11px 0 14px;
  background: rgba(255, 255, 255, 0.055);
}

body[data-app="hall"] .search-wrap input {
  min-height: 40px;
  border: 0;
  padding: 0 42px 0 0;
  color: #ffffff;
  background: transparent;
  font-size: 15px;
}

body[data-app="hall"] .search-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

body[data-app="hall"] .search-btn {
  top: 5px;
  right: 7px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: hidden;
  color: transparent;
  background: transparent;
  text-indent: -999px;
}

body[data-app="hall"] .search-btn::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 10px;
  height: 10px;
  border: 3px solid rgba(76, 157, 219, 0.72);
  border-radius: 50%;
}

body[data-app="hall"] .search-btn::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 21px;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: rgba(76, 157, 219, 0.72);
  transform: rotate(45deg);
  transform-origin: left center;
}

body[data-app="hall"] .game-container {
  min-height: 300px;
  padding-bottom: 28px;
}

body[data-app="hall"] .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  padding: 0 0 24px;
}

body[data-app="hall"] .game-card {
  position: relative;
  aspect-ratio: 128 / 168;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transition: transform 0.16s ease;
}

body[data-app="hall"] .game-card:active {
  transform: scale(0.94);
}

body[data-app="hall"] .game-card > button {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(150deg, rgba(18, 22, 54, 0.98), rgba(18, 12, 48, 0.98) 55%, rgba(10, 34, 58, 0.96));
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.28);
  text-align: center;
}

body[data-app="hall"] .game-card .img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(18, 22, 54, 0.98), rgba(18, 12, 48, 0.98) 55%, rgba(10, 34, 58, 0.96));
}

body[data-app="hall"] .game-card .game-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

body[data-app="hall"] .game-card .game-info {
  display: none !important;
}

body[data-app="hall"] .game-card .game-name {
  display: none !important;
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

body[data-app="hall"] .game-card .game-plat {
  display: none !important;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.7px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-app="hall"] .game-card .favorite-btn {
  display: none !important;
}

body[data-app="hall"] .game-placeholder {
  z-index: 2;
  display: none !important;
}

body[data-app="hall"] .loading,
body[data-app="hall"] .empty,
body[data-app="hall"] .load-more {
  color: rgba(255, 255, 255, 0.34);
}

body[data-app="hall"] .float-service-btn {
  position: fixed;
  top: 64%;
  right: max(8px, calc((100vw - 430px) / 2 + 8px));
  z-index: 180;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2979ff, #1565c0);
  box-shadow: 0 2px 12px rgba(41, 121, 255, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-50%);
}

body[data-app="hall"] .float-service-btn::before {
  content: none;
}

body[data-app="hall"] .float-service-btn::after {
  content: none;
}

body[data-app="hall"] .back-top {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  padding: 8px 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transform: translateX(-50%);
  transition: opacity 0.3s;
  white-space: nowrap;
}

body[data-app="hall"] .back-top.show {
  display: flex;
}

@media (max-width: 360px) {
  body[data-app="hall"] .page-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  body[data-app="hall"] .game-grid {
    gap: 8px;
  }

  body[data-app="hall"] .game-card .game-name {
    display: none !important;
    font-size: 14px;
  }

  body[data-app="hall"] .balance-bar {
    max-width: calc(100vw - 138px);
  }
}

/* polished user center */
#myOverlay {
  overflow: hidden;
  background: linear-gradient(160deg, #0f1034 0%, #151039 34%, #111933 68%, #12142f 100%);
}

#myOverlay .overlay-header {
  grid-template-columns: 36px 1fr 36px;
  min-height: 56px;
  border-bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(12, 14, 43, 0.98) 0%, rgba(12, 14, 43, 0.92) 70%, rgba(12, 14, 43, 0) 100%);
}

#myOverlay .overlay-header strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

#myOverlay .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  font-size: 22px;
}

#myOverlay .overlay-body {
  width: min(430px, 100%);
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  padding: 0 0 max(16px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#myOverlay .my-profile-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
}

#myOverlay .my-mascot {
  position: absolute;
  top: -28px;
  right: 6px;
  width: min(72vw, 280px);
  max-width: none;
  max-height: 140px;
  height: auto;
  object-fit: contain;
  object-position: right top;
  opacity: 0.88;
  pointer-events: none;
  z-index: 1;
}

#myOverlay .my-profile {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 24px;
}

#myOverlay .my-avatar {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 2px solid rgba(135, 82, 255, 0.52);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.13) 0 15%, transparent 16%),
    radial-gradient(circle at 50% 78%, rgba(255, 255, 255, 0.10) 0 27%, transparent 28%),
    rgba(124, 77, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#myOverlay .my-avatar img,
body[data-app="hall"] .top-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

#myOverlay .my-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 255, 255, 0.16) 0 14%, transparent 15%),
    radial-gradient(circle at 50% 78%, rgba(255, 255, 255, 0.13) 0 25%, transparent 26%),
    rgba(124, 77, 255, 0.15);
}

#myOverlay .my-avatar.has-avatar {
  border-color: rgba(124, 77, 255, 0.62);
}

#myOverlay .my-profile strong {
  max-width: 150px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

#myOverlay .my-id-row {
  gap: 6px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

#myOverlay .my-id-row .plain-link {
  min-height: auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

#myOverlay .my-copy-id {
  width: auto;
  min-height: auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.35);
  background: transparent;
  font-size: 14px;
  line-height: 1;
}

#myOverlay .my-vip-card {
  position: relative;
  overflow: hidden;
  display: block;
  margin: 0 16px 16px;
  border: 0;
  border-radius: 16px;
  padding: 17px 18px 14px;
  background: linear-gradient(135deg, #6b48f2 0%, #a749ca 46%, #e35d97 100%);
  box-shadow: 0 12px 26px rgba(173, 72, 190, 0.18);
}

#myOverlay .my-vip-card::after {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

#myOverlay .my-vip-top {
  position: relative;
  z-index: 1;
  align-items: center;
  margin-bottom: 10px;
}

#myOverlay .my-vip-top strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

#myOverlay #vipDetailBtn {
  min-height: auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

#myOverlay #vipDetailBtn::after {
  content: " >";
}

#myOverlay .my-vip-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 11px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.35;
}

#myOverlay .vip-progress {
  position: relative;
  z-index: 1;
  height: 8px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

#myOverlay .vip-progress::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%);
}

#myOverlay .vip-progress span {
  display: block;
  min-width: 8px;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
}

#myOverlay .my-vip-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  text-align: right;
}

#myOverlay .my-action-btns {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 16px 16px;
}

#myOverlay .my-action-btns button {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
}

body[data-app="hall"] .top-avatar {
  overflow: hidden;
}

body[data-app="hall"] .top-avatar.has-avatar {
  background: transparent;
}

#myOverlay .my-action-btns .primary-btn,
#myOverlay .my-action-btns .cz-btn {
  border: 0;
  background: linear-gradient(135deg, #7657ff, #4b86ff);
  box-shadow: 0 10px 22px rgba(77, 119, 255, 0.20);
}

#myOverlay .my-action-btns .secondary-btn,
#myOverlay .my-action-btns .tx-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.075);
}

#myOverlay .my-action-btns .btn-emoji {
  margin-right: 6px;
  font-size: 15px;
  line-height: 1;
}

#myOverlay .my-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 16px 16px;
}

#myOverlay .my-menu-grid button {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

#myOverlay .my-menu-grid .mi-icon {
  display: block;
  font-size: 22px;
  line-height: 1;
}

#myOverlay .my-menu-grid .mi-label {
  display: block;
  color: rgba(255, 255, 255, 0.60);
  font-size: 11px;
  line-height: 1.2;
}

#myOverlay .my-invite-card {
  position: relative;
  margin: 0 16px 16px;
  border: 1px solid rgba(124, 77, 255, 0.24);
  border-radius: 16px;
  padding: 15px 16px 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.18), rgba(68, 138, 255, 0.10));
}

#myOverlay .my-invite-top {
  margin-bottom: 14px;
}

#myOverlay .my-invite-top span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

#myOverlay .my-invite-top .plain-link {
  min-height: auto;
  padding: 0;
  color: #4a8cff;
  font-size: 12px;
}

#myOverlay .my-invite-top .plain-link::after {
  content: " >";
}

#myOverlay .my-invite-link-row {
  position: relative;
  gap: 10px;
  min-height: 42px;
  padding-left: 0;
}

#myOverlay .my-invite-gift {
  flex: 0 0 auto;
  font-size: 36px;
  line-height: 1;
}

#myOverlay #myReferralLink {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.70);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#myOverlay #copyMyReferralBtn {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 16px;
  background: #ff444d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

#myOverlay .my-list-section {
  overflow: hidden;
  display: block;
  margin: 0 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

#myOverlay .my-list-section button {
  position: relative;
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 16px;
  color: #ffffff;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
}

#myOverlay .my-list-section button:last-child {
  border-bottom: 0;
}

#myOverlay .my-list-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#myOverlay .my-list-icon {
  width: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

#myOverlay .my-list-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

#myOverlay .my-list-arrow {
  color: rgba(255, 255, 255, 0.25);
  font-size: 16px;
}

#myOverlay .my-list-section button > span:last-child {
  color: rgba(255, 255, 255, 0.30);
}

@media (max-height: 700px) {
  #myOverlay .my-profile-wrap {
    min-height: 92px;
  }

  #myOverlay .my-profile {
    min-height: 92px;
    padding-top: 8px;
    padding-bottom: 12px;
  }

  #myOverlay .my-mascot {
    width: 230px;
    opacity: 0.78;
  }

  #myOverlay .my-menu-grid button {
    min-height: 64px;
  }
}

/* Withdraw page: match legacy hall layout */
#withdrawOverlay {
  background: linear-gradient(160deg, #0c0e2b 0%, #1a1044 30%, #0e1a3a 60%, #141230 100%);
  overflow-y: auto;
}

#withdrawOverlay .withdraw-header {
  position: relative;
  width: min(430px, 100%);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 12px 16px;
}

#withdrawOverlay .withdraw-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 22px;
}

#withdrawOverlay .withdraw-header .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

#withdrawOverlay .record-link {
  min-width: 36px;
  min-height: 32px;
  color: #4a8cff;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

#withdrawOverlay .withdraw-content {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 0 16px 26px;
}

#withdrawOverlay .wd-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(38, 193, 218, 0.20);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(38, 193, 218, 0.15), rgba(38, 193, 218, 0.05));
}

#withdrawOverlay .withdraw-methods {
  margin-bottom: 16px;
}

#withdrawOverlay .method-option {
  min-height: 58px;
}

#withdrawOverlay .wd-balance-bar .left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#withdrawOverlay .wd-balance-bar .usdt-badge {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #26a17b;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

#withdrawOverlay .wd-balance-bar .label {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

#withdrawOverlay .wd-balance-bar .right {
  flex: 0 0 auto;
  color: #26c6da;
  font-size: 16px;
  font-weight: 900;
}

#withdrawOverlay .wd-section {
  margin-bottom: 16px;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

#withdrawOverlay .wd-section-title,
#withdrawOverlay .wd-amount-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#withdrawOverlay .wd-section-title .label,
#withdrawOverlay .wd-amount-header .label,
#withdrawOverlay .wd-pwd-label {
  color: rgba(255, 255, 255, 0.60);
  font-size: 14px;
  font-weight: 800;
}

#withdrawOverlay .wd-section-title .action {
  min-height: auto;
  padding: 0;
  color: #448aff;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

#withdrawOverlay .wd-select,
#withdrawOverlay .wd-amount-input-wrap,
#withdrawOverlay .wd-pwd-input-wrap {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

#withdrawOverlay .wd-select {
  justify-content: space-between;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 14px;
  text-align: left;
}

#withdrawOverlay .wd-select.has-value {
  color: #ffffff;
}

#withdrawOverlay .wd-select .arrow {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.30);
  font-size: 18px;
}

#withdrawOverlay .wd-amount-input-wrap,
#withdrawOverlay .wd-pwd-input-wrap {
  padding: 0 14px;
}

#withdrawOverlay .wd-amount-input-wrap input,
#withdrawOverlay .wd-pwd-input-wrap input {
  min-width: 0;
  flex: 1;
  min-height: 46px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  outline: none;
}

#withdrawOverlay .wd-amount-input-wrap input {
  font-size: 18px;
  font-weight: 900;
}

#withdrawOverlay .wd-pwd-input-wrap input {
  font-size: 15px;
}

#withdrawOverlay .wd-amount-input-wrap input::placeholder,
#withdrawOverlay .wd-pwd-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.24);
}

#withdrawOverlay .wd-amount-input-wrap .all-btn {
  flex: 0 0 auto;
  min-width: auto;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #448aff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

#withdrawOverlay .wd-pwd-section {
  margin-bottom: 16px;
}

#withdrawOverlay .wd-pwd-label {
  margin-bottom: 10px;
}

#withdrawOverlay .wd-pwd-link {
  display: inline-block;
  min-height: auto;
  margin-top: 8px;
  padding: 0;
  color: #448aff;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

#withdrawOverlay .wd-submit-btn {
  width: 100%;
  min-height: 48px;
  margin: 8px 0 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c4dff, #448aff);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

#withdrawOverlay .wd-contact {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 13px;
  text-align: center;
}

#withdrawOverlay .wd-contact button {
  min-height: auto;
  padding: 0;
  color: #448aff;
  background: transparent;
  font: inherit;
  font-weight: 800;
}

#withdrawOverlay .wd-notes {
  padding: 14px;
  border: 1px solid rgba(255, 165, 0, 0.15);
  border-radius: 12px;
  background: rgba(255, 165, 0, 0.08);
}

#withdrawOverlay .wd-notes .note-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: rgba(255, 200, 100, 0.85);
  font-size: 13px;
  line-height: 1.5;
}

#withdrawOverlay .wd-notes .note-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 14px;
}

/* Mobile-first layout guard: keep every user-facing page inside the phone canvas. */
:root {
  --hall-mobile-width: 430px;
}

html,
body[data-app="hall"] {
  width: 100%;
  overflow-x: hidden;
}

body[data-app="hall"] .hall-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

body[data-app="hall"] .page-content {
  width: 100%;
  max-width: var(--hall-mobile-width);
  margin: 0 auto;
}

body[data-app="hall"] .screen-overlay {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body[data-app="hall"] .screen-overlay .overlay-header,
body[data-app="hall"] #withdrawOverlay .withdraw-header {
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--hall-mobile-width);
  margin: 0 auto;
}

body[data-app="hall"] .screen-overlay .overlay-body,
body[data-app="hall"] #withdrawOverlay .withdraw-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--hall-mobile-width);
  min-height: 0;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

body[data-app="hall"] .overlay-header {
  grid-template-columns: 44px minmax(0, 1fr) 64px;
  padding-left: 16px;
  padding-right: 16px;
}

body[data-app="hall"] .overlay-header .back-btn,
body[data-app="hall"] #withdrawOverlay .withdraw-header .back-btn {
  justify-self: start;
  color: #ffffff;
}

body[data-app="hall"] .overlay-header strong,
body[data-app="hall"] #withdrawOverlay .withdraw-header .title {
  min-width: 0;
  text-align: center;
}

@media (min-width: 560px) {
  body[data-app="hall"] {
    background: #060716;
  }

  body[data-app="hall"] .hall-shell,
  body[data-app="hall"] .auth-screen {
    width: var(--hall-mobile-width);
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    background: linear-gradient(160deg, #0c0e2b 0%, #1a1044 30%, #0e1a3a 60%, #141230 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 60px rgba(0, 0, 0, 0.38);
  }

  body[data-app="hall"] .screen-overlay,
  body[data-app="hall"] .modal-mask {
    width: var(--hall-mobile-width);
    max-width: calc(100vw - 32px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  body[data-app="hall"] .toast {
    max-width: calc(var(--hall-mobile-width) - 28px);
  }
}

/* Modal forms should be solid panels, not translucent over the current page. */
body[data-app="hall"] .modal-mask {
  z-index: 220;
  background: rgba(0, 0, 0, 0.74);
}

body[data-app="hall"] .modal-card {
  border-color: rgba(255, 255, 255, 0.16);
  background: #202034;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.48);
}

body[data-app="hall"] .modal-card header,
body[data-app="hall"] .modal-body {
  background: #202034;
}

body[data-app="hall"] .modal-card header {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body[data-app="hall"] .modal-card header button {
  background: rgba(255, 255, 255, 0.12);
}

body[data-app="hall"] .modal-body .text-input {
  border-color: rgba(255, 255, 255, 0.14);
  background: #2a2b3f;
  color: #ffffff;
}

body[data-app="hall"] .modal-body .text-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

/* User center: prevent unreadable text and horizontal overflow on real phones. */
#myOverlay .overlay-body {
  width: 100%;
  max-width: var(--hall-mobile-width);
}

#myOverlay .my-profile-wrap,
#myOverlay .my-vip-card,
#myOverlay .my-action-btns,
#myOverlay .my-menu-grid,
#myOverlay .my-invite-card,
#myOverlay .my-list-section {
  max-width: calc(100% - 32px);
  margin-left: 16px;
  margin-right: 16px;
}

#myOverlay .my-profile-wrap,
#myOverlay .my-action-btns,
#myOverlay .my-menu-grid {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#myOverlay .my-action-btns button,
#myOverlay .my-action-btns button span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

#myOverlay .my-action-btns button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
}

#myOverlay .my-invite-card {
  overflow: hidden;
}

#myOverlay .my-invite-link-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

#myOverlay .my-invite-gift {
  width: 40px;
  min-width: 0;
  text-align: center;
}

#myOverlay #myReferralLink {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#myOverlay #copyMyReferralBtn {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  padding: 0;
  white-space: nowrap;
}

/* VIP detail: contain the carousel and weekly card inside the mobile viewport. */
#vipOverlay .vip-page-body {
  width: 100%;
  max-width: var(--hall-mobile-width);
  margin: 0 auto;
  padding: 10px 16px max(24px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

#vipOverlay .vip-card-strip {
  width: calc(100% + 32px);
  max-width: none;
  min-height: 236px;
  margin: 0 -16px 6px;
  padding: 12px 16px 18px;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: visible;
  scroll-padding-left: 16px;
  scroll-padding-right: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

#vipOverlay .vip-card-slide {
  flex: 0 0 calc(100vw - 32px);
  width: calc(100vw - 32px);
  max-width: calc(var(--hall-mobile-width) - 32px);
  min-width: 0;
  min-height: 204px;
  height: auto;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  scroll-snap-align: start;
}

#vipOverlay .vip-card-slide b,
#vipOverlay .vip-card-slide em {
  overflow-wrap: anywhere;
}

#vipOverlay .vip-stat-grid {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  z-index: 2;
  margin-top: 4px;
}

#vipOverlay .vip-stat-grid article {
  min-width: 0;
  padding: 12px 10px;
}

#vipOverlay .vip-stat-grid strong,
#vipOverlay .vip-stat-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#vipOverlay .vip-weekly-card {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 2px;
  min-height: 126px;
  align-content: start;
  overflow: visible;
}

#vipOverlay .vip-weekly-card > div:first-child,
#vipOverlay .vip-weekly-data {
  min-width: 0;
  flex-wrap: wrap;
}

#vipOverlay .vip-weekly-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

#vipOverlay .vip-weekly-data span,
#vipOverlay .vip-weekly-data b {
  min-width: 0;
  overflow-wrap: anywhere;
}

#vipOverlay .vip-weekly-card button {
  max-width: 100%;
  min-height: 40px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
}

/* Game cards use image art only. Hide or neutralize any legacy text layer restored by mobile WebView history. */
body[data-app="hall"] .game-card .game-info,
body[data-app="hall"] .game-card .game-name,
body[data-app="hall"] .game-card .game-plat,
body[data-app="hall"] .game-card .game-title,
body[data-app="hall"] .game-card .game-label,
body[data-app="hall"] .game-card .game-card-name,
body[data-app="hall"] .game-card [data-game-title],
body[data-app="hall"] .game-card [data-game-name] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 360px) {
  body[data-app="hall"] .overlay-header {
    grid-template-columns: 40px minmax(0, 1fr) 56px;
    padding-left: 12px;
    padding-right: 12px;
  }

  #myOverlay .my-profile {
    padding-left: 16px;
    padding-right: 16px;
  }

  #myOverlay .my-vip-card,
  #myOverlay .my-invite-card,
  #myOverlay .my-list-section {
    max-width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }

  #myOverlay .my-action-btns,
  #myOverlay .my-menu-grid {
    padding-left: 12px;
    padding-right: 12px;
  }

  #myOverlay .my-invite-link-row {
    grid-template-columns: 34px minmax(0, 1fr) 52px;
    gap: 6px;
  }

  #myOverlay .my-invite-gift {
    width: 34px;
    font-size: 30px;
  }

  #myOverlay #copyMyReferralBtn {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
  }

  #vipOverlay .vip-page-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  #vipOverlay .vip-card-strip {
    width: calc(100% + 24px);
    min-height: 218px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    scroll-padding-left: 12px;
    scroll-padding-right: 12px;
  }

  #vipOverlay .vip-card-slide {
    flex-basis: calc(100vw - 24px);
    width: calc(100vw - 24px);
    max-width: calc(var(--hall-mobile-width) - 24px);
    min-height: 194px;
    padding: 18px;
  }

  #vipOverlay .vip-stat-grid {
    gap: 8px;
  }

  #vipOverlay .vip-stat-grid strong {
    font-size: 17px;
  }

  #vipOverlay .vip-stat-grid span,
  #vipOverlay .vip-weekly-card span {
    font-size: 11px;
  }
}

/* Header avatar must remain a true circle regardless of Telegram image ratio or cached layout. */
body[data-app="hall"] .top-avatar {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  aspect-ratio: 1 / 1;
  position: relative;
  display: block;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
  appearance: none;
  -webkit-appearance: none;
}

body[data-app="hall"] .top-avatar img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* VIP detail spacing guard: cards, stat tabs, and weekly gift must never overlap. */
#vipOverlay .vip-page-body {
  gap: 18px !important;
}

#vipOverlay .vip-card-strip {
  flex: 0 0 auto;
  min-height: 238px !important;
  margin-bottom: 4px !important;
  overflow-y: visible !important;
}

#vipOverlay .vip-card-slide {
  box-sizing: border-box;
  min-height: 204px !important;
}

#vipOverlay .vip-stat-grid,
#vipOverlay .vip-weekly-card,
#vipOverlay .vip-rebate-section {
  position: relative;
  z-index: 3;
}

#vipOverlay .vip-weekly-card {
  min-height: 128px !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(40px, auto);
  align-content: start !important;
  gap: 10px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 12px !important;
  overflow: visible !important;
  clear: both;
}

#vipOverlay .vip-weekly-card button {
  min-height: 40px !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}

#vipOverlay .vip-rebate-section {
  margin-top: 0 !important;
}

body.vip-overlay-open .float-service-btn {
  top: auto;
  bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 84px));
}

#listOverlay .record-tabs {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  align-items: center !important;
  grid-auto-rows: 44px !important;
}

#listOverlay .record-tab {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  align-self: center !important;
  padding: 0 10px !important;
  line-height: 1 !important;
}

#listOverlay .list-body,
#listOverlay .finance-records {
  align-content: start !important;
  grid-auto-rows: max-content !important;
}

#listOverlay .finance-records .record-card {
  min-height: 0 !important;
  height: auto !important;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px;
}

#listOverlay .finance-records .record-card-top,
#listOverlay .finance-records .record-card-row {
  min-height: 0;
  margin-top: 0;
  line-height: 1.35;
}

#listOverlay .finance-records .record-card-row span,
#listOverlay .finance-records .record-card-row strong {
  min-width: 0;
}

#listOverlay .finance-records .record-card-row span:last-child {
  max-width: 54%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-brand img { width: 100%; max-width: 332px; height: auto; border-radius: 12px; }
