.page-greg-scroller { background: #09111e; color: #eff6fb; }
/* The site navigator otherwise covers the right-hand game control on phones. */
.page-greg-scroller .greg-ai-helper { display: none !important; }
.greg-scroller-page { padding: 2rem 1rem 4rem; background: radial-gradient(ellipse at 80% 5%, #243d4c 0, transparent 55%); }
.greg-scroller-shell { width: min(1080px, 100%); margin: auto; }
.greg-game-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-bottom: 2rem; }
.greg-game-nav a { color: #c2d3df; font-size: .85rem; text-decoration: none; border-bottom: 1px solid #68808f; padding-bottom: .2rem; }
.greg-scroller-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.greg-scroller-kicker { margin: 0 0 .5rem; color: #b3e0d7; font: 700 .75rem/1.4 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.greg-scroller-shell h1 { margin: 0; font-size: clamp(2.8rem, 8vw, 5rem); line-height: 1; color: #fff6d8; letter-spacing: -.055em; }
.greg-beta-note { color: #f3dcad; border: 1px solid #75664b; padding: .35rem .65rem; border-radius: 20px; font-size: .75rem; }
.greg-scroller-intro { color: #c0d0dc; max-width: 650px; margin: 1rem 0 1.5rem; line-height: 1.6; }
.greg-scroller-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem 1rem; margin: 0 0 .85rem; font-size: .85rem; color: #c7d9e4; }
.greg-scroller-options label { display: flex; align-items: center; gap: .5rem; }
.greg-scroller-options select { color: #eef7ff; background: #1a2a39; border: 1px solid #6c8292; border-radius: 6px; padding: .55rem; min-height: 44px; max-width: 100%; }
.greg-scroller-options input { width: 18px; height: 18px; accent-color: #f4d38d; }
.greg-scroller-options strong { color: #f4d38d; padding-left: .4rem; }
.greg-scroller-frame { position: relative; overflow: hidden; border: 1px solid #738792; border-radius: 14px; background: #101d2c; box-shadow: 0 18px 65px #0005; }
#greg-scroller-canvas { display: block; width: 100%; height: auto; touch-action: none; }
.greg-scroller-hud { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; min-height: 55px; padding: .7rem 9rem .7rem 1rem; font: 700 .8rem ui-monospace, monospace; background: linear-gradient(#091420f0, #09142000); pointer-events: none; }
.greg-scroller-hud strong { color: #ffe2a0; font-size: 1.15rem; padding-left: .25rem; }
#scroller-protection { color: #a8f4ff; }
.greg-scroller-toolbar { position: absolute; z-index: 5; right: .6rem; top: .6rem; display: flex; gap: .4rem; }
.greg-scroller-shell button { min-height: 48px; padding: .6rem 1rem; color: #f4f8fb; background: #203648; border: 1px solid #8ca8b8; border-radius: 7px; font: 700 .85rem system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.greg-scroller-shell button:hover { background: #304e60; }
.greg-scroller-shell button:disabled { cursor: default; opacity: .55; }
.greg-scroller-shell :is(button, a, select, input, summary, canvas):focus-visible { outline: 3px solid #ffe2a0; outline-offset: 3px; }
.greg-scroller-toolbar button { width: 48px; padding: .3rem; }
.greg-scroller-frame .greg-game-music-toggle { position: absolute; z-index: 5; right: 4rem; top: .6rem; width: 48px; padding: .3rem; }
.greg-scroller-frame:has(#scroller-escape:not([hidden])) .greg-game-music-toggle { right: 7.4rem; }
.greg-scroller-overlay { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem 4rem; background: #071321d9; text-align: center; }
.greg-scroller-overlay h2 { margin: .25rem 0 .6rem; font-size: clamp(1.5rem, 4vw, 2.8rem); color: #ffe7af; line-height: 1.1; }
.greg-scroller-overlay > p:not(.greg-scroller-kicker) { max-width: 520px; color: #deebf4; margin: 0 0 1.2rem; font-size: .95rem; line-height: 1.5; }
.greg-scroller-overlay-actions, .greg-scroller-actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.greg-scroller-shell :is(#scroller-overlay-action, #scroller-go, #scroller-score-form button) { background: #f2d395; color: #15232e; border-color: #ffe9ba; }
.greg-scroller-shell :is(#scroller-overlay-action, #scroller-go, #scroller-score-form button):hover { background: #ffe6b5; }
.greg-scroller-actions { margin-top: 1rem; }
.greg-scroller-actions button { min-width: 145px; }
.greg-scroller-touch { position: absolute; z-index: 3; bottom: .6rem; left: .6rem; right: .6rem; display: flex; justify-content: space-between; pointer-events: none; }
.greg-scroller-touch button { min-width: 100px; min-height: 52px; background: #102537e8; border-color: #b4d8d7; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.greg-scroller-touch button:active { background: #d4ebe1; color: #172d37; }
.greg-scroller-route { padding: .85rem 1rem; background: #152330; border: 1px solid #41596a; border-top: 0; border-radius: 0 0 10px 10px; margin: -7px 8px 0; min-height: 87px; }
.greg-scroller-route strong { color: #bde8d9; font-size: .8rem; }
.greg-scroller-route p { margin: .3rem 0 0; font-size: .9rem; line-height: 1.5; color: #d3e1ea; }
.greg-scroller-controls { font-size: .8rem; line-height: 1.9; text-align: center; color: #b5c9d7; margin: 1rem auto 1.8rem; max-width: 820px; }
.greg-scroller-controls kbd { font: 700 .75rem ui-monospace, monospace; padding: .15rem .35rem; border: 1px solid #687d8d; border-radius: 4px; color: #edf6fc; }
.greg-scroller-guide { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #405767; border-radius: 12px; overflow: hidden; }
.greg-scroller-guide section { padding: 1.25rem; background: #14222f; }
.greg-scroller-guide section + section { border-left: 1px solid #405767; }
.greg-guide-icon { font-size: 1.5rem; color: #f4d395; }
.greg-scroller-guide h2 { font-size: 1rem; margin: .6rem 0; color: #eaf5fa; }
.greg-scroller-guide p, .greg-scroller-leaderboard p { color: #becfdb; font-size: .85rem; line-height: 1.6; margin: 0; }
.greg-scroller-leaderboard, .greg-scroller-score-entry { margin-top: 1.5rem; border: 1px solid #526978; border-radius: 10px; padding: 1.2rem; }
.greg-scroller-score-entry { background: #142838; margin-bottom: 1.5rem; }
.greg-scroller-score-entry h2 { font-size: 1.2rem; margin-top: 0; color: #ffe7af; }
.greg-scroller-score-entry p { font-size: .9rem; color: #d2e1eb; }
.greg-scroller-score-form-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }
.greg-scroller-score-form-row input { width: min(14rem, 100%); background: #091725; color: #fff; border: 1px solid #8ba7b9; border-radius: 6px; padding: .7rem; font: 700 1rem ui-monospace, monospace; }
.greg-scroller-leaderboard summary { cursor: pointer; color: #eaf3f8; font-weight: 700; padding: .25rem 0; }
.greg-scroller-leaderboard[open] summary { margin-bottom: 1rem; }
.greg-scroller-score-list { padding-left: 1.7rem; font: .9rem ui-monospace, monospace; }
.greg-scroller-score-list li { padding: .6rem .4rem; border-bottom: 1px solid #344b5c; }
.greg-scroller-score-list strong { float: right; color: #ffe2a0; }
.greg-scroller-score-empty { list-style: none; color: #cfdee8; }
.greg-scroller-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.greg-scroller-shell [hidden] { display: none !important; }
.greg-scroller-frame:is(:fullscreen, .is-fullscreen) { width: 100vw; height: 100dvh; border: 0; border-radius: 0; display: flex; align-items: center; justify-content: center; background: #07111c; }
.greg-scroller-frame:is(:fullscreen, .is-fullscreen) #greg-scroller-canvas { width: min(100vw, calc(100dvh * 1.92)); height: auto; max-height: 100dvh; }
.greg-scroller-frame:is(:fullscreen, .is-fullscreen) .greg-scroller-touch { bottom: max(.75rem, env(safe-area-inset-bottom)); left: max(.75rem, env(safe-area-inset-left)); right: max(.75rem, env(safe-area-inset-right)); }
.greg-scroller-frame:is(:fullscreen, .is-fullscreen) .greg-scroller-toolbar { top: max(.6rem, env(safe-area-inset-top)); right: max(.6rem, env(safe-area-inset-right)); }
@media (max-width: 600px) {
  .greg-scroller-page { padding: 1.2rem .65rem 2rem; }
  .greg-game-nav { margin-bottom: 1.3rem; }
  .greg-scroller-intro { font-size: .9rem; }
  .greg-scroller-options { font-size: .8rem; }
  .greg-scroller-options label:first-child { width: 100%; }
  .greg-scroller-options select { flex: 1; min-width: 0; }
  .greg-scroller-frame { padding-bottom: 64px; }
  .greg-scroller-touch { bottom: .4rem; }
  .greg-scroller-overlay { padding: 3.5rem .8rem 1rem; }
  .greg-scroller-overlay .greg-scroller-kicker { display: none; }
  .greg-scroller-overlay h2 { font-size: 1.3rem; }
  .greg-scroller-overlay > p:not(.greg-scroller-kicker) { font-size: .8rem; line-height: 1.35; margin-bottom: .6rem; }
  .greg-scroller-hud { font-size: .65rem; gap: .6rem; padding: .6rem 7.5rem .6rem .6rem; min-height: 42px; }
  .greg-scroller-hud strong { font-size: .85rem; }
  .greg-scroller-toolbar { top: .25rem; right: .25rem; }
  .greg-scroller-frame .greg-game-music-toggle { top: .25rem; right: 3.5rem; }
  .greg-scroller-guide { grid-template-columns: 1fr; }
  .greg-scroller-guide section + section { border-left: 0; border-top: 1px solid #405767; }
  .greg-scroller-frame:is(:fullscreen, .is-fullscreen) { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .greg-scroller-shell *, .greg-scroller-shell *::before { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
