/* Baker Bash's front door: the launch screen and the game select (js/hub.js).
   One overlay, #bb, over everything on the root page. <html data-bb> says what shows:
   "launch" (the title), "hub" (pick a game) or "game" (the overlay is away). It is set by a
   script in <head>, so the right thing is painted from the very first frame. */

@property --bb-hole { syntax: '<length>'; inherits: false; initial-value: 0px; }

.bb {
  --bb-display: 'Luckiest Guy', 'Nunito', 'Arial Black', system-ui, sans-serif;
  --bb-text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bb-gold: #ffd23c; --bb-pink: #ff3d8b; --bb-cyan: #35e0ff; --bb-violet: #8c4dff;
  --px: 0; --py: 0;
  position: fixed; inset: 0; z-index: 500; overflow: hidden; isolation: isolate;
  color: #fff; font-family: var(--bb-text); font-weight: 800;
  background:
    radial-gradient(90% 55% at 50% 112%, rgba(255, 61, 139, 0.42) 0%, rgba(255, 61, 139, 0) 70%),
    radial-gradient(120% 90% at 50% 38%, #3a1470 0%, #1a0838 48%, #07030f 100%);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.bb *, .bb *::before, .bb *::after { box-sizing: border-box; }
html[data-bb='game'] .bb { display: none; }

/* ------------------------------------------------------------ the room: light beams, rays and confetti, all drawn on one canvas (js/hub.js) */
.bb-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
/* the games' icons, adrift around the title */
.bb-floats { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity 0.5s, transform 0.7s cubic-bezier(0.5, 0, 0.3, 1); }
.bb-float { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  translate: calc(var(--px) * var(--z) * -1px) calc(var(--py) * var(--z) * -1px); transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }
.bb-float span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 30%; font-size: calc(var(--s) * 0.52); line-height: 1;
  background: linear-gradient(150deg, var(--c1), var(--c2)); border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0.12em 0 rgba(0, 0, 0, 0.35), 0 0.3em 0.6em rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 0 44px -6px var(--glow);
  animation: bb-pop 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both, bb-drift var(--d) ease-in-out infinite alternate; animation-delay: calc(0.5s + var(--i) * 0.12s), calc(var(--i) * -1.7s); }
@keyframes bb-pop { from { opacity: 0; scale: 0.2; } to { opacity: 1; scale: 1; } }
@keyframes bb-drift { from { transform: translateY(-9px) rotate(var(--r1)); } to { transform: translateY(11px) rotate(var(--r2)); } }
.bb-float:nth-child(6n + 1) { --x: 11%; --y: 17%; --s: clamp(64px, 11vmin, 118px); --z: 26; --d: 5.2s; --r1: -14deg; --r2: -5deg; }
.bb-float:nth-child(6n + 2) { --x: 88%; --y: 15%; --s: clamp(56px, 9.5vmin, 100px); --z: 16; --d: 6.1s; --r1: 9deg; --r2: 17deg; }
.bb-float:nth-child(6n + 3) { --x: 9%; --y: 72%; --s: clamp(54px, 9vmin, 96px); --z: 12; --d: 6.8s; --r1: 6deg; --r2: 15deg; }
.bb-float:nth-child(6n + 4) { --x: 90%; --y: 70%; --s: clamp(66px, 11.5vmin, 124px); --z: 30; --d: 5.6s; --r1: -16deg; --r2: -7deg; }
.bb-float:nth-child(6n + 5) { --x: 27%; --y: 90%; --s: clamp(46px, 7.5vmin, 80px); --z: 9; --d: 7.3s; --r1: -8deg; --r2: 4deg; }
.bb-float:nth-child(6n + 6) { --x: 73%; --y: 91%; --s: clamp(46px, 7.5vmin, 80px); --z: 20; --d: 6.4s; --r1: 3deg; --r2: 12deg; }
/* upright: keep them clear of the title and the start button */
@media (orientation: portrait) {
  .bb-float:nth-child(6n + 1) { --x: 13%; --y: 13%; }
  .bb-float:nth-child(6n + 2) { --x: 86%; --y: 11%; }
  .bb-float:nth-child(6n + 3) { --x: 12%; --y: 84%; }
  .bb-float:nth-child(6n + 4) { --x: 87%; --y: 82%; }
  .bb-float:nth-child(6n + 5) { --x: 38%; --y: 93%; }
  .bb-float:nth-child(6n + 6) { --x: 64%; --y: 94%; }
}
html[data-bb='hub'] .bb-floats { opacity: 0; transform: scale(1.5); }

/* ------------------------------------------------------------ the two views */
.bb-view { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.5, 0, 0.3, 1), visibility 0s linear 0.6s; }
html[data-bb='launch'] .bb-select, html[data-bb='hub'] .bb-launch { opacity: 0; visibility: hidden; pointer-events: none; }
html[data-bb='launch'] .bb-launch, html[data-bb='hub'] .bb-select { transition-delay: 0s; }
html[data-bb='hub'] .bb-launch { transform: scale(1.35); }
html[data-bb='launch'] .bb-select { transform: scale(0.9); }

/* ------------------------------------------------------------ launch: BAKER BASH */
.bb-launch { justify-content: center; gap: clamp(10px, 2.4vh, 26px); text-align: center; cursor: pointer; }
.bb-kicker { display: inline-flex; align-items: center; gap: 0.8em; margin: 0; padding: 0.55em 1.2em 0.5em; border-radius: 99px; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: clamp(11px, 1.7vmin, 17px); font-weight: 900; letter-spacing: 0.26em; text-transform: uppercase; color: #ffe9a8; white-space: nowrap;
  animation: bb-rise 0.6s cubic-bezier(0.2, 1, 0.3, 1) 0.05s both; }
.bb-kicker::before, .bb-kicker::after { content: '★'; font-size: 0.9em; letter-spacing: 0; color: var(--bb-pink); }
@keyframes bb-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.bb-mark { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; font-family: var(--bb-display); font-weight: 900; font-synthesis: none; line-height: 0.86; text-transform: uppercase; transform: rotate(-4deg); translate: calc(var(--px) * 7px) calc(var(--py) * 5px); transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }
.bb-mark > span { display: flex; white-space: nowrap; }
.bb-mark i { display: inline-block; font-style: normal; rotate: var(--r, 0deg);
  animation: bb-drop 0.75s cubic-bezier(0.25, 1.45, 0.45, 1) both, bb-bob 3.4s ease-in-out infinite; animation-delay: calc(0.15s + var(--i) * 0.065s), calc(1.2s + var(--i) * 0.16s); }
.bb-mark i:nth-child(odd) { --r: -3.5deg; }
.bb-mark i:nth-child(even) { --r: 3deg; }
@keyframes bb-drop { 0% { opacity: 0; transform: translateY(-0.9em) scale(1.6) rotate(-14deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes bb-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.045em; } }
.bb-w1 { font-size: min(21.5vw, 23vh, 250px); color: #fff8ea; letter-spacing: 0.02em;
  text-shadow: 0 0.012em 0 #ffc4dd, 0 0.024em 0 #ffaacd, 0 0.036em 0 #ff91bd, 0 0.048em 0 #ff78ad, 0 0.060em 0 #f7629d, 0 0.072em 0 #ec508c, 0 0.084em 0 #e13d7a, 0 0.096em 0 #d42e6c, 0 0.108em 0 #c32662, 0 0.120em 0 #b31f59, 0 0.132em 0 #a3184f, 0 0.162em 0 #3d0a3a, 0 0.144em 0 #3d0a3a, 0 0.27em 0.3em rgba(0, 0, 0, 0.5); }
.bb-w2 { font-size: min(28vw, 30vh, 330px); color: var(--bb-gold); letter-spacing: 0.03em; margin-top: 0.02em;
  text-shadow: 0 0.011em 0 #ffe98f, 0 0.023em 0 #ffd570, 0 0.035em 0 #ffc150, 0 0.046em 0 #ffae31, 0 0.057em 0 #fc9a25, 0 0.069em 0 #f88622, 0 0.081em 0 #f57120, 0 0.092em 0 #ee601f, 0 0.103em 0 #e2531f, 0 0.115em 0 #d5471f, 0 0.127em 0 #c93a1f, 0 0.157em 0 #4a0d2a, 0 0.139em 0 #4a0d2a, 0 0.26em 0.3em rgba(0, 0, 0, 0.5), 0 0 1.1em rgba(255, 190, 60, 0.35); }
/* how many games are inside: a sticker on the corner of the title */
.bb-badge { position: absolute; right: -0.3em; top: -0.2em; font-size: min(21.5vw, 23vh, 250px); }
.bb-badge span { display: grid; place-content: center; width: 4.3em; height: 4.3em; font-size: 0.115em; line-height: 0.9; text-align: center; color: #170a33; background: var(--bb-cyan); border-radius: 50%;
  box-shadow: 0 0.22em 0 #1493c4, 0 0.5em 0.9em rgba(0, 0, 0, 0.4), inset 0 0.12em 0 rgba(255, 255, 255, 0.6); transform: rotate(14deg);
  animation: bb-stamp 0.55s cubic-bezier(0.3, 1.7, 0.5, 1) 1s both; }
.bb-badge b { font-size: 2.1em; font-weight: 900; letter-spacing: 0; }
.bb-badge small { font: 900 0.72em/1 var(--bb-text); letter-spacing: 0.12em; }
@keyframes bb-stamp { from { opacity: 0; transform: rotate(-30deg) scale(2.4); } to { opacity: 1; transform: rotate(14deg) scale(1); } }

.bb-start { position: relative; margin-top: clamp(8px, 2.4vh, 26px); padding: 0.72em 1.7em 0.62em; border-radius: 99px; font-family: var(--bb-display); font-weight: 900; font-synthesis: none; font-size: clamp(20px, 3.5vmin, 40px); letter-spacing: 0.05em; text-transform: uppercase; color: #2a0f3d;
  background: linear-gradient(180deg, #fff3b8 0%, #ffd23c 45%, #ffb21f 100%);
  box-shadow: 0 0.2em 0 #c9730a, 0 0.2em 0 2px rgba(0, 0, 0, 0.25), 0 0.6em 1.2em rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.8);
  animation: bb-rise 0.6s cubic-bezier(0.2, 1, 0.3, 1) 1.15s both, bb-beat 1.5s ease-in-out 1.9s infinite; transition: filter 0.15s; }
.bb-start::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; border: 3px solid var(--bb-gold); opacity: 0; animation: bb-ring 1.5s ease-out 1.9s infinite; pointer-events: none; }
.bb-start:hover { filter: brightness(1.07); }
.bb-start:active { translate: 0 0.12em; box-shadow: 0 0.08em 0 #c9730a, 0 0.3em 0.7em rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.8); }
.bb-start:focus-visible, .bb-logo:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
@keyframes bb-beat { 0%, 100% { scale: 1; } 50% { scale: 1.055; } }
@keyframes bb-ring { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.22, 1.6); } }
.bb-keys { display: none; }
@media (hover: hover) and (pointer: fine) { .bb-touch { display: none; } .bb-keys { display: inline; } }
.bb-foot { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2em 0.9em; max-width: min(46em, 78vw); min-height: 1.3em; font-size: clamp(11px, 1.55vmin, 16px); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); animation: bb-rise 0.6s cubic-bezier(0.2, 1, 0.3, 1) 1.35s both; }
.bb-foot span + span::before { content: '✦'; margin-right: 0.9em; color: var(--bb-pink); }

/* ------------------------------------------------------------ game select */
.bb-select { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.bb-select::-webkit-scrollbar { display: none; }
.bb-top { flex: none; width: 100%; max-width: 1500px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.bb-logo { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 99px; font-family: var(--bb-display); font-weight: 900; font-synthesis: none; font-size: clamp(20px, 3vmin, 30px); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; color: #fff8ea; transition: background 0.2s; }
.bb-logo svg { width: 1.5em; height: 1.5em; flex: none; padding: 0.3em; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); transition: transform 0.18s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.2s; }
.bb-logo span { padding-top: 0.14em; text-shadow: 0 0.06em 0 #d9306f, 0 0.12em 0 #3d0a3a; }
.bb-logo em { font-style: normal; color: var(--bb-gold); text-shadow: 0 0.06em 0 #f2641f, 0 0.12em 0 #4a0d2a; }
.bb-logo:hover svg { transform: translateX(-3px); background: rgba(255, 255, 255, 0.22); }
.bb-count { margin: 0; font-size: clamp(11px, 1.5vmin, 15px); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); white-space: nowrap; }

.bb-main { flex: 1 0 auto; width: 100%; max-width: 1500px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(12px, 2.6vh, 30px); padding: clamp(8px, 2vh, 24px) 0 clamp(6px, 3vh, 34px); }
.bb-pick { margin: 0; font-family: var(--bb-display); font-weight: 900; font-synthesis: none; font-size: clamp(30px, 6.4vmin, 76px); line-height: 0.95; letter-spacing: 0.03em; text-transform: uppercase; text-align: center; color: #fff8ea; transform: rotate(-2deg);
  text-shadow: 0 0.04em 0 #ff7fb4, 0 0.08em 0 #d9306f, 0 0.12em 0 #3d0a3a, 0 0.22em 0.3em rgba(0, 0, 0, 0.45); }
.bb-pick em { font-style: normal; color: var(--bb-gold); text-shadow: 0 0.04em 0 #ffb52e, 0 0.08em 0 #f2641f, 0 0.12em 0 #4a0d2a, 0 0.22em 0.3em rgba(0, 0, 0, 0.45); }

/* still in a room: straight back to it */
.bb-resume { display: none; align-items: center; gap: 12px; padding: 8px 10px 8px 18px; border-radius: 99px; background: rgba(20, 60, 40, 0.75); border: 1px solid rgba(120, 255, 180, 0.4); font-size: clamp(13px, 1.8vmin, 17px); text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.bb-resume.on { display: inline-flex; }
.bb-resume i { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #5dffa0; box-shadow: 0 0 0 0 rgba(93, 255, 160, 0.7); animation: bb-live 1.6s ease-out infinite; }
.bb-resume b { font-weight: 900; letter-spacing: 0.08em; }
.bb-resume em { font-style: normal; padding: 0.5em 1em; border-radius: 99px; background: linear-gradient(180deg, #7dffb4, #2bc06b); color: #06301a; font-weight: 900; white-space: nowrap; }
.bb-resume:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes bb-live { to { box-shadow: 0 0 0 12px rgba(93, 255, 160, 0); } }

.bb-cards { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(12px, 1.8vw, 26px); justify-content: center; }
.bb-cards[data-n='1'] { max-width: 420px; } .bb-cards[data-n='2'] { max-width: 820px; } .bb-cards[data-n='3'] { max-width: 1200px; }
/* five: one row when there's room, otherwise three and two with the two centred */
@media (min-width: 621px) and (max-width: 1199px) and (min-height: 521px) {
  .bb-cards[data-n='5'] { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1000px; }
  .bb-cards[data-n='5'] .bb-card { grid-column: span 2; }
  .bb-cards[data-n='5'] .bb-card:nth-child(4) { grid-column: 2 / span 2; }
}

.bb-card { --c1: #44207a; --c2: #1c0a3a; --glow: #ffd23c; --ink: #fff;
  position: relative; display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; border-radius: clamp(22px, 2.4vw, 34px); overflow: hidden; text-align: left; color: var(--ink); container-type: inline-size;
  background: linear-gradient(165deg, var(--c1) 0%, var(--c2) 100%); border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.38), 0 26px 44px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.28s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.25s, border-color 0.2s, filter 0.3s; outline: none; }
html[data-bb='hub'] .bb-card { animation: bb-card-in 0.65s cubic-bezier(0.25, 1.3, 0.45, 1) both; animation-delay: calc(0.12s + var(--i) * 0.075s); }
@keyframes bb-card-in { from { opacity: 0; transform: translateY(70px) scale(0.86) rotate(calc((var(--i) - 1.5) * 2.5deg)); } to { opacity: 1; transform: none; } }
/* a sheen that crosses the card when it is picked out */
.bb-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.24) 50%, transparent 62%); transform: translateX(-110%); pointer-events: none; }
.bb-card:focus-visible::after, .bb-card.busy::after { transform: translateX(110%); transition: transform 0.75s ease; }
.bb-card:focus-visible, .bb-card.busy { transform: translateY(-8px) scale(1.035); border-color: #fff; z-index: 2;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 17px 0 rgba(0, 0, 0, 0.32), 0 34px 60px rgba(0, 0, 0, 0.5), 0 0 70px -6px var(--glow), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
@media (hover: hover) {
  .bb-card:hover::after { transform: translateX(110%); transition: transform 0.75s ease; }
  .bb-card:hover { transform: translateY(-8px) scale(1.035); border-color: rgba(255, 255, 255, 0.7); z-index: 2;
    box-shadow: 0 17px 0 rgba(0, 0, 0, 0.32), 0 34px 60px rgba(0, 0, 0, 0.5), 0 0 70px -6px var(--glow), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
  .bb-card:hover .bbc-ic, .bb-card:focus-visible .bbc-ic { transform: scale(1.16) rotate(-8deg); }
}
.bb-card:active { transform: translateY(3px) scale(0.985); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.38), 0 12px 24px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.22); transition-duration: 0.08s; }
/* one is opening: the rest step back */
.bb-cards.going .bb-card:not(.busy) { filter: saturate(0.5) brightness(0.55); transform: scale(0.96); }

.bbc-art { position: relative; flex: none; display: grid; place-items: center; height: clamp(104px, 23vh, 230px);
  background: radial-gradient(60% 75% at 50% 62%, color-mix(in srgb, var(--glow) 60%, transparent) 0%, transparent 72%), repeating-conic-gradient(from 0deg at 50% 62%, rgba(255, 255, 255, 0.06) 0deg 9deg, transparent 9deg 18deg); }
.bbc-ic { font-size: clamp(60px, 13vh, 132px); line-height: 1; filter: drop-shadow(0 0.08em 0 rgba(0, 0, 0, 0.3)) drop-shadow(0 0.16em 0.2em rgba(0, 0, 0, 0.35)); transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.bbc-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: clamp(10px, 1.6vh, 18px) clamp(14px, 1.5vw, 22px) clamp(14px, 2vh, 22px); background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.26) 100%); }
.bbc-sub { font-size: clamp(10.5px, 1.35vmin, 14px); font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: var(--glow); }
.bbc-name { font-family: var(--bb-display); font-weight: 900; font-synthesis: none; font-size: clamp(26px, 4.3vmin, 46px); line-height: 0.95; letter-spacing: 0.02em; text-transform: uppercase; text-shadow: 0 0.07em 0 rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
/* (the name fits its card whatever the number of cards: never broken mid-word) */
@supports (font-size: 1cqi) {
  .bb-card { container-type: inline-size; }
  .bbc-name { font-size: clamp(20px, min(4.3vmin, 12.5cqi), 46px); overflow-wrap: normal; }
}
.bbc-pitch { font-size: clamp(13px, 1.75vmin, 18px); font-weight: 700; line-height: 1.25; opacity: 0.86; }
.bbc-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bbc-players { display: inline-flex; align-items: center; gap: 6px; padding: 0.42em 0.8em; border-radius: 99px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.16); font-size: clamp(11.5px, 1.5vmin, 15px); font-weight: 900; white-space: nowrap; }
.bbc-players svg { width: 1.25em; height: 1.25em; flex: none; }
.bbc-go { display: inline-flex; align-items: center; gap: 2px; padding: 0.42em 0.6em 0.42em 0.95em; border-radius: 99px; background: var(--glow); color: #160a22; font-size: clamp(12px, 1.6vmin, 16px); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.bbc-go svg { width: 1.2em; height: 1.2em; }
.bbc-tag { position: absolute; top: 12px; right: 12px; padding: 0.4em 0.8em; border-radius: 99px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.25); font-size: 10.5px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
/* waiting on the room behind the door */
.bb-card.busy .bbc-go { background: #fff; }
.bb-card.busy .bbc-go svg { animation: bb-spin 0.8s linear infinite; }

/* phones held upright: a list of wide cards */
@media (max-width: 620px) {
  .bb-cards { grid-template-columns: 1fr; gap: 12px; }
  .bb-card { flex-direction: row; border-radius: 24px; }
  .bbc-art { width: 104px; height: auto; align-self: stretch; background: radial-gradient(70% 60% at 50% 50%, color-mix(in srgb, var(--glow) 60%, transparent) 0%, transparent 74%), repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.06) 0deg 9deg, transparent 9deg 18deg); }
  .bbc-ic { font-size: 58px; }
  .bbc-body { padding: 12px 14px 12px 4px; gap: 3px; background: none; }
  .bbc-name { font-size: 27px; }
  .bbc-pitch { font-size: 13.5px; }
  .bbc-meta { padding-top: 6px; }
  .bbc-tag { top: auto; bottom: 8px; left: 8px; right: auto; font-size: 9px; padding: 0.3em 0.6em; }
  .bb-main { justify-content: flex-start; }
  .bb-count { display: none; }
  @keyframes bb-card-in { from { opacity: 0; transform: translateX(60px) scale(0.92); } to { opacity: 1; transform: none; } }
}
/* short and wide (a phone on its side): keep the cards whole */
@media (max-height: 520px) and (min-width: 621px) {
  .bb-pick { font-size: clamp(22px, 7vh, 34px); }
  .bb-main { gap: 8px; padding: 2px 0 6px; }
  .bbc-art { height: clamp(64px, 24vh, 110px); }
  .bbc-ic { font-size: clamp(40px, 15vh, 64px); }
  .bbc-pitch { display: none; }
  .bbc-name { font-size: clamp(20px, 6vh, 28px); font-size: min(clamp(20px, 6vh, 28px), 11.5cqi); }
  .bb-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .bbc-go { display: none; }
  .bbc-body { padding: 6px 12px 12px; gap: 3px; }
  .bb-top { min-height: 40px; }
  .bb-kicker, .bb-foot { display: none; }
}

/* ------------------------------------------------------------ the door opens onto a game, and closes behind it */
.bb.bb-out, .bb.bb-in { pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at var(--hx, 50%) var(--hy, 50%), transparent calc(var(--bb-hole) - 40px), #000 var(--bb-hole));
  mask-image: radial-gradient(circle at var(--hx, 50%) var(--hy, 50%), transparent calc(var(--bb-hole) - 40px), #000 var(--bb-hole)); }
.bb.bb-out { animation: bb-hole-open 0.8s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.bb.bb-in { animation: bb-hole-open 0.6s cubic-bezier(0.3, 0, 0.3, 1) reverse both; }
@keyframes bb-hole-open { from { --bb-hole: 0px; } to { --bb-hole: 150vmax; } }
/* where a hole can't be animated (or motion is reduced): a plain fade */
.bb.bb-out.bb-fade, .bb.bb-in.bb-fade { -webkit-mask-image: none; mask-image: none; }
.bb.bb-out.bb-fade { animation: bb-fade-out 0.45s ease forwards; }
.bb.bb-in.bb-fade { animation: bb-fade-out 0.35s ease reverse both; }
@keyframes bb-fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bb-float span, .bb-mark i, .bb-badge span, .bb-kicker, .bb-foot, .bb-start, .bb-start::after, .bb-resume i, html[data-bb='hub'] .bb-card { animation: none !important; }
  .bb-view, .bb-floats, .bb-float, .bb-mark, .bb-card, .bbc-ic, .bb-card::after { transition-duration: 0.01s !important; }
  html[data-bb='hub'] .bb-launch, html[data-bb='launch'] .bb-select { transform: none; }
  html[data-bb='hub'] .bb-floats { transform: none; }
}

/* build label (e.g. Pre-alpha) in the card's top-left corner */
.bbc-stage { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 4px 9px; border-radius: 999px; background: repeating-linear-gradient(-45deg, #ffd23c 0 8px, #ffbe1a 8px 16px); color: #1a1000; font-size: 10.5px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); pointer-events: none; }

/* the test bench: every game, alone */
.bb-test { margin-left: auto; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; font-weight: 800; font-size: clamp(12px, 1.6vmin, 15px); text-decoration: none; white-space: nowrap; }
.bb-test:hover { background: rgba(255, 255, 255, 0.22); }
.bb-count + .bb-test { margin-left: 14px; }
/* ten or eleven: two rows on wide screens (five and five; six and five, the second row centred),
   three across on middling ones, with the cards a little more compact */
@media (min-width: 621px) {
  .bb-cards:is([data-n='10'], [data-n='11']) .bbc-art { height: clamp(72px, 13.5vh, 170px); }
  .bb-cards:is([data-n='10'], [data-n='11']) .bbc-ic { font-size: clamp(44px, 9vh, 100px); }
  .bb-cards:is([data-n='10'], [data-n='11']) .bbc-pitch { font-size: clamp(12px, 1.5vmin, 16px); }
  .bb-cards:is([data-n='10'], [data-n='11']) .bbc-body { padding: clamp(8px, 1.2vh, 14px) clamp(12px, 1.3vw, 18px) clamp(10px, 1.5vh, 16px); gap: 4px; }
}
@media (min-width: 900px) and (min-height: 521px) {
  .bb-cards[data-n='10'] { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1500px; }
  .bb-cards[data-n='11'] { grid-template-columns: repeat(12, minmax(0, 1fr)); max-width: 1640px; }
  .bb-cards[data-n='11'] .bb-card { grid-column: span 2; }
  .bb-cards[data-n='11'] .bb-card:nth-child(7) { grid-column: 2 / span 2; }
  /* six across is narrow: the players chip and the play button get snug */
  .bb-cards[data-n='11'] .bbc-meta { gap: 4px; }
  .bb-cards[data-n='11'] .bbc-players { padding: 0.38em 0.55em; gap: 4px; font-size: clamp(10.5px, 1.3vmin, 14px); }
  .bb-cards[data-n='11'] .bbc-go { padding: 0.38em 0.45em 0.38em 0.7em; font-size: clamp(11px, 1.35vmin, 15px); letter-spacing: 0.05em; }
}
@media (min-width: 621px) and (max-width: 899px) and (min-height: 521px) {
  .bb-cards[data-n='10'] { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
  .bb-cards[data-n='10'] .bb-card:nth-child(10) { grid-column: 2; }
  .bb-cards[data-n='11'] { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 820px; }
  .bb-cards[data-n='11'] .bb-card { grid-column: span 2; }
  .bb-cards[data-n='11'] .bb-card:nth-child(10) { grid-column: 2 / span 2; }
}
/* the launch screen's floating icons: places for the seventh to eleventh */
.bb-float:nth-child(7) { --x: 30%; --y: 9%; --s: clamp(44px, 7vmin, 76px); --z: 8; --d: 7.7s; --r1: 10deg; --r2: 18deg; }
.bb-float:nth-child(8) { --x: 70%; --y: 8%; --s: clamp(44px, 7vmin, 76px); --z: 14; --d: 6.9s; --r1: -9deg; --r2: -1deg; }
.bb-float:nth-child(9) { --x: 40%; --y: 96%; --s: clamp(42px, 6.5vmin, 70px); --z: 10; --d: 7.1s; --r1: -4deg; --r2: 6deg; }
.bb-float:nth-child(10) { --x: 60%; --y: 95%; --s: clamp(42px, 6.5vmin, 70px); --z: 9; --d: 8.1s; --r1: 6deg; --r2: -3deg; }
.bb-float:nth-child(11) { --x: 50%; --y: 4%; --s: clamp(40px, 6vmin, 66px); --z: 7; --d: 7.4s; --r1: -6deg; --r2: 5deg; }
@media (orientation: portrait) {
  .bb-float:nth-child(7) { --x: 24%; --y: 6%; }
  .bb-float:nth-child(8) { --x: 76%; --y: 5%; }
  .bb-float:nth-child(9) { --x: 34%; --y: 97%; }
  .bb-float:nth-child(10) { --x: 66%; --y: 96%; }
  .bb-float:nth-child(11) { --x: 50%; --y: 3%; }
}
