/* Corporate Games bar (gamesbar.js). Canonical copy: C:\ct\test-sites\corporate-games-bar - every site carries an identical copy.
   Self-contained: uses no variable from the page. Deep indigo bar (the home site's ink colour), white text, marigold for the current game and focus.
   The bar is dark in light and dark mode alike, so it reads the same everywhere. Laptop (900px and wider): one row, no scrollbar. Phone: slim bar + "All games" sheet. */
.cgb{position:relative;background:#1B1442;color:#fff;font:14px/1.3 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;-webkit-text-size-adjust:100%;text-align:left}
.cgb *{box-sizing:border-box}
.cgb-sprite{position:absolute;width:0;height:0;overflow:hidden}
.cgb-in{max-width:1240px;margin:0 auto;padding:0 16px;display:flex;align-items:center;gap:10px;min-height:52px}
.cgb a,.cgb button{color:#fff;text-decoration:none;font:inherit;display:inline-flex;align-items:center;gap:7px;min-height:44px;border-radius:999px;border:2px solid transparent;background:none;cursor:pointer;margin:0}
.cgb a:hover,.cgb button:hover{background:rgba(255,255,255,.12)}
.cgb a:focus-visible,.cgb button:focus-visible{outline:3px solid #FFC93C;outline-offset:2px}
.cgb a[aria-current]:not([aria-current="false"]){background:rgba(255,201,60,.16);border-color:#FFC93C}
.cgb-badge,.cgb-mark{display:block;flex:none;width:26px;height:26px}
.cgb-name{display:flex;flex-direction:column;line-height:1.15;font-weight:700;font-size:14px;white-space:nowrap}
.cgb-corp{font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#D9D3FF}
.cgb-note{font-size:12.5px;font-weight:500;color:#D9D3FF;white-space:normal}
.cgb-home{padding:4px 8px 4px 4px;flex:none}
.cgb-line{display:none;color:#D9D3FF;font-size:12.5px;white-space:nowrap}
.cgb-row{list-style:none;margin:0 0 0 auto;padding:0;display:flex;align-items:center;gap:2px;flex-wrap:nowrap}
.cgb-row li{margin:0;padding:0}
.cgb-game{padding:4px 7px 4px 4px;gap:6px}
.cgb .cgb-cur,.cgb .cgb-all,.cgb .cgb-sheet{display:none}
/* laptop: the CORPORATE line is 12.5px (the smallest size we allow), so the row is kept compact and the strapline waits for a wide screen */
@media (min-width:900px){.cgb-badge,.cgb-mark{width:24px;height:24px}}
@media (min-width:900px) and (max-width:1279.98px){.cgb-home{padding:4px}.cgb-home .cgb-name{display:none}} /* the mark alone (its link says "Corporate Games, home") */
@media (min-width:900px) and (max-width:1099.98px){
  .cgb-in{gap:4px;padding:0 10px}.cgb-row{gap:0}.cgb-game{padding:4px 5px 4px 3px;gap:4px}
  .cgb-badge,.cgb-mark{width:20px;height:20px}.cgb-name{font-size:12.5px}.cgb-corp{letter-spacing:0}
}
@media (min-width:1440px){.cgb-in{max-width:1440px}.cgb-line{display:inline}}
/* phone and tablet: the mark, the current game, and the All games button that opens the sheet */
@media (max-width:899.98px){
  .cgb-in{min-height:50px;gap:6px;padding:0 10px}
  .cgb-row{display:none}
  .cgb .cgb-cur{display:inline-flex;padding:3px 10px 3px 4px;min-width:0}
  .cgb-cur .cgb-name{overflow:hidden;text-overflow:ellipsis}
  .cgb .cgb-all{display:inline-flex;margin-left:auto;flex:none;padding:0 14px;border-color:rgba(255,255,255,.55);font-weight:650;font-size:14px}
  .cgb .cgb-all[aria-expanded="true"]{background:#FFC93C;border-color:#FFC93C;color:#1B1442}
  .cgb-dots{width:14px;height:14px;flex:none;background:radial-gradient(circle,currentColor 1.6px,transparent 2.2px) 0 0/7px 7px}
  .cgb-sheet{z-index:900;position:absolute;left:0;right:0;top:100%;background:#1B1442;border-top:1px solid rgba(255,255,255,.18);box-shadow:0 18px 36px rgba(0,0,0,.4);padding:14px 12px 16px;max-height:calc(100vh - 60px);overflow-y:auto}
  .cgb.cgb-open .cgb-sheet{display:block}
  .cgb .cgb-sheet[hidden]{display:none}
  .cgb-sheet-title{margin:2px 4px 12px;font:700 15px/1.3 Inter,system-ui,sans-serif;color:#FFE08A}
  .cgb-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .cgb-grid li{margin:0;padding:0;display:flex}
  .cgb .cgb-tile{flex:1 1 auto;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:8px;padding:12px 6px;border-radius:18px;background:rgba(255,255,255,.08);border:2px solid rgba(255,255,255,.1)}
  .cgb .cgb-tile[aria-current]:not([aria-current="false"]){border-color:#FFC93C;background:rgba(255,201,60,.16)}
  .cgb-tile .cgb-badge{width:56px;height:56px}
  .cgb-tile .cgb-name{align-items:center;white-space:normal;font-size:15px}
  .cgb .cgb-close{display:flex;margin:14px auto 0;padding:0 22px;border-color:rgba(255,255,255,.55);justify-content:center}
}
@media (min-width:600px) and (max-width:899.98px){.cgb-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:479.98px){.cgb-has-cur .cgb-home .cgb-name{display:none}.cgb-home{padding:4px}}
@media (prefers-reduced-motion:reduce){.cgb *{transition:none!important}}
@media print{.cgb,.cgb-sprite{display:none}}
