[hidden],
.hidden {
  display: none !important;
}
#balance-value[data-balance-hidden="true"] { font-size: 0; }
#balance-value[data-balance-hidden="true"] > span { visibility: hidden; font-size: 0; }
#balance-value[data-balance-hidden="true"]::after { content: "••••••"; font-size: 24px; }
#top-balance-value[data-balance-hidden="true"] { font-size: 0; }
#top-balance-value[data-balance-hidden="true"] b { visibility: hidden; font-size: 0; }
#top-balance-value[data-balance-hidden="true"]::after { content: "••••••"; font-size: 14px; }
.bh-surface[data-variant="mobile"] .header-actions { min-width: 0; flex: 0 1 auto; }
.bh-surface[data-variant="mobile"] .bh-profile { max-width: 100%; justify-content: flex-end; }
.bh-surface[data-variant="mobile"] .brand { flex-shrink: 1; }
.bh-surface[data-variant="mobile"] .brand-logo { max-width: clamp(90px,30vw,135px); max-height: 38px; }
.bh-home-shortcuts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 6px; margin: 12px 0 18px; }
.bh-home-shortcuts button { position: relative; display: flex; align-items: flex-end; min-width: 0; height: clamp(64px,18vw,86px); overflow: hidden; padding: 0; border: 1px solid #6c624c; border-radius: 8px; background: #25282d; color: #f6e3b5; font-size: 11px; cursor: pointer; }
.bh-home-shortcuts .bh-shortcut-icon { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.bh-home-shortcuts .bh-shortcut-icon > [data-icon] { display: block; width: 100%; height: 100%; }
.bh-home-shortcuts .bh-shortcut-icon img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: center; }
.bh-home-shortcuts button > span:last-child { position: relative; z-index: 1; display: block; width: 100%; min-width: 0; padding: 16px 2px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; text-align: center; font-weight: 600; text-shadow: 0 1px 3px #000; background: linear-gradient(transparent,#16191ee8); pointer-events: none; }
.bh-home-shortcuts button:focus-visible { outline: 2px solid #efd08b; outline-offset: 2px; }
#bh-game-notice { margin: 0 0 12px; }
.page:not(.active) {
  display: none;
}
.bh-surface[data-mode="preview"] .game-art::after {
  content: "设计预览";
}
body {
  margin: 0;
}
.modal-open {
  overflow: hidden;
}
.bh-surface {
  min-height: 100vh;
}
#toast {
  position: fixed;
  z-index: 50000;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 14px 22px;
  border: 1px solid #b8a46b;
  border-radius: 12px;
  background: #26282c;
  color: #f6e9bb;
  box-shadow: 0 10px 40px #0008;
  text-align: center;
}
.bh-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  box-sizing: border-box;
  background: #292c31;
  color: #f3ecda;
  border: 1px solid #9d8b5f;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 22px 80px #0009;
}
.bh-dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
.bh-dialog h2 {
  margin: 0 0 20px;
  color: #ead18c;
  font-size: 24px;
}
.bh-dialog p {
  line-height: 1.8;
}
.bh-dialog .dialog-close {
  float: right;
  background: transparent;
  border: 0;
  color: #dfcc98;
  font-size: 25px;
  cursor: pointer;
}
.auth-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}
.auth-tabs button {
  flex: 1;
  padding: 10px;
  background: transparent;
  color: #baad8a;
  border: 0;
  border-bottom: 2px solid transparent;
}
.auth-tabs .is-active {
  border-color: #d9be7c;
  color: #f4db9e;
}
.bh-dialog label {
  display: block;
  margin: 16px 0 6px;
  font-size: 14px;
}
.bh-dialog input:not([type="checkbox"]) {
  width: 100%;
  box-sizing: border-box;
  background: #1e2228;
  color: #fff;
  border: 1px solid #756b52;
  padding: 12px;
  border-radius: 8px;
  font: inherit;
}
.bh-dialog .gold-button[type="submit"] {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
}
.bh-dialog .remember {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bh-dialog .remember input {
  margin: 0;
}
.auth-note {
  font-size: 12px;
  color: #b7aa89;
}
#auth-error {
  color: #ffb6a6;
  min-height: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.bh-surface .portal-main {
  padding-top: 22px;
  padding-bottom: 24px;
}
.bh-surface .category {
  cursor: pointer;
}
.bh-surface .lobby-main {
  min-width: 0;
}
button {
  font: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.bh-surface .platform-app-download-banner {
  margin: 10px auto;
}
@media (max-width: 600px) {
  .bh-dialog {
    padding: 20px;
  }
  .bh-surface .portal-heading {
    gap: 8px;
  }
  .bh-surface .page-title h1 {
    font-size: 25px;
  }
  .bh-surface .header-actions .bh-profile {
    gap: 6px;
  }
  .bh-surface .header-actions .gold-button,
  .bh-surface .header-actions .quiet-button {
    padding: 8px 12px;
  }
}

/* Keep auth fields readable without triggering input-focus zoom on iPhone. */
#authModal input:not([type="checkbox"]) {
  font-size: 16px;
}

/* Keep ordinary scrolling while disabling accidental mobile page zoom. */
.bh-surface[data-variant="mobile"] {
  touch-action: pan-x pan-y;
}

@media (max-width: 360px) {
  #authModal .platform-captcha-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }
  #authModal .platform-captcha-row input {
    grid-column: 1 / -1;
  }
}

/* BOHUI_HOME_LAYOUT_PATCH_BEGIN */
.bh-surface[data-variant="mobile"] #page-home .carousel[data-variant="mobile"] {
  height: clamp(144px, 40vw, 164px);
}
.bh-surface[data-variant="mobile"] #home-shortcuts > button {
  height: clamp(64px, 19vw, 84px);
  border-radius: 10px;
  font-size: clamp(11px, 2.8vw, 13px);
}
.bh-surface[data-variant="mobile"] #home-shortcuts {
  width: 100%;
  gap: clamp(6px, 1.6vw, 8px);
}
.bh-surface[data-variant="mobile"] #home-shortcuts .bh-shortcut-icon > [data-icon] {
  padding: 8px 12px 23px;
  box-sizing: border-box;
}
.bh-surface[data-variant="mobile"] #home-shortcuts .bh-shortcut-icon > [data-icon] > img {
  object-fit: contain;
}
/* BOHUI_HOME_LAYOUT_PATCH_END */

/* Square game artwork fills the card edge to edge without stretching. */
.bh-surface .game-card {
  border-radius: 28px;
  overflow: hidden;
}
.bh-surface .game-card .game-art {
  position: relative;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 27px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #292e35, #111b27);
}
.bh-surface .game-card .game-art > .artwork {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.bh-surface .game-card .game-art::after {
  content: none;
  display: none;
}
.bh-surface .game-card .game-meta {
  padding: 10px 16px 12px;
}
.bh-surface .game-card .game-meta h3 {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Keep homepage recommendations compact beside the category navigation. */
.bh-surface #game-grid {
  grid-template-columns: repeat(auto-fill, minmax(0, 150px));
  gap: 12px;
  align-items: start;
}
.bh-surface #game-grid .game-card {
  border-radius: 20% 20% 16px 16px;
}
.bh-surface #game-grid .game-art {
  border-radius: 20%;
  border-bottom: 0;
  background: transparent;
}
.bh-surface #game-grid .game-art > .artwork {
  transform: scale(1.02);
}
@supports (width: 1cqw) {
  .bh-surface #game-grid .bh-game-wrap {
    container-type: inline-size;
  }
  .bh-surface #game-grid .game-card {
    border-radius: 20cqw 20cqw 16px 16px;
  }
  .bh-surface #game-grid .game-art {
    border-radius: 20cqw;
  }
}
.bh-surface #game-grid .game-meta {
  padding: 7px 10px 9px;
}
.bh-surface #game-grid .game-meta h3 {
  font-size: 13px;
  line-height: 1.4;
}
.bh-surface #game-grid .favorite-button {
  top: 3px;
  right: 3px;
}
.bh-surface[data-variant="mobile"] #game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bh-surface[data-variant="mobile"] #game-grid .game-meta {
  padding: 6px 8px 8px;
}
.bh-surface[data-variant="mobile"] #game-grid .game-meta h3 {
  font-size: 12px;
}
.bh-surface #game-grid:has(> .bh-status) {
  grid-template-columns: minmax(0, 1fr);
}

/* Fill desktop recommendation rows without inflating a sparse one-to-four list. */
.bh-surface[data-variant="desktop"] #game-grid {
  gap: 8px;
}
.bh-surface[data-variant="desktop"] #game-grid:has(> .bh-game-wrap:nth-child(5)) {
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
}
