/* The top bar of every game's play screen. Change it here, never inside a single game.
   Width, side spacing and height match the site header (.container and .header-inner in app/globals.css). */
@font-face{font-family:'DM Sans';src:url('fonts/dm-sans-latin-wght-normal.woff2') format('woff2');font-weight:100 1000;font-display:swap}
@font-face{font-family:'Bricolage Grotesque';src:url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');font-weight:200 800;font-display:swap}

.gamebar{box-sizing:border-box;flex:none;width:100%;margin:0;padding:0;border-bottom:1px solid #273342;font-family:'DM Sans',system-ui,-apple-system,sans-serif;line-height:normal}
.gamebar *{box-sizing:border-box}
.gamebar-inner{width:100%;max-width:1140px;margin:0 auto;padding:0 clamp(18px,4vw,36px);min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.gamebar-brand{display:flex;align-items:center;gap:14px;min-width:0;color:#eff0ee;text-decoration:none}
.gamebar-logo{flex:none;width:46px;height:46px;border-radius:12px;border:1px solid #c8ac7b66;display:block}
.gamebar-name{display:block;font-optical-sizing:auto;font-family:'Bricolage Grotesque',sans-serif;font-weight:800;font-size:19px;letter-spacing:.18em;text-transform:uppercase}
.gamebar-tagline{display:block;margin-top:5px;color:#8996a5;font-size:9px;letter-spacing:.17em;text-transform:uppercase}
.gamebar-actions{display:flex;align-items:center;gap:8px;flex:none}
.gamebar-button{display:inline-flex;align-items:center;gap:10px;margin:0;padding:12px 15px;min-height:48px;background:#192433;border:1px solid #2c3c4d;border-radius:12px;color:#d8dfdf;font:inherit;font-size:17px;line-height:1;letter-spacing:.02em;text-decoration:none;cursor:pointer}
.gamebar-button span{font-size:12px;font-weight:400;white-space:nowrap}
.gamebar-button:hover{background:#253346}
.gamebar-button:focus-visible,.gamebar-brand:focus-visible{outline:3px solid #b4d1d0;outline-offset:3px}
.gamebar-button[hidden]{display:none}

/* On wide screens five buttons with labels need less padding to fit the column. */
@media(min-width:861px){.gamebar-button{gap:8px;padding:10px 13px;min-height:42px}.gamebar-actions{gap:8px}.gamebar-name{font-size:16px}}

/* The game takes the rest of the window. */
body.has-gamebar{display:flex;flex-direction:column}
body.has-gamebar>.app{flex:1 0 auto;width:100%;min-height:0;margin-top:0;margin-bottom:0}
/* Games that always fit the window and never scroll. */
body.has-gamebar.fits-window{height:100vh;height:100dvh;min-height:0;overflow:hidden}
body.has-gamebar.fits-window>.app{flex:1 1 0;height:auto}

@media(max-width:1100px){.gamebar-name{font-size:16px}}
@media(max-width:860px){.gamebar-button{padding:10px 12px;min-height:42px}.gamebar-button span{display:none}}
@media(max-width:700px) and (orientation:portrait){.gamebar-inner{gap:10px}.gamebar-actions{gap:5px}.gamebar-name{font-size:13px;letter-spacing:.11em}.gamebar-tagline{display:none}.gamebar-logo{width:34px;height:34px;border-radius:9px}}
@media(max-width:480px) and (orientation:portrait){.gamebar-inner{gap:6px}.gamebar-actions{gap:4px}.gamebar-brand{gap:6px}.gamebar-logo{display:none}.gamebar-name{font-size:11px;letter-spacing:.08em;line-height:1.35}.gamebar-button{padding:7px 9px;min-height:36px;font-size:15px}}
@media(max-height:520px) and (orientation:landscape){.gamebar-inner{min-height:48px}.gamebar-name{font-size:13px}.gamebar-tagline{display:none}.gamebar-logo{width:34px;height:34px;border-radius:9px}.gamebar-button{padding:7px 9px;min-height:34px}}

/* The same breathing room under and below the bar in every game that fits the window. */
body.has-gamebar.fits-window>.app{padding-top:clamp(10px,2.2vh,20px);padding-bottom:12px}
@media(max-height:520px) and (orientation:landscape){body.has-gamebar.fits-window>.app{padding-top:8px;padding-bottom:8px}}

/* Typography for all games: DM Sans for text, Bricolage Grotesque for headings and large display text. */
body.has-gamebar{font-family:'DM Sans',system-ui,-apple-system,sans-serif}
body.has-gamebar .app :is(h1,h2,h3),body.has-gamebar dialog h2,body.has-gamebar .app :is(.gravity-name,.length-card .number,.length-card strong,.route strong){font-family:'Bricolage Grotesque',sans-serif;letter-spacing:-.01em}
