:root {
  --orange: #ff650d;
  --orange-soft: #ff7c28;
  --brown: #542e0a;
  --brown-deep: #3e2106;
  --ink: #444;
  --muted: #929292;
  --line: #ececec;
  --panel: #fff;
  --stage: #f1f1f1;
  --shell-width: 1320px;
  --shell-left: calc(50% - 680px);
  --ui-scale: 1;
  --number-font: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1180px;
  background: #eeeeee;
}

body {
  min-height: 100vh;
  padding-bottom: 150px;
  margin: 0;
  color: var(--ink);
  background: #eeeeee;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.background-art,
.background-art span {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.background-art {
  overflow: hidden;
}

.background-art .left-wash {
  width: 960px;
  height: 1040px;
  top: -90px;
  left: -95px;
  background:
    radial-gradient(ellipse at 37% 20%, rgba(255,255,255,.98) 0 15%, rgba(255,248,221,.86) 40%, rgba(255,215,83,.66) 72%, rgba(255,215,83,0) 73%);
  transform: rotate(-17deg);
}

.background-art .left-ring {
  width: 1120px;
  height: 1120px;
  left: -760px;
  top: 420px;
  border-radius: 50%;
  border: 225px solid #ffc01a;
  box-shadow:
    0 0 0 95px rgba(255, 216, 90, .28),
    0 0 0 230px rgba(255, 228, 142, .26);
}

.background-art .right-sun {
  width: 1080px;
  height: 640px;
  left: auto;
  right: -160px;
  top: auto;
  bottom: -180px;
  background: linear-gradient(145deg, rgba(255, 202, 49, .74), rgba(255, 222, 110, .46) 53%, rgba(255, 244, 205, 0) 76%);
  clip-path: polygon(0 0, 100% 78%, 100% 100%, 0 100%);
}

.shell {
  position: relative;
  z-index: 2;
  width: var(--shell-width);
  margin-left: var(--shell-left);
}

.desktop-flow {
  display: contents;
}

.account-bar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #666871;
  background: rgba(245, 245, 245, .78);
  padding: 0 14px;
}

.brand,
.account {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
}

.brand-logo {
  display: block;
  width: 90px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.brand-signal {
  margin-left: 18px;
  font-size: 22px;
  color: #686a71;
}

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

.account {
  gap: 13px;
  font-size: 17px;
}

.account-profile-trigger {
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: #575b65;
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.account-profile-trigger:hover,
.account-profile-trigger:focus-visible {
  color: #ed6b16;
  outline: none;
  background: rgba(255, 111, 20, .08);
}

.account-balance-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.account-balance-group[hidden] {
  display: none;
}

.account-member-id {
  padding: 2px 7px;
  border-radius: 10px;
  color: #8d5b20;
  font-family: Consolas, monospace;
  font-size: 11px;
  background: #fff1d8;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #74767d;
  border-radius: 50%;
  font-size: 25px;
  font-weight: 300;
}

.account b {
  font-family: Consolas, monospace;
  font-size: 15px;
}

.eye {
  color: #aaa;
  font-size: 11px;
}

.text-button,
.globe {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 4px 0;
}

.auth-action {
  min-width: 48px;
  padding: 6px 12px;
  border-radius: 5px;
  color: #fff;
  background: #f57a22;
}

.auth-action + .auth-action {
  color: #f06b12;
  box-shadow: inset 0 0 0 1px #f3a66f;
  background: #fff;
}

.globe {
  font-size: 24px;
}

.page {
  padding-bottom: 160px;
}

.hero {
  position: relative;
  z-index: 6;
  height: 138px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(134, 74, 15, .45), transparent 33%),
    linear-gradient(105deg, #653809 0, var(--brown-deep) 58%, #66370e 100%);
  border-radius: 30px 30px 0 0;
  display: grid;
  grid-template-columns: 430px 500px 390px;
}

.hero-left {
  display: flex;
  align-items: flex-start;
  padding: 31px 0 0 36px;
}

.lottery-emblem {
  position: relative;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid #f2c64c;
  background: #fff;
  box-shadow: 0 7px 10px rgba(0, 0, 0, .28);
}

.lottery-emblem svg,
.game-flag-mini svg {
  display: block;
  width: 100%;
  height: 100%;
}

.emblem-leaf {
  position: absolute;
  right: 15px;
  top: 5px;
  color: #73bd8e;
  font-size: 28px;
  transform: rotate(12deg);
}

.emblem-ball {
  position: absolute;
  left: 7px;
  top: 40px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #444;
  font: 800 9px Arial, sans-serif;
  background: #fff;
  transform: rotate(-18deg);
}

.emblem-wave {
  position: absolute;
  right: 11px;
  bottom: 7px;
  color: white;
  font-size: 35px;
  transform: rotate(-25deg);
}

.lottery-copy {
  margin-left: 17px;
}

.game-switch {
  position: relative;
}

.lottery-title {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0;
  border: 0;
  color: inherit;
  font-size: 27px;
  font-weight: 700;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.lottery-title .star {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-right: 10px;
  border-radius: 50%;
  color: white;
  font-size: 15px;
  background: #a9bfd0;
}

.lottery-title .down {
  position: relative;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  color: #ac8f77;
  font-size: 0;
  font-weight: 400;
}

.lottery-title .down::before,
.mini-game-switch-trigger .chevron::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.game-switch.open .lottery-title .down::before,
.game-switch.open .mini-game-switch-trigger .chevron::before {
  transform: rotate(225deg);
}

.game-switch-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 38px;
  width: 168px;
  padding: 6px;
  border: 1px solid #decdbf;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(39, 18, 3, .28);
}

.game-switch-menu[hidden] {
  display: none;
}

.game-switch-menu button {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #4f4f4f;
  font-size: 16px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.game-switch-menu button:hover,
.game-switch-menu button:focus-visible {
  color: #e96318;
  background: #fff4eb;
  outline: none;
}

.game-switch-menu button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, #f58b2a, #e95e12);
}

.lottery-tags {
  display: flex;
  gap: 6px;
}

.lottery-tags button {
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: rgba(153, 104, 51, .55);
}

.hero-center {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: 110px 255px;
  justify-content: end;
  align-content: start;
  gap: 8px;
  padding: 12px 12px 0 0;
}

.period {
  padding-top: 12px;
  text-align: right;
  font-size: 18px;
  line-height: 1.45;
}

.period span,
.period strong {
  display: block;
  font-weight: 400;
}

.period i {
  color: #ffc80c;
  font-style: normal;
}

.draw-video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 104px;
  height: 28px;
  margin-top: 5px;
  border: 1px solid rgba(255, 205, 91, .58);
  border-radius: 6px;
  color: #fff2cd;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  background: rgba(113, 57, 8, .72);
  box-shadow: 0 4px 12px rgba(29, 13, 1, .2);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.draw-video-link:hover,
.draw-video-link:focus-visible {
  border-color: #ffd76c;
  color: #351803;
  outline: none;
  background: linear-gradient(135deg, #ffe27a, #ffb22d);
}

.draw-video-link span {
  display: inline;
  color: inherit;
  font-size: 10px;
}

.digital-clock {
  width: 255px;
  height: 76px;
  padding: 8px 22px 6px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 5px;
  background: rgba(65, 34, 7, .43);
}

.clock-labels {
  display: flex;
  justify-content: space-around;
  color: #bda68b;
  font-size: 7px;
  font-family: Arial, sans-serif;
}

.clock-value {
  color: white;
  font: 400 43px/48px "Courier New", monospace;
  letter-spacing: -2px;
  white-space: nowrap;
}

.time-progress {
  grid-column: 2;
  width: 248px;
  height: 6px;
  margin: -1px 0 0 5px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(236, 212, 178, .55);
}

.time-progress i {
  display: block;
  width: 0;
  height: 100%;
  background:
    repeating-linear-gradient(
      105deg,
      #ff2e9d 0 9px,
      #ff6a68 9px 17px,
      #ffc800 17px 26px
    );
  background-size: 52px 100%;
  box-shadow: 0 0 7px rgba(255, 95, 87, .65);
  transition: width .25s linear;
  animation: time-progress-flow .9s linear infinite;
}

@keyframes time-progress-flow {
  to {
    background-position: 52px 0;
  }
}

.hero-right {
  --draw-column-gap: 9px;
  --draw-row-width: 479px;
  --draw-video-width: 92px;
  position: relative;
  grid-column: 2;
  grid-row: 1;
  padding-top: 14px;
  text-align: right;
}

.draw-period {
  height: 42px;
  padding: 0 0 0 max(0px, calc(100% - var(--draw-row-width)));
  font-size: 17px;
  text-align: left;
}

.draw-balls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 42px;
}

.history-toggle {
  cursor: pointer;
  outline: none;
}

.history-toggle:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(255, 188, 118, .7);
}

.history-toggle[aria-expanded="true"] .draw-down {
  transform: rotate(225deg);
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 5px solid;
  border-radius: 50%;
  color: #202020;
  font: 400 18px/1 var(--number-font);
  text-align: center;
  background: white;
  box-shadow: inset 0 0 4px rgba(0,0,0,.15);
}

.ball.green {
  border-color: #58b981;
}

.ball.red {
  border-color: #ff4d71;
}

.ball.blue {
  border-color: #5ca9e7;
}

.draw-balls > i {
  font-style: normal;
  font-weight: 600;
}

.draw-down {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: -5px 16px 0 8px;
  border-right: 2px solid #af9881;
  border-bottom: 2px solid #af9881;
  font-size: 0;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform .16s ease;
}

.zodiacs {
  display: flex;
  justify-content: flex-end;
  gap: 27px;
  padding: 5px 35px 0 0;
  font-size: 17px;
}

.zodiacs i {
  width: 0;
}

.hero-right .draw-balls,
.hero-right .zodiacs {
  display: grid;
  grid-template-columns: repeat(6, 40px) 16px 40px 10px;
  justify-content: end;
  column-gap: var(--draw-column-gap);
}

.hero-right .draw-balls {
  position: relative;
  grid-template-columns:
    repeat(6, 40px) 16px 40px 10px var(--draw-video-width);
}

.hero-right .draw-video-link {
  position: static;
  align-self: center;
  min-width: 0;
  width: var(--draw-video-width);
  height: 26px;
  margin: 0;
  transform: none;
}

.hero-right .zodiacs {
  gap: 0 9px;
  padding: 5px calc(var(--draw-video-width) + var(--draw-column-gap)) 0 0;
}

.hero-right .zodiacs::after {
  content: "";
}

.hero-right .zodiacs span,
.hero-right .zodiacs i,
.hero-right .draw-balls > i {
  width: auto;
  text-align: center;
}

.hero-right .draw-down {
  justify-self: center;
  margin: -5px 0 0;
}

.draw-history {
  position: absolute;
  z-index: 12;
  top: 132px;
  right: 31px;
  width: 346px;
  padding: 13px 11px 15px;
  border: 1px solid #ededed;
  border-radius: 12px;
  color: #555;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
}

.draw-history[hidden] {
  display: none;
}

.draw-history::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 16px;
  width: 15px;
  height: 15px;
  border-top: 1px solid #ededed;
  border-left: 1px solid #ededed;
  background: #fff;
  transform: rotate(45deg);
}

.history-list {
  display: grid;
}

.history-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: start;
  min-height: 54px;
}

.history-issue {
  padding-top: 8px;
  color: #9a9a9a;
  font-size: 15px;
  text-align: left;
}

.history-balls {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 4px;
}

.history-ball {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  color: #989898;
  font-size: 13px;
  line-height: 1;
}

.history-ball.special::before {
  content: "+";
  position: absolute;
  left: -7px;
  top: 7px;
  color: #9b9b9b;
  font-size: 13px;
}

.history-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 3px solid;
  border-radius: 50%;
  color: #4a4a4a;
  font: 400 12px/1 var(--number-font);
  background: #fff;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .12);
}

.history-number.green {
  border-color: #58b981;
}

.history-number.red {
  border-color: #ff4d71;
}

.history-number.blue {
  border-color: #5ca9e7;
}

.history-zodiac {
  white-space: nowrap;
}

.draw-history.from-mini {
  position: fixed;
  top: 54px;
  right: auto;
  left: calc(var(--shell-left) + var(--shell-width) - 377px);
}

.play-nav {
  position: relative;
  display: flex;
  align-items: center;
  height: 57px;
  padding: 0 25px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.play-nav::-webkit-scrollbar {
  display: none;
}

.play-nav button {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 24px;
  border: 0;
  color: #555;
  font-size: 18px;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.play-nav button.active {
  color: var(--orange);
}

.nav-arrows {
  position: absolute;
  right: 18px;
  display: flex;
  gap: 19px;
  pointer-events: none;
  color: #ffc19a;
  font-size: 28px;
}

.nav-arrows i {
  font-style: normal;
}

.help-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding-left: 16px;
  border: 0;
  color: #555;
  text-align: left;
  background: linear-gradient(#fff 70%, #f2f2f2);
  box-shadow: 0 5px 9px rgba(0,0,0,.10);
  cursor: pointer;
}

.help-row:hover {
  color: var(--orange);
  background: linear-gradient(#fffaf5 70%, #f7eee7);
}

.help-icon {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-right: 13px;
  border: 2px solid #777;
  border-radius: 50%;
  font-size: 14px;
}

.rule-hint {
  margin-left: 14px;
  color: var(--orange);
  font-size: 14px;
}

.code-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 104px;
  padding: 0 30px;
  background: #f1f1f1;
}

.code-tabs.is-hidden {
  display: none;
}

.code-tabs button {
  position: relative;
  width: 114px;
  height: 52px;
  border: 1px solid #d2d2d2;
  border-radius: 6px;
  color: #aaa;
  font-size: 18px;
  background: linear-gradient(#fff, #f8f8f8);
  cursor: pointer;
}

.code-tabs button.active {
  color: var(--orange-soft);
  border-color: var(--orange-soft);
}

.code-tabs button.active::after {
  margin-left: 6px;
  color: var(--orange);
  content: "✓";
  font-weight: 700;
}

.bet-card {
  margin: 0 14px 0;
  border-radius: 11px;
  background: linear-gradient(#fff 85%, #f4f4f4);
  box-shadow: 0 3px 8px rgba(130,130,130,.27);
}

.bet-content {
  background: #f1f1f1;
  padding-top: 0;
}

.inline-text-order {
  min-height: 232px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 20px 24px;
}

.inline-text-order #textOrderInput {
  width: 100%;
  height: 136px;
  min-height: 136px;
  max-height: 136px;
  padding: 12px 20px;
  border: 1px solid rgba(217, 146, 35, .72);
  border-radius: 10px;
  outline: none;
  color: #54320d;
  font: 17px/22px Consolas, "Microsoft YaHei", monospace;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 18px rgba(121, 77, 14, .12);
  transition: border-color .18s, box-shadow .18s, background .18s;
  resize: none;
  overflow-y: auto;
}

.inline-text-order #textOrderInput::placeholder {
  color: #a98251;
}

.inline-text-order #textOrderInput:focus {
  border-color: #ff781c;
  box-shadow: 0 0 0 3px rgba(255, 120, 28, .14), 0 5px 18px rgba(121, 77, 14, .12);
}

.inline-text-order #textOrderInput.applied {
  border-color: #28a36a;
  background: #f2fff8;
  box-shadow: 0 0 0 3px rgba(40, 163, 106, .13);
}

.inline-text-order #textOrderInput.invalid {
  border-color: #d84c3f;
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(216, 76, 63, .1);
}

.inline-text-order #textOrderInput.recognizing {
  border-color: #3d80d9;
  background:
    linear-gradient(90deg, rgba(61, 128, 217, .07), transparent 42%),
    rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 3px rgba(61, 128, 217, .11);
}

.inline-text-order #textOrderInput:disabled {
  color: #9d9387;
  background: rgba(245, 242, 238, .88);
  cursor: not-allowed;
}

.inline-text-order-actions {
  display: flex;
  justify-content: flex-end;
}

.inline-text-order-actions button {
  width: 142px;
  height: 46px;
  border: 1px solid #ff781c;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff8d2b, #f65c18);
  box-shadow: 0 6px 16px rgba(179, 69, 10, .2);
  cursor: pointer;
}

.inline-text-order-actions button:hover:not(:disabled) {
  filter: brightness(1.04);
}

.inline-text-order-actions button:disabled {
  border-color: rgba(185, 164, 137, .55);
  color: #a99a88;
  background: rgba(240, 235, 227, .92);
  box-shadow: none;
  cursor: not-allowed;
}

.cart-inline {
  margin-top: 12px;
  padding: 0 14px 14px;
  border: 1px solid #ececec;
  border-radius: 11px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 8px rgba(130, 130, 130, .2);
}

.cart-inline[hidden] {
  display: none;
}

.cart-inline-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.cart-inline-header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.cart-inline-header strong {
  color: #555;
  font-size: 18px;
}

.cart-inline-header span {
  color: #999;
  font-size: 13px;
}

.cart-inline-header > b {
  color: #777;
  font-size: 14px;
}

.cart-inline-header > b span {
  color: var(--orange);
  font: 700 18px/1 var(--number-font);
}

.cart-inline-list {
  display: grid;
  gap: 9px;
  padding-top: 12px;
}

.cart-inline-group {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 120px 54px;
  gap: 12px;
  min-height: 58px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #eee;
  border-radius: 7px;
  background: #fff;
}

.cart-inline-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #555;
}

.cart-inline-mode strong {
  font-size: 15px;
}

.cart-inline-mode span {
  color: #999;
  font-size: 12px;
}

.cart-inline-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cart-inline-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #555;
  font-size: 13px;
  background: #fff7ed;
}

.cart-inline-choice b {
  color: var(--orange);
}

.cart-inline-group-total {
  color: #777;
  text-align: right;
  font-size: 13px;
}

.cart-inline-group-total b {
  color: var(--orange);
  font: 700 15px/1 var(--number-font);
}

.cart-inline-remove {
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #888;
  background: #fff;
  cursor: pointer;
}

.cart-inline-remove:hover {
  color: var(--orange);
  border-color: #ffc08a;
}

.quick-card {
  min-height: 289px;
  padding: 29px 25px 22px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 57px;
}

.quick-item {
  display: grid;
  grid-template-columns: 68px 78px 1fr;
  align-items: center;
  min-width: 0;
  font-size: 19px;
}

.quick-item .odds,
.number-item .odds {
  color: var(--orange);
  font-size: 16px;
  font-weight: 700;
}

.bet-input {
  width: 116px;
  height: 43px;
  border: 1px solid #e9e9e9;
  border-radius: 5px;
  outline: 0;
  color: var(--orange);
  text-align: center;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 2px 3px rgba(220,220,220,.45);
  transition: border-color .16s, box-shadow .16s;
}

.bet-input:focus,
.bet-input.has-value {
  border-color: #ffc071;
  box-shadow: 0 0 0 2px rgba(255, 148, 50, .12), inset 0 2px 3px rgba(220,220,220,.38);
}

.number-item .number,
.quick-item .name,
.group-bet-item .name {
  cursor: pointer;
}

.number-item.stake-target .number {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(255, 101, 13, .72),
    inset 0 0 4px rgba(0, 0, 0, .15);
}

.quick-item.stake-target .name,
.group-bet-item.stake-target .name {
  color: var(--orange);
  font-weight: 700;
}

.number-item.stake-target .bet-input,
.quick-item.stake-target .bet-input,
.group-bet-item.stake-target .bet-input {
  border-color: var(--orange);
  background: #fffaf4;
  box-shadow: 0 0 0 2px rgba(255, 101, 13, .12);
}

.number-card {
  min-height: 630px;
  margin-top: 15px;
  padding: 20px 20px 24px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 58px;
}

.number-item {
  display: grid;
  grid-template-columns: 54px 76px 1fr;
  align-items: center;
  min-width: 0;
}

.number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 5px solid;
  border-radius: 50%;
  color: #202020;
  font-family: var(--number-font);
  font-size: 18px;
  font-weight: 400;
  background: #fff;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, .15);
}

.number.red,
.mini-number.red {
  border-color: #ff4d71;
}

.number.blue,
.mini-number.blue {
  border-color: #5ca9e7;
}

.number.green,
.mini-number.green {
  border-color: #58b981;
}

.number-item .bet-input {
  width: 92px;
  height: 42px;
}

.grouped-card,
.selection-card {
  min-height: 289px;
  padding: 20px 24px 28px;
}

.grouped-card + .grouped-card,
.selection-card + .selection-card {
  margin-top: 15px;
}

.group-block + .group-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ededed;
}

.group-title,
.selection-title {
  margin-bottom: 13px;
  color: #555;
  font-size: 17px;
  font-weight: 600;
}

.group-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
}

.group-bet-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(72px, 92px);
  gap: 4px;
  align-items: center;
  min-height: 45px;
  min-width: 0;
}

.group-bet-item .name,
.quick-item .name,
.selection-item .selection-main b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-bet-item .odds {
  color: var(--orange);
  font-size: 16px;
  font-weight: 700;
}

.group-bet-item .bet-input {
  width: 100%;
  max-width: 92px;
}

.special-zodiac-card .selection-hint {
  margin-bottom: 10px;
}

.special-zodiac-item {
  grid-template-columns: 28px minmax(0, 1fr) 38px 72px;
  gap: 4px;
}

.special-zodiac-item .name {
  font-weight: 700;
  text-align: center;
}

.zodiac-bet-numbers {
  min-width: 0;
  color: #777;
  font: 600 12px/1.35 var(--number-font);
  overflow-wrap: anywhere;
}

.special-zodiac-item .odds {
  text-align: center;
  white-space: nowrap;
}

.special-zodiac-item .bet-input {
  max-width: 72px;
}

.grouped-card[data-mode="一肖总肖平特尾数"] .group-bet-item {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(24px, auto) 36px;
  gap: 4px 6px;
  align-content: start;
}

.grouped-card[data-mode="一肖总肖平特尾数"] .group-bet-item .name {
  grid-column: 1;
  align-self: center;
  min-width: 0;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.grouped-card[data-mode="一肖总肖平特尾数"] .group-bet-item .odds {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

.grouped-card[data-mode="一肖总肖平特尾数"] .group-bet-item .bet-input {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  height: 36px;
}

.grouped-card[data-mode="特码大小"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px 18px;
  min-height: 0;
  padding: 16px 20px 20px;
}

.grouped-card[data-mode="特码大小"] .group-block {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ededed;
  border-radius: 8px;
}

.grouped-card[data-mode="特码大小"] .group-title {
  margin-bottom: 7px;
  font-size: 15px;
}

.grouped-card[data-mode="特码大小"] .group-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}

.grouped-card[data-mode="特码大小"] .group-bet-item {
  grid-template-columns: minmax(42px, 1fr) 54px 82px;
  min-height: 38px;
}

.grouped-card[data-mode="特码大小"] .group-bet-item .bet-input {
  width: 82px;
  height: 36px;
}

.grouped-card[data-mode="特码大小"] .group-block:last-child {
  grid-column: 1 / -1;
}

.grouped-card[data-mode="特码大小"] .group-block:last-child .group-items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selection-hint {
  margin: -4px 0 16px;
  color: #999;
  font-size: 14px;
}

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

.selection-grid.zodiac-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.variant-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.variant-tabs button {
  flex: 0 0 auto;
  min-width: 76px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  color: #666;
  white-space: nowrap;
  background: #fff;
  cursor: pointer;
}

.variant-tabs button.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.variant-tabs button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.variant-selection-card .selection-title {
  margin-bottom: 9px;
}

.variant-selection-card .combination-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  text-align: center;
}

.variant-selection-card .combination-title strong {
  color: #f22;
  font-size: 20px;
  font-weight: 500;
}

.variant-selection-card .combination-title span {
  color: #666;
  font-size: 15px;
}

.variant-selection-card > .selection-hint {
  margin: 0 0 18px;
  text-align: center;
}

.selection-item {
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 7px;
  color: #555;
  text-align: left;
  background: linear-gradient(#fff, #f7f7f7);
  cursor: pointer;
}

.selection-item:hover {
  border-color: #ffc27c;
}

.selection-item.selected {
  color: var(--orange);
  border-color: var(--orange);
  background: #fff8ef;
  box-shadow: 0 0 0 2px rgba(255,101,13,.08);
}

.selection-item .selection-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 17px;
}

.selection-item .selection-odds {
  color: var(--orange);
  font-size: 15px;
  font-weight: 700;
}

.selection-item .selection-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.selection-item .mini-number {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 3px solid;
  border-radius: 50%;
  color: #333;
  font-family: var(--number-font);
  font-size: 12px;
  font-style: normal;
  background: #fff;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .12);
}

.selection-item.number-choice {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.selection-item.number-choice .number {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

/* 组合玩法采用参考站的三列卡片结构：选择块与赔率各自独立。 */
.selection-grid.zodiac-grid.combination-zodiac-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(28px, 6vw, 76px);
  row-gap: 16px;
}

.selection-item.combination-zodiac-item,
.selection-item.combination-tail-item {
  min-height: 0;
  padding: 0;
  border: 0;
  color: #555;
  text-align: center;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.selection-item.combination-zodiac-item:hover,
.selection-item.combination-tail-item:hover {
  border: 0;
}

.combination-choice-box {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.combination-choice-box > b {
  color: #e5292d;
  font-size: 19px;
  line-height: 1;
}

.selection-item.combination-zodiac-item .selection-numbers {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 24px);
  width: 100%;
  margin: 0;
}

.selection-item.combination-zodiac-item .mini-number {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-family: var(--number-font);
  font-size: 17px;
  font-style: normal;
  line-height: 1.2;
  background: transparent;
  box-shadow: none;
}

.selection-item.combination-zodiac-item .mini-number.red { color: #ff4b50; }
.selection-item.combination-zodiac-item .mini-number.blue { color: #3487ff; }
.selection-item.combination-zodiac-item .mini-number.green { color: #00c94f; }

.selection-item.combination-zodiac-item > .selection-odds,
.selection-item.combination-tail-item > .selection-odds {
  display: block;
  padding-top: 7px;
  color: #aaa;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.selection-item.combination-zodiac-item.selected,
.selection-item.combination-tail-item.selected {
  color: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.selection-item.combination-zodiac-item.selected .combination-choice-box,
.selection-item.combination-tail-item.selected .combination-choice-box {
  color: #fff;
  border-color: #e5292d;
  background: #e5292d;
}

.selection-item.combination-zodiac-item.selected .combination-choice-box > b,
.selection-item.combination-zodiac-item.selected .mini-number,
.selection-item.combination-tail-item.selected .combination-choice-box > b {
  color: #fff;
}

.combination-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 13px 14px;
  border: 2px solid #e42525;
  color: #666;
  font-size: 17px;
  background: rgba(255, 255, 255, .82);
}

.combination-summary b {
  margin: 0 2px;
  color: red;
  font-family: var(--number-font);
  font-size: 18px;
  font-weight: 500;
}

.empty-card {
  min-height: 289px;
  display: grid;
  place-items: center;
  color: #999;
}

.side-tools {
  position: fixed;
  z-index: 5;
  left: calc(var(--shell-left) + var(--shell-width) + 64px);
  top: 40.5vh;
  width: 168px;
  padding: 18px 0;
  border-radius: 12px;
  background: #fff;
}

.side-tools button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 79px;
  padding: 0 20px;
  border: 0;
  color: #c97100;
  font-size: 19px;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.side-tools button:hover {
  background: #fff8ed;
}

.side-tools span {
  width: 34px;
  font-size: 26px;
}

.history-drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  overflow: visible;
  color: #555;
  background: #fff;
  box-shadow: -5px 0 16px rgba(0, 0, 0, .18);
  transform: translateX(102%);
  transition: transform .22s ease;
  pointer-events: none;
}

.history-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer-handle {
  position: absolute;
  top: 103px;
  left: -25px;
  width: 25px;
  height: 64px;
  border: 0;
  border-radius: 4px 0 0 4px;
  color: white;
  font-size: 22px;
  background: #a86622;
  cursor: pointer;
  pointer-events: auto;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 42px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.drawer-tabs button {
  border: 0;
  color: #555;
  background: #fff;
  cursor: pointer;
}

.drawer-tabs button.active {
  color: #b66b15;
  background: linear-gradient(#fff8ea, #ffe3ad);
}

.drawer-recent {
  height: calc(100vh - 42px);
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.drawer-table-head {
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-rows: 20px 20px;
  height: 41px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #ddd;
  color: #444;
  font-size: 12px;
}

.drawer-table-head > span:first-child {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
}

.drawer-table-head > span:nth-child(2) {
  display: grid;
  place-items: center;
}

.drawer-table-head > div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
}

.drawer-table-head i {
  font-style: normal;
  text-align: center;
}

.drawer-history-list {
  height: calc(100vh - 83px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
}

.drawer-history-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: 61px;
  border-bottom: 1px solid #eee;
}

.drawer-history-row:first-child .drawer-issue {
  color: #f39800;
  font-weight: 700;
}

.drawer-issue {
  display: grid;
  place-items: center;
  color: #777;
  font-size: 13px;
}

.drawer-result {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
}

.drawer-ball {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #7d7d7d;
  font-size: 12px;
  line-height: 1;
}

.drawer-number {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 3px solid;
  border-radius: 50%;
  color: #3f3f3f;
  font: 400 12px/1 var(--number-font);
  background: white;
}

.drawer-number.red {
  border-color: #ff4d71;
}

.drawer-number.blue {
  border-color: #5ca9e7;
}

.drawer-number.green {
  border-color: #58b981;
}

.drawer-bets {
  height: calc(100vh - 42px);
  overflow: hidden;
  background: #f5f5f5;
}

.drawer-bet-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

.drawer-bet-head strong {
  color: #555;
  font-size: 16px;
}

.drawer-bet-head span {
  color: #999;
  font-size: 12px;
}

.drawer-bet-list {
  height: calc(100vh - 105px);
  padding: 12px;
  overflow-y: auto;
}

.drawer-bet-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #999;
  text-align: center;
  line-height: 1.8;
}

.drawer-bet-card {
  margin-bottom: 10px;
  padding: 13px 14px;
  border-radius: 8px;
  color: #666;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.drawer-bet-card header,
.drawer-bet-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-bet-card header {
  margin-bottom: 9px;
}

.drawer-bet-card header strong {
  color: #ee6e17;
}

.drawer-bet-card header span {
  padding: 2px 7px;
  border-radius: 10px;
  color: #bc7b18;
  font-size: 11px;
  background: #fff3dc;
}

.drawer-bet-card p {
  margin: 5px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}

.drawer-bet-card footer {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  color: #999;
  font-size: 11px;
}

.drawer-bet-card footer b {
  color: #ee4c30;
  font-size: 14px;
}

.drawer-withdrawal-card.success {
  border-left: 3px solid #34a96d;
}

.drawer-withdrawal-card.success header span {
  color: #218954;
  background: #e8f8ef;
}

.drawer-withdrawal-card.rejected {
  border-left: 3px solid #d25b61;
}

.drawer-withdrawal-card.rejected header span {
  color: #b8424a;
  background: #fff0f1;
}

.drawer-withdrawal-card.pending {
  border-left: 3px solid #e7a12e;
}

.drawer-withdrawal-note {
  color: #888 !important;
  font-size: 12px !important;
}

.drawer-cart-remove {
  border: 0;
  color: #999;
  font-size: 12px;
  background: transparent;
  cursor: pointer;
}

.drawer-cart-remove:hover {
  color: var(--orange);
}

.bet-dock {
  position: fixed;
  z-index: 9;
  bottom: 0;
  height: 130px;
  padding: 16px 15px 12px;
  border-radius: 11px 11px 0 0;
  background: #fff;
  box-shadow: 0 -2px 9px rgba(120,120,120,.24);
}

.dock-balance {
  height: 35px;
  display: flex;
  align-items: flex-start;
  font-size: 16px;
}

.dock-balance strong {
  margin-right: 8px;
  color: red;
  font-weight: 400;
}

.dock-row {
  height: 58px;
  display: flex;
  align-items: stretch;
}

.edit-icon {
  display: grid;
  place-items: center;
  width: 50px;
  padding: 0;
  border: 1px solid #ddd;
  border-right: 0;
  border-radius: 7px 0 0 7px;
  color: #7d899a;
  font-size: 22px;
  background: linear-gradient(#fff, #f1f1f1);
  cursor: pointer;
}

.edit-icon:hover,
.edit-icon:focus-visible {
  color: var(--orange);
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--orange-soft);
}

.edit-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stake-chips {
  display: flex;
  width: 355px;
  border: 1px solid #ddd;
  border-left: 0;
  border-radius: 0 7px 7px 0;
  overflow: hidden;
  background: linear-gradient(#fff, #f1f1f1);
}

.stake-chips button {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 17px;
  cursor: pointer;
}

.stake-chips button + button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 1px;
  height: 30px;
  background: #d7d7d7;
}

.stake-chips button.active {
  color: #333;
  box-shadow: inset 0 0 0 1px var(--orange-soft);
  background: white;
}

.custom-stake {
  width: 151px;
  margin-left: 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  outline: 0;
  text-align: center;
}

.custom-stake-control {
  display: contents;
}

.custom-stake-prefix,
.custom-stake-suffix {
  display: none;
}

.custom-stake::placeholder {
  color: #aaa;
  font-size: 13px;
}

.dock-total {
  display: flex;
  min-width: 128px;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
}

.dock-total strong {
  margin-left: 5px;
  color: #f04f23;
  font-family: Consolas, monospace;
}

.dock-spacer {
  flex: 1;
}

.action {
  min-width: 74px;
  border: 0;
  border-right: 1px solid #aaa;
  color: #c8c8c8;
  font-size: 17px;
  background: linear-gradient(#f7f7f7, #e4e4e4);
  box-shadow: 0 2px 0 #999;
}

.action:enabled {
  color: #fff;
  background: linear-gradient(#ff8c3d, #f16812);
  cursor: pointer;
}

.action.primary {
  width: 116px;
  border-radius: 8px;
  margin-right: 14px;
  border-right: 0;
}

.action.split {
  border-radius: 8px 0 0 8px;
}

.action.basket {
  width: 116px;
  border-radius: 0 8px 8px 0;
  border-right: 0;
}

.clear {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 63px;
  border: 0;
  color: #c9c9c9;
  background: transparent;
  cursor: pointer;
}

.clear span {
  font-size: 25px;
}

/* 组合玩法的底部操作区独立呈现单注金额和组合快捷金额。 */
.combination-mode-active {
  padding-bottom: 170px;
}

.combination-mode-active .bet-dock {
  height: 160px;
  padding-top: 10px;
}

.combination-mode-active .dock-balance {
  height: 28px;
}

.combination-mode-active .dock-row {
  height: 108px;
  display: grid;
  grid-template-columns: 76px minmax(300px, 1fr) 132px 132px 132px 132px;
  grid-template-rows: 42px 52px;
  gap: 8px 10px;
}

.combination-mode-active .stake-chips {
  grid-column: 1 / 6;
  grid-row: 1;
  width: auto;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.combination-mode-active .stake-chips button {
  border-radius: 18px;
  color: #fff;
  background: #aaa;
}

.combination-mode-active .stake-chips button + button::before {
  display: none;
}

.combination-mode-active .stake-chips button.active {
  color: #fff;
  background: var(--orange);
  box-shadow: none;
}

.combination-mode-active .edit-icon {
  grid-column: 6;
  grid-row: 1;
  width: auto;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: #aaa;
}

.combination-mode-active .edit-icon svg {
  display: none;
}

.combination-mode-active .edit-icon::after {
  content: "编辑金额";
  font-size: 14px;
}

.combination-mode-active .custom-stake-control {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #555;
  font-size: 16px;
}

.combination-mode-active .custom-stake-prefix,
.combination-mode-active .custom-stake-suffix {
  display: inline;
  white-space: nowrap;
}

.combination-mode-active .custom-stake {
  width: 120px;
  height: 48px;
  margin: 0;
  border-color: #ccc;
  font-size: 18px;
}

.combination-mode-active .dock-total,
.combination-mode-active .dock-spacer {
  display: none;
}

.combination-mode-active .clear {
  grid-column: 1;
  grid-row: 2;
  width: auto;
}

.combination-mode-active .action.basket {
  grid-column: 3;
  grid-row: 2;
  width: auto;
  border-radius: 8px;
  border-right: 0;
}

.combination-mode-active .action.split {
  grid-column: 4;
  grid-row: 2;
  border-radius: 8px;
  border-right: 0;
}

.combination-mode-active .action.primary {
  grid-column: 5 / 7;
  grid-row: 2;
  width: auto;
  margin: 0;
}

.mini-header {
  position: fixed;
  z-index: 8;
  top: 0;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(#fff 87%, #ececec);
  box-shadow: 0 3px 7px rgba(100,100,100,.28);
  transform: translateY(-110%);
  transition: transform .18s ease;
}

.mini-header.visible {
  transform: translateY(0);
}

.mini-left {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 18px;
}

.mini-left strong {
  color: var(--orange);
  font-size: 21px;
}

.mini-game-switch-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.game-flag-mini {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  overflow: hidden;
  border: 2px solid #f2c64c;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.mini-game-switch-trigger .chevron {
  position: relative;
  width: 12px;
  height: 12px;
  color: var(--orange);
  font-size: 0;
}

.mini-game-switch-trigger .chevron::before {
  top: 0;
  left: 1px;
}

.game-switch-mini .game-switch-menu {
  top: calc(100% + 13px);
  left: 0;
}

.mini-left .bell {
  color: #ffbd00;
}

.mini-clock {
  padding: 4px 8px;
  color: white;
  font: 22px/1 "Courier New", monospace;
  background: #ff7834;
  border: 2px solid #ffc5a5;
}

.mini-balls {
  gap: 7px;
}

.mini-balls .ball {
  width: 36px;
  height: 36px;
  border-width: 4px;
  font-size: 16px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 150px;
  padding: 12px 22px;
  border-radius: 7px;
  color: white;
  background: rgba(45,45,45,.86);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.stake-editor-dialog {
  width: min(625px, calc(100vw - 24px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #333;
  background: #fff;
  box-shadow: 0 20px 58px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.stake-editor-dialog[open] {
  display: flex;
  flex-direction: column;
}

.stake-editor-dialog::backdrop {
  background: rgba(20, 20, 20, .38);
  backdrop-filter: blur(2px);
}

.stake-editor-header {
  position: relative;
  display: grid;
  min-height: 60px;
  padding: 0 64px;
  border-bottom: 1px solid #e5e5e5;
  place-items: center;
}

.stake-editor-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.stake-editor-close {
  position: absolute;
  top: 8px;
  right: 15px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #777;
  font: 38px/1 Arial, sans-serif;
  background: transparent;
  cursor: pointer;
}

.stake-editor-close:hover {
  color: var(--orange);
}

.stake-editor-form {
  display: flex;
  min-height: 292px;
  flex-direction: column;
}

.stake-editor-grid {
  display: grid;
  padding: 24px 30px 16px;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stake-editor-option {
  position: relative;
  display: block;
  height: 60px;
}

.stake-editor-option .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stake-editor-option input,
.stake-editor-restore {
  width: 100%;
  height: 60px;
  padding: 0 12px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  outline: 0;
  color: #222;
  font-size: 19px;
  text-align: center;
  background: linear-gradient(#fff, #fafafa);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.stake-editor-option input:focus {
  border-color: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(255, 101, 13, .12);
}

.stake-editor-remove {
  position: absolute;
  z-index: 1;
  top: -11px;
  right: -10px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0 0 2px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font: 22px/1 Arial, sans-serif;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.stake-editor-remove:hover {
  color: #fff;
  background: var(--orange);
}

.stake-editor-restore {
  cursor: pointer;
}

.stake-editor-restore:hover {
  border-color: var(--orange-soft);
  color: var(--orange);
}

.stake-editor-error {
  min-height: 22px;
  margin: 0;
  padding: 0 30px;
  color: #e5482d;
  font-size: 14px;
}

.stake-editor-footer {
  display: flex;
  min-height: 86px;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #e8e8e8;
  gap: 30px;
}

.stake-editor-footer button {
  width: 150px;
  height: 52px;
  border: 1px solid #d2d2d2;
  border-radius: 7px;
  font-size: 19px;
  cursor: pointer;
}

.stake-editor-cancel {
  color: #444;
  background: linear-gradient(#fff, #f4f4f4);
}

.stake-editor-save {
  border-color: #ff981e !important;
  color: #fff;
  background: linear-gradient(#ffab25, #ff8b10);
  box-shadow: 0 2px 1px rgba(0, 0, 0, .16);
}

.stake-editor-save:hover {
  background: linear-gradient(#ffb335, #ff7d00);
}

.lottery-intro-dialog {
  width: min(890px, calc(100vw - 20px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0 0 14px 14px;
  color: #555;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  overflow: hidden;
}

.lottery-intro-dialog[open] {
  display: flex;
  flex-direction: column;
}

.lottery-intro-dialog::backdrop {
  background: rgba(20, 20, 20, .32);
  backdrop-filter: blur(1px);
}

.lottery-intro-header {
  position: relative;
  display: grid;
  min-height: 66px;
  padding: 0 62px;
  border-bottom: 1px solid #e4e4e4;
  background: #fff;
  place-items: center;
}

.lottery-intro-header h2 {
  margin: 0;
  color: #3b3b3b;
  font-size: 26px;
  font-weight: 400;
}

.lottery-intro-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #858585;
  font: 35px/1 Arial, sans-serif;
  background: transparent;
  cursor: pointer;
}

.lottery-intro-close:hover {
  color: var(--orange);
}

.lottery-intro-content {
  padding: 36px 52px 38px;
  font-size: 20px;
  line-height: 1.75;
}

.lottery-intro-content section + section {
  margin-top: 24px;
}

.lottery-intro-content h3 {
  margin: 0 0 8px;
  color: #4c4c4c;
  font-size: 20px;
  font-weight: 400;
}

.lottery-intro-content p {
  margin: 3px 0;
}

.lottery-intro-link {
  margin-top: 38px !important;
  white-space: normal;
}

.lottery-intro-link a {
  color: #001cff;
  text-decoration: underline;
}

.rules-dialog {
  width: min(1480px, calc(100vw - 20px));
  max-width: none;
  height: min(880px, calc(100dvh - 20px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #3e3e3e;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  overflow: hidden;
}

.rules-dialog[open] {
  display: flex;
  flex-direction: column;
}

.rules-dialog::backdrop {
  background: rgba(20, 20, 20, .38);
  backdrop-filter: blur(2px);
}

.rules-dialog-header {
  position: relative;
  display: grid;
  min-height: 64px;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid #e8e8e8;
  grid-template-columns: 220px minmax(0, 1fr) 48px;
  background: #fff;
}

.rules-dialog-header select {
  width: 180px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  outline: 0;
  color: #3f3f3f;
  font-size: 17px;
  background: #fff;
}

.rules-dialog-header select:focus {
  border-color: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(255, 101, 13, .1);
}

.rules-dialog-header h2 {
  margin: 0;
  color: #222;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.rules-dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #777;
  font: 42px/1 Arial, sans-serif;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.rules-dialog-close:hover {
  color: var(--orange);
}

.rules-dialog-content {
  flex: 1;
  padding: 25px 28px 40px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #b8b8b8 transparent;
  scrollbar-width: thin;
}

.rules-dialog-content section + section {
  margin-top: 26px;
}

.rules-dialog-content h3 {
  margin: 0 0 5px;
  color: #303030;
  font-size: 18px;
}

.rules-dialog-content p {
  margin: 2px 0;
  color: #454545;
  font-size: 16px;
  line-height: 1.65;
}

.rules-dialog-content .rules-note {
  padding: 16px 18px;
  border: 1px solid #ffe0c9;
  border-radius: 8px;
  background: #fff9f4;
}

.rules-dialog-content .rules-note h3 {
  color: #d65b0b;
}

.profile-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: #343139;
  background: #fff;
  box-shadow: 0 24px 80px rgba(53, 31, 15, .32);
}

.profile-dialog[open] {
  display: block;
}

.profile-dialog::backdrop {
  background: rgba(42, 28, 18, .58);
  backdrop-filter: blur(6px);
}

.profile-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 22px 16px;
  border-bottom: 1px solid #eee8e3;
}

.profile-dialog-header span {
  color: #f26816;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.profile-dialog-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.profile-dialog-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #817b77;
  font-size: 25px;
  line-height: 1;
  background: #f5f2ef;
  cursor: pointer;
}

.profile-dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.profile-identity {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid #eee6df;
  border-radius: 13px;
  background: #fffaf6;
}

.profile-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #e3c4ad;
  border-radius: 50%;
  color: #a56334;
  font-size: 25px;
  background: #fff;
}

.profile-identity > div > span {
  display: block;
  margin-bottom: 3px;
  color: #9a918b;
  font-size: 11px;
}

.profile-identity strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.profile-identity > b {
  padding: 4px 9px;
  border-radius: 12px;
  color: #218c5a;
  font-size: 11px;
  background: #eaf8f0;
}

.profile-balance {
  padding: 17px 18px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(120deg, #7f330e, #f47b22);
  box-shadow: 0 12px 30px rgba(190, 78, 18, .18);
}

.profile-balance > span,
.profile-balance > small {
  display: block;
  color: rgba(255, 255, 255, .78);
}

.profile-balance > span {
  font-size: 12px;
}

.profile-balance > strong {
  display: block;
  margin: 5px 0 3px;
  font-family: Consolas, monospace;
  font-size: 27px;
}

.profile-balance-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin: 7px 0;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
}

.profile-balance-breakdown b {
  color: #fff;
}

.profile-balance > small {
  font-size: 10px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-action {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #e4ddd7;
  border-radius: 11px;
  color: #555057;
  text-align: left;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s, transform .16s;
}

.profile-action span {
  font-size: 15px;
  font-weight: 700;
}

.profile-action small {
  color: #9a9490;
  font-size: 10px;
}

.profile-action.primary {
  border-color: #ffb17c;
  color: #e95f0d;
  background: #fff7f1;
}

.profile-action:hover {
  border-color: #f3843d;
  transform: translateY(-1px);
}

.profile-identity > b.agent {
  color: #8a4c0d;
  background: #fff0d7;
}

.rebate-profile-action {
  grid-column: 1 / -1;
  border-color: #f6c58c;
  background: #fffaf3;
}

.agent-console-action {
  grid-column: 1 / -1;
  border-color: #a8dfee;
  color: #087793;
  background: #f2fcff;
}

.rebate-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  overflow: auto;
}

.rebate-dialog-body {
  gap: 12px;
}

.agent-rebate-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f0dfcf;
  border-radius: 12px;
  background: #fffaf5;
}

.agent-rebate-rates > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff;
}

.agent-rebate-rates span,
.agent-rebate-rates small {
  color: #91857d;
  font-size: 11px;
}

.agent-rebate-rates strong {
  color: #ed6b16;
  font: 700 17px/1.2 Consolas, monospace;
}

.agent-rebate-rates > small {
  grid-column: 1 / -1;
  padding: 0 3px;
}

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

.agent-rebate-summary article {
  padding: 12px 14px;
  border: 1px solid #eee4dc;
  border-radius: 11px;
}

.agent-rebate-summary span {
  display: block;
  color: #9b938d;
  font-size: 10px;
}

.agent-rebate-summary strong {
  display: block;
  margin-top: 5px;
  color: #302b28;
  font: 700 19px/1.2 Consolas, monospace;
}

.agent-rebate-toolbar {
  display: flex;
  gap: 8px;
}

.agent-rebate-toolbar select,
.agent-rebate-toolbar button {
  height: 36px;
  border: 1px solid #dfd6cf;
  border-radius: 8px;
  font: inherit;
}

.agent-rebate-toolbar select {
  min-width: 150px;
  padding: 0 10px;
  color: #514b47;
  background: #fff;
}

.agent-rebate-toolbar button {
  padding: 0 18px;
  border-color: #f27a25;
  color: #fff;
  background: #f27a25;
  cursor: pointer;
}

.agent-rebate-list {
  display: grid;
  gap: 8px;
  min-height: 96px;
  max-height: 360px;
  overflow: auto;
}

.agent-rebate-item {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #ede5de;
  border-radius: 10px;
  background: #fff;
}

.agent-rebate-item > div {
  min-width: 0;
}

.agent-rebate-item strong,
.agent-rebate-item span {
  display: block;
}

.agent-rebate-item > div:first-child strong {
  color: #39332f;
  font-size: 12px;
}

.agent-rebate-item span,
.agent-rebate-item small {
  color: #918983;
  font-size: 10px;
}

.agent-rebate-item small {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px dashed #eee5dd;
}

.agent-rebate-amount {
  text-align: right;
}

.agent-rebate-amount > strong {
  color: #ed6612;
  font: 700 16px/1.2 Consolas, monospace;
}

.agent-rebate-status.pending { color: #b97612; }
.agent-rebate-status.settled { color: #1b9465; }
.agent-rebate-status.cancelled { color: #a39b95; }

.agent-rebate-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px dashed #e7ddd5;
  border-radius: 10px;
  color: #9b938d;
}

.agent-rebate-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8d857f;
  font-size: 10px;
}

.agent-rebate-pager div {
  display: flex;
  gap: 7px;
}

.agent-rebate-pager button {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #ddd4cd;
  border-radius: 7px;
  color: #5e5752;
  background: #fff;
}

.agent-rebate-pager button:disabled {
  opacity: .4;
}

@media (max-width: 640px) {
  .rebate-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .agent-rebate-rates,
  .agent-rebate-summary {
    grid-template-columns: 1fr;
  }

  .agent-rebate-rates > small {
    grid-column: auto;
  }

  .agent-rebate-item {
    grid-template-columns: 1fr auto;
  }

  .agent-rebate-item > div:nth-child(2) {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
  }
}

.payout-dialog {
  width: min(620px, calc(100vw - 24px));
  max-width: none;
  max-height: min(700px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #34333a;
  background: #f7f7f8;
  box-shadow: 0 28px 86px rgba(28, 18, 9, .32);
  overflow: hidden;
}

.payout-dialog[open] {
  display: flex;
  flex-direction: column;
}

.payout-dialog::backdrop {
  background: rgba(18, 14, 10, .48);
  backdrop-filter: blur(3px);
}

.payout-success-dialog {
  width: min(410px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: #332f2d;
  background: transparent;
  box-shadow: 0 24px 70px rgba(35, 20, 11, .28);
}

.payout-success-dialog::backdrop {
  background: rgba(22, 19, 17, .62);
  backdrop-filter: blur(5px);
}

.payout-success-card {
  padding: 28px 30px 26px;
  text-align: center;
  background: #fff;
  border-radius: inherit;
}

.payout-success-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff9737, #ff5f0a);
  box-shadow: 0 10px 24px rgba(255, 102, 15, .28);
  font-size: 30px;
  font-weight: 700;
}

.payout-success-eyebrow {
  display: block;
  color: #ff650f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.payout-success-card h2 {
  margin: 6px 0 14px;
  font-size: 24px;
}

.payout-success-card p {
  margin: 0;
  color: #5d5652;
  font-size: 16px;
}

.payout-success-card p strong {
  color: #ff5f0a;
  font-size: 22px;
}

.payout-success-card small {
  display: block;
  margin-top: 8px;
  color: #9a928d;
}

.payout-success-card button {
  width: 100%;
  height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(90deg, #ff9632, #ff5f0a);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.payout-dialog-header {
  position: relative;
  display: flex;
  min-height: 58px;
  padding: 0 62px 0 20px;
  align-items: center;
  border-bottom: 1px solid #ece6df;
  background: #fff;
}

.payout-dialog-header span {
  display: block;
  margin-bottom: 2px;
  color: #ff781f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.payout-dialog-header h2 {
  margin: 0;
  color: #28252a;
  font-size: 18px;
}

.payout-dialog-header button {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #827c78;
  font: 27px/1 Arial, sans-serif;
  background: #f4f2f0;
  cursor: pointer;
}

.payout-dialog-header button:hover {
  color: #ff6816;
  background: #fff0e7;
}

.payout-dialog-body {
  padding: 14px 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
}

.payout-balance-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 82px;
  padding: 13px 16px;
  align-content: center;
  border-radius: 11px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 25%, rgba(255,255,255,.22), transparent 23%),
    linear-gradient(135deg, #6a3010, #a64d14 58%, #f37620);
  box-shadow: 0 9px 22px rgba(131, 62, 17, .18);
}

.payout-balance-card::after {
  position: absolute;
  top: -42px;
  right: -28px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  content: "";
}

.payout-balance-card > span {
  color: rgba(255,255,255,.72);
  font-size: 10px;
}

.payout-balance-card > strong {
  margin: 3px 0 2px;
  font: 500 20px Consolas, "Microsoft YaHei", sans-serif;
}

.payout-balance-card > strong b {
  font-size: 23px;
}

.payout-balance-card > small {
  color: rgba(255,255,255,.72);
  font-size: 9px;
}

.payout-bound-section,
.payout-bind-section,
.payout-withdraw-section,
.payout-password-setup-section {
  margin-top: 13px;
}

.payout-section-heading {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payout-section-heading h3 {
  margin: 0;
  color: #353138;
  font-size: 13px;
}

.payout-section-heading span {
  color: #99939b;
  font-size: 9px;
}

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

.payout-bound-card {
  display: grid;
  min-height: 56px;
  padding: 8px 10px;
  align-items: center;
  border: 1px solid #e7e0da;
  border-radius: 9px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  background: #fff;
}

.payout-bound-card > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  background: linear-gradient(145deg, #ff9d40, #f26211);
}

.payout-bound-card.usdt > i {
  background: linear-gradient(145deg, #36c9aa, #139b80);
}

.payout-bound-card div {
  min-width: 0;
}

.payout-bound-card strong,
.payout-bound-card span {
  display: block;
}

.payout-bound-card strong {
  color: #403b42;
  font-size: 11px;
}

.payout-bound-card span {
  overflow: hidden;
  margin-top: 2px;
  color: #918b93;
  font: 9px Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout-bound-card em {
  color: #16a47f;
  font-size: 8px;
  font-style: normal;
}

.payout-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 50px;
  padding: 9px;
  place-content: center;
  border: 1px dashed #ddd4cc;
  border-radius: 9px;
  color: #969096;
  text-align: center;
  background: rgba(255,255,255,.7);
}

.payout-empty strong,
.payout-empty span {
  display: block;
}

.payout-empty strong {
  color: #625c63;
  font-size: 11px;
}

.payout-empty span {
  margin-top: 2px;
  font-size: 9px;
}

.payout-empty.error {
  border-color: #ffc6c6;
  color: #c94646;
  background: #fff5f5;
}

.payout-method-tabs {
  display: grid;
  margin-top: 13px;
  margin-bottom: 9px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.payout-method-tabs button {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1d9d2;
  border-radius: 9px;
  color: #615b62;
  font-size: 11px;
  gap: 6px;
  background: #fff;
  cursor: pointer;
}

.payout-method-tabs button i {
  font-size: 14px;
  font-style: normal;
}

.payout-method-tabs button.active {
  border-color: #ff8a35;
  color: #e95f0e;
  background: #fff5ed;
  box-shadow: 0 0 0 3px rgba(255, 119, 28, .08);
}

.payout-bind-form,
.payout-withdraw-form,
.payout-password-setup-form {
  padding: 11px;
  border: 1px solid #e8e1dc;
  border-radius: 10px;
  background: #fff;
}

.payout-unbound-message {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px dashed #efc8aa;
  border-radius: 8px;
  color: #9b673f;
  font-size: 9px;
  background: #fff8f1;
}

.payout-unbound-message.error {
  border-color: #efb4b4;
  color: #c14242;
  background: #fff4f4;
}

.payout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.payout-withdraw-fields {
  grid-template-columns: 1.35fr .8fr .9fr;
}

.payout-password-setup-fields {
  grid-template-columns: 1.25fr .9fr .9fr;
}

.payout-password-fields {
  margin-top: 9px;
}

.payout-fields[hidden] {
  display: none;
}

.payout-fields label {
  display: grid;
  gap: 4px;
  color: #625d64;
  font-size: 10px;
}

.payout-fields input,
.payout-fields select {
  width: 100%;
  height: 35px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid #ded7d2;
  border-radius: 7px;
  outline: 0;
  color: #302d33;
  font-size: 11px;
  background: #fff;
}

.payout-fields input:focus,
.payout-fields select:focus {
  border-color: #ff8b37;
  box-shadow: 0 0 0 3px rgba(255, 120, 30, .09);
}

.payout-form-error {
  min-height: 14px;
  margin: 6px 0 0;
  color: #d73f3f;
  font-size: 9px;
}

.payout-security-note {
  display: flex;
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 7px;
  color: #8b704d;
  font-size: 8px;
  line-height: 1.45;
  gap: 6px;
  background: #fff8ec;
}

.payout-security-note strong {
  flex: 0 0 auto;
  color: #d56d17;
}

.payout-save {
  width: 100%;
  height: 37px;
  margin-top: 9px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff9a34, #f46612);
  box-shadow: 0 8px 18px rgba(229, 97, 16, .2);
  cursor: pointer;
}

.payout-save:disabled {
  cursor: wait;
  opacity: .58;
}

.auth-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #f8f8fb;
  background: #07070f;
  overflow: hidden;
}

body.auth-locked {
  overflow: hidden;
  background: #07070f;
}

body.auth-locked > .background-art,
body.auth-locked > .desktop-flow,
body.auth-locked > .side-tools,
body.auth-locked > .history-drawer,
body.auth-locked > .bet-dock,
body.auth-locked > .toast {
  display: none !important;
}

body.auth-locked .auth-close {
  display: none;
}

.auth-dialog[open] {
  display: grid;
  place-items: center;
}

.auth-dialog::backdrop {
  background: #07070f;
}

.auth-ballpit {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #07070f;
}

.auth-ballpit canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-ballpit::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 26%, rgba(5,5,12,.18) 58%, rgba(3,3,8,.72) 100%),
    linear-gradient(90deg, rgba(4,4,10,.24), transparent 28% 72%, rgba(4,4,10,.24));
}

.auth-form {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(430px, calc(100vw - 34px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  flex-direction: column;
  padding: 34px 38px 30px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 28px;
  color: #34333d;
  background: rgba(255,255,255,.88);
  box-shadow:
    0 34px 90px rgba(0,0,0,.52),
    inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(24px) saturate(1.22);
  animation: auth-card-enter .46s cubic-bezier(.2,.82,.3,1) both;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(49,0,248,.3) transparent;
}

.auth-form [hidden] {
  display: none !important;
}

@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #77727f;
  font-size: 25px;
  line-height: 1;
  background: rgba(255,255,255,.56);
  cursor: pointer;
}

.auth-close:hover {
  color: #1e1c26;
  background: #fff;
}

.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  color: #292631;
}

.auth-brand .brand-logo {
  width: 126px;
  height: 84px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(93, 62, 8, .2);
}

.auth-eyebrow {
  margin-bottom: 8px;
  color: #3100f8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 2px 0 19px;
  padding: 4px;
  border: 1px solid rgba(43,37,51,.1);
  border-radius: 12px;
  background: rgba(238,236,244,.82);
}

.auth-mode-switch button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  color: #77727f;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: color .16s, background .16s, box-shadow .16s;
}

.auth-mode-switch button.active {
  color: #fff;
  background: linear-gradient(105deg, #3100f8, #2500b8);
  box-shadow: 0 7px 16px rgba(49,0,248,.2);
}

.auth-form h2 {
  margin: 0 0 20px;
  color: #19171f;
  font-size: 28px;
  letter-spacing: -.02em;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
  color: #575260;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  height: 47px;
  padding: 0 14px;
  border: 1px solid rgba(43,37,51,.14);
  border-radius: 11px;
  outline: 0;
  color: #1c1922;
  font-size: 15px;
  background: rgba(255,255,255,.75);
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.auth-form input:focus {
  border-color: #3100f8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49,0,248,.13);
}

.auth-error {
  min-height: 20px;
  color: #e54b36;
  font-size: 12px;
}

.auth-status {
  min-height: 0;
  margin-bottom: 0;
  color: #247a47;
  font-size: 12px;
}

.auth-status:not(:empty) {
  min-height: 20px;
}

.auth-activity-hint {
  margin: 0 0 13px;
  padding: 9px 11px;
  border: 1px solid rgba(124, 255, 103, .45);
  border-radius: 9px;
  color: #24683a;
  background: rgba(124,255,103,.12);
  font-size: 12px;
}

.auth-submit {
  height: 48px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(105deg, #3100f8 0 56%, #2500b8 100%);
  box-shadow: 0 12px 24px rgba(49,0,248,.22);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(49,0,248,.3);
}

.auth-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.bet-content button:disabled,
.bet-content input:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.auth-switch {
  margin: 14px 0 10px;
  border: 0;
  color: #3100f8;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
}

.auth-form small {
  color: #8a8590;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .stake-editor-dialog {
    width: calc(100vw - 16px);
    border-radius: 10px;
  }

  .stake-editor-header {
    min-height: 56px;
  }

  .stake-editor-header h2 {
    font-size: 19px;
  }

  .stake-editor-grid {
    padding: 24px 24px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stake-editor-footer {
    min-height: 78px;
    padding: 0 20px;
    gap: 16px;
  }

  .stake-editor-footer button {
    width: min(150px, 42vw);
    height: 48px;
    font-size: 17px;
  }

  .lottery-intro-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 10px;
  }

  .lottery-intro-header {
    min-height: 58px;
    padding: 0 52px;
  }

  .lottery-intro-header h2 {
    font-size: 21px;
  }

  .lottery-intro-content {
    padding: 24px 22px 30px;
    font-size: 16px;
    overflow-y: auto;
  }

  .lottery-intro-content h3 {
    font-size: 17px;
  }

  .lottery-intro-link {
    margin-top: 28px !important;
  }

  .rules-dialog {
    width: calc(100vw - 8px);
    height: calc(100dvh - 8px);
    border-radius: 10px;
  }

  .rules-dialog-header {
    min-height: 58px;
    padding: 6px 10px;
    grid-template-columns: 145px minmax(0, 1fr) 40px;
  }

  .rules-dialog-header select {
    width: 140px;
    height: 40px;
    padding-inline: 10px;
    font-size: 14px;
  }

  .rules-dialog-header h2 {
    font-size: 18px;
  }

  .rules-dialog-close {
    width: 38px;
    height: 38px;
    font-size: 34px;
  }

  .rules-dialog-content {
    padding: 18px 16px 30px;
  }

  .rules-dialog-content h3 {
    font-size: 16px;
  }

  .rules-dialog-content p {
    font-size: 14px;
  }

  .auth-form {
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100dvh - 18px);
    padding: 24px 25px 22px;
    border-radius: 23px;
  }

  .auth-brand {
    margin-bottom: 14px;
  }

  .auth-mode-switch {
    margin-bottom: 15px;
  }

  .auth-ballpit::after {
    background: rgba(4,4,11,.26);
  }

  .profile-dialog {
    width: calc(100vw - 16px);
    border-radius: 13px;
  }

  .profile-dialog-header,
  .profile-dialog-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .profile-identity {
    grid-template-columns: 44px 1fr;
  }

  .profile-identity > b {
    display: none;
  }

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

  .payout-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 11px;
  }

  .payout-dialog-header {
    min-height: 56px;
    padding-left: 16px;
  }

  .payout-dialog-body {
    padding: 11px 10px 15px;
  }

  .payout-bound-list,
  .payout-fields,
  .payout-withdraw-fields,
  .payout-password-setup-fields {
    grid-template-columns: 1fr;
  }

  .payout-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form {
    animation: none;
  }

  .time-progress i {
    animation: none;
  }
}

@media (max-width: 1650px) {
  :root {
    --shell-width: 1120px;
    --shell-left: calc(50% - 560px);
  }

  .hero {
    grid-template-columns: 330px 470px 320px;
  }

  .hero-center {
    grid-template-columns: 82px 230px;
    gap: 4px;
    padding-right: 4px;
  }

  .digital-clock {
    width: 230px;
    padding-inline: 16px;
  }

  .time-progress {
    width: 223px;
  }

  .period {
    font-size: 16px;
  }

  .period span,
  .period strong {
    white-space: nowrap;
  }

  .hero-left {
    padding-left: 18px;
  }

  .lottery-emblem {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-width: 3px;
  }

  .lottery-copy {
    margin-left: 10px;
  }

  .lottery-title {
    font-size: 24px;
  }

  .lottery-title .star {
    width: 26px;
    height: 26px;
    margin-right: 7px;
  }

  .hero-right {
    --draw-column-gap: 7px;
    --draw-row-width: 461px;
  }

  .hero-right .zodiacs {
    gap: 0 var(--draw-column-gap);
  }

  .play-nav button {
    min-width: 0;
    padding-inline: 15px;
    font-size: 17px;
  }

  .quick-item {
    grid-template-columns: 55px 64px 1fr;
  }

  .bet-input {
    width: 92px;
  }

  .number-item {
    grid-template-columns: 47px 62px 1fr;
  }

  .number-item .bet-input {
    width: 72px;
  }

  .side-tools {
    left: calc(var(--shell-left) + var(--shell-width) + 24px);
    width: 144px;
  }

  .side-tools button {
    padding: 0 12px;
  }

  .account {
    gap: 9px;
    font-size: 14px;
  }

  .account-bar {
    padding-inline: 8px;
  }

  .dock-total {
    min-width: 105px;
  }
}

@media (max-width: 1280px) {
  html {
    min-width: 0;
    width: 100%;
  }

  body {
    min-width: 0;
  }

  :root {
    --shell-width: 1320px;
    --shell-left: 0px;
  }

  .hero {
    grid-template-columns: 430px 500px 390px;
  }

  .hero-center {
    grid-template-columns: 110px 255px;
    gap: 8px;
    padding-right: 12px;
  }

  .digital-clock {
    width: 255px;
    padding-inline: 22px;
  }

  .time-progress {
    width: 248px;
  }

  .period {
    font-size: 18px;
  }

  .hero-left {
    padding-left: 36px;
  }

  .lottery-emblem {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
    border-width: 4px;
  }

  .lottery-copy {
    margin-left: 17px;
  }

  .lottery-title {
    font-size: 27px;
  }

  .lottery-title .star {
    width: 29px;
    height: 29px;
    margin-right: 10px;
  }

  .hero-right {
    --draw-column-gap: 9px;
    --draw-row-width: 479px;
  }

  .hero-right .zodiacs {
    gap: 0 var(--draw-column-gap);
  }

  .desktop-flow {
    display: block;
    width: 1320px;
    margin-left: 0;
    zoom: var(--ui-scale);
  }

  .desktop-flow .shell {
    width: 1320px;
    margin-left: 0;
  }

  .bet-dock {
    width: 1320px;
    margin-left: 0;
    zoom: var(--ui-scale);
  }

  .side-tools {
    display: none;
  }

  .background-art .left-wash {
    left: -260px;
  }
}

/*
 * 窄窗口继续使用完整的 1320px 投注画布并按视口等比缩放。
 * 抽屉和弹窗不属于画布，需要单独按真实视口适配。
 */
@media (max-width: 720px) and (hover: none),
       (max-width: 720px) and (pointer: coarse) {
  :root {
    --shell-width: 100%;
    --shell-left: 0px;
  }

  body {
    padding-bottom: 136px;
  }

  .desktop-flow {
    width: 100%;
    margin-left: 0;
    zoom: 1;
  }

  .desktop-flow .shell,
  .bet-dock {
    width: 100%;
    margin-left: 0;
    zoom: 1;
  }

  .account-bar {
    height: 58px;
    padding: 0 10px;
  }

  .brand {
    min-width: 0;
    gap: 7px;
  }

  .brand .brand-logo {
    width: 66px;
    height: 44px;
    border-radius: 6px;
  }

  .brand-signal,
  .brand > strong {
    display: none;
  }

  .account {
    min-width: 0;
    gap: 6px;
    font-size: 11px;
  }

  .account-profile-trigger,
  .account-balance-group,
  .account .text-button {
    white-space: nowrap;
  }

  .account-profile-trigger {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .account-balance-group {
    font-size: 10px;
  }

  .page {
    width: 100%;
    padding-bottom: 150px;
  }

  .hero {
    width: 100%;
    height: auto;
    min-height: 152px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 176px;
    grid-template-rows: 70px auto;
    row-gap: 0;
    border-radius: 16px 16px 0 0;
  }

  .hero-left {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    min-width: 0;
    padding: 7px 0 0 8px;
  }

  .lottery-emblem {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-width: 2px;
  }

  .lottery-copy {
    min-width: 0;
    margin-left: 6px;
  }

  .lottery-title {
    height: 26px;
    font-size: 15px;
  }

  .lottery-title .star {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    font-size: 9px;
  }

  .lottery-tags button {
    height: 18px;
    padding: 0 6px;
    font-size: 9px;
  }

  .game-switch-main .game-switch-menu {
    left: 28px;
    width: 150px;
  }

  .hero-center {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 47px 116px;
    justify-content: end;
    align-content: start;
    gap: 3px;
    min-width: 0;
    padding: 8px 7px 0 0;
  }

  .period {
    padding-top: 3px;
    font-size: 8.5px;
    line-height: 1.25;
  }

  .period span,
  .period strong {
    white-space: nowrap;
  }

  .hero-right .draw-video-link {
    position: static;
    gap: 1px;
    min-width: 0;
    width: 46px;
    height: 20px;
    margin: 0;
    padding: 0 2px;
    border-radius: 4px;
    font-size: 8px;
    white-space: nowrap;
    transform: none;
  }

  .hero-right .draw-video-link span {
    font-size: 6px;
  }

  .digital-clock {
    width: 116px;
    height: 36px;
    padding: 2px 6px;
  }

  .clock-labels {
    font-size: 4.5px;
  }

  .clock-value {
    font-size: 20px;
    line-height: 23px;
    letter-spacing: -.5px;
    text-align: center;
  }

  .time-progress {
    width: 112px;
    height: 3px;
    margin: 0 0 0 2px;
  }

  .hero-right {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 3px 6px 6px;
    text-align: center;
  }

  .draw-period {
    height: 17px;
    padding: 0;
    font-size: 10px;
    text-align: center;
  }

  .draw-balls {
    justify-content: center;
    gap: 4px;
    min-height: 30px;
  }

  .hero-right .draw-balls,
  .hero-right .zodiacs {
    grid-template-columns: repeat(6, 28px) 8px 28px 8px;
    justify-content: center;
    column-gap: 4px;
  }

  .hero-right .draw-balls {
    grid-template-columns: repeat(6, 28px) 8px 28px 8px 46px;
  }

  .ball {
    width: 28px;
    height: 28px;
    border-width: 3px;
    font-size: 12px;
    line-height: 1;
  }

  .draw-down {
    width: 8px;
    height: 8px;
    margin-right: 0;
    margin-left: 3px;
    border-width: 0 1.5px 1.5px 0;
  }

  .zodiacs {
    justify-content: center;
    gap: 0 4px;
    padding: 1px 0 0;
    font-size: 10px;
  }

  .hero-right .zodiacs {
    gap: 0 4px;
    padding: 1px 50px 0 0;
  }

  .draw-history {
    top: 155px;
    right: 8px;
    width: calc(100% - 16px);
  }

  .play-nav {
    height: 49px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .play-nav::-webkit-scrollbar,
  .code-tabs::-webkit-scrollbar {
    display: none;
  }

  .play-nav button {
    height: 48px;
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 14px;
  }

  .nav-arrows {
    display: none;
  }

  .help-row {
    height: 48px;
    font-size: 14px;
  }

  .code-tabs {
    height: 76px;
    gap: 7px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .code-tabs button {
    width: 92px;
    height: 44px;
    flex: 0 0 92px;
    font-size: 14px;
  }

  .bet-card {
    margin-right: 8px;
    margin-left: 8px;
  }

  .quick-card,
  .grouped-card,
  .selection-card {
    min-height: 0;
    padding: 14px 10px 18px;
  }

  .quick-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 5px 3px;
  }

  .quick-item {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-rows: minmax(24px, auto) 32px;
    gap: 3px 2px;
    align-content: start;
    min-width: 0;
    padding: 3px 1px;
    font-size: clamp(10px, 2.8vw, 13px);
    text-align: center;
  }

  .quick-item .name {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    max-width: 100%;
    line-height: 1.15;
  }

  .quick-item .odds {
    grid-column: 3;
    align-self: center;
    justify-self: center;
    white-space: nowrap;
  }

  .quick-item .bet-input {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .quick-item .odds,
  .number-item .odds,
  .group-bet-item .odds {
    font-size: clamp(9px, 2.55vw, 12px);
    line-height: 1;
  }

  .bet-input,
  .number-item .bet-input {
    width: 100%;
    max-width: none;
    height: 32px;
    padding: 0 2px;
  }

  .number-card {
    min-height: 0;
    margin-top: 10px;
    padding: 10px 6px 15px;
  }

  .number-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 5px 3px;
  }

  .number-item {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-rows: 32px 32px;
    gap: 3px 2px;
    align-content: start;
    min-width: 0;
    padding: 2px 1px;
  }

  .number-item .number {
    grid-column: 2;
    align-self: center;
    justify-self: center;
  }

  .number-item .odds {
    grid-column: 3;
    align-self: center;
    justify-self: center;
    white-space: nowrap;
  }

  .number-item .bet-input {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .number {
    width: 30px;
    height: 30px;
    border-width: 3px;
    font-size: 12px;
  }

  .group-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 3px;
  }

  .group-bet-item {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-rows: minmax(24px, auto) 32px;
    gap: 3px 2px;
    align-content: start;
    min-width: 0;
    padding: 3px 1px;
    font-size: clamp(10px, 2.8vw, 13px);
    text-align: center;
  }

  .group-bet-item .name {
    grid-column: 2;
    align-self: center;
    justify-self: center;
    max-width: 100%;
    line-height: 1.15;
  }

  .group-bet-item .odds {
    grid-column: 3;
    align-self: center;
    justify-self: center;
    white-space: nowrap;
  }

  .group-bet-item .bet-input {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    height: 32px;
  }

  .group-block[data-group-title="一肖"] .group-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .group-block[data-group-title="一肖"] .group-bet-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 32px;
    justify-items: stretch;
  }

  .group-block[data-group-title="一肖"] .group-bet-item .name,
  .group-block[data-group-title="一肖"] .group-bet-item .odds {
    grid-column: 1;
    justify-self: center;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .group-block[data-group-title="一肖"] .group-bet-item .bet-input {
    width: 100%;
  }

  .special-zodiac-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto 32px;
    justify-items: stretch;
    min-height: 112px;
  }

  .special-zodiac-item .name,
  .special-zodiac-item .zodiac-bet-numbers,
  .special-zodiac-item .odds,
  .special-zodiac-item .bet-input {
    grid-column: 1;
    justify-self: center;
    max-width: 100%;
    text-align: center;
  }

  .special-zodiac-item .zodiac-bet-numbers {
    font-size: clamp(8px, 2.2vw, 10px);
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .special-zodiac-item .bet-input {
    justify-self: stretch;
    width: 100%;
  }

  .grouped-card[data-mode="特码大小"] {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 8px 14px;
  }

  .grouped-card[data-mode="特码大小"] .group-block {
    padding: 8px;
  }

  .grouped-card[data-mode="特码大小"] .group-bet-item {
    grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  }

  .grouped-card[data-mode="特码大小"] .group-bet-item .bet-input {
    width: 100%;
  }

  .grouped-card[data-mode="特码大小"] .group-block:last-child {
    grid-column: auto;
  }

  .grouped-card[data-mode="特码大小"] .group-block:last-child .group-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .selection-grid,
  .selection-grid.zodiac-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px 3px;
  }

  .variant-tabs {
    gap: 5px;
    margin: -1px -2px 10px;
    padding: 0 2px 4px;
  }

  .variant-tabs button {
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
    border-radius: 5px;
    font-size: 12px;
  }

  .selection-item {
    min-width: 0;
    min-height: 52px;
    padding: 5px 3px;
    text-align: center;
    overflow: hidden;
  }

  .selection-item .selection-main {
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: clamp(10px, 2.8vw, 13px);
    line-height: 1.15;
  }

  .selection-item .selection-main b {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .selection-item .selection-odds {
    max-width: 100%;
    font-size: clamp(9px, 2.5vw, 11px);
    white-space: nowrap;
  }

  .selection-item .selection-numbers {
    display: grid;
    grid-template-columns: repeat(2, 20px);
    justify-content: center;
    gap: 3px;
    margin-top: 5px;
  }

  .selection-item .mini-number {
    width: 20px;
    height: 20px;
    border-width: 2px;
    font-size: 9px;
  }

  .selection-item.number-choice {
    min-height: 44px;
    padding: 3px;
  }

  .selection-item.number-choice .number {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .cart-inline {
    margin-right: 8px;
    margin-left: 8px;
    padding-inline: 10px;
  }

  .cart-inline-group {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .cart-inline-choices,
  .cart-inline-group-total {
    grid-column: 1 / -1;
  }

  .cart-inline-group-total {
    text-align: left;
  }

  .mini-header {
    height: 50px;
    padding: 0 9px;
  }

  .mini-left {
    min-width: 0;
    gap: 6px;
    font-size: 11px;
  }

  .mini-balls {
    display: none;
  }

  .bet-dock {
    height: 132px;
    padding: 7px 8px 8px;
  }

  .dock-balance {
    height: 26px;
    font-size: 12px;
  }

  .dock-row {
    height: 91px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 40px 43px;
    gap: 5px 4px;
  }

  .edit-icon {
    width: 100%;
    height: 40px;
    grid-column: 1;
    border-right: 1px solid #ddd;
    border-radius: 6px;
  }

  .edit-icon svg {
    width: 18px;
    height: 18px;
  }

  .stake-chips {
    width: 100%;
    height: 40px;
    grid-column: 2 / 10;
    border-left: 1px solid #ddd;
    border-radius: 6px;
  }

  .stake-chips button {
    font-size: 12px;
  }

  .stake-chips button + button::before {
    top: 8px;
    height: 23px;
  }

  .custom-stake {
    width: 100%;
    height: 40px;
    grid-column: 10 / 13;
    margin-left: 0;
  }

  .custom-stake::placeholder {
    font-size: 9px;
  }

  .dock-total {
    min-width: 0;
    grid-column: 1 / 4;
    grid-row: 2;
    padding-inline: 2px;
    font-size: 10px;
  }

  .dock-spacer {
    display: none;
  }

  .action {
    width: auto;
    min-width: 0;
    font-size: 11px;
  }

  .action.primary {
    width: auto;
    grid-column: 4 / 7;
    grid-row: 2;
    margin-right: 0;
  }

  .action.split {
    grid-column: 7 / 9;
    grid-row: 2;
  }

  .action.basket {
    width: auto;
    grid-column: 9 / 12;
    grid-row: 2;
  }

  .clear {
    width: auto;
    grid-column: 12;
    grid-row: 2;
    font-size: 9px;
  }

  .clear span {
    font-size: 16px;
  }

  .history-drawer {
    width: calc(100vw - 28px);
    max-width: 380px;
  }

  .drawer-handle {
    left: -24px;
    width: 24px;
  }

  .drawer-tabs button {
    min-width: 0;
    padding-inline: 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .drawer-table-head,
  .drawer-row {
    min-width: 340px;
  }
}

/* Mobile viewport guard: the page stays screen-sized; only scoped rows scroll. */
@media (max-width: 720px) and (hover: none),
       (max-width: 720px) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .desktop-flow,
  .desktop-flow .shell,
  .page,
  .hero,
  .play-board,
  .bet-card,
  .cart-inline,
  .bet-dock {
    max-width: 100%;
    min-width: 0;
  }

  .play-nav,
  .code-tabs,
  .drawer-table {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  input,
  select,
  textarea,
  img,
  canvas,
  svg {
    max-width: 100%;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

}

@media (max-width: 720px) and (hover: none),
       (max-width: 720px) and (pointer: coarse) {
  .selection-grid.zodiac-grid.combination-zodiac-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 6px;
  }

  .combination-choice-box {
    min-height: 64px;
    gap: 5px;
    padding: 7px 3px;
  }

  .combination-choice-box > b {
    font-size: 15px;
  }

  .selection-item.combination-zodiac-item .selection-numbers {
    gap: 3px;
  }

  .selection-item.combination-zodiac-item .mini-number {
    font-size: clamp(11px, 3.4vw, 14px);
  }

  .selection-item.combination-zodiac-item > .selection-odds,
  .selection-item.combination-tail-item > .selection-odds {
    padding-top: 5px;
    font-size: 14px;
  }

  .combination-summary {
    gap: 8px;
    margin-top: 18px;
    padding: 9px 7px;
    border-width: 1px;
    font-size: 11px;
  }

  .combination-summary b {
    font-size: 13px;
  }

  body.combination-mode-active {
    padding-bottom: 154px;
  }

  .combination-mode-active .bet-dock {
    height: 146px;
    padding: 6px 7px 7px;
  }

  .combination-mode-active .dock-balance {
    height: 25px;
  }

  .combination-mode-active .dock-row {
    height: 106px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 39px 48px;
    gap: 6px 4px;
  }

  .combination-mode-active .stake-chips {
    grid-column: 1 / 11;
    grid-row: 1;
    gap: 3px;
    height: 39px;
  }

  .combination-mode-active .stake-chips button {
    padding: 0 2px;
    border-radius: 13px;
    font-size: 10px;
  }

  .combination-mode-active .edit-icon {
    grid-column: 11 / 13;
    grid-row: 1;
    height: 39px;
  }

  .combination-mode-active .edit-icon::after {
    font-size: 9px;
  }

  .combination-mode-active .clear {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .combination-mode-active .custom-stake-control {
    grid-column: 2 / 6;
    grid-row: 2;
    gap: 3px;
    font-size: 11px;
  }

  .combination-mode-active .custom-stake {
    width: min(68px, 100%);
    height: 44px;
    font-size: 16px !important;
  }

  .combination-mode-active .action.basket {
    display: none;
  }

  .combination-mode-active .action.split {
    grid-column: 6 / 9;
    grid-row: 2;
  }

  .combination-mode-active .action.primary {
    grid-column: 9 / 13;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .inline-text-order {
    min-height: 190px;
    gap: 8px;
    padding: 12px 10px;
  }

  .inline-text-order #textOrderInput {
    height: 122px;
    min-height: 122px;
    max-height: 122px;
    padding: 10px 13px;
    border-radius: 8px;
    font: 14px/20px Consolas, "Microsoft YaHei", monospace;
  }

  .inline-text-order-actions button {
    width: 112px;
    height: 40px;
    font-size: 14px;
  }
}
