/* Tater Tot Trot — sunny San Diego: sky, ocean, sand, FUN.
   Font: the system's rounded face (SF Pro Rounded on iPad/Mac), no downloads. */
:root {
  --sky-top: #3fb8ff;
  --sky: #8fdcff;
  --sun: #fff3a8;
  --ocean: #19b5c9;
  --ocean-deep: #0e8fb3;
  --foam: #e9fbff;
  --sand: #ffe3a3;
  --sand-deep: #f7c873;
  --ink: #0b4467;
  --coral: #ff5f7e;
  --sunset: #ff9a3c;
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--round);
  font-weight: 600;
  background: var(--sand);
  color: var(--ink);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- The game fills the screen, on a sunny sky ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
           70px max(10px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 88% 8%, var(--sun) 0, rgba(255, 243, 168, 0.65) 7%, rgba(255, 243, 168, 0) 22%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 55%, #c8f0ff 100%);
  overflow: hidden;
}
/* ocean + foam along the bottom of the sky */
.stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q15 0 30 10 T60 10 T90 10 T120 10 V20 H0Z' fill='%23ffe3a3'/%3E%3C/svg%3E") bottom / 120px 22px repeat-x,
    linear-gradient(180deg, var(--ocean) 0%, var(--ocean-deep) 100%);
  z-index: 0;
}
.stage > * { position: relative; z-index: 1; }

.game-wrap {
  position: relative;
  /* as big as fits, keeping 2:1 */
  width: min(100%, calc((100vh - 110px) * 2));
  width: min(100%, calc((100svh - 110px) * 2));
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 6px solid #fff;
  background: var(--sky);
  touch-action: none; /* the wash bay is scrubbed by dragging */
  display: block;
  box-shadow: 0 0 0 4px var(--ocean), 0 14px 34px rgba(11, 68, 103, 0.35);
}

.game-btns {
  position: absolute;
  top: 2.5%;
  right: 2%;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.gbtn {
  width: clamp(34px, 6.5vw, 58px);
  height: clamp(34px, 6.5vw, 58px);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--ocean);
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 3px 0 var(--ocean-deep);
}
.gbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ocean-deep); }
.gbtn[hidden] { display: none; }

/* Real full screen (tablets / desktop) */
.game-wrap:fullscreen, .game-wrap:-webkit-full-screen {
  width: 100vw; height: 100vh;
  background: linear-gradient(180deg, var(--sky-top), var(--ocean-deep));
  display: flex; align-items: center; justify-content: center;
}
.game-wrap:fullscreen canvas, .game-wrap:-webkit-full-screen canvas {
  width: min(100vw, 200vh); border-radius: 0; border: 0; box-shadow: none;
}
.game-wrap:fullscreen .game-btns, .game-wrap:-webkit-full-screen .game-btns { top: 16px; right: 16px; }

.rotate-hint {
  display: none; margin: 12px 0 0; font-size: 1.1rem; font-weight: 800; color: #fff;
  text-shadow: 0 2px 0 var(--ocean-deep);
}
@media (orientation: portrait) and (max-width: 700px) {
  .rotate-hint { display: block; }
  .stage { justify-content: flex-start; padding-top: 24px; min-height: auto; padding-bottom: 90px; }
}

.scroll-hint {
  margin-top: 12px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  font-size: 1.05rem;
  background: rgba(11, 68, 103, 0.25);
  padding: 6px 16px;
  border-radius: 20px;
}

/* ---------- Home page on the sand ---------- */
.home { max-width: 780px; margin: 0 auto; padding: 24px 16px 8px; }
h1 { margin: 0; }
.logo { width: min(280px, 58vw); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(11, 68, 103, 0.2)); }
h2 {
  font-weight: 900;
  color: var(--coral);
  font-size: 2rem;
  margin: 34px 0 14px;
  text-shadow: 0 3px 0 #fff, 0 5px 0 rgba(255, 95, 126, 0.2);
}
.lead { font-size: 1.35rem; margin: 10px 0 0; font-weight: 700; }

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; text-align: left; }
.rules li {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border-radius: 22px;
  padding: 10px 18px; font-size: 1.2rem;
  box-shadow: 0 0 0 4px var(--foam), 0 6px 0 var(--sand-deep);
}
.rules li:nth-child(odd) { box-shadow: 0 0 0 4px #ffe0e8, 0 6px 0 var(--sand-deep); }
.rules img { width: 84px; height: 66px; object-fit: contain; flex: none; }
.rules b { color: var(--ocean-deep); font-weight: 900; }

.btn-key { font-size: 1.25rem; font-weight: 800; }
.small { font-size: 1rem; opacity: 0.8; }

.play-btn {
  display: inline-block; margin: 22px 0 8px; padding: 16px 48px;
  background: linear-gradient(180deg, var(--sunset), var(--coral));
  color: #fff; text-decoration: none; font-size: 1.7rem; font-weight: 900;
  border-radius: 40px; box-shadow: 0 6px 0 #d63d5f;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.play-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #d63d5f; }

kbd {
  font-family: var(--round);
  background: #fff;
  border: 2px solid var(--ocean);
  border-radius: 8px;
  padding: 1px 8px;
}

/* ---------- Footer (part of Rocko's World, like Super Rocko) ---------- */
.site-foot {
  margin-top: 24px; padding: 26px 16px 34px;
  background: linear-gradient(180deg, var(--sand-deep), #eeb35a);
  color: #5a3a12;
}
.site-foot .promise {
  display: inline-block; margin: 0 0 14px; padding: 8px 16px; font-weight: 800; font-size: 15px;
  background: #fff; border-radius: 999px; color: var(--ink); box-shadow: 0 3px 0 rgba(11, 68, 103, 0.2);
}
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.foot-links a { color: var(--ink); font-weight: 800; font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--coral); }
.foot-links a:hover { color: var(--coral); }
.site-foot .legal { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.site-foot .tms { margin: 0; font-size: 12px; opacity: 0.75; }
