.modao-ui .player-bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.header-topup, .profile-edit-button, .record-rules-button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; box-shadow: none; transform: none;
  padding: 6px; color: #777; font: inherit; cursor: pointer;
}
.header-topup { color: var(--red); font-size: 22px; margin-left: -8px; }
.profile-edit-button { margin-left: auto; align-self: center; font-size: 21px; }
.profile-user-avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.record-rules-button { margin-left: auto; font-size: 13px; text-decoration: underline; }
.bi-pencil-square::before { content: "\f4ca"; }
.bi-check::before { content: "\f26e"; }
.hd-ac-coin, .hd-prize-amount img { clip-path: ellipse(45% 46% at 50% 49%); }
.record-settlement-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.record-settlement-actions > button { min-height: 44px; }
.modao-ui .record-settlement-actions > .draw-btn,
.modao-ui .result-settlement-actions .result-shipping-btn { background: var(--red); border-color: var(--red); color: #fff; }
.modao-ui .record-settlement-actions > .trial-btn { background: #171717; border-color: #171717; color: #fff; }
.record-card .record-selection-toggle {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 20px; height: 20px; min-height: 0; padding: 0;
  border: 1px solid #d8d7d0; border-radius: 3px; background: white;
  box-shadow: none; color: transparent; transform: none; font-size: 17px;
}
.record-card.selected .record-selection-toggle { background: var(--red); border-color: var(--red); color: white; }
.record-card { position: relative; grid-template-rows: auto auto auto auto auto; }
.record-card .record-image { grid-row: 1 / 6; }
.record-acquired { grid-column: 2; color: #999; font-size: 11px; line-height: 1.5; }
.record-quantity { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.record-quantity button {
  display: grid; place-items: center; width: 28px; min-height: 28px; padding: 0;
  border: 1px solid #e8e7df; border-radius: 5px; background: #f8f7f2;
  color: #555; box-shadow: none; font-size: 18px; transform: none; cursor: pointer;
}
.record-quantity-value { min-width: 18px; text-align: center; font-size: 14px; }
.result-settlement-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-settlement-actions .recycle-selected-btn { background: #171717; color: white; }
.result-settlement-actions .keep-all-btn { grid-column: 1 / -1; min-height: 32px; background: transparent; color: #777; border: 0; }
.modao-ui .button-row.bulk-draw { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modao-ui .button-row .hundred-draw-btn,
.modao-ui .result-repeat-actions .hundred-draw-btn { background: #fff; border: 1px solid var(--red); color: var(--red); }
.modao-ui .recommend-grid .button-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.modao-ui .recommend-grid .button-row.single-draw { grid-template-columns: minmax(0, 1fr); }
.modao-ui .recommend-grid .button-row button { min-width: 0; min-height: 40px; padding: 8px 5px; }
.modao-ui .recommend-grid .button-row .hundred-draw-btn,
.modao-ui .result-repeat-actions.bulk-draw .hundred-draw-btn { grid-column: 1 / -1; }
.modao-ui .recommend-grid .button-row .trial-btn:not(.hundred-draw-btn) { background: #20201e; border-color: #20201e; color: #fff; }
.modao-ui .home-pool-card .pool-card-info,
.modao-ui .pool-card-list > .home-pool-card:first-child .pool-card-info {
  display: flex; flex-direction: column; min-width: 0;
}
.modao-ui .home-pool-card .pool-card-info > .button-row,
.modao-ui .home-pool-card .pool-card-info > .pool-card-actions { margin-top: auto; }
.modao-ui .recommend-grid .button-row .draw-btn:disabled,
.modao-ui .recommend-grid .button-row .trial-btn:disabled,
.modao-ui .button-row .hundred-draw-btn:disabled,
.modao-ui .result-repeat-actions .hundred-draw-btn:disabled {
  background: #eeede8; border-color: #eeede8; color: #aaa99f; opacity: 1; cursor: not-allowed;
}
.modao-ui button:focus-visible { outline: 2px solid #ff2b1e; outline-offset: 3px; }

/* Pool detail: clear navigation, readable prize labels and a compact draw bar. */
.detail .detail-inner { margin-bottom: 84px; }
.detail .back-row.pool-detail-back {
  position: static; top: auto; z-index: auto; margin: 0;
  min-height: 58px; padding: 10px 18px; gap: 16px;
  background: #fff; border-bottom: 1px solid #efeee8; box-shadow: none;
}
.detail .back-row .back {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 7px 11px; flex-shrink: 0;
  border: 1px solid #e9e7e0; border-radius: 7px; background: #f8f7f3;
  color: #4d4d47; font-size: 13px; font-weight: 500;
  box-shadow: none; transform: none; line-height: 1.4;
}
.detail .back-row .back:hover { color: var(--red); border-color: #ffd3ce; background: #fff6f4; }
.detail .back-row .back:active { transform: none; }
.detail .back-row .back .bi { font-size: 13px; }
.detail .back-row strong { max-width: 62%; font-size: 13px; font-weight: 500; color: #77776f; }
.detail .prize-grid .prize-name {
  padding: 10px 2px 4px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: #343430; font-size: 14px; font-weight: 500; line-height: 1.6;
  letter-spacing: .015em; text-align: left; text-wrap: pretty; word-break: normal; overflow-wrap: anywhere;
}
.detail .sticky-draw {
  bottom: calc(70px + env(safe-area-inset-bottom));
  padding: 12px 20px; border-top: 1px solid #e9e7e0;
  background: #fff; box-shadow: 0 -4px 18px #17171706;
}
.detail .sticky-draw .pool-bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-rows: auto auto; align-items: center; gap: 4px 24px;
  width: min(700px, 100%); margin: 0 auto; padding: 0;
}
.detail .sticky-draw .price {
  grid-column: 1; grid-row: 1; display: flex; align-items: center; flex-wrap: wrap;
  gap: 2px 6px; align-self: end; min-width: 0;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--red); font-size: 26px; font-weight: 700; line-height: 1.2;
}
.detail .sticky-draw .price .coin { width: 23px; height: 23px; margin: 0; flex-shrink: 0; }
.detail .sticky-draw .price::after { content: "pt / 抽"; color: #96968e; font-size: 12px; font-weight: 400; white-space: nowrap; }
.detail .sticky-draw .remain {
  grid-column: 1; grid-row: 2; justify-self: start; align-self: start;
  min-width: 0; margin: 0; padding: 0; border: 0; background: none;
  color: #85857d; font-size: 11px; font-weight: 400; line-height: 1.5; text-align: left;
}
.detail .sticky-draw .button-row {
  grid-column: 2; grid-row: 1 / 3; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; min-width: 0; margin: 0;
}
.detail .sticky-draw .button-row.single-draw { grid-template-columns: minmax(0, 1fr); }
.detail .sticky-draw .button-row.bulk-draw { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail .sticky-draw .draw-btn,
.detail .sticky-draw .trial-btn {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 48px;
  margin: 0; padding: 10px 14px; border: 1px solid transparent; border-radius: 8px;
  color: #fff; font-size: 15px; font-weight: 600; line-height: 1.4;
  text-shadow: none; box-shadow: none; transform: none;
}
.detail .sticky-draw .draw-btn { background: var(--red); border-color: var(--red); }
.detail .sticky-draw .draw-btn:hover { background: #e92519; border-color: #e92519; }
.detail .sticky-draw .trial-btn { background: #20201e; border-color: #20201e; }
.detail .sticky-draw .trial-btn:hover { background: #3a3a36; border-color: #3a3a36; }
.detail .sticky-draw .button-row .hundred-draw-btn { background: #fff; border-color: var(--red); color: var(--red); }
.detail .sticky-draw .draw-btn:disabled,
.detail .sticky-draw .trial-btn:disabled {
  background: #eeede8; border-color: #eeede8; color: #aaa99f; opacity: 1; cursor: not-allowed;
}
html[data-player-layout="unfolded"] .detail .sticky-draw .pool-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px;
}
html[data-player-layout="unfolded"] .recommend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px;
}
@media (max-width: 759px) {
  .detail .back-row.pool-detail-back { padding: 9px 12px; gap: 12px; min-height: 56px; }
  .detail .back-row .back { font-size: 13px; }
  .detail .prize-grid .prize-name { font-size: 13px; line-height: 1.6; padding-top: 9px; }
  .detail .sticky-draw { bottom: calc(70px + env(safe-area-inset-bottom)); padding: 12px 16px; }
  .detail .sticky-draw .pool-bottom { grid-template-columns: minmax(0, 1fr) minmax(144px, 1.1fr); column-gap: 14px; }
  .detail .sticky-draw .price { font-size: 23px; }
  .detail .sticky-draw .price .coin { width: 21px; height: 21px; }
  .detail .sticky-draw .draw-btn, .detail .sticky-draw .trial-btn { padding: 10px 8px; font-size: 14px; }
  .detail .sticky-draw .button-row.bulk-draw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail .sticky-draw .button-row.bulk-draw .hundred-draw-btn { grid-column: 1 / -1; }
  .detail:has(.sticky-draw .bulk-draw) .detail-inner { margin-bottom: 144px; }
}
@media (max-width: 599px) {
  .detail .sticky-draw { bottom: calc(63px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .detail .sticky-draw .pool-bottom { column-gap: 10px; }
  .detail .sticky-draw .price { font-size: 20px; }
  .detail .sticky-draw .price::after { font-size: 10px; }
  .detail .back-row strong { font-size: 12px; }
}
@media (max-width: 759px) {
  .modao-ui .player-bottom-nav > button { min-width: 0; padding: 0 2px; font-size: 10px; }
  .record-settlement-actions { gap: 8px; }
  .record-card .record-selection-toggle { top: 10px; right: 10px; }
  .record-acquired { font-size: 10px; }
  .header-topup { margin-left: -6px; padding: 4px; font-size: 19px; }
}
