.game-dialog {
  width: 800px; max-width: calc(100vw - 40px); max-height: calc(100dvh - 40px);
  padding: 24px; overflow: auto; border-radius: 9px; border: 2px solid #172b44;
  background: #fff7e8 url('./assets/journal-paper.webp') repeat; background-size: 256px;
  color: #102542; box-shadow: 4px 5px 0 #07142e40;
}
.game-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.game-dialog > header {
  display: grid; grid-template-columns: 110px 1fr 44px; align-items: start;
  gap: 8px; margin: 0 0 18px;
}
.game-dialog > header > small { padding: 6px 0 0 5px; font-size: 12px; color: #5d7081; }
.game-dialog > header > div { text-align: center; padding-right: 20px; }
.game-dialog h2 { margin: 0; font-size: 32px; line-height: 1.3; font-weight: 850; }
.game-dialog #gameSubtitle { margin: 7px 0 0; font-size: 14px; line-height: 1.4; color: #5d7081; }
.game-dialog .dialog-close { width: 44px; height: 44px; }
.game-clip { position: absolute; width: 18px; height: 24px; background: url('./assets/hud-icons.webp') 100% 0 / 400% 100% no-repeat; image-rendering: pixelated; pointer-events: none; }
.game-clip-tl { left: 9px; top: 2px; }.game-clip-tr { right: 9px; top: 2px; }
.game-clip-bl { left: 9px; bottom: 2px; }.game-clip-br { right: 9px; bottom: 2px; }
.game-dialog .game-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 16px; }
.game-dialog .game-poster {
  min-width: 0; padding: 7px 7px 0; border: 1px solid #afbab9; border-radius: 7px;
  background: #fffdf34d; overflow: hidden;
}
.game-poster-entry { display: block; color: inherit; text-decoration: none; border-radius: 4px; }
.game-poster-entry:focus-visible { outline: 3px solid #123bee; outline-offset: 3px; }
.game-poster-art {
  position: relative; height: clamp(230px, 42dvh, 380px); border-radius: 4px; overflow: hidden;
  background: #c4e8ef url('./assets/game-poster-sky.webp') center top / cover no-repeat;
}
.game-poster-art > img { display: block; width: 100%; height: calc(100% - 38px); object-fit: contain; padding: 4px 0 0; }
.game-poster-label {
  position: absolute; left: 5%; right: 5%; bottom: 2px; min-height: 68px;
  display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 6px 14px;
  background: url('./assets/game-poster-nameplate.webp') center / 100% 100% no-repeat;
}
.game-dialog .game-poster-label h3 { margin: 0; font-size: 26px; font-weight: 850; line-height: 1.2; }
.game-dialog .game-poster-label p { margin: 3px 0 0; min-height: 0; font-size: 13px; line-height: 1.25; color: #3e5872; }
.game-dialog .game-poster-entry .primary-button { width: calc(100% - 32px); min-height: 46px; margin: 8px 16px 0; font-size: 18px; border-color: #112751; border-radius: 5px; }
.game-poster-entry:hover .primary-button { background: #0926a8; }
.game-poster-entry:active .primary-button { transform: translateY(1px); }
.game-dialog .game-poster .text-button { min-height: 44px; padding: 8px 0; width: 100%; font-size: 14px; }
.game-dialog #findGameCompanions { min-height: 44px; background: transparent; font-size: 14px; border-color: #7c8ba2; }
.game-dialog #findGameCompanions:hover { background: #fffdf3; }
.game-dialog .local-boundary { border: 0; padding: 0; margin: 8px 0 0; font-size: 11px !important; line-height: 1.4; text-align: center; }
.game-dialog :is(a, button):focus-visible { outline: 3px solid #123bee; outline-offset: 2px; }
@media (max-height: 560px) and (orientation: landscape) {
  .game-dialog { padding: 12px 20px; max-height: calc(100dvh - 18px); }
  .game-dialog > header { grid-template-columns: 95px 1fr 44px; margin-bottom: 8px; }
  .game-dialog > header > small { font-size: 11px; }
  .game-dialog > header > div { padding-right: 14px; }
  .game-dialog h2 { font-size: 21px; }
  .game-dialog #gameSubtitle { font-size: 12px; margin-top: 4px; }
  .game-dialog .game-choices { gap: 10px; margin-bottom: 8px; }
  .game-dialog .game-poster { padding: 4px 4px 0; }
  .game-poster-art { height: clamp(98px, 28dvh, 150px); }
  .game-poster-art > img { width: 52%; height: 100%; padding: 2px; }
  .game-poster-label { left: 50%; right: 1%; top: 50%; bottom: auto; min-height: 44px; padding: 4px 10px; transform: translateY(-50%); }
  .game-dialog .game-poster-label h3 { font-size: 18px; }
  .game-dialog .game-poster-label p { font-size: 11px; margin-top: 1px; }
  .game-dialog .game-poster-entry .primary-button { min-height: 44px; margin-top: 4px; padding: 7px; font-size: 14px; }
  .game-dialog .game-poster .text-button { min-height: 44px; font-size: 12px; padding: 7px 0; }
  .game-dialog #findGameCompanions { font-size: 12px; }
  .game-dialog .local-boundary { margin-top: 4px; }
}
@media (max-width: 680px) and (orientation: landscape) {
  .game-dialog { padding: 12px; max-width: calc(100vw - 18px); }
  .game-dialog > header { grid-template-columns: 75px 1fr 44px; }
  .game-dialog > header > small { padding-left: 0; font-size: 10px; }
  .game-dialog > header > div { padding-right: 0; }
  .game-dialog h2 { font-size: 19px; }
  .game-dialog .game-poster-label h3 { font-size: 16px; }
  .game-dialog .game-poster-entry .primary-button { margin-left: 6px; margin-right: 6px; width: calc(100% - 12px); }
}

@media (max-height: 380px) and (orientation: landscape) {
  .game-dialog > header { position: sticky; top: -12px; z-index: 2; padding-top: 3px; padding-bottom: 5px; background: #fff7e8 url('./assets/journal-paper.webp') repeat; background-size: 256px; }
}
