/* Theme button sits inside the board (top corner), so the fixed top HUD (#faith-hud) never covers it when the board is scrolled into view. */
.board-theme-bar{position:absolute;z-index:8;top:calc(9.1% + 8px);left:calc(9.1% + 8px);display:flex;max-width:calc(81.8% - 16px);margin:0;padding:0;box-sizing:border-box}
.board-viewport.has-3d>.board-theme-bar{top:10px;left:auto;right:10px;max-width:calc(100% - 20px)}
/* Short landscape phones: the board is too small to hold the button, and the top HUD is centred, so pin it in the free corner beside the HUD. */
@media (orientation:landscape) and (max-height:520px) and (max-width:999px){body:has(#game-screen:not([hidden])) .board-viewport>.board-theme-bar{position:fixed;z-index:35;top:max(4px,env(safe-area-inset-top,0px));right:max(8px,env(safe-area-inset-right,0px));left:auto;max-width:calc(50vw - 170px)}#game-screen:is(.fx-shake-light,.fx-shake-hard) .board-viewport>.board-theme-bar{visibility:hidden}}
.board-viewport .board-theme-bar button{min-height:44px;padding:6px 12px;border-color:#dabb74;border-radius:8px;background:#241c1bd6;color:#ffe5a6;font-size:13px;line-height:1.3;text-align:center}
.board-theme-bar button,.board-theme-dialog button{min-height:44px;padding:10px 16px;border:1px solid #b99550;border-radius:12px;background:#24171d;color:#f4dc9c;font:600 15px/1.5 system-ui,sans-serif;cursor:pointer}
.board-theme-dialog{box-sizing:border-box;width:min(460px,calc(100% - 28px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:1px solid #c6a158;border-radius:22px;background:#1c141d;color:#f8edd5;box-shadow:0 20px 90px #000a;font:16px/1.7 system-ui,sans-serif}
.board-theme-dialog::backdrop{background:#08060bc9}.board-theme-dialog h2{font-size:23px;margin:0 0 12px}.board-theme-dialog p{font-size:14px;margin:10px 0 20px;color:#ddd1bd}
.board-theme-dialog label{display:block;font-weight:700;margin:16px 0 6px}.board-theme-dialog select{box-sizing:border-box;width:100%;min-height:48px;border:1px solid #9f874e;border-radius:10px;background:#2a2030;color:#fff5dd;padding:10px;font:16px system-ui,sans-serif}.board-theme-dialog select:disabled{opacity:1;color:#c5b5d9;border-color:#675776}.board-theme-dialog button{width:100%;margin-top:10px}.board-theme-dialog :focus-visible,.board-theme-bar :focus-visible{outline:3px solid #e4bbff;outline-offset:3px}
