html, body {
  margin: 0;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
  height: 100%;
  background: #070b14;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* --- landscape presentation, reused verbatim from JUMPER's own pattern
   (games/too-far/web/style.css) -- see game.js's applyPresentation() for
   the matching JS half. ------------------------------------------------- */
#stage {
  position: fixed;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  overflow: hidden;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #0a1020;
}

body {
  font-family: -apple-system, "Segoe UI", "Courier New", monospace;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  z-index: 5;
  pointer-events: none;
}

#dist {
  font-size: 26px;
  font-weight: 900;
  color: #cfe0ff;
  text-shadow: 2px 2px 0 #08152e, 0 0 10px rgba(77,127,255,0.4);
}

#best {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: #cfe0ff;
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 6px;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, #0a1128 0%, #0e1a3a 55%, #142452 100%);
  z-index: 10;
}

.title {
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: 50px;
  letter-spacing: 3px;
  color: #4d7fff;
  text-shadow: 3px 3px 0 #06133a, 0 0 16px rgba(77,127,255,0.4);
  margin: 0;
}

.title.small { font-size: 36px; color: #ff5d5d; text-shadow: 3px 3px 0 #4a0000; }

.subtitle {
  color: #cfe0ff;
  font-size: 14px;
  max-width: 320px;
  line-height: 1.5;
  margin: 0;
  font-weight: 600;
}

.bestLine {
  color: #cfe0ff;
  font-weight: 800;
  font-size: 14px;
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 8px;
  margin: 0;
}

.resultLine {
  color: #cfe0ff;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.roast {
  color: #6c7ea3;
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  margin: 0;
}

.cta-btn {
  margin-top: 10px;
  font-family: inherit;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: #061029;
  background: #4d7fff;
  border: none;
  border-radius: 16px;
  padding: 18px 36px;
  box-shadow: 0 6px 0 #2c4dbb, 0 8px 18px rgba(0,0,0,0.4);
  animation: pulse 1.1s ease-in-out infinite;
}

.cta-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #2c4dbb;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hidden { display: none; }

#rotateHint {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0,0,0,0.62);
  color: #fff8ee;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  animation: hintFade 0.4s ease-out;
}
@keyframes hintFade { from { opacity: 0; } to { opacity: 1; } }

.kbd-hint{display:none;}
@media (hover: hover) and (pointer: fine){
  .kbd-hint{display:block;}
}
.kbd-hint{color:#cfe0ff;font-size:12px;font-weight:700;letter-spacing:1px;margin:0;opacity:.75;}

.seo-line {
  color: #cfe0ff;
  font-size: 10px;
  max-width: 220px;
  line-height: 1.2;
  margin: -10px 0 0;
  font-weight: 400;
  opacity: .6;
  white-space: nowrap;
}

/* Reserve the shared ad band the same way JUMPER does -- #stage is a
   transformed ancestor, so the ad anchor rotates with the presentation
   and screens must clear it explicitly rather than assume top:24px. */
.screen {
  padding-top: calc(24px + var(--thela-ad-band, 96px));
  box-sizing: border-box;
}
