:root {
  --bg: #0f1419;
  --card: #1a2332;
  --card-border: #2d3a4f;
  --accent: #f0b429;
  --accent-dim: #c4921f;
  --text: #e8ecf1;
  --muted: #8b9cb3;
  --win: #3dd68c;
  --lose: #f07178;
  --dice-red: #e85d4c;
  --dice-green: #3dd68c;
  --dice-blue: #6cb6ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

body {
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 180, 41, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(108, 182, 255, 0.08), transparent);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

.header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 2rem;
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.tagline {
  font-size: 0.8rem;
  color: var(--muted);
}

.wallet {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.wallet-balance {
  line-height: 1.15;
}

.wallet-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.wallet-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.balance {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.guest-hint {
  font-size: 0.7rem;
  color: var(--muted);
}

.user-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.user-status {
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-auth-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.btn-auth-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.trial-banner,
.exchange-hint {
  font-size: 0.72rem;
  margin-top: 0.45rem;
  max-width: 22rem;
  margin-left: auto;
  line-height: 1.45;
  text-align: right;
}

.trial-banner {
  color: #f0a060;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(240, 160, 96, 0.1);
  border: 1px solid rgba(240, 160, 96, 0.25);
}

.trial-banner strong {
  color: #ffb87a;
}

.exchange-hint {
  color: var(--win);
}

.header-cn-link {
  display: none;
}

@media (max-width: 900px) {
  .header {
    padding: 0.85rem 1rem;
    gap: 0.55rem;
    flex-direction: column;
    align-items: stretch;
  }

  .wallet {
    width: 100%;
    align-items: flex-end;
    text-align: right;
  }

  .wallet-balance {
    align-self: flex-end;
    text-align: right;
  }

  .wallet-panel {
    align-items: flex-end;
  }

  .user-bar {
    justify-content: flex-end;
    width: 100%;
    margin-top: 0;
  }

  .trial-banner,
  .exchange-hint {
    text-align: right;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    max-width: 100%;
  }

  body.cn-site .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 0.45rem 0.75rem;
  }

  body.cn-site .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.cn-site .brand h1 {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  body.cn-site .brand .tagline {
    display: none;
  }

  body.cn-site .logo {
    font-size: 1.65rem;
  }

  body.cn-site .wallet {
    display: contents;
  }

  body.cn-site .wallet-balance {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    align-self: center;
  }

  body.cn-site .wallet-label {
    font-size: 0.72rem;
    margin-bottom: 0.1rem;
  }

  body.cn-site .balance {
    font-size: 1.55rem;
  }

  body.cn-site .wallet-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: stretch;
    padding-top: 0.55rem;
    border-top: 1px solid var(--card-border);
  }

  body.cn-site .user-bar {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 0;
    gap: 0.4rem;
  }

  body.cn-site .user-status {
    flex: 1 1 100%;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    text-align: left;
  }

  body.cn-site .btn-auth-sm {
    flex-shrink: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  body.cn-site #btn-deposit {
    border-color: rgba(74, 222, 128, 0.45);
    color: #4ade80;
  }

  body.cn-site #btn-withdraw {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
  }

  body.cn-site .header-cn-link {
    display: block;
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
    font-size: 0.78rem;
  }

  body.cn-site .header-cn-link a {
    color: var(--accent);
    text-decoration: none;
  }

  body.cn-site .trial-banner,
  body.cn-site .exchange-hint {
    text-align: left;
    margin-left: 0;
    max-width: none;
  }
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.auth-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.auth-lead {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240, 180, 41, 0.1);
}

.auth-form label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.5rem 0 0.25rem;
}

.auth-form input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.auth-form .btn-primary {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1a1200;
  font-weight: 600;
  cursor: pointer;
}

.auth-error {
  color: var(--lose);
  font-size: 0.8rem;
  min-height: 1.2rem;
  margin-top: 0.5rem;
}

.cn-withdraw-feedback {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.cn-withdraw-feedback.ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #4ade80;
}

.cn-withdraw-feedback.err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.cn-withdraw-feedback.hidden {
  display: none;
}

.btn-primary.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 1300;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  background: rgba(74, 222, 128, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #4ade80;
}

.app-toast.show.err {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #f87171;
}

@media (max-width: 900px) {
  .auth-overlay {
    align-items: flex-start;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-card {
    margin: auto 0;
    max-width: 100%;
    padding: 1.15rem 1rem 1.25rem;
  }

  .auth-card h2 {
    font-size: 1.1rem;
  }

  .auth-form label {
    font-size: 0.85rem;
  }

  .auth-form input {
    font-size: 16px;
    min-height: 44px;
  }

  .auth-form .btn-primary {
    min-height: 44px;
    font-size: 1rem;
  }
}

.auth-divider {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 1rem 0 0.75rem;
}

.btn-trial {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.55rem 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px dashed var(--card-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-trial-label {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
}

.btn-trial-x {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  font-size: 1.25rem;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-trial:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-trial:hover .btn-trial-x {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240, 180, 41, 0.08);
}

.auth-foot {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.75rem;
  text-align: center;
}

.register-captcha-wrap {
  margin-top: 0.75rem;
}

.register-captcha-hint {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
}

.register-captcha-hint.hidden {
  display: none;
}

.register-captcha-wrap.hidden {
  display: none;
}

.slider-captcha-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.slider-captcha-track {
  position: relative;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  user-select: none;
  touch-action: none;
  width: 100%;
  max-width: 280px;
}

.slider-captcha-slot {
  position: absolute;
  left: 0;
  top: 4px;
  height: 32px;
  border-radius: 6px;
  border: 1px dashed rgba(240, 180, 41, 0.55);
  background: rgba(240, 180, 41, 0.08);
  pointer-events: none;
  z-index: 0;
}

.slider-captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(240, 180, 41, 0.18);
  pointer-events: none;
}

.slider-captcha-puzzle {
  position: absolute;
  left: 0;
  top: 4px;
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.35);
  border: 1px solid rgba(240, 180, 41, 0.55);
  color: var(--accent);
  font-size: 0.85rem;
  pointer-events: none;
}

.slider-captcha-thumb {
  position: absolute;
  left: 0;
  top: 4px;
  width: 44px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--accent);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
}

.slider-captcha-msg {
  min-height: 1.1rem;
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.slider-captcha-msg.err {
  color: var(--lose);
}

.slider-captcha-msg.ok {
  color: var(--win);
}

.slider-captcha.passed .slider-captcha-thumb {
  cursor: default;
  border-color: var(--win);
  color: var(--win);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  overflow-x: auto;
}

.tab {
  flex: 1;
  min-width: 120px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .tab:hover {
    border-color: var(--accent-dim);
    color: var(--text);
  }
}

@media (max-width: 900px) {
  .tabs {
    overflow-x: visible;
    overscroll-behavior-x: none;
  }
}

.tab.active {
  background: linear-gradient(135deg, #2a3548, #1e2838);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.lottery-banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 0.65rem;
}

.lottery-banner-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.12), rgba(240, 120, 60, 0.08));
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.lottery-banner-link:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.18), rgba(240, 120, 60, 0.12));
}

.lottery-banner-link.unlocked {
  border-color: rgba(80, 200, 120, 0.45);
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.14), rgba(60, 180, 100, 0.08));
}

.lottery-banner-link.unlocked:hover {
  border-color: var(--win);
}

.lottery-banner-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.lottery-banner-text {
  flex: 1;
  min-width: 12rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lottery-banner-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.lottery-banner-link.unlocked .lottery-banner-cta {
  color: var(--win);
}

.lottery-banner-link.locked {
  cursor: pointer;
}

.lottery-banner-link.locked:hover {
  border-color: rgba(240, 180, 41, 0.45);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.12), rgba(240, 120, 60, 0.08));
}

.lottery-banner-link.locked .lottery-banner-cta {
  color: var(--muted);
  opacity: 0.75;
}

.lottery-banner-tip {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  color: #f0a060;
  border-radius: 6px;
  background: rgba(240, 160, 96, 0.12);
  border: 1px solid rgba(240, 160, 96, 0.25);
}

.lottery-banner-tip.hidden {
  display: none;
}

@media (max-width: 900px) {
  .lottery-banner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .lottery-banner-text {
    min-width: 0;
    font-size: 0.82rem;
  }
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem;
}

.card h2 {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.history-panel {
  grid-column: 1 / -1;
}

.history-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: -0.5rem 0 0.5rem;
}

.bet-query-toolbar {
  margin-bottom: 0.75rem;
}

.bet-query-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.bet-query-label {
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 2rem;
  padding-top: 0.35rem;
  flex-shrink: 0;
}

.bet-query-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

.bet-query-chip {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.bet-query-chip:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.bet-query-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240, 180, 41, 0.1);
}

.bet-pl-banner {
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.bet-pl-banner.win {
  color: var(--win);
  border: 1px solid rgba(61, 214, 140, 0.35);
}

.bet-pl-banner.lose {
  color: var(--lose);
  border: 1px solid rgba(240, 113, 120, 0.35);
}

.bet-pl-banner.even {
  color: var(--muted);
  border: 1px solid var(--card-border);
}

.bet-list-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.draw-info {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.draw-info .period {
  color: var(--accent);
  font-weight: 600;
}

.draw-info .summary {
  margin-top: 0.5rem;
  font-size: 1.15rem;
}

.draw-info .dice-summary {
  line-height: 1.45;
}

.draw-info .dice-summary-symbols,
.draw-info .dice-summary-detail {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .draw-info .dice-summary-detail {
    margin-top: 0.2rem;
    padding-left: 2.75rem;
    letter-spacing: 0.04em;
  }
}

@media (min-width: 901px) {
  .draw-info .dice-summary-symbols,
  .draw-info .dice-summary-detail {
    display: inline;
  }

  .draw-info .dice-summary-detail::before {
    content: '　';
  }
}

.draw-info .zodiac-draw-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.15rem;
  margin-top: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.draw-info .zodiac-kw,
.draw-info .zodiac-animal,
.draw-info .zodiac-ages-paren,
.draw-info .zodiac-ages {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .draw-info .zodiac-draw-line {
    font-size: 0.92rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .draw-info .zodiac-draw-line::-webkit-scrollbar {
    display: none;
  }
}

.countdown-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 0.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 180, 41, 0.12), transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.countdown-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

@media (max-width: 900px) {
  .countdown-bar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

.countdown {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.countdown.locked {
  color: var(--lose);
}

.lockout-hint {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--lose);
  font-weight: 600;
}

.lockout-hint.hidden {
  display: none;
}

.bet-panel.locked .btn-primary {
  opacity: 0.45;
  cursor: not-allowed;
}

.bet-actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.25rem;
}

.bet-actions .btn-primary {
  flex: 1;
  margin-top: 0;
}

.auto-bet-inline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.auto-bet-inline input {
  width: 2.5rem;
  padding: 0.35rem 0.2rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.auto-bet-suffix {
  font-size: 0.7rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.chip-auto {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.chip-auto:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(240, 180, 41, 0.22);
}

.chip-auto.chip-stop {
  background: rgba(240, 113, 120, 0.12);
  color: var(--lose);
  border-color: rgba(240, 113, 120, 0.35);
}

.chip-auto:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chip-auto.hidden {
  display: none;
}

.luck-bet-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--card-border);
}

.luck-bet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.luck-bet-pointer {
  width: 0;
  height: 0;
  margin: 0.15rem 0 0 1.35rem;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 16px solid #f0b429;
  filter: drop-shadow(0 0 6px rgba(240, 180, 41, 0.55));
  animation: luck-bet-pointer-bounce 0.85s ease-in-out infinite;
}

@keyframes luck-bet-pointer-bounce {
  0%, 100% { transform: translateY(5px); opacity: 0.75; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.luck-bet-hint {
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
  color: #ffe8a3;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(240, 180, 41, 0.12), rgba(157, 124, 255, 0.1));
  border: 1px solid rgba(240, 180, 41, 0.35);
}

.btn-luck {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(157, 124, 255, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(157, 124, 255, 0.2), rgba(157, 124, 255, 0.08));
  color: #ddd6fe;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-luck:hover:not(:disabled) {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, rgba(157, 124, 255, 0.35), rgba(157, 124, 255, 0.15));
}

.btn-luck.btn-luck-stop {
  background: rgba(240, 113, 120, 0.12);
  color: var(--lose);
  border-color: rgba(240, 113, 120, 0.4);
}

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

.btn-luck.hidden {
  display: none;
}

.bet-panel.auto-running .auto-bet-inline,
.bet-panel.auto-running .luck-bet-row,
.bet-panel.auto-running .luck-bet-actions,
.bet-panel.auto-running .btn-luck {
  pointer-events: auto;
  opacity: 1;
}

.auto-bet-status-mini {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1em;
}

.auto-bet-status-mini.active {
  color: var(--accent);
}

.bet-panel.auto-running {
  pointer-events: none;
  opacity: 0.92;
}

/* 本游戏自动下注试财运中：禁用手动选号/下注，保留停止试财运 */
.bet-panel.luck-auto-active #bet-forms,
.bet-panel.luck-auto-active .stake-row,
.bet-panel.luck-auto-active .bet-actions .btn-primary,
.bet-panel.luck-auto-active .auto-bet-inline {
  pointer-events: none;
  opacity: 0.55;
}

.bet-panel.luck-auto-active .luck-bet-row,
.bet-panel.luck-auto-active .luck-bet-actions,
.bet-panel.luck-auto-active .btn-luck {
  pointer-events: auto;
  opacity: 1;
}

.bet-panel.auto-running .bet-type.selected,
.bet-panel.auto-running .chip.selected {
  box-shadow: 0 0 0 2px var(--accent);
}

@media (max-width: 480px) {
  .bet-actions {
    flex-wrap: wrap;
  }
  .auto-bet-inline {
    width: 100%;
    justify-content: flex-end;
  }
}

.tabs.locked {
  pointer-events: none;
  opacity: 0.6;
}

.bet-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bet-type {
  padding: 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s;
}

.bet-type:hover {
  border-color: var(--muted);
}

.bet-type.selected {
  border-color: var(--accent);
  background: rgba(240, 180, 41, 0.1);
}

.bet-type .name {
  font-weight: 600;
  font-size: 0.9rem;
}

.bet-type .odds {
  font-size: 0.75rem;
  color: var(--accent);
}

.bet-type .desc {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.selection-panel {
  margin-bottom: 1rem;
}

.selection-panel h3 {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.chip:hover {
  border-color: var(--muted);
}

.chip.selected {
  border-color: var(--accent);
  background: rgba(240, 180, 41, 0.22);
}

.chip.dice-chip.selected {
  border-color: var(--accent);
  border-width: 2px;
  background: linear-gradient(165deg, #4a3a18 0%, #2e2410 100%);
  box-shadow:
    0 0 0 2px rgba(240, 180, 41, 0.45),
    inset 0 1px 0 rgba(255, 220, 140, 0.18);
}

.chip.dice-chip.selected .dice-chip-name {
  color: #ffe8a8;
  font-weight: 700;
}

.chip.dice-chip.selected .dice-chip-num {
  background: rgba(0, 0, 0, 0.55);
  color: #ffd54f;
}

.dice-symbol-grid .dice-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.4rem 0.5rem;
  gap: 0.1rem;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.dice-chip-name {
  font-size: 0.72rem;
  color: var(--muted);
}

.dice-chip-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffd54f;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.chip.dice-鱼,
.chip.dice-鸡 { border-color: var(--dice-red); }
.chip.dice-虾,
.chip.dice-蟹 { border-color: var(--dice-green); }
.chip.dice-葫芦,
.chip.dice-虎 { border-color: var(--dice-blue); }

.dice-color-grid .chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 5.5rem;
  padding: 0.45rem 0.55rem;
}

.dice-color-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.dice-color-syms {
  font-size: 0.72rem;
  color: var(--muted);
}

.chip.dice-color-gold { border-color: var(--dice-red); }
.chip.dice-color-green { border-color: var(--dice-green); }
.chip.dice-color-blue { border-color: var(--dice-blue); }

/* 鱼虾蟹 6 图案：手机端上 3 下 3 */
@media (max-width: 900px) {
  .chip-grid.dice-symbol-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .dice-symbol-grid .dice-chip {
    min-width: 0;
    width: 100%;
  }
}

.age-bet-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.age-pick-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
  max-height: none;
}

.age-pick-chip {
  min-width: 0;
  padding: 0.4rem 0.25rem;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (max-width: 480px) {
  .age-pick-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.stake-row {
  margin-bottom: 1rem;
}

.stake-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stake-row input {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #0f1419;
  color: var(--text);
  font-size: 1rem;
}

.quick-stakes {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.quick-stakes button {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.quick-stakes button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  color: #1a1200;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.msg.ok { color: var(--win); }
.msg.err { color: var(--lose); }

.bet-history {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.sub-title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.25rem 0 0.5rem;
}

.draw-history-block {
  margin-top: 0.75rem;
  border-top: 1px solid var(--card-border);
  padding-top: 0.5rem;
}

.draw-history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.35rem 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
}

.draw-history-toggle:hover {
  color: var(--accent);
}

.draw-history-chevron {
  font-size: 0.7rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.draw-history-block:not(.collapsed) .draw-history-chevron {
  transform: rotate(90deg);
}

.draw-history-body {
  margin-top: 0.35rem;
}

.draw-history-block.collapsed .draw-history-body {
  display: none;
}

.draw-history-list {
  list-style: none;
  overflow-y: auto;
}

/* 可视期数：鱼虾蟹 3 期、生肖 2 期、六合 3 期（超出可滚动） */
.draw-history-list.dh-game-dice {
  max-height: 252px;
}

.draw-history-list.dh-game-zodiac {
  max-height: 188px;
}

.draw-history-list.dh-game-lotto {
  max-height: 288px;
}

.draw-history-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.8rem;
}

.draw-history-list .dh-lotto .lotto-balls.compact {
  margin-top: 0.2rem;
}

.draw-history-list .dh-lotto .dh-text {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.draw-history-list .dh-period {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.35rem;
}

.draw-history-list .dh-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.draw-history-list .dh-result {
  margin-top: 0.25rem;
  color: var(--text);
  line-height: 1.4;
}

.bet-history li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.85rem;
  display: block;
}

.bet-history .bet-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.bet-history .bet-row-top .bet-row-main {
  flex: 1;
  min-width: 0;
  padding-right: 0.25rem;
}

.bet-history .bet-row-top .bet-row-status {
  flex-shrink: 0;
  padding-right: 0.65rem;
  text-align: right;
  white-space: nowrap;
}

.bet-history .bet-meta-inline {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #8ec8ff;
  line-height: 1.45;
  word-break: break-word;
}

.bet-history .bet-meta-line {
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0.88;
  margin: 0.35rem 0 0.4rem;
  padding: 0.35rem 0.5rem;
  line-height: 1.5;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.bet-history .bet-draw-line {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.bet-history .bet-draw-line strong {
  color: var(--text);
  font-weight: 500;
}

.bet-balance-line {
  margin-top: 0.45rem;
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.bet-pl-summary {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.bet-pl-summary strong {
  font-size: 1.05rem;
  margin-left: 0.2rem;
}

.bet-pl-win { color: var(--win); }
.bet-pl-lose { color: var(--lose); }
.bet-pl-even { color: var(--muted); }
.bet-pl-pending { color: var(--accent); margin-bottom: 0.25rem; }

.bet-balance-detail {
  font-size: 0.72rem;
  color: var(--muted);
}

.bet-balance-line strong {
  color: var(--text);
}

.bet-history .status-won { color: var(--win); }
.bet-history .status-lost { color: var(--lose); }
.bet-history .status-pending { color: var(--accent); }

.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer code {
  font-size: 0.7rem;
}

.symbols-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0;
}

.symbols-row .sym-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 鱼虾蟹传统图案（独立切图） */
.dice-sym-img {
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain;
  vertical-align: middle;
  image-rendering: auto;
}

.dice-sym-img.dice-sym-xs {
  width: 1.35rem;
  height: 1.35rem;
}

.dice-sym-img.dice-sym-sm {
  width: 1.85rem;
  height: 1.85rem;
}

.dice-sym-img.dice-sym-md {
  width: 2.5rem;
  height: 2.5rem;
}

.dice-sym-img.dice-sym-lg {
  width: 3.5rem;
  height: 3.5rem;
}

.dice-sym-img.dice-sym-chip {
  width: 3rem;
  height: 3rem;
}

.dice-chip-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 2.75rem;
}

.lotto-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.draw-info .lotto-summary {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.draw-info .lotto-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin-top: 0.35rem;
}

.draw-info .lotto-summary-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.draw-info .lotto-main-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
}

.draw-info .lotto-main-item + .lotto-main-item::before {
  content: '·';
  margin: 0 0.35rem;
  color: var(--muted);
  font-weight: 400;
}

.draw-info .lotto-summary-special {
  flex-wrap: nowrap;
}

@media (max-width: 900px) {
  .draw-info .lotto-summary-main {
    display: block;
  }

  .draw-info .lotto-main-head {
    margin-bottom: 0.3rem;
  }

  .draw-info .lotto-main-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem 0.25rem;
    width: 100%;
  }

  .draw-info .lotto-main-item {
    text-align: center;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .draw-info .lotto-main-item + .lotto-main-item::before {
    content: none;
    margin: 0;
  }
}

.draw-info .lotto-kw,
.draw-info .lotto-colon {
  flex-shrink: 0;
  white-space: nowrap;
}

.draw-info .lotto-kw {
  font-weight: 600;
  color: var(--accent);
}

.draw-info .lotto-summary-special .lotto-val {
  white-space: nowrap;
}

.draw-info .lotto-val {
  flex: 1 1 auto;
  min-width: 0;
  word-break: keep-all;
}

.ball {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.ball.main { background: #2d4a6f; }
.ball.special { background: linear-gradient(135deg, #c41e3a, #8b0000); }
.ball.red { background: #c41e3a; }
.ball.blue { background: #1e5aa8; }
.ball.green { background: #1a7a4a; }

.lotto-balls.compact .ball {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.65rem;
}

.dh-dice .sym {
  display: inline-flex;
  align-items: center;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.dh-dice .dh-text,
.dh-lotto .dh-text,
.dh-zodiac .dh-text {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.dh-zodiac .z-big { font-size: 1.1rem; }

.lotto-multi-hint {
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0.35rem 0 0.6rem;
}

/* 48 码选号：一次展示全部，不出现纵向滚动条 */
.lotto-num-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.35rem;
  max-height: none;
  overflow: visible;
}

.lotto-num-grid .chip.ball {
  min-width: 0;
  padding: 0.38rem 0.15rem;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (max-width: 640px) {
  .lotto-num-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.lotto-num-grid .chip.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.lotto-pick-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.5rem 0 0.35rem;
}

.btn-six-plus-random {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}

.lotto-num-grid .chip.disabled,
.lotto-num-grid .chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 手机端：一键返回顶部（查看开奖信息） */
.back-top {
  display: none !important;
}

@media (max-width: 900px) {
  .back-top {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    position: fixed;
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 500;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: #1e2838;
    color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    font-family: inherit;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .back-top.at-top {
    opacity: 0.92;
  }

  .back-top:active {
    transform: scale(0.92);
    background: #2a3548;
  }

  .back-top-icon {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .back-top.at-top .back-top-icon {
    transform: rotate(180deg);
  }

  .back-top-label {
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
  }
}

.cn-entry-banner {
  margin: 0 1.25rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.cn-entry-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
}

.cn-entry-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.cn-entry-text strong {
  color: #4ade80;
  font-size: 0.95rem;
}

.cn-entry-cta {
  color: #4ade80;
  font-weight: 600;
  white-space: nowrap;
}

.deposit-card .deposit-address-box {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.deposit-address-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.deposit-address-text {
  flex: 1;
  min-width: 0;
}

.deposit-qr-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  background: #fff;
  border-radius: 8px;
}

.deposit-qr-wrap.hidden {
  display: none;
}

.deposit-qr-hint {
  font-size: 0.7rem;
  color: #333;
}

.deposit-quick-stakes {
  margin: 0.35rem 0 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.deposit-quick-stakes button {
  min-width: 0;
  width: 100%;
  padding: 0.45rem 0.35rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.deposit-address-box code {
  display: block;
  word-break: break-all;
  margin: 0.35rem 0;
  font-size: 0.82rem;
}

.deposit-address-box .addr-highlight {
  color: #f87171;
  font-weight: 600;
}

.deposit-address-text .btn-outline {
  margin-top: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.deposit-address-text .btn-outline.copied {
  border-color: var(--win);
  color: var(--win);
  background: rgba(61, 214, 140, 0.12);
}

.deposit-history {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  max-height: 200px;
  overflow-y: auto;
}

.deposit-history li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.deposit-active-order {
  margin: 1rem 0;
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.deposit-pay-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: #4ade80;
  margin: 0.35rem 0;
}

.deposit-pay-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.deposit-rate-hint,
.deposit-cny-estimate {
  font-size: 0.88rem;
  color: #fbbf24;
  margin: 0.35rem 0 0;
}

.deposit-cny-estimate {
  margin-top: 0.25rem;
  font-weight: 500;
}

.btn-deposit-cancel {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-deposit-cancel:hover {
  background: rgba(248, 113, 113, 0.16);
}

.withdraw-card .auth-lead {
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.withdraw-hint {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.withdraw-hint.id-expired {
  color: #f87171;
}

.id-card-bind-panel h3 {
  font-size: 0.95rem;
  color: var(--gold, #fbbf24);
  margin-bottom: 0.5rem;
}

.withdraw-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.wd-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.wd-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.wd-stat-card strong {
  color: var(--gold, #fbbf24);
  font-size: 1.05rem;
}

.wd-field {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.wd-field input[type="text"],
.wd-field input[type="number"],
.wd-field input[type="password"],
.wd-field input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 16px;
}

.wd-field .req {
  color: #f87171;
}

.withdraw-history-wrap {
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.withdraw-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.withdraw-history-table th,
.withdraw-history-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.withdraw-history-table th {
  color: var(--muted);
  font-weight: 500;
  position: sticky;
  top: 0;
  background: var(--card, #1a1a2e);
}

.cn-ledger-balance-card {
  margin: 0.75rem 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cn-ledger-wrap {
  max-height: 320px;
}

.cn-ledger-table .ledger-note {
  max-width: 10rem;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.74rem;
}

.ledger-delta-pos {
  color: #4ade80;
  font-weight: 600;
}

.ledger-delta-neg {
  color: #f87171;
  font-weight: 600;
}

.ledger-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
}

.ledger-type-deposit {
  color: #4ade80;
}

.ledger-type-admin {
  color: #60a5fa;
}

.ledger-type-withdraw,
.ledger-type-withdraw_refund {
  color: #fbbf24;
}

.ledger-type-withdraw-paid {
  color: #4ade80;
}

.ledger-tx-link {
  color: #fff;
  text-decoration: underline;
}

.ledger-type-system {
  color: var(--muted);
}

.wd-st-pending { color: #fbbf24; }
.wd-st-approved { color: #4ade80; }
.wd-st-paid { color: #4ade80; }
.wd-st-rejected { color: #f87171; }

@media (max-width: 520px) {
  .withdraw-cards {
    grid-template-columns: 1fr;
  }
}

.support-chat-wrap {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.support-chat-wrap.hidden {
  display: none;
}

.support-chat-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(74, 222, 128, 0.75);
  background: linear-gradient(160deg, #22c55e, #16a34a);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-chat-fab:hover {
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.45);
}

.support-chat-fab:active {
  transform: scale(0.94);
}

.support-chat-fab-icon {
  display: block;
  flex-shrink: 0;
}

.support-chat-fab-label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #4ade80;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  pointer-events: none;
}

.support-chat-fab.hidden {
  display: none;
}

.support-chat-panel {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 901;
  width: min(360px, calc(100vw - 32px));
  height: min(480px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card, #1a1a2e);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.support-chat-panel.hidden {
  display: none;
}

.support-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(251, 191, 36, 0.08);
}

.support-chat-head strong {
  color: #fbbf24;
}

.support-chat-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-chat-empty {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.support-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.support-chat-msg-user {
  align-self: flex-end;
  align-items: flex-end;
}

.support-chat-msg-staff {
  align-self: flex-start;
  align-items: flex-start;
}

.support-chat-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.support-chat-msg-user .support-chat-bubble {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.support-chat-msg-staff .support-chat-bubble {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.22);
}

.support-chat-time {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 3px;
}

.support-chat-status {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.support-chat-status.hidden {
  display: none;
}

.support-chat-status.is-error {
  color: #fca5a5;
}

.support-chat-status.is-ok {
  color: #86efac;
}

.support-chat-form {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #151b28;
}

.support-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.support-chat-image-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1e2838;
  color: #94a3b8;
  cursor: pointer;
}

.support-chat-image-btn:active {
  background: #2a3548;
}

.support-chat-form textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #fff;
  color: #1a1a2e;
  font-size: 16px;
  line-height: 1.45;
  font-family: inherit;
  box-sizing: border-box;
}

.support-chat-form textarea::placeholder {
  color: #94a3b8;
}

.support-chat-send-btn {
  flex-shrink: 0;
  min-width: 56px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(160deg, #fbbf24, #d97706);
  color: #1a1208;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.support-chat-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.support-chat-send-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.support-chat-image-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
  max-width: 120px;
}

.support-chat-image-preview.hidden {
  display: none;
}

.support-chat-image-preview img {
  display: block;
  max-width: 120px;
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.support-chat-preview-clear {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.support-chat-img-open {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  max-width: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.support-chat-img {
  display: block;
  max-width: min(220px, 100%);
  max-height: 180px;
  border-radius: 8px;
  margin-top: 4px;
  cursor: pointer;
  object-fit: cover;
  vertical-align: top;
}

.support-chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.92);
  touch-action: manipulation;
}

.support-chat-lightbox.hidden {
  display: none;
}

.support-chat-lightbox-img {
  max-width: min(96vw, 900px);
  max-height: 92vh;
  border-radius: 8px;
  object-fit: contain;
}

.support-chat-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.support-chat-img-cap {
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 520px) {
  .support-chat-panel {
    right: 8px;
    bottom: 72px;
    width: calc(100vw - 16px);
    height: min(420px, calc(100vh - 96px));
  }

  .support-chat-wrap {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .support-chat-fab {
    width: 3rem;
    height: 3rem;
  }

  .support-chat-fab-icon {
    width: 22px;
    height: 22px;
  }

  .support-chat-fab-label {
    font-size: 0.68rem;
  }
}
