/* Auxiliary menus only. Approved art, Home and board geometry are unchanged. */
.bc-shell { --menu-safe-top: env(safe-area-inset-top, 0px); --menu-safe-bottom: env(safe-area-inset-bottom, 0px); top: var(--menu-top, 0px); bottom: auto; height: var(--menu-height, 100%); padding-top: var(--menu-safe-top); padding-bottom: calc(76px + var(--menu-safe-bottom)); }
.bc-nav { padding-bottom: max(5px, var(--menu-safe-bottom, env(safe-area-inset-bottom, 0px))); height: calc(76px + var(--menu-safe-bottom, env(safe-area-inset-bottom, 0px))); }
.bc-menu-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; animation: bc-menu-enter 180ms ease-out; }
.bc-menu-panel > * { flex-shrink: 0; }
.bc-menu-panel[hidden], .bc-dialog [hidden] { display: none !important; }
.bc-content { scroll-padding-block: 12px 24px; }
/* Unlike overflow:hidden, clip prevents focus restoration from panning the
   outer page by a pixel. The menu content remains the sole scroll container. */
html:has(.bc-shell:not([hidden])), body:has(.bc-shell:not([hidden])), .is-home:has(.bc-shell:not([hidden])) { overflow: clip; }
.bc-shell :is(button, input, summary):focus-visible, .bc-nav button:focus-visible, .bc-dialog :is(button, input):focus-visible { outline: 3px solid #ffe593; outline-offset: 3px; }
.bc-shell :is(button, summary), .bc-dialog button { touch-action: manipulation; }
.bc-shell button:disabled, .bc-dialog button:disabled { opacity: 1; color: #d0c8e0; background: #393449; border-color: #71647f; box-shadow: inset 0 1px #ffffff14; cursor: not-allowed; filter: none; transform: none; text-shadow: none; }
.bc-shell input:disabled { opacity: 1; color: #bcb0cc; }
.bc-shell input[aria-invalid="true"] { border-color: #ffb1c6; outline: 1px solid #ffb1c6; }
.bc-form small { color: #d5c6e8; font-size: 11px; line-height: 1.45; }
.bc-error { color: #ffbdce; font-size: 12px; margin: 0; }
.bc-error:empty { display: none; }
.bc-status { padding: 10px 12px; margin: 0; border: 1px solid #b6a1df; border-radius: 12px; background: #251d46; color: #f2eaff; font-size: 12px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.bc-status[data-state="success"] { background: #153e35; border-color: #67d6aa; color: #dcffed; }
.bc-status[data-state="warning"] { background: #3e3040; border-color: #e5bc70; color: #fff0c8; }
.bc-status[data-state="error"] { background: #491d36; border-color: #f991af; color: #ffe0e8; }
.bc-status[data-state="submitting"], .bc-status[data-state="loading"] { background: #202e53; border-color: #a3d2ff; color: #e0f1ff; }
.bc-empty { margin: 0; padding: 12px; color: #dccdec; background: #1b1536ad; border-radius: 12px; font-size: 12px; line-height: 1.6; }
.bc-secondary { min-height: 44px; padding: 10px 14px; border: 1px solid #9276ba; border-radius: 12px; background: linear-gradient(#473665, #302046); color: #fff1ff; font-size: 12px; font-weight: 800; }
.bc-test-controls { border-top: 1px solid #ffffff21; font-size: 11px; color: #d8cce9; }
.bc-test-controls summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.bc-test-controls summary::before { content: '+'; margin-right: 8px; font-size: 18px; }
.bc-test-controls[open] summary::before { content: '−'; }
.bc-test-controls label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.bc-test-controls input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; accent-color: #ff5cad; }
.bc-accordion { padding: 0; }
.bc-accordion summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 800; }
.bc-accordion summary::-webkit-details-marker { display: none; }
.bc-accordion summary > span { flex: 1; }
.bc-accordion summary > svg:last-child { width: 16px; transition: transform 180ms ease; }
.bc-accordion[open] summary > svg:last-child { transform: rotate(90deg); }
.bc-accordion-body { padding: 0 10px 10px; }
.bc-history { list-style: none; margin: 0; padding: 0; }
.bc-history li { padding: 12px 4px; border-top: 1px solid #ffffff20; font-size: 13px; }
.bc-history span { display: block; color: #cdbbdf; font-size: 11px; margin-top: 5px; }
.bc-copy button { flex-shrink: 0; min-width: 104px; font-size: 11px; }
.bc-copy input { min-width: 0; }
.bc-dialog { max-height: min(720px, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px)); overscroll-behavior: contain; touch-action: pan-y; padding-top: 40px; animation: bc-menu-enter 180ms ease-out; }
.bc-dialog-x { position: absolute; top: 5px; right: 6px; min-width: 44px; min-height: 44px; font-size: 28px; }
.bc-dialog .bc-cta, .bc-dialog .bc-status, #menuDialogExtra:not(:empty) { margin-top: 12px; }
.bc-dialog .bc-form { text-align: left; }
.bc-dialog .bc-form input { color: #f4eaff; min-height: 44px; width: 100%; border: 1px solid #8d74b9; border-radius: 10px; background: #171332; padding: 10px; font-size: 16px; }
.bc-dialog-open .bc-content { overflow: hidden; }
.bc-keyboard-open .bc-shell { padding-bottom: max(12px, var(--menu-safe-bottom)); }
.bc-keyboard-open .bc-nav { display: none; }
@keyframes bc-menu-enter { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .bc-menu-panel, .bc-dialog { animation: none; } .bc-accordion summary > svg:last-child { transition: none; } }
/* Fixed public-art slot: decoding/errors never move or block a sheet form. */
.bc-sheet-banner { position: relative; flex: none; width: 100%; aspect-ratio: 3; }
.bc-sheet-banner > img { display: block; width: 100%; height: auto; aspect-ratio: 3; }
.bc-sheet-banner[data-banner-state='error'] > img { visibility: hidden; }
.bc-sheet-banner [data-banner-retry] { position: absolute; inset: 15% 8%; margin: auto; min-height: 44px; }
.bc-resource-error { grid-column: 1 / -1; min-width: 0; width: 100%; }
.profile-referral:has(.bc-resource-error) { flex-wrap: wrap; }
