/* A single, consistent route home around all four game worlds. Game action
   controls keep their original nodes, listeners and individual meaning. */
.poku-game-page .poku-game-topbar {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.2fr) 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: max(9px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 9px max(12px, env(safe-area-inset-left, 0px));
  border: 0;
  border-bottom: 1px solid #d8c591;
  background: #182c28;
  color: #fff6dc;
  font-family: 'DM Sans', system-ui, sans-serif;
  position: relative;
  z-index: 2;
}
.poku-game-topbar .poku-game-nav-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #a38f5f;
  border-radius: 14px;
  background: #f8efd9;
  color: #294c3b;
  box-shadow: 0 2px 0 #0b1b1744;
  font: 700 13px/1.2 'DM Sans', system-ui, sans-serif;
  letter-spacing: normal;
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.poku-game-topbar .poku-game-nav-button:hover { background: #fff9e9; }
.poku-game-topbar .poku-game-nav-button:focus-visible { outline: 3px solid #efd085; outline-offset: 3px; }
.poku-game-topbar .poku-game-nav-calm { justify-self: end; border-color: #bba565; background: #f3e4bc; }
.poku-game-topbar .poku-game-nav-title {
  min-width: 0;
  color: #fff2ce;
  font: 600 clamp(13px, 3.6vw, 18px)/1.2 Georgia, serif;
  text-align: center;
  letter-spacing: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.poku-game-page .poku-game-account-topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
.poku-game-topbar .poku-portal-actions { display: flex; align-items: center; justify-self: end; gap: 6px; }
.poku-game-topbar .poku-account-icon { position: relative; display: inline-block; flex: none; width: 16px; height: 18px; }
.poku-game-topbar .poku-account-icon::before { content: ''; position: absolute; left: 5px; top: 0; width: 7px; height: 7px; box-sizing: border-box; border: 1.7px solid currentColor; border-radius: 50%; }
.poku-game-topbar .poku-account-icon::after { content: ''; position: absolute; left: 1px; bottom: 0; width: 15px; height: 9px; box-sizing: border-box; border: 1.7px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.poku-game-page .poku-legacy-navigation { display: none !important; }
.poku-game-key-kosilo .app.poku-game > .poku-game-topbar { margin-bottom: 10px; border-radius: 13px; }
.poku-game-key-kosilo .poku-level-icon { width: 22px; height: 22px; font: 400 22px/1 system-ui, sans-serif; }

/* Removing logos does not remove the original sound, account, help, sharing,
   internal area selection or level-selection controls. */
.poku-game-key-kosilo .app.poku-game:not(.compact-game-tools) > .masthead {
  min-height: 54px;
  justify-content: flex-end;
}
.poku-game-key-pasji-park .site-header { justify-content: space-between; min-height: 58px; }

/* The dog's direct-visit map fills the remaining screen below the common
   navigation. Embedded maps already sit below the parent's visible header. */
body.poku-game-key-pasji-park:not(.poku-embedded)[data-view="area"] > .poku-game-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
}
body.poku-game-key-pasji-park:not(.poku-embedded)[data-view="area"] #area-screen {
  top: var(--poku-common-nav-height, 68px);
  bottom: 0;
  height: auto;
}

/* The parent owns the shared header in the one-page Poku portal. Its iframe
   receives the visible remaining viewport; games scroll within that space. */
html.poku-embedded-root { height: auto; min-height: 0; overflow-y: auto; }
body.poku-embedded { height: auto; min-height: 0; margin: 0; overflow-x: clip; }
body.poku-embedded > .poku-game-topbar { display: none; }
body.poku-embedded .garden-app { width: 100%; max-width: 100%; box-shadow: none; }
body.poku-embedded .tablecloth { padding-top: 6px; }
body.poku-embedded .app.poku-game:not(.playing) { height: auto; min-height: 0; }
body.poku-embedded .garden-footer { padding-bottom: 18px; }
body.poku-embedded .poku-home-logo,
body.poku-embedded .home-scene-title { display: none !important; }

@media (max-width: 350px) {
  .poku-game-page .poku-game-topbar { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .poku-game-topbar .poku-game-nav-button { padding-left: 9px; padding-right: 9px; font-size: 12px; }
}
