@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@700;800&display=swap');

:root { color-scheme: dark; font-family: 'Nunito', sans-serif; background: #101c29; color: #eff5fa; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
header { flex: 0 0 auto; min-height: 48px; display: flex; align-items: center; gap: 16px; padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left)); border-bottom: 1px solid #304252; }
a { color: #c5f390; text-decoration: none; }
a:hover { color: #eff5fa; }
.back { white-space: nowrap; font-weight: 800; }
:is(h1,.gtp-game-heading) { flex: 1; margin: 0; font-family: 'Lilita One', sans-serif; font-size: clamp(14px, 2.5vw, 20px); font-weight: 400; }
button { border: 1px solid #52687a; border-radius: 7px; background: #1c3041; color: #eff5fa; padding: 7px 12px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
button:hover { background: #30495c; }
:focus-visible { outline: 2px solid #c5f390; outline-offset: 3px; }
main { flex: 1; min-height: 0; background: #101c29; }
iframe { display: block; width: 100%; height: 100%; border: 0; background: #101c29; }
main:fullscreen { width: 100%; height: 100%; }
#status { position: fixed; right: 12px; bottom: 12px; max-width: calc(100% - 24px); margin: 0; padding: 12px 16px; border: 1px solid #52687a; border-radius: 8px; background: #101c29; }
[hidden] { display: none !important; }
@media (max-width: 480px) { header { gap: 10px; } .back span { display: none; } .back { padding: 4px 8px; font-size: 20px; } button { padding: 7px 9px; } }

/* The cover sizes the launch screen; reserve a full playfield only during play. */
.gtp-game-viewport--embedded:not([data-state="playing"]) { height: auto; }
.gtp-game-viewport--embedded .gtp-embed-launch {
  position: relative; inset: auto; display: flex; flex-direction: column;
  align-items: center; gap: 14px; padding: 16px;
}
.gtp-embed-cover { display: block; width: min(100%, 400px); height: auto; border-radius: 10px; }
#embed-play { padding: 12px 24px; font-size: 16px; font-weight: 800; }
#embed-message { max-width: 500px; margin: 0; text-align: center; line-height: 1.5; }
.gtp-embed-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px; font-size: 12px; }
.gtp-embed-toolbar a, #embed-message a { text-decoration: underline; }
.gtp-game-viewport--embedded[data-state="playing"]:has(main:fullscreen) { contain: none; }
@media (max-height: 480px) {
  .gtp-game-viewport--embedded[data-state="playing"] > main > iframe { top: 72px; }
}

/* Give the provider a real viewport while the local cover remains on screen. */
.gtp-game-viewport--embedded[data-state="loading"] > main > iframe {
  position: absolute; inset: 0; width: 100%; height: 100dvh;
  visibility: hidden; pointer-events: none; transform: none;
}
