/* arcade: modals, leaderboards, share + doll editor */
.bmb-modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 3, 15, .82); display: grid; place-items: center; padding: 12px;
  overflow-y: auto; touch-action: auto; -webkit-user-select: none; user-select: none;
}
.bmb-box {
  width: min(520px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; background: #120a2e; color: #e8f4ff;
  border: 4px solid #000; box-shadow: 0 0 0 3px #3b2c86, 8px 8px 0 3px #000; padding: 18px 16px; text-align: center;
  font-family: 'VT323', monospace; font-size: 20px;
}
.bmb-box h2 { font-family: 'Press Start 2P', monospace; font-size: clamp(12px, 3.6vw, 16px); color: var(--yellow); margin: 0 0 12px; line-height: 1.5; }
.bmb-box h2 b { color: var(--green); font-weight: normal; }
.bmb-sub { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--cyan); margin: 0 0 10px; }
.bmb-note { color: #a9a3d6; font-size: 17px; margin: 8px 0 0; }
.bmb-err { color: var(--pink); min-height: 1.2em; margin: 6px 0; }
.bmb-status { color: var(--green); min-height: 1.2em; margin: 8px 0 0; font-family: 'Press Start 2P', monospace; font-size: 10px; }
.bmb-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.bmb-row.small { align-items: center; }
.bmb-btn {
  font-family: 'Press Start 2P', monospace; font-size: 11px; border: 3px solid #000; box-shadow: 3px 3px 0 #000; padding: 11px 12px;
  cursor: pointer; color: #000; background: var(--green); min-height: 44px;
}
.bmb-btn.alt { background: var(--cyan); }
.bmb-btn.ghost { background: #2a1f5e; color: #e8f4ff; }
.bmb-btn.small { font-size: clamp(8px, 2.2cqw, 13px); padding: 1.4cqh 1.8cqw; min-height: 0; }
.bmb-btn:disabled { opacity: .6; cursor: wait; }
.bmb-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.bmb-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.bmb-initials input {
  width: 6.2em; font-family: 'Press Start 2P', monospace; font-size: clamp(32px, 11vw, 52px); text-align: center; letter-spacing: .25em;
  padding: 10px 0 10px .25em; background: #000; color: var(--yellow); border: 4px solid var(--pink); text-transform: uppercase; caret-color: var(--pink);
}
.bmb-initials input:focus { outline: 3px solid var(--cyan); }
.bmb-ranks { display: flex; gap: 22px; justify-content: center; font-family: 'Press Start 2P', monospace; font-size: clamp(18px, 6vw, 28px); color: var(--yellow); margin: 6px 0 12px; }
.bmb-ranks small { display: block; font-size: 9px; color: var(--cyan); margin-top: 6px; }

/* leaderboard (page panel + inside modals) */
.board h2, .bmb-board-in h2 { margin-bottom: 8px; }
.bmb-board-in h2 { font-size: 11px; color: var(--green); }
.bmb-tabs { display: flex; gap: 6px; margin-bottom: 8px; justify-content: center; }
.board .bmb-tabs { justify-content: flex-start; }
.bmb-tabs button { font-family: 'Press Start 2P', monospace; font-size: 10px; background: #000; color: #a9a3d6; border: 2px solid #3b2c86; padding: 8px 10px; cursor: pointer; }
.bmb-tabs button.on { color: #000; background: var(--yellow); border-color: #000; }
.bmb-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.bmb-list li { display: grid; grid-template-columns: 3em 1fr auto; gap: 8px; padding: 3px 6px; border-bottom: 1px dashed #2c1f6b; font-size: 20px; }
.bmb-list .pos { color: #a9a3d6; }
.bmb-list .nm { font-family: 'Press Start 2P', monospace; font-size: 13px; color: #e8f4ff; align-self: center; }
.bmb-list .nm em { font-style: normal; font-size: 9px; color: #000; background: var(--pink); padding: 2px 4px; margin-left: 4px; vertical-align: 2px; }
.bmb-list .sc { color: var(--yellow); font-variant-numeric: tabular-nums; }
.bmb-list li.top1 .nm { color: var(--yellow); }
.bmb-list li.top2 .nm { color: #d8d8e8; }
.bmb-list li.top3 .nm { color: var(--orange); }
.bmb-list li.me { background: rgba(255, 63, 164, .15); }
.bmb-empty { color: #a9a3d6; margin: 6px 0; }

/* share previews */
.bmb-share-prev { display: flex; gap: 10px; justify-content: center; align-items: flex-end; }
.bmb-share-prev canvas { image-rendering: pixelated; border: 3px solid #000; box-shadow: 4px 4px 0 #000; background: #0b0620; }
.bmb-share-prev .story { width: min(150px, 38vw); height: auto; aspect-ratio: 9 / 16; }
.bmb-share-prev .sq { width: min(110px, 28vw); height: auto; aspect-ratio: 1; }

/* doll editor */
.bmb-editor { display: grid; gap: 10px; justify-items: center; }
.bmb-editor .ed { width: min(320px, 78vw); height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 3px solid #000; touch-action: none; cursor: crosshair; }
.bmb-pal { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; width: min(320px, 78vw); }
.bmb-pal button { aspect-ratio: 1; border: 2px solid #000; cursor: pointer; padding: 0; min-width: 0; }
.bmb-pal button.on { outline: 3px solid #fff; outline-offset: -1px; transform: scale(1.12); }
.bmb-pal .eraser { background: repeating-conic-gradient(#1a123e 0% 25%, #33285f 0% 50%) 0 0 / 8px 8px; color: #fff; font-size: 12px; }
.bmb-check { display: inline-flex; gap: 6px; align-items: center; font-family: 'Press Start 2P', monospace; font-size: 10px; color: var(--cyan); }
