/* v031 polish (Game Studio, PP-003, Michael's requests). Loaded last. Remove this file's <link> in index.html, plus the small
   JS edits listed in CHANGES-v031.md, to revert. No gameplay, rules, levels, physics or protocol changes. */

/* ---- R8. No visible scroll bars anywhere (every screen, sheet, list, browser); scrolling itself still works ---- */
html, body, *, *::before, *::after { scrollbar-width: none !important; -ms-overflow-style: none !important; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }

/* ---- R2. Popups read clearly: stronger backdrop and a near-solid card (the Shop and its buy sheet keep their look) ---- */
.screen.overlay:not(#adscreen):not(#buysheet):not(#rotate) {
  background: radial-gradient(120% 80% at 50% 40%, rgba(16, 8, 48, .66), rgba(8, 4, 26, .88));
}
.screen.overlay:not(#buysheet) .modal, .fail-card, .rot-card {
  background: linear-gradient(180deg, rgb(64, 46, 140) 0%, rgb(30, 20, 82) 100%);
  background: linear-gradient(180deg, rgba(64, 46, 140, .985) 0%, rgba(30, 20, 82, .99) 100%);
}
#rotate { background: radial-gradient(120% 80% at 50% 40%, rgba(16, 8, 48, .72), rgba(8, 4, 26, .9)); }

/* ---- R3. Choose your dive: Big Screen Solo and Party Dive art moves gently, in the same style as Solo Dive ---- */
@keyframes epTvBob { 0%, 100% { transform: translateY(1px) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(8deg); } }
@keyframes epSweep { 0% { background-position: 140% 0; } 55%, 100% { background-position: -40% 0; } }
#endpick .ep-tv img { animation: epTvBob 2.6s ease-in-out infinite; will-change: transform; }
#endpick .ep-card.party .ep-tv img:nth-child(2) { animation-delay: -.85s; }
#endpick .ep-card.party .ep-tv img:nth-child(3) { animation-delay: -1.7s; }
#endpick .ep-tv::before { content: ''; position: absolute; inset: 0; border-radius: 5px; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%) no-repeat; background-size: 260% 100%;
  animation: epSweep 4.4s ease-in-out infinite; }
#endpick .ep-card.party .ep-tv::before { animation-delay: -2.2s; }
@media (prefers-reduced-motion: reduce) { #endpick .ep-tv::before { animation: none !important; opacity: 0; } }
html.reduce-motion #endpick .ep-tv::before { animation: none !important; opacity: 0; }

/* ---- R4. Courses: World 1 starts left-aligned with the "Sky Classics" set button above it (later worlds still centre) ---- */
.cs-rail { padding-left: calc(var(--sal) + 20px) !important; }

/* ---- R5. Settings: the Vibration row has no sub-text where vibration is not supported (the JS leaves it empty) ---- */
#stHapticsNote:empty { display: none; }

/* ---- R6. Versus: the player-count chips sit in the same place on all three cards: right-aligned on the title row,
   same size and style ---- */
.vx-mode .vxm-text b { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
.vx-mode .vxm-n, .vx-mode.feat .vxm-n { flex: none; margin-left: auto; min-width: 84px; box-sizing: border-box; text-align: center;
  font: 850 11.5px/1 var(--body); font-style: normal; padding: 6px 10px; border-radius: 99px;
  background: rgba(255, 200, 120, .14); color: #ffd27a; box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .22); }

/* ======================= Extra sweep (less-travelled screens) ======================= */
/* X1. Big Screen pause on the TV: the mascot is scaled up to 14vmin there but kept the phone offsets, so it sat on top of
   the "Paused" title and off-centre. Offsets now scale with it. */
html.big-mode #ptpause .modal.has-mascot { margin-top: calc(max(84px, 14vmin) * .55) !important; padding-top: calc(max(84px, 14vmin) * .46 + 2.4vmin) !important; }
html.big-mode #ptpause .mascot { top: calc(max(84px, 14vmin) * -.56) !important; left: 50% !important; margin-left: calc(max(84px, 14vmin) * -.5) !important; }
/* X2. Ad placeholder: the drifting background bubbles showed through the ad slot; the slot is now near-solid (still a placeholder) */
#adscreen .ad-slot { background: rgba(26, 13, 66, .9); }
/* X3. Narrow phones (320-380 px): sheet titles ran up against the corner close button (Choose your dive, Today's
   leaderboard, Hearts, Big Screen). Titles keep clear of it and step down a size only where needed. */
.ep-modal > h2, .rk-modal h2, .hs-modal h2, .bs-modal h2 { padding-inline: 30px; }
@media (max-width: 380px) { .ep-modal > h2, .rk-modal h2, .hs-modal h2, .bs-modal h2 { font-size: min(28px, 7.6vw) !important; } }
/* X4. "Your first dive" / "Best 120 m" chip on the Solo Dive card no longer breaks onto two lines on small phones */
.ep-text em { white-space: nowrap; }

/* AdSense display fill */
#adscreen .ad-slot.lp-adsense-slot { display: block; overflow: hidden; }
#adscreen .ad-slot.lp-adsense-slot ins.adsbygoogle { width: 100%; }
