/* Fill the available browser screen even when a phone requests desktop layout. */
html, body { width:100%; height:100%; min-height:0; margin:0; overflow:hidden; background:#020617; }
#gameContainer { position:fixed; inset:0; width:100%; height:100%; height:100dvh; max-width:none; max-height:none; }
#gameCanvas { display:block; }
#gameContainer > div:first-of-type { padding-top:max(16px, env(safe-area-inset-top)); padding-left:max(12px, env(safe-area-inset-left)); padding-right:max(12px, env(safe-area-inset-right)); }
#gameModal { overflow-y:auto; touch-action:pan-y; justify-content:safe center; padding:max(20px, env(safe-area-inset-top)) 16px calc(88px + env(safe-area-inset-bottom)); }
#gameModal > div { margin:auto; }
#scoreEntry { width:100%; margin:0 0 16px; text-align:left; }
#scoreEntry[hidden], #leaderboardPanel[hidden] { display:none; }
#scoreEntry label { display:block; color:#fcd34d; font-size:13px; margin-bottom:5px; }
#playerName { width:100%; box-sizing:border-box; background:#020617; color:#fff; border:1px solid #64748b; border-radius:7px; padding:10px; user-select:text; -webkit-user-select:text; touch-action:manipulation; }
.fishing-button { border:1px solid #a17630; border-radius:7px; padding:8px 12px; color:#fde68a; background:#1e293b; cursor:pointer; touch-action:manipulation; }
.fishing-button:focus-visible, #playerName:focus-visible { outline:2px solid #fbbf24; outline-offset:3px; }
button:disabled { opacity:.6; cursor:wait; }
#saveScore { width:100%; margin-top:8px; }
#saveStatus, #leaderboardStatus, #serverBest { font-size:12px; color:#cbd5e1; margin:8px 0; }
#showLeaderboard { margin-top:12px; }
#fullScreenBtn { margin-top:8px; }
#fullScreenBtn[hidden] { display:none; }
.site-trail-game { left:max(12px, env(safe-area-inset-left)); bottom:calc(12px + env(safe-area-inset-bottom)); }
#leaderboardPanel { position:fixed; inset:0; width:100%; height:100%; height:100dvh; max-width:none; margin:0; box-sizing:border-box; z-index:60; background:#020617; padding:max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); overflow-y:auto; touch-action:pan-y; color:#f8fafc; }
#leaderboardPanel * { touch-action:pan-y; }
#leaderboardPanel h2 { color:#fcd34d; font-size:24px; font-weight:bold; margin:0 0 12px; }
#leaderboardList { list-style:none; padding:0; margin-top:14px; }
#leaderboardList li { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid #334155; }
#leaderboardList span { overflow-wrap:anywhere; }
#leaderboardList strong { color:#fcd34d; }
.leaderboard-note { color:#94a3b8; font-size:11px; margin-top:10px; }
