/* Rainey's Reef Run — game page. Loads after site.css. */
.play-wrap { padding: 22px 0 60px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .play-grid { grid-template-columns: minmax(0, 1fr); } .play-wrap { padding-top: 12px; } .play-page .banner, .play-page .topbar { display: none; } }
/* The stage owns every touch inside it: no scroll, no text selection, no long-press menu, no double-tap zoom. */
.stage { position: relative; width: 100%; height: min(74vh, 720px); height: min(74svh, 720px); /* svh, not dvh: the height must not change when the phone's address bar slides away during a scroll, or the canvas is rebuilt on every step of it and flickers */ min-height: 420px; border-radius: 22px; overflow: hidden; background: #072a5c; border: 3px solid #2a3a8c; box-shadow: 0 0 60px rgba(25, 195, 230, .22); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-btn { position: absolute; top: 10px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(10, 16, 51, .55); color: #fff; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }
#mute { right: 10px; } #pause { right: 60px; }
.overlay-card { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 16px; background: rgba(6, 12, 40, .74); overflow-y: auto; overflow-x: hidden; /* no backdrop blur: blurring a canvas that redraws 60 times a second flickers on phones */ cursor: default; touch-action: pan-y; }
.overlay-card[hidden] { display: none; }
.overlay-card .inner { width: min(380px, 100%); background: #fff; color: var(--text); border-radius: 22px; padding: 22px 22px 20px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2, 1.2, .4, 1); user-select: text; -webkit-user-select: text; }
.overlay-card h2 { font-size: 1.7rem; margin: 0 0 6px; color: var(--ink); }
.overlay-card .big { font-family: var(--pixel); font-size: 3rem; color: var(--pink); line-height: 1.1; }
.overlay-card .sub { color: var(--muted); font-size: .95rem; margin: 0 0 14px; }
.overlay-card .how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.overlay-card .how b { display: block; font-size: 1.7rem; }
.overlay-card .field { text-align: left; margin-bottom: 12px; } .overlay-card .input { min-height: 46px; padding: 10px 13px; }
.overlay-card .hint { font-size: .8rem; }
.tag-row { display: flex; gap: 8px; } .tag-row .input { flex: 1; min-width: 0; font-family: var(--head); }
.reward-card { background: linear-gradient(135deg, #fff1c7, #ffe3f1); border: 2px dashed var(--pink); border-radius: 16px; padding: 14px; margin: 12px 0; }
.reward-card .code { font-family: var(--pixel); font-size: 1.7rem; color: var(--pink); letter-spacing: .06em; }
.play-hint { text-align: center; color: #9db0e8; font-size: .9rem; margin: 12px 0 0; }
.play-stats { color: #9db0e8; font-size: .9rem; text-align: center; margin: 12px 0 0; }
.chal { border-radius: 18px; padding: 18px 20px; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, #ec1380, #7b4dd6); }
.chal h3 { color: #fff; margin: 6px 0 4px; font-size: 1.3rem; } .chal p { margin: 0; font-size: .95rem; }
.chal .goal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 10px 14px; font-weight: 800; }
.overlay-card .eyebrow { color: var(--pink); }
/* Around the game nothing can be selected or long-pressed: a thumb that slipped off the stage used to highlight the text under it and
   bring up Copy / Look Up. Form fields, the result card and reward codes stay selectable. */
.play-wrap { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.play-wrap input, .play-wrap textarea, .play-wrap .overlay-card .inner, .play-wrap #myRewards { user-select: text; -webkit-user-select: text; }
/* While a run is on (play.js sets body.playing) the whole page belongs to the game: no scrolling, no sideways drag, no selection anywhere. */
body.playing, body.playing * { touch-action: none !important; user-select: none !important; -webkit-user-select: none !important; -webkit-touch-callout: none !important; }
body.playing { overscroll-behavior: none; }
/* The game page never moves sideways. */
html:has(body.play-page), body.play-page { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
/* Who is playing: the names saved on this phone. */
.who-menu { margin: 0 0 12px; } .who-lbl { display: block; font-weight: 800; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.who-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.who-chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); font-family: var(--head); font-size: 1rem; cursor: pointer; }
.who-chip.on { border-color: var(--pink-ink); background: var(--pink-ink); color: #fff; }
.who-list { display: grid; gap: 8px; margin: 0 0 14px; }
.who-row { display: flex; gap: 6px; align-items: stretch; }
.who-pick { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 9px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-family: var(--head); font-size: 1.05rem; text-align: left; }
.who-pick small { color: var(--muted); font-family: var(--body); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.who-pick.on { border-color: var(--pink-ink); background: #fff0f7; } .who-pick:hover { border-color: var(--aqua); }
.who-x { width: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.linkbtn { border: 0; background: none; padding: 6px 4px; color: var(--pink-ink); font-weight: 800; font-size: .95rem; text-decoration: underline; cursor: pointer; }
