.bb-account-button{display:inline-flex;align-items:center;gap:.45rem;max-width:11rem;min-height:44px;padding:.4rem .65rem;border:1px solid #a6c9b6;border-radius:14px;background:var(--card-bg,#fff);color:var(--text,#164b37);font:inherit;font-weight:700;cursor:pointer;white-space:nowrap;overflow:hidden}.bb-account-button span:last-child{overflow:hidden;text-overflow:ellipsis}.bb-account-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:50%;object-fit:cover;background:#fff}.bb-google-letter{display:grid;place-items:center;color:#4285f4;border:1px solid #d8dce1;font-family:Arial,sans-serif;font-size:23px}.bb-account-settings{display:inline-flex;align-items:center;justify-content:center;gap:.2rem;border:1px solid currentColor;border-radius:10px;padding:.25rem .5rem;font:inherit;font-weight:700;background:transparent;color:inherit;cursor:pointer;margin-right:.4rem}.bb-game-return{padding:.6rem 1rem;text-align:left;background:#020309}.bb-game-return a{display:inline-block;color:#ffad37;font:700 16px/1.5 system-ui,sans-serif;text-decoration:none}.bb-account-dialog{width:min(92vw,620px);max-height:88dvh;overflow:auto;border:1px solid #bdd5c8;border-radius:20px;padding:24px;background:#f8fcfa;color:#173d30;font:16px/1.7 system-ui,sans-serif}.bb-account-dialog::backdrop{background:#00190d99}.bb-account-dialog h2{margin:0 0 12px;font-size:24px}.bb-account-dialog p{margin:.75rem 0}.bb-account-dialog label{display:block;margin:1rem 0}.bb-account-dialog input[type=text],.bb-account-dialog select{display:block;width:100%;box-sizing:border-box;font:inherit;color:inherit;border:1px solid #a9c4b5;border-radius:10px;padding:10px;background:#fff}.bb-account-dialog button{font:700 16px/1.4 system-ui,sans-serif;border:1px solid #588c70;border-radius:10px;padding:11px 16px;background:#087f59;color:white;cursor:pointer}.bb-account-dialog button:disabled{opacity:.5;cursor:default}.bb-account-dialog .bb-close{float:right;background:transparent;color:#365f4b}.bb-account-dialog .bb-secondary{background:white;color:#28523f}.bb-account-dialog .bb-error{color:#a23b25}.bb-account-dialog .bb-notice{background:#edf6f0;border-left:3px solid #8aa776;padding:12px}.bb-account-dialog ul{padding-left:1.25em}.bb-account-dialog small{display:block;font-size:14px;color:#456c57}.bb-account-dialog .bb-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.bb-account-dialog .bb-demo-choice{display:block;padding:10px;border:1px solid #bdd5c8;border-radius:12px}.bb-account-dialog .bb-demo-choice input{margin-right:6px}.bb-account-dialog .bb-consent{display:flex;align-items:flex-start;gap:8px}.bb-account-dialog .bb-consent input{margin-top:8px}.bb-account-profile-image{width:64px;height:64px;object-fit:cover;border-radius:50%;background:white}#accountEntry{margin-right:auto}header.top #accountEntry{margin-right:8px}.unified-header #accountEntry{position:absolute;left:14px;top:50%;transform:translateY(-50%)}@media(max-width:600px){.bb-account-button{max-width:7rem;font-size:14px;padding:.3rem}.bb-account-avatar{width:26px;height:26px;flex-basis:26px}.unified-header #accountEntry{left:8px}.bb-account-dialog{padding:18px}.bb-account-dialog h2{font-size:21px}.bb-account-settings{font-size:14px}.top #accountEntry{max-width:8rem}}

/* Profile image is the accessible image-picker control. */
.bb-account-dialog .bb-profile-edit{position:relative;display:block;width:88px;height:88px;border:0;border-radius:50%;padding:0;margin:16px 4px 12px;background:#fff;box-shadow:0 0 0 2px #a9c4b5;color:#164b37;overflow:visible}
.bb-profile-edit .bb-account-profile-image{display:grid;place-items:center;width:88px;height:88px;box-sizing:border-box;font-size:36px;object-fit:cover;border-radius:50%}
.bb-profile-camera{position:absolute;right:-4px;bottom:-2px;width:32px;height:32px;display:grid;place-items:center;border:2px solid #f8fcfa;border-radius:50%;background:#087f59;color:#fff;box-sizing:content-box}
.bb-profile-edit:focus-visible{outline:3px solid #287bd1;outline-offset:6px}
.bb-profile-edit:hover{box-shadow:0 0 0 3px #087f59}

.bb-account-label{display:flex;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.25}.bb-account-label>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}.bb-account-label>small{font-size:14px;font-weight:500;line-height:1.3;opacity:.9}

/* Account controls add a separate return row; keep the flexible row on the game board. */
.shell.bb-game-account{grid-template-rows:auto auto minmax(0,1fr) auto auto}
.shell.bb-game-account>.top{grid-row:1}
.shell.bb-game-account>.bb-game-return{grid-row:2}
.shell.bb-game-account>.stage{grid-row:3;min-height:0}
.shell.bb-game-account>#music-status{grid-row:4}
.shell.bb-game-account>.hud{grid-row:5}
.bb-game-return a.primary{color:#251403}

/* The return link scrolls with the menu and clips beneath the fixed header. */
#menu.bb-game-menu{display:block;justify-items:stretch;padding:0}
#menu.bb-game-menu>.bb-game-return{position:static;width:100%;margin:0;padding:.6rem 1rem}
#menu.bb-game-menu>.overlay-inner{width:min(calc(100% - 30px),450px);margin:15px auto}

/* Compact account entry: large avatar, one line, quiet when idle. */
.bb-account-button{gap:.5rem;max-width:15rem;min-height:48px;padding:4px;border:0;border-radius:12px;background:transparent;color:inherit;overflow:visible}
.bb-account-button .bb-account-avatar{width:40px;height:40px;flex-basis:40px;border:1px solid #a6c9b6}
.bb-account-button .bb-account-label{flex-direction:row;align-items:center;gap:.45rem;font-size:16px;min-width:0}
.bb-account-button .bb-account-label>span{max-width:7rem}
.bb-account-button .bb-account-label>small{flex:none;font-size:14px;line-height:1.3;opacity:1}
.bb-account-button[data-sync=error] .bb-account-sync-label{color:#a23b25}
header.top .bb-account-button[data-sync=error] .bb-account-sync-label{color:#ffbd54}
.bb-account-button:focus-visible{outline:3px solid #82dcff;outline-offset:2px}
header.top .bb-account-button{color:#f1f5ff}
@media(max-width:600px){.bb-account-button,.top #accountEntry{max-width:13rem;font-size:16px;padding:4px}.bb-account-button .bb-account-label>span{max-width:5rem}}

.bb-account-dialog .bb-profile-image-status{margin:.5rem 0 1rem;font-size:16px;line-height:1.6}

/* Keep the title's animation/hit box away from the close button. */
.bb-account-dialog[open]>*{animation:none}
.bb-account-dialog-header{position:sticky;top:-24px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-24px -24px 16px;padding:24px;background:#f8fcfa}
.bb-account-dialog-header h2{min-width:0;margin:0}
.bb-account-dialog .bb-account-dialog-header .bb-close{float:none;flex:none;position:relative;z-index:1;touch-action:manipulation}
@media(max-width:600px){.bb-account-dialog-header{top:-18px;margin:-18px -18px 16px;padding:18px}}

.bb-account-master{display:inline-block;position:relative;width:1.15em;height:1.15em;flex:0 0 1.15em;background:linear-gradient(140deg,#fff2a1 0%,#ffce51 48%,#df941e 100%);clip-path:polygon(50% 0%,62% 13%,80% 9%,86% 27%,100% 37%,94% 53%,98% 69%,80% 77%,73% 95%,55% 90%,40% 100%,28% 86%,10% 83%,9% 64%,0% 50%,10% 36%,12% 18%,31% 16%)}
.bb-account-master::after{content:'';position:absolute;inset:27% 25% 30%;background:#392100;clip-path:polygon(0 57%,17% 40%,38% 63%,84% 12%,100% 27%,39% 96%)}
.bb-account-master-detail:not([hidden]){display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;background:#fff7dc;color:#6b4c11}

/* White Google roundel; compact mobile entry leaves room for the centered brand. */
.bb-account-button[data-auth=guest] .bb-google-letter{background:#fff;border-color:#d7dce2;box-shadow:0 1px 4px #11182712}
.bb-google-letter svg{display:block;width:24px;height:24px;flex:none}
.bb-account-button:hover .bb-account-avatar{box-shadow:0 0 0 3px #808a9626}
@media(max-width:720px){
 .unified-header #accountEntry{left:8px;width:48px;max-width:48px;min-height:48px;padding:4px;gap:0}
 .unified-header #accountEntry .bb-account-label{display:none}
 .unified-header #accountEntry .bb-account-avatar{width:40px;height:40px;flex-basis:40px}
 .top #accountEntry[data-auth=guest] .bb-account-label{display:none}
}

.bb-game-comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bb-account-dialog .bb-game-choice{min-width:0;margin:0;padding:14px;border:2px solid #bed0c6;border-radius:14px;background:#fff;cursor:pointer}
.bb-account-dialog .bb-game-choice:has(input:checked){border-color:#087f59;background:#eff8f3}
.bb-game-choice>input{margin-right:6px;accent-color:#087f59}
.bb-game-choice>strong{font-size:16px}
.bb-game-comparison-details{margin:14px 0 0;font-size:14px;display:grid;grid-template-columns:1fr;gap:2px}
.bb-game-comparison-details dt{color:#557564}.bb-game-comparison-details dd{margin:0 0 8px;font-size:16px;font-weight:700}
@media(max-width:600px){.bb-game-comparison{grid-template-columns:1fr}}

@media(min-width:601px){.bb-game-choice>strong{display:inline-block;vertical-align:top;width:calc(100% - 28px);min-height:3.4em}}
