/* Frogger V2 platform adapter styles. Only the adapter's own elements; the game's canvas/CSS are untouched. */
.pg-top { position: fixed; left: 0; right: 0; z-index: 5; display: flex; align-items: center; box-sizing: border-box; padding: 0 max(8px, env(safe-area-inset-left, 0px)); font-family: "Press Start 2P", ui-monospace, monospace; color: #cfe3ff; pointer-events: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.pg-top { gap: 6px; font-size: 8px; line-height: 1; justify-content: flex-start; background: rgba(15, 39, 72, 0.78); }
body[data-pg-mode="landscape"] .pg-top { background: transparent; }
.pg-top .pg-who { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-dot { flex: 0 0 auto; width: 6px; height: 6px; background: #7a8599; image-rendering: pixelated; }
.pg-dot[data-run="ranked"] { background: #3ddc84; }
.pg-dot[data-run="practice"] { background: #ffc83d; }
.pg-btns { flex: 0 0 auto; display: flex; gap: 4px; pointer-events: auto; }
.pg-btn { font: inherit; font-size: 7px; line-height: 1; padding: 4px 5px; color: #0b1020; background: #cfe3ff; border: 0; border-radius: 0; cursor: pointer; text-decoration: none; touch-action: manipulation; }
.pg-btn:focus-visible { outline: 2px solid #ffc83d; outline-offset: 1px; }
.pg-hide { display: none !important; }
@media (max-width: 420px) { .pg-top { font-size: 7px; gap: 4px; } .pg-btn { font-size: 6px; padding: 4px; } }
/* Desktop-only legibility (>= 1024x600, landscape layout = the game's empty top/bottom margins). Phones, tablets in portrait and every
   mobile layout (<= 1023 px wide or < 600 px high) are NOT matched, so they stay pixel-identical to before. */
@media (min-width: 1024px) and (min-height: 600px) {
  body[data-pg-mode="landscape"] .pg-top { font-size: 14px; gap: 10px; padding: 0 max(20px, env(safe-area-inset-left, 0px)); }
  body[data-pg-mode="landscape"] .pg-dot { width: 10px; height: 10px; }
  body[data-pg-mode="landscape"] .pg-btn { font-size: 12px; padding: 7px 10px; }
  body[data-pg-mode="landscape"] .pg-btns { gap: 8px; }
}
.pg-toast { position: fixed; left: 50%; bottom: calc(var(--sab, 22px) + 4px); transform: translateX(-50%); z-index: 6; max-width: min(94vw, 520px); box-sizing: border-box; padding: 5px 8px; background: rgba(15, 39, 72, 0.92); border: 1px solid #3b5bdb; color: #e8f0ff; font-family: "Press Start 2P", ui-monospace, monospace; font-size: 7px; line-height: 1.5; text-align: center; pointer-events: none; }
@media (max-width: 420px) { .pg-toast { font-size: 6px; } }
/* leaderboard panel */
.pg-panel { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(15, 39, 72, 0.72); font-family: "Press Start 2P", ui-monospace, monospace; color: #e8f0ff; }
.pg-card { box-sizing: border-box; width: min(94vw, 460px); max-height: 88dvh; overflow: auto; background: #0e1530; border: 2px solid #3b5bdb; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 8px; line-height: 1.5; }
.pg-h { font-size: 10px; color: #ffc83d; }
.pg-sub { opacity: 0.7; font-size: 6px; }
.pg-pb { padding: 6px; background: #17224a; color: #9fe8b4; }
.pg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pg-list li { display: grid; grid-template-columns: 34px 1fr auto auto auto; gap: 6px; align-items: center; padding: 3px 4px; background: #121b3b; }
.pg-list li.pg-you { outline: 1px solid #ffc83d; }
.pg-list .pg-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-list i { font-style: normal; opacity: 0.8; }
.pg-list li.pg-empty { display: block; opacity: 0.8; }
.pg-close { align-self: flex-end; font-size: 8px; padding: 6px 10px; }
/* Shared game header (public/game-nav): identity pill + Ranks live there. Inside the Telegram frame the wrapper owns them, so only the action buttons stay. */
html[data-pgh] .pg-top .pg-who, html[data-pgh] .pg-top .pg-dot, html[data-pgh] .pg-btn[data-pg-ranks], html[data-pgh] [data-pg-signin] { display: none !important; }
html[data-pgh="web"] .pg-top { display: none !important; }
html[data-pgh="tg"] .pg-top { justify-content: flex-end; }
/* Phone landscape gate. Light + blue site chrome; the game canvas underneath is untouched. */
.pg-rotate {
  position: fixed; inset: 0; z-index: 2147483647; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  background: #f5f7fc; color: var(--pgn-navy, #183b73); text-align: center; pointer-events: auto;
  font-family: "PGN Inter", Inter, system-ui, sans-serif;
}
.pg-rotate svg { width: 72px; height: 72px; display: block; }
.pg-rotate h2 {
  margin: 0; max-width: 280px; font-family: "PGN Fredoka", Fredoka, Inter, sans-serif; font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--pgn-navy, #183b73);
}
.pg-rotate__back {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: min(100%, 280px); height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid rgba(246, 205, 90, 0.55); background: #ffc83d; color: var(--pgn-navy, #183b73);
  font: 600 15px/1 "PGN Inter", Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.pg-rotate__back:focus-visible { outline: 2px solid #397dd1; outline-offset: 2px; }
