/* The site's top bar inside a game, built by shared/shell.js: the logo on one side; the back, settings and language buttons
   on the other; the game's name in the middle. Used by every game. */
/* Messages for the player show in the middle of the screen (shared/notify.js). A game's own message line takes no room,
   so a message never moves the board. */
#feedback[role=alert], #error[role=status] { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
/* A pop-up that takes the focus itself when it opens (shared/focus.js) shows no ring of its own. */
dialog:focus { outline: none; }
header.topbar { background: var(--gk-well) !important; border-bottom: 1px solid var(--gk-line) !important; color: var(--gk-ink); align-items: center; gap: clamp(10px, 2vw, 28px); padding: 0 clamp(12px, 3.4vw, 48px) !important; min-height: 52px; font-family: var(--gk-font); direction: inherit; box-shadow: none; position: sticky; top: 0; z-index: var(--gk-z-bar); }
header.topbar > [hidden] { display: none !important; }
.gk-brand { display: flex; align-items: center; gap: 10px; flex: none; justify-self: start; min-height: var(--gk-tap); color: var(--gk-ink); text-decoration: none; direction: ltr; }
.gk-brand img { width: 40px; height: 33px; object-fit: contain; }
.gk-name { font-size: 20px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; white-space: nowrap; }
.gk-name > span { font-weight: 400; }
.gk-name small { display: block; margin-top: 2px; font-size: var(--gk-text-xs); font-weight: 500; letter-spacing: 3px; line-height: 1; color: var(--gk-gold); }
/* The game's name sits in the middle of the bar, whatever stands at its sides. */
header.topbar { display: grid !important; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); }
.gk-context { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.gk-context .game-title { display: block !important; margin: 0; padding: 0; border: 0; font-size: clamp(15px, 2.2vw, 20px); font-weight: 700; color: var(--gk-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gk-actions { display: flex; align-items: center; justify-content: flex-end; gap: clamp(7px, 1.2vw, 12px); }
/* Round buttons in KHABEETHA's style: blue with a gold ring for settings and language, orange for going back. */
.gk-gear, .gk-round { width: var(--gk-tap); height: var(--gk-tap); min-width: 0 !important; padding: 0 !important; flex: none; display: grid; place-items: center; border-radius: 50% !important; border: 0 !important; background: radial-gradient(circle at 35% 30%, var(--gk-rim-light), var(--gk-panel-deep)) !important; color: var(--gk-gold) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--gk-gold-deep) 53%, transparent), var(--gk-shadow-1) !important; font: 700 13px/1 var(--gk-font); text-decoration: none; cursor: pointer; transition: transform .12s, filter .12s; }
.gk-gear svg { width: 25px; height: 25px; }
.gk-lang span { letter-spacing: .5px; }
.gk-back { background: radial-gradient(circle at 35% 30%, var(--gk-back), var(--gk-back-deep)) !important; color: var(--gk-white) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--gk-back-edge) 67%, transparent), var(--gk-shadow-1) !important; }
.gk-back svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* The back arrow points to the edge the button sits at: left in Arabic, right in English. */
html[dir=rtl] .gk-back svg { transform: scaleX(-1); }
.gk-gear:hover, .gk-round:hover { filter: brightness(1.15); } .gk-gear:active, .gk-round:active { transform: scale(.94); }
/* Every round button stays 44px, the size a finger needs. On a phone the logo gives way to the game's name: the orange
   back button already leads to the games library. */
@media (max-width: 599px) { header.topbar { grid-template-columns: minmax(0, 1fr) max-content; } .gk-brand { display: none; } .gk-actions { gap: 6px; } .gk-gear svg { width: 23px; height: 23px; } }
@media (orientation: landscape) and (max-height: 560px) { .gk-name small { display: none; } .gk-brand img { width: 32px; height: 26px; } }