:root {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #28323d;
  background: #f2f3f7;
  font-synthesis: none;
  --blue: #08aee6;
  --app-height: 100dvh;
  --safe-top: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
  --safe-right: 0px;
  --dock-height: 126px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 0;
  color: inherit;
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #1366ad;
  outline-offset: 2px;
}
button:focus:not(:focus-visible) {
  outline: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.player-shell {
  width: 100%;
  max-width: 600px;
  height: var(--app-height);
  margin: auto;
  background: #e9ebef;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 22px #dfe3eb;
  padding-left: max(env(safe-area-inset-left), var(--safe-left));
  padding-right: max(env(safe-area-inset-right), var(--safe-right));
}
.site-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 58px;
  padding: 6px 10px;
  padding-top: calc(6px + max(env(safe-area-inset-top), var(--safe-top)));
  background: linear-gradient(105deg, #04c7df, #08a8f0);
  color: #fff;
}
.brand {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  text-decoration: none;
}
.brand img {
  object-fit: contain;
  border-radius: 11px;
}
.header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.header-title h1 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.header-title p {
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.4;
}
.header-action {
  background: #ffffff18;
  border-radius: 9px;
  flex: 0 0 44px;
  padding: 0 5px;
  color: white;
  font-size: 13px;
}
.phase-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 7px 12px;
  gap: 8px;
  flex: none;
  border-bottom: 1px solid #eceef1;
  min-height: 76px;
}
.phase-main {
  flex: 1;
  min-width: 0;
}
.phase-main > p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.phase-main > p strong {
  color: #178bc2;
  font-weight: 500;
}
.state-pill {
  font-size: 11px;
  margin-left: 7px;
  color: #7b8491;
}
.state-pill.closed,
.state-pill.stale {
  color: #b65e2a;
}
.timer-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
.timer-line > span {
  font-size: 11px;
  color: #7a8290;
}
.timer-line > strong {
  background: #3e4653;
  color: #fff;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 15px;
  min-width: 58px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.icon-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  width: 44px;
  min-height: 44px;
  background: transparent;
  font-size: 22px;
  flex-shrink: 0;
  border-radius: 8px;
}
.timer-line .icon-button {
  color: #7c8795;
  font-size: 20px;
}
.wallet-mini {
  padding-left: 12px;
  border-left: 1px solid #e2e5ea;
  min-width: 0;
  max-width: 48%;
}
.wallet-mini > span {
  font-size: 11px;
  color: #7a8290;
}
.wallet-mini > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 2px;
}
.wallet-mini strong {
  font-size: 17px;
  font-weight: 500;
  color: #e55355;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.wallet-mini .icon-button {
  font-size: 20px;
}
.last-result {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e1e5eb;
  padding: 5px 10px;
  min-height: 44px;
  flex: none;
  font-size: 12px;
  text-align: left;
  flex-wrap: wrap;
}
.last-result > .history-chevron {
  margin-left: auto;
  color: #7b8290;
  font-size: 16px;
}
.last-result .last-issue {
  flex-shrink: 0;
  max-width: 34%;
  overflow-wrap: anywhere;
}
.result-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ball {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #0ab5e4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}
.ball.sum {
  background: #ff5b66;
}
.result-sign {
  font-size: 13px;
  color: #666;
}
.last-result .ball {
  width: 24px;
  height: 24px;
  font-size: 14px;
}
.last-result .result-line {
  gap: 3px;
}
.result-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.result-tag {
  font-size: 12px;
  color: #3b4550;
}
.last-result .result-tags {
  flex-shrink: 0;
  gap: 0;
}
.last-result .result-tag {
  font-size: 11px;
}
.chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 12px 18px;
  overflow-x: hidden;
}
.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 20px;
  max-width: 100%;
  font-size: 14px;
}
.chat-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}
.message-body {
  min-width: 0;
  max-width: calc(100% - 45px);
}
.sender {
  display: block;
  font-size: 11px;
  color: #969ba3;
  margin-bottom: 4px;
}
.bubble {
  background: white;
  border-radius: 0 15px 15px 15px;
  padding: 10px 12px;
  box-shadow: 0 2px 5px #c5c9d32b;
  overflow-wrap: anywhere;
}
.bubble p + p {
  margin-top: 7px;
}
.bubble .simulation-note {
  font-size: 11px;
  color: #9298a0;
  margin-top: 9px;
}
.chat-message.mine {
  flex-direction: row-reverse;
}
.chat-message.mine .message-body {
  max-width: 85%;
}
.chat-message.mine .sender {
  text-align: right;
}
.mine .bubble {
  border-radius: 15px 0 15px 15px;
  background: #b2e8fa;
}
.mine .bubble small {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  color: #557383;
}
.result-bubble {
  padding: 0;
  overflow: hidden;
  display: inline-block;
}
.result-bubble > strong {
  display: block;
  padding: 8px 11px;
  background: #0db1df;
  color: white;
  font-size: 13px;
}
.result-bubble > div {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.auth-panel {
  margin-top: 10px;
}
.auth-panel .button {
  width: 100%;
}
.chat-status {
  text-align: center;
  font-size: 11px;
  color: #939aa3;
  padding: 5px;
}
.chat-dock {
  flex: none;
  background: #e9ebef;
  border-top: 1px solid #dadee4;
  padding: 8px 10px max(env(safe-area-inset-bottom), var(--safe-bottom));
  position: relative;
}
.composer {
  display: flex;
  gap: 8px;
  align-items: center;
}
.composer input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  background: #f8f9fc;
  border-radius: 24px;
  padding: 9px 13px;
  font-size: 16px;
  color: #333;
}
.composer input::placeholder {
  font-size: 13px;
  color: #979eaa;
}
.composer > button {
  border-radius: 24px;
  background: linear-gradient(120deg, #35b4ee, #48a0f7);
  color: #fff;
  padding: 0 16px;
  min-width: 60px;
}
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: none;
  min-height: 58px;
  font-size: 11px;
  color: #7c8697;
  line-height: 1.25;
}
.bottom-nav button > span {
  font-size: 25px;
  line-height: 30px;
  color: #939db0;
}
.bottom-nav button[aria-expanded="true"] {
  color: #0789c4;
  background: #dceff9;
  border-radius: 9px;
}
.pending-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #99651e;
  background: #fff4da;
  border-radius: 8px;
  padding: 0 8px;
  margin-bottom: 5px;
  gap: 6px;
}
.connection-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  background: #fff0d5;
  color: #94622a;
  font-size: 12px;
  padding: 3px 10px;
  flex: none;
}
.connection-banner > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.text-button {
  background: transparent;
  color: #087da9;
  padding: 0 8px;
  font-size: 13px;
  min-width: 44px;
}
.field-error {
  font-size: 12px;
  color: #bd3c37;
  overflow-wrap: anywhere;
  margin-top: 6px;
}
.composer-error {
  margin: 3px 8px;
}
.button {
  border-radius: 7px;
  min-width: 44px;
  padding: 9px 14px;
  min-height: 44px;
  line-height: 1.4;
  font-weight: 500;
}
.primary {
  background: #3ba7f3;
  color: white;
}
.secondary {
  background: #f3f5f9;
  color: #5f6876;
  border: 1px solid #e3e6ec;
}
.sheet {
  padding: 0;
  border: 0;
  border-radius: 17px 17px 0 0;
  width: calc(100% - 16px);
  max-width: 520px;
  max-height: calc(
    var(--app-height) - 22px - max(env(safe-area-inset-top), var(--safe-top))
  );
  height: fit-content;
  box-shadow: 0 -5px 35px #25364c2e;
  margin: auto auto 0;
  color: #2e3640;
  background: #fff;
  overflow: hidden;
}
.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet::backdrop {
  background: #0008;
}
.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f4;
  flex: none;
  min-height: 61px;
  gap: 8px;
}
.sheet-heading h2 {
  font-size: 17px;
  font-weight: 600;
  padding-left: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sheet-heading .icon-button {
  font-size: 24px;
  color: #8a929d;
}
.sheet-scroll {
  padding: 12px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
}
.sheet-note {
  font-size: 12px;
  color: #858c97;
  margin: 0 0 10px;
}
.option-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.option-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 51px;
  border-radius: 8px;
  background: #f6f7fb;
  border: 1px solid #e3e5eb;
  padding: 5px 2px;
  line-height: 1.3;
}
.option-button.basic {
  grid-column: span 2;
}
.option-button strong {
  font-size: 14px;
  font-weight: 400;
}
.option-button small {
  font-size: 11px;
  color: #939aa4;
  margin-top: 2px;
}
.option-button[aria-pressed="true"] {
  background: #e3f5ff;
  border-color: #36a5ee;
  color: #128cca;
  box-shadow: inset 0 0 0 1px #36a5ee;
}
.option-button[aria-pressed="true"] small {
  color: #408cac;
}
.bet-controls {
  border-top: 1px solid #edf0f3;
  flex: none;
  padding: 10px 14px
    calc(10px + max(env(safe-area-inset-bottom), var(--safe-bottom)));
  background: #fff;
}
.chip-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.chip-row button {
  min-width: 0;
  min-height: 44px;
  background: #f5f6fa;
  border: 1px solid #e0e4eb;
  border-radius: 7px;
  font-size: 13px;
}
.chip-row button[aria-pressed="true"] {
  background: #43aaf2;
  color: white;
  border-color: #43aaf2;
}
.amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 12px;
}
.amount-row span {
  flex: none;
  color: #6c7480;
}
.amount-row input {
  border: 1px solid #e0e5eb;
  border-radius: 7px;
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  background: #fff;
}
.field-hint {
  font-size: 11px;
  color: #8e96a0;
  margin-top: 4px;
}
.bet-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.selected-summary {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.selected-summary strong {
  font-weight: 500;
}
.selected-summary small {
  display: block;
  color: #949aa4;
  font-size: 10px;
  margin-top: 3px;
}
.bet-footer .button {
  padding: 8px 12px;
  font-size: 12px;
}
.page-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px 10px;
  gap: 5px;
  border-bottom: 1px solid #eee;
  flex: none;
}
.page-tabs button {
  min-width: 0;
  font-size: 13px;
  background: #f5f6f9;
  border-radius: 7px;
}
.page-tabs button[aria-current="page"] {
  color: #0b90ca;
  background: #e1f5ff;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #eef8fd;
  margin-bottom: 13px;
  overflow-wrap: anywhere;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #cceefa;
  font-size: 21px;
  color: #198ab3;
}
.profile-card h3 {
  font-size: 16px;
}
.profile-card p,
.muted {
  font-size: 12px;
  color: #8b929c;
}
.profile-card p {
  margin-top: 3px;
}
.panel {
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  padding: 12px;
}
.panel h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.demo-actions article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-top: 1px solid #edf0f3;
  margin-top: 10px;
  padding-top: 10px;
}
.demo-actions article > div {
  min-width: 0;
}
.demo-actions strong {
  font-size: 13px;
}
.demo-actions p {
  font-size: 11px;
  color: #8b929c;
  overflow-wrap: anywhere;
  margin-top: 3px;
}
.demo-actions button {
  flex-shrink: 0;
  font-size: 12px;
  padding: 7px 10px;
}
.page-disclaimer {
  text-align: center;
  font-size: 11px;
  color: #9ca2ab;
  padding: 15px 5px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-heading h3 {
  font-size: 15px;
}
.record-list,
.history-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.record-item {
  padding: 11px 10px;
  border: 1px solid #e6e9ee;
  border-radius: 9px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  font-size: 12px;
}
.record-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.record-item h3 {
  font-size: 13px;
  font-weight: 500;
}
.record-item p,
.record-item small {
  font-size: 11px;
  color: #9ba0a8;
  margin-top: 4px;
}
.record-values {
  text-align: right;
  flex-shrink: 0;
  max-width: 38%;
}
.record-values strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.record-status {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: #83909a;
}
.record-status.won {
  color: #139d92;
}
.record-status.lost {
  color: #ac7784;
}
.history-card {
  border: 1px solid #e6e9ee;
  border-radius: 9px;
  padding: 11px;
}
.history-card .section-heading {
  font-size: 12px;
  margin-bottom: 9px;
}
.history-card time {
  font-size: 10px;
  color: #989fa8;
}
.history-card .result-tags {
  margin-top: 8px;
}
.result-proof {
  margin-top: 10px;
  font-size: 11px;
  color: #7d8794;
}
.result-proof summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.result-proof code {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 10px;
  padding-top: 8px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 13px;
}
.pagination button {
  background: #f2f5f9;
  border-radius: 6px;
  font-size: 12px;
  padding: 5px 11px;
}
.pagination p {
  font-size: 11px;
  text-align: center;
  color: #818a96;
}
.pagination p span {
  display: block;
}
.empty-state {
  padding: 20px 10px;
  text-align: center;
  background: #f8f9fb;
  border-radius: 9px;
  font-size: 13px;
}
.empty-state p {
  font-size: 12px;
  color: #8d96a2;
  margin-top: 7px;
}
.empty-state button {
  margin-top: 10px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px
    calc(12px + max(env(safe-area-inset-bottom), var(--safe-bottom)));
  border-top: 1px solid #edf0f3;
  flex: none;
}
.confirm-details > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
}
.confirm-details strong {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 65%;
}
.notice-box {
  font-size: 12px;
  padding: 10px;
  border-radius: 7px;
  background: #f0f8fc;
  color: #4f7688;
  margin-top: 10px;
}
.rules-copy {
  font-size: 13px;
  line-height: 1.8;
}
.rules-copy dt {
  font-weight: 600;
  margin-top: 11px;
}
.rules-copy dd {
  margin: 3px 0 0;
  color: #7a8590;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--dock-height) + 12px);
  width: calc(100% - 28px);
  max-width: 450px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: white;
  background: #354453ed;
  padding: 5px 7px 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  z-index: 10;
  overflow-wrap: anywhere;
}
.toast .icon-button {
  font-size: 21px;
}
.keyboard-open .toast {
  display: none;
}
.keyboard-open .bottom-nav {
  display: none;
}
.sheet input {
  scroll-margin: 12px;
}
.sheet .field-error {
  margin-bottom: 5px;
}
noscript {
  position: fixed;
  inset: 30% 5%;
  padding: 30px;
  background: #fff;
  z-index: 50;
}
@media (min-width: 700px) {
  .player-shell {
    border-left: 1px solid #e1e4eb;
    border-right: 1px solid #e1e4eb;
  }
  .sheet {
    border-radius: 16px;
    margin: auto;
    max-height: calc(var(--app-height) - 40px);
  }
  .chat-thread {
    padding: 18px 16px;
  }
  .header-title h1 {
    font-size: 17px;
  }
}
@media (max-width: 360px) {
  .header-title h1 {
    font-size: 15px;
  }
  .header-title p {
    font-size: 10px;
  }
  .site-header {
    padding-left: 7px;
    padding-right: 7px;
    gap: 4px;
  }
  .phase-strip {
    padding: 6px 8px;
    gap: 4px;
  }
  .phase-main > p {
    font-size: 12px;
  }
  .state-pill {
    margin-left: 4px;
    font-size: 10px;
  }
  .wallet-mini {
    padding-left: 8px;
    max-width: 45%;
  }
  .wallet-mini strong {
    font-size: 15px;
  }
  .last-result {
    padding: 5px 7px;
    font-size: 11px;
    gap: 4px;
  }
  .last-result .ball {
    width: 21px;
    height: 21px;
    font-size: 13px;
  }
  .last-result .result-line {
    gap: 2px;
  }
  .last-result .result-tags {
    display: none;
  }
  .chat-thread {
    padding: 13px 8px;
  }
  .chat-message {
    gap: 7px;
  }
  .chat-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .message-body {
    max-width: calc(100% - 39px);
  }
  .bubble {
    padding: 9px 10px;
    font-size: 13px;
  }
  .sheet-scroll {
    padding: 10px;
  }
  .bet-controls {
    padding-left: 10px;
    padding-right: 10px;
  }
  .chip-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .bet-footer {
    gap: 5px;
  }
  .bet-footer .button {
    padding: 8px;
    font-size: 11px;
  }
  .selected-summary {
    font-size: 11px;
  }
  .selected-summary small {
    font-size: 10px;
  }
}
@media (max-height: 500px) {
  .site-header {
    min-height: 48px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .header-title p {
    display: none;
  }
  .phase-strip {
    min-height: 61px;
    padding-top: 3px;
    padding-bottom: 3px;
  }
  .bottom-nav {
    margin: 0;
  }
  .bottom-nav button {
    min-height: 44px;
    flex-direction: row;
    gap: 5px;
  }
  .bottom-nav button > span {
    font-size: 20px;
    line-height: 24px;
  }
  .chat-dock {
    padding-top: 5px;
  }
  .sheet-heading {
    min-height: 50px;
    padding: 3px 10px;
  }
  .sheet {
    max-height: calc(var(--app-height) - 10px);
  }
  .bet-controls {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .chip-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .field-hint {
    display: none;
  }
  .bet-footer {
    margin-top: 5px;
  }
  .amount-row {
    margin-top: 5px;
  }
  .chat-thread {
    padding-top: 9px;
  }
  .dialog-actions {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
