/* Fermi Frog: the look.
   A handheld game: the world on top (the scene), the controls below (the deck).
   Everything borrows from the frog stickers: dark navy outlines, flat bright colours, chunky pixels. */

:root, [data-colour="pond"] {
  --navy: #1B2340;      /* the frog's outline colour: borders and text on light */
  --night: #0E1428;     /* under the buttons, behind the game */
  --cream: #F7F3E3;     /* paper: panels and text on dark */
  --yellow: #FFD23F;    /* points, the chosen width, "you" */
  --pink: #F0648C;      /* the main button */
  --pink-dark: #9B2C52;
  --on-go: #fff;        /* the words on the main button */
  --green: #49B863;     /* the frog, the range */
  --green-dark: #23703A;
  --red: #E5484D;
  --pixel: "Jersey 20", ui-monospace, "Courier New", monospace;
  --plain: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* The app's colours. The player picks one in the profile; boot.js writes it on <html data-colour="...">.
   A colour changes four things: the panels, the dark under them, the main button, the words on that button.
   The names (navy, pink) say what they are in the first colour, "pond". The list of colours is in profile.js. */
[data-colour="reeds"] { --navy: #17382A; --night: #0B2318; --pink: #F5B13D; --pink-dark: #9C6410; --on-go: #17382A; }
[data-colour="lotus"] { --navy: #47203F; --night: #2A1126; --pink: #FF8FB5; --pink-dark: #A63A66; --on-go: #2A1126; }
[data-colour="dusk"]  { --navy: #2D2250; --night: #181130; --pink: #FF8A5B; --pink-dark: #A84A22; --on-go: #181130; }
[data-colour="moon"]  { --navy: #2C313D; --night: #171A22; --pink: #A9C4F5; --pink-dark: #4D6AA3; --on-go: #171A22; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--pixel);
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-synthesis: none; /* the pixel font has one weight: never fake a bold */
  font-variant-ligatures: none;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h2:focus { outline: none; }
.nojs { padding: 2rem; }

#app {
  position: relative;
  max-width: 30rem;
  height: 100dvh;
  margin: 0 auto;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 34rem) and (min-height: 44rem) {
  body { display: grid; place-items: center; }
  #app { width: 26rem; height: min(54rem, 100dvh - 2.5rem); border: 4px solid #000; border-radius: 20px; }
}

.screen { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- the scene: the world and the frog ---------- */

.stage { position: relative; flex: 1 1 0; min-height: 12rem; overflow: hidden; background: #C6E7EE; container-type: size; }
.stage { background: var(--night); }
/* the scene behind the frog: one picture per zone, slid up and down by world.js */
.world { position: absolute; inset: 0; overflow: hidden; }
.world img { position: absolute; top: 0; max-width: none; image-rendering: pixelated; -webkit-user-drag: none; user-select: none;
  transition: transform 0.9s cubic-bezier(0.25, 0.8, 0.3, 1), opacity 0.7s ease; will-change: transform, opacity; }
.world img.instant { transition: none; }
/* what the frog stands on: its top edge sits just under the frog's feet */
.perch { position: absolute; left: 50%; top: 74%; z-index: 1; width: min(46cqw, 11rem); height: auto; transform: translate(-50%, -38%); -webkit-user-drag: none; user-select: none; }
.perch[data-kind="leaf"] { width: min(52cqw, 12.5rem); transform: translate(-46%, -42%); }
.perch[data-kind="cloud"] { width: min(52cqw, 12.5rem); transform: translate(-50%, -30%); }
/* the branch starts inside the trunk on the left of the picture and passes under the frog */
.perch[data-kind="branch"] { left: 12%; width: 68cqw; transform: translate(0, -46%); }
.stem { position: absolute; z-index: 1; display: none; }
.stem.reed { display: block; left: 50%; top: 74%; bottom: 0; width: 9px; margin-left: -4px; background: #3D8246; border-left: 3px solid #4E9A52; }
.frog { position: absolute; left: 50%; top: 74%; width: min(40cqw, 9.5rem, 36cqh); transform: translate(-50%, -94%); z-index: 2; }
.frog[data-pose="write"] { width: min(52cqw, 12.5rem, 60cqh); }
.frog[data-pose="cheer"], .frog[data-pose="jump"] { width: min(44cqw, 10.5rem, 36cqh); }
.frog[data-pose="catch"] { width: min(50cqw, 12rem, 42cqh); }
.frog-img { display: block; width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
/* an animated pose: its pictures play in a layer over the still, which stays to hold the frog's place (app.js sets the layer's size) */
.frog-img.under { visibility: hidden; }
.frog-film { position: absolute; background-repeat: no-repeat; pointer-events: none; }
/* the frog's shadow on its perch: it is what makes the frog sit in the scene instead of floating over it */
.frog::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: 0.5%; width: 80%; height: 9%; translate: -50% 0; border-radius: 50%; background: rgb(10 16 34 / 0.34); }
.frog[data-pose="cheer"]::before, .frog[data-pose="astronaut"]::before { width: 48%; }
.frog[data-pose="jump"]::before { width: 40%; }
.frog[data-pose="catch"]::before { left: 36%; width: 62%; } /* the frog sits on the left of this picture, the tongue fills the right */
.frog[data-pose="splash"]::before { display: none; } /* this one brings its own puddle */
.frog.hop .frog-img, .frog.hop .frog-film { animation: hop 0.9s cubic-bezier(0.3, 0, 0.4, 1); }
.frog.hop::before { animation: hop-shadow 0.9s cubic-bezier(0.3, 0, 0.4, 1); } /* the higher the frog, the smaller its shadow */
/* a short wait on the ground first (the frog crouches), up, down, then a beat for the landing */
@keyframes hop { 0%, 28% { transform: translateY(0); } 55% { transform: translateY(-34%); } 82%, 100% { transform: translateY(0); } }
@keyframes hop-shadow { 0%, 28%, 82%, 100% { scale: 1; opacity: 1; } 55% { scale: 0.55; opacity: 0.5; } }

.hud { position: absolute; left: 0.6rem; right: 0.6rem; top: 0.55rem; z-index: 3; display: flex; justify-content: space-between; align-items: center; }
.pips { display: flex; gap: 0.3rem; }
.pips i { display: block; width: 1.15rem; height: 1.15rem; border: 3px solid var(--navy); border-radius: 4px; background: var(--cream); }
.pips i.caught { background: var(--yellow); }
.pips i.missed { background: var(--red); }
.pips i.now { background: #fff; box-shadow: 0 0 0 2px var(--yellow); }
.alt { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.05rem 0.55rem 0.1rem; border-radius: 5px; background: var(--navy); color: var(--cream); font-weight: 600; }
.alt img { width: 1.5rem; height: 1.5rem; align-self: center; margin-left: -0.2rem; }
.alt b { font-size: 1.45rem; color: var(--yellow); font-weight: 700; }
/* the logo, the fly's number, the places of the tree and the keys: only on a computer (the wide screen, at the end of this file) */
.hud-left { display: flex; align-items: center; gap: 0.8rem; }
.hud-logo, .fly-number, .meter, .keys, .tree-label { display: none; }
.home-link { padding: 0.05rem 0.5rem 0.1rem; border: 0; border-radius: 5px; background: var(--navy); color: var(--cream); font-weight: 600; }

.bubble {
  position: absolute; left: 0.6rem; right: 0.6rem; top: 2.55rem; z-index: 3;
  padding: 0.55rem 0.7rem 0.6rem;
  background: var(--cream); color: var(--navy);
  border: 3px solid var(--navy); border-radius: 8px; box-shadow: 0 4px 0 var(--navy);
}
.question { font-size: 1.6rem; font-weight: 400; line-height: 1; text-wrap: balance; }

.pop {
  position: absolute; left: 50%; top: 27%; z-index: 5; transform: translateX(-50%); /* above the frog, never on its face */
  font-size: 2.9rem; color: var(--yellow); white-space: nowrap; pointer-events: none;
  text-shadow: 3px 0 var(--navy), -3px 0 var(--navy), 0 3px var(--navy), 0 -3px var(--navy), 3px 3px var(--navy), -3px 3px var(--navy), 3px -3px var(--navy), -3px -3px var(--navy);
}
.pop.run { animation: rise 1.1s ease-out both; }
@keyframes rise { 0% { opacity: 0; translate: 0 1rem; scale: 0.6; } 18% { opacity: 1; translate: 0 0; scale: 1.15; } 30% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -2.2rem; } }

.fly { position: absolute; left: 0; top: 0; z-index: 6; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; pointer-events: none; }
.fly img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fly .up { animation: flap 0.14s steps(1) infinite; }
.fly .down { animation: flap 0.14s steps(1) infinite reverse; }
@keyframes flap { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

/* ---------- the deck: the controls ---------- */

.deck {
  position: relative; flex: none;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 0.65rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom));
  background: var(--navy); border-top: 4px solid var(--night);
}
.range { min-height: 1.8rem; text-align: center; font-size: 1.6rem; font-weight: 600; }
.range b { color: var(--yellow); font-weight: 700; }
.hit .range { color: var(--yellow); font-weight: 700; }
.miss .range { color: #FF9AA0; font-weight: 700; }

.tape {
  position: relative; height: 5.6rem; margin: 0 -0.75rem; overflow: hidden;
  background: var(--cream); color: var(--navy);
  border-top: 3px solid var(--night); border-bottom: 3px solid var(--night);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.tape:active { cursor: grabbing; }
.tape.locked { cursor: default; }
.tape:focus-visible { outline-offset: -4px; outline-color: var(--pink); }
.tape-ticks i { position: absolute; bottom: 0; width: 0; height: 0.8rem; border-left: 2px solid var(--navy); opacity: 0.5; }
.tape-ticks i.big { height: 1.55rem; border-left-width: 3px; opacity: 1; }
.tape-ticks b { position: absolute; left: 0; bottom: 3.55rem; transform: translateX(-50%); font-size: 1.2rem; font-weight: 600; font-style: normal; white-space: nowrap; }
.tape-ticks i:not(.big) b { font-size: 1.02rem; }
.tape-band { position: absolute; top: 1.75rem; bottom: 0; background: rgb(73 184 99 / 0.38); border-left: 4px solid var(--green-dark); border-right: 4px solid var(--green-dark); }
.tape-mark { position: absolute; top: 1.75rem; bottom: 0; width: 0; margin-left: -2px; border-left: 4px dotted var(--pink); display: none; }
.revealed .tape-mark { display: block; }
.tape-hint { position: absolute; left: 50%; bottom: 0.35rem; transform: translateX(-50%); padding: 0 0.5rem 0.1rem; border-radius: 5px; background: var(--navy); color: var(--cream); font-size: 1.05rem; pointer-events: none; }
.tape-hint::before { content: "\25C0\00A0"; }
.tape-hint::after { content: "\00A0\25B6"; }

.tools { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem; }
.widths { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
/* the key that opens the calculator: a little calculator */
.calc-open {
  display: flex; align-items: center; padding: 0.2rem 0.6rem;
  border: 0; border-radius: 7px; background: var(--cream); box-shadow: 0 4px 0 var(--night);
}
.calc-open img { height: 2.6rem; width: auto; image-rendering: pixelated; }
.calc-open:active, .calc-open[aria-expanded="true"] { transform: translateY(2px); box-shadow: 0 2px 0 var(--night); }

/* the stopwatch, between the flies and the height */
.clock { min-width: 2.4rem; padding: 0.05rem 0.45rem 0.1rem; border-radius: 5px; background: var(--navy); color: var(--cream); font-size: 1.45rem; font-weight: 700; text-align: center; }
.clock.low { background: var(--red); color: #fff; animation: hurry 1s steps(2) infinite; }
@keyframes hurry { 50% { scale: 1.12; } }
@media (prefers-reduced-motion: reduce) { .clock.low { animation: none; } }

/* the calculator: a panel over the controls */
.calc {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.5rem 1.6rem calc(1.7rem + env(safe-area-inset-bottom));
  background: var(--navy) url(img/ui/calc-board.webp) center / 100% 100% no-repeat; image-rendering: pixelated; outline: 0;
}
.calc-top { display: flex; align-items: stretch; gap: 0.5rem; }
.calc-screen {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end;
  min-height: 3.6rem; padding: 0.15rem 0.6rem 0.2rem; overflow: hidden;
  border: 3px solid var(--night); border-radius: 8px; background: var(--cream); color: var(--navy);
}
.calc-screen small { min-height: 1.1rem; font-size: 1.05rem; line-height: 1; opacity: 0.7; }
.calc-screen b { font-size: 2rem; line-height: 1; font-weight: 700; white-space: nowrap; }
.calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
/* each key is a picture of a blank pebble; its lower edge is the pebble's side, so the sign sits a little high */
.calc-keys button {
  padding: 0.3rem 0 0.7rem; border: 0; background: url(img/ui/key-cream.webp) center / 100% 100% no-repeat; color: var(--navy);
  font-size: 1.65rem; font-weight: 700; line-height: 1;
}
.calc-keys button:active { transform: translateY(2px); filter: brightness(0.92); }
.calc-keys .op { background-image: url(img/ui/key-yellow.webp); }
.calc-keys .undo { background-image: url(img/ui/key-orange.webp); }
.calc-keys .equals { grid-row: span 2; background-image: url(img/ui/key-green.webp); color: #fff; font-size: 2.2rem; text-shadow: 2px 2px 0 var(--navy), -2px 2px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy); }
.calc-top .link { background: var(--navy); border-color: var(--night); }
.widths button {
  display: flex; flex-direction: column; align-items: center; padding: 0.3rem 0 0.35rem;
  border: 0; border-radius: 7px; background: var(--cream); color: var(--navy); box-shadow: 0 4px 0 var(--night);
}
.widths small { font-size: 1.05rem; font-weight: 600; opacity: 0.75; }
.widths b { font-size: 1.65rem; line-height: 0.9; font-weight: 700; }
.widths button.on { background: var(--yellow); transform: translateY(2px); box-shadow: 0 2px 0 var(--night); }
.widths button.on small { opacity: 1; }

.go {
  width: 100%; padding: 0.75rem; border: 0; border-radius: 9px;
  background: var(--pink); color: var(--on-go); font-size: 1.75rem; font-weight: 700;
  box-shadow: 0 5px 0 var(--pink-dark);
}
.go:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-dark); }
.go:disabled { opacity: 0.55; cursor: default; }
.ghost { padding: 0.55rem; border: 3px solid var(--cream); border-radius: 9px; background: transparent; color: var(--cream); font-weight: 600; }
.ghost:active { transform: translateY(2px); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.link { padding: 0.1rem 0.5rem 0.15rem; border: 2px solid var(--cream); border-radius: 6px; background: transparent; color: var(--cream); font-weight: 600; }

.after { display: flex; flex-direction: column; gap: 0.5rem; min-height: 3.3rem; justify-content: center; }
.answer-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.answer { font-size: 1.5rem; line-height: 1; }
.how { padding: 0.6rem 0.7rem; border-radius: 8px; background: var(--cream); color: var(--navy); font-family: var(--plain); font-size: 0.95rem; line-height: 1.4; }
.how .source { margin-top: 0.4rem; font-size: 0.82rem; opacity: 0.75; }

/* ---------- start ---------- */

.home .stage { flex: 1 1 0; min-height: 15rem; }
.logo { position: absolute; left: 50%; top: 0.8rem; z-index: 3; width: min(74cqw, 17rem, 62cqh); height: auto; transform: translateX(-50%); -webkit-user-drag: none; user-select: none; }
.tagline { font-size: 1.4rem; line-height: 1.05; text-align: center; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; counter-reset: step; }
.steps li { counter-increment: step; padding: 0.35rem 0.3rem 0.45rem; border-radius: 7px; background: rgb(247 243 227 / 0.1); text-align: center; font-size: 1.1rem; line-height: 1; }
.steps li::before { content: counter(step); display: block; font-size: 1.6rem; color: var(--yellow); }
.fine { font-size: 1.05rem; text-align: center; opacity: 0.8; }

/* ---------- the climb: result and leaderboard ---------- */

.end { overflow-y: auto; }
.tree { flex: none; height: 44%; min-height: 15rem; overflow-y: auto; overscroll-behavior: contain; }
.tree-inner { position: relative; }
.tree .world { position: relative; inset: auto; isolation: isolate; } /* the scenes overlap each other in their own pile, under the frogs and name tags */
.tree .world img { left: 0; width: 100%; object-fit: cover; transition: none; }
/* how each scene ends over the scene below (JOINS in world.js): most fade out like mist; the canopy's leaves end in bumps */
.tree .world img.mist { -webkit-mask-image: linear-gradient(#000 var(--from, 77%), transparent 100%); mask-image: linear-gradient(#000 var(--from, 77%), transparent 100%); }
.tree .world img.bumps {
  --bumps: linear-gradient(#000, #000) top / 100% 88% no-repeat,
    radial-gradient(closest-side, #000 97%, transparent 100%) 0 100% / 22% 20% repeat-x,
    radial-gradient(closest-side, #000 97%, transparent 100%) 9% 96% / 15% 16% repeat-x;
  -webkit-mask: var(--bumps); mask: var(--bumps);
}
.tree-layer { position: absolute; inset: 0; }
.zone-line { position: absolute; left: 0; right: 0; height: 0; z-index: 1; }
.zone-line span { position: absolute; left: 0.35rem; bottom: 0.25rem; display: flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.5rem 0.1rem 0.15rem; border-radius: 999px; background: var(--navy); color: var(--cream); font-size: 1rem; }
.zone-line img { width: 1.5rem; height: 1.5rem; }
.tag {
  position: absolute; max-width: 34%; display: flex; align-items: center; gap: 0.2rem; white-space: nowrap;
  transform: translateY(-50%); padding: 0 0.35rem 0.05rem 0.2rem;
  background: var(--cream); color: var(--navy); border: 2px solid var(--navy); border-radius: 5px;
  font-size: 1.05rem; line-height: 1.1;
}
.tag img { flex: none; width: 1.1rem; height: 1.1rem; object-fit: contain; }
.tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tag.me { max-width: none; background: var(--yellow); z-index: 2; }
.tree-frog { position: absolute; left: 18%; width: 4.4rem; transform: translate(-50%, -90%); z-index: 1; }

.end .deck { flex: none; gap: 0.8rem; }
.medal { display: block; width: 5.5rem; height: 5.5rem; margin: -3.4rem auto -0.3rem; position: relative; z-index: 2; }
.verdict { font-size: 1.9rem; line-height: 1; text-align: center; text-wrap: balance; }
.total { text-align: center; font-weight: 600; }
.total b { font-size: 3.2rem; line-height: 0.9; color: var(--yellow); font-weight: 700; }
.catches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.catches li { padding: 0.3rem 0 0.4rem; border-radius: 7px; text-align: center; font-size: 1.45rem; }
.catches .caught { background: var(--yellow); color: var(--navy); }
.catches .missed { background: rgb(229 72 77 / 0.25); color: #FF9AA0; font-size: 1.15rem; padding-top: 0.45rem; }

.board-box h3 { font-size: 1.5rem; font-weight: 400; }
.board-box > * + * { margin-top: 0.5rem; }
.post label, .field label { display: block; font-size: 1.15rem; }
.post input, .field input {
  width: 100%; margin-top: 0.25rem; padding: 0.5rem 0.6rem;
  font: inherit; font-size: 1.4rem; color: var(--navy);
  background: var(--cream); border: 3px solid var(--night); border-radius: 8px;
}
.post .go { margin-top: 0.6rem; font-size: 1.5rem; }
.post .note { margin-top: 0.9rem; }
.problem { margin-top: 0.4rem; color: #FF9AA0; font-weight: 600; }
.problem:empty { display: none; }
.note { font-size: 1.05rem; opacity: 0.8; line-height: 1.1; }
a.note { display: block; color: var(--yellow); } /* the privacy link under "Sign in with Google" */
.board li { display: grid; grid-template-columns: 2.2rem 1.9rem 1fr auto; gap: 0.4rem; align-items: center; padding: 0.3rem 0; border-top: 2px dashed rgb(247 243 227 / 0.2); }
.board .face { width: 1.9rem; height: 1.9rem; object-fit: contain; }
.board .rank { opacity: 0.7; }
.board .name { overflow-wrap: anywhere; }
.board .score { font-weight: 700; }
.board .me { color: var(--yellow); }
.board .gold { width: 1.3rem; height: 1.3rem; margin-left: 0.3rem; vertical-align: -0.2rem; object-fit: contain; } /* a supporter's golden fly */
.board .skip { display: block; text-align: center; opacity: 0.6; }
.share .ghost { width: 100%; }
.share textarea { width: 100%; margin-top: 0.5rem; padding: 0.5rem; font: inherit; font-size: 0.9rem; color: var(--navy); background: var(--cream); border: 3px solid var(--night); border-radius: 8px; resize: vertical; }

/* ---------- the pond: the frog on a lily pad, seen from above ---------- */

.me-chip.pond-chip { left: auto; right: 0.6rem; } /* the same round button as the profile's, in the other corner */
.pond-screen .hud { pointer-events: none; }
.pond-screen .hud > * { pointer-events: auto; }
/* the water: paler where it is shallow in the middle, deeper at the banks */
/* the pond and what is written over it (the hint, the tilt button, the corner buttons on the start screen) */
.pond-box { position: relative; flex: 1 1 0; min-height: 15rem; display: flex; }
.pond { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: #3F9BA6 url("img/pond/water.webp") center / cover; }
/* pond.js gives each of these its size and its place */
.pond-raft, .pond-leaf, .pond-lap { position: absolute; left: 0; top: 0; aspect-ratio: 1; will-change: transform; }
.pond-leaf img, .pond-frog img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.pond-frog { position: relative; width: 100%; height: 100%; }
.pond-leaf { filter: drop-shadow(0 5px 0 rgb(14 40 60 / 0.28)); }
.pond-raft { z-index: 2; filter: drop-shadow(0 7px 0 rgb(14 40 60 / 0.32)); }
/* the water lapping at the pad: short arcs just outside its edge, that widen a little and fade. They travel with the pad. */
.pond-lap { z-index: 1; pointer-events: none; transition: opacity 0.6s; }
.pond-lap i { position: absolute; inset: 0; border: 3px solid transparent; border-top-color: rgb(255 255 255 / 0.8); border-bottom-color: rgb(255 255 255 / 0.8);
  border-radius: 50%; opacity: 0; animation: pond-lap 3.3s linear infinite; }
.pond-lap i:nth-child(2) { rotate: 60deg; animation-delay: -1.1s; }
.pond-lap i:nth-child(3) { rotate: 120deg; animation-delay: -2.2s; }
@keyframes pond-lap { 0% { scale: 1; opacity: 0; } 20% { opacity: 1; } 100% { scale: 1.3; opacity: 0; } }
.pond { cursor: pointer; }
.pond-foot { position: absolute; left: 0.75rem; right: 0.75rem; bottom: calc(0.85rem + env(safe-area-inset-bottom)); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; pointer-events: none; }
.pond-hint { padding: 0.15rem 0.7rem 0.25rem; border-radius: 6px; background: var(--navy); color: var(--cream); font-size: 1.15rem; text-align: center; }
.pond-tilt { pointer-events: auto; background: var(--navy); }

/* ---------- profile ---------- */

/* the player's frog in the corner of the start screen: the way to the profile */
.me-chip { position: absolute; left: 0.6rem; top: 0.55rem; z-index: 4; width: 2.7rem; height: 2.7rem; padding: 0.15rem; border: 3px solid var(--navy); border-radius: 50%; background: var(--cream); box-shadow: 0 3px 0 var(--navy); }
.me-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--navy); }
.me-chip img { display: block; width: 100%; height: 100%; object-fit: contain; }

.profile .stage { flex: none; height: 32%; min-height: 12rem; }
.profile .deck { gap: 0.95rem; }
.profile h3, .field label { margin-bottom: 0.3rem; font-size: 1.15rem; font-weight: 400; opacity: 0.8; }
.profile section .note { margin-top: 0.45rem; }
.profile section .note + .pair, .profile section .gold + .pair { margin-top: 0.55rem; }
.field input { margin-top: 0; }
.frogs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.35rem; } /* sixteen frogs: two rows */
.frogs button { aspect-ratio: 1; padding: 0.25rem; border: 3px solid transparent; border-radius: 9px; background: rgb(247 243 227 / 0.1); }
.frogs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frogs button[aria-pressed="true"] { background: var(--cream); border-color: var(--yellow); }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.choices button { padding: 0.5rem 0.2rem; border: 3px solid var(--cream); border-radius: 9px; background: transparent; color: var(--cream); font-weight: 600; }
.choices button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
/* the "Sign in with Google" button: Google's own look (white, its sign, plain letters), so players recognise it */
.google { display: flex; align-items: center; justify-content: center; gap: 0.65rem; padding: 0.65rem 0.9rem; border: 1px solid #747775; border-radius: 8px;
  background: #fff; color: #1F1F1F; font-family: var(--plain); font-size: 1rem; font-weight: 500; letter-spacing: 0; text-decoration: none; }
.google svg { flex: none; width: 1.25rem; height: 1.25rem; }
/* the paid plan: its door in the profile, and its screen */
.ghost.gold { display: flex; align-items: center; justify-content: center; gap: 0.45rem; width: 100%; margin-top: 0.55rem; border-color: var(--yellow); color: var(--yellow); }
.ghost.gold img { flex: none; width: 1.5rem; height: 1.5rem; object-fit: contain; }
.plan .fly { left: 71%; top: 36%; animation: hover 2.6s ease-in-out infinite; }
@keyframes hover { 0%, 100% { translate: 0 0; } 50% { translate: -0.45rem -0.65rem; } }
.pitch { font-size: 1.2rem; line-height: 1.05; text-align: center; text-wrap: balance; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.perks li { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.4rem 0.4rem 0.5rem; border-radius: 7px; background: rgb(247 243 227 / 0.1); text-align: center; font-size: 1.1rem; line-height: 1; text-wrap: balance; }
.perks img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.thanks { font-size: 1.5rem; line-height: 1; text-align: center; color: var(--yellow); text-wrap: balance; }
.swatches { display: flex; gap: 0.7rem; }
/* each button wears its own colour: the panel on one half, the main button on the other */
.swatch { width: 2.7rem; height: 2.7rem; border: 3px solid var(--cream); border-radius: 50%; background: linear-gradient(135deg, var(--navy) 50%, var(--pink) 50%); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--yellow); outline-offset: 3px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.stats li { padding: 0.35rem 0.3rem 0.45rem; border-radius: 7px; background: rgb(247 243 227 / 0.1); text-align: center; font-size: 1.05rem; line-height: 1; }
.stats b { display: block; font-size: 1.9rem; color: var(--yellow); }
.places { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; }
.places img { display: block; width: 100%; height: auto; }
.places .dim { opacity: 0.22; filter: grayscale(1); }

/* Supporter extras. Not bought yet: shown with a lock, and a press opens the plan. */
.locked { position: relative; opacity: 0.55; }
.locked::after { content: "🔒"; position: absolute; right: 0.15rem; bottom: 0.1rem; font-size: 0.85rem; line-height: 1; filter: grayscale(1); }
.seasons { grid-template-columns: repeat(4, 1fr); }
.night-switch { display: flex; align-items: center; justify-content: center; gap: 0.45rem; width: 100%; margin-top: 0.5rem; padding: 0.4rem;
  border: 3px solid var(--cream); border-radius: 9px; background: transparent; color: var(--cream); font-weight: 600; }
.night-switch img { width: 1.6rem; height: 1.6rem; object-fit: contain; }
.night-switch[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats.four b { font-size: 1.55rem; }
.past-days { display: grid; gap: 0.4rem; }
.past-days button { display: flex; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.5rem 0.7rem;
  border: 3px solid var(--cream); border-radius: 9px; background: transparent; color: var(--cream); font-weight: 600; text-align: left; }
.past-days b { color: var(--yellow); }
.past .deck { overflow-y: auto; }

/* The night (a supporter extra): the scenes darken and turn blue, and a few pixel stars come out. Made in code, no new pictures. */
[data-night] .world img, [data-night] .pond { filter: brightness(0.6) saturate(0.7); }
[data-night] .world::before, [data-night] .world::after { content: ""; position: absolute; inset: 0; z-index: 10; pointer-events: none; }
[data-night] .world::before { background: #22307a; mix-blend-mode: multiply; opacity: 0.5; }
[data-night] .world::after {
  background-repeat: no-repeat;
  background-image: linear-gradient(#fff6d0, #fff6d0), linear-gradient(#fff6d0, #fff6d0), linear-gradient(#fff, #fff),
    linear-gradient(#fff6d0, #fff6d0), linear-gradient(#fff, #fff), linear-gradient(#fff6d0, #fff6d0), linear-gradient(#fff, #fff);
  background-size: 4px 4px, 3px 3px, 4px 4px, 3px 3px, 3px 3px, 4px 4px, 3px 3px;
  background-position: 12% 8%, 27% 17%, 46% 5%, 63% 13%, 78% 6%, 90% 19%, 35% 27%;
  opacity: 0.85;
}
[data-night] .tree .world::after { display: none; } /* the tall tree has its own sky */

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 20; transform: translate(-50%, 1rem);
  padding: 0.45rem 0.9rem 0.5rem; border: 3px solid var(--navy); border-radius: 8px;
  background: var(--yellow); color: var(--navy); font-weight: 700;
  white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the wide screen: a computer, or a tablet held sideways ----------
   A phone never gets here: held upright it is too narrow, held sideways it is too short.
   The handheld turns on its side: the scene fills the left, the deck becomes a panel on the right.
   Nothing above this block changes, so the phone look stays exactly as it is. */
@media (min-width: 56rem) and (min-height: 34rem) {
  body {
    background:
      radial-gradient(ellipse 70% 60% at 50% 45%, color-mix(in srgb, var(--navy) 70%, transparent), transparent 75%),
      repeating-linear-gradient(0deg, rgb(255 255 255 / 0.025) 0 2px, transparent 2px 6px),
      var(--night);
  }
  #app {
    width: min(76rem, 100vw - 4rem);
    height: min(48rem, 100dvh - 4rem);
    max-width: none;
    border: 4px solid #000; border-radius: 22px;
    box-shadow: 0 10px 0 #000, 0 30px 80px rgb(0 0 0 / 0.5);
  }
  .screen { flex-direction: row; }

  /* the scene: everything left of the panel */
  .stage, .home .stage, .profile .stage, .tree, .pond-box { flex: 1 1 0; height: auto; min-height: 0; min-width: 0; }

  /* the panel: a fixed column, its content in the middle, scrolling when it is long */
  .deck {
    flex: none; width: 26rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    justify-content: safe center;
    padding: 1.6rem 1.6rem;
    border-top: 0; border-left: 4px solid var(--night);
    gap: 0.9rem;
    scrollbar-width: thin; scrollbar-color: rgb(247 243 227 / 0.25) transparent;
  }
  .end { overflow: hidden; }
  .end .deck { gap: 1rem; }
  .tape { margin: 0 -1.6rem; }

  /* a bigger scene, a bigger frog: sizes follow the scene's height, not the phone's width */
  .frog { width: min(28cqh, 34cqw); }
  .frog[data-pose="write"] { width: min(40cqh, 46cqw); }
  .frog[data-pose="cheer"], .frog[data-pose="jump"] { width: min(31cqh, 38cqw); }
  .frog[data-pose="catch"] { width: min(36cqh, 44cqw); }
  .perch { width: min(33cqh, 40cqw); }
  .perch[data-kind="leaf"], .perch[data-kind="cloud"] { width: min(37cqh, 45cqw); }
  .logo { width: min(56cqw, 26rem, 42cqh); top: 1.4rem; }
  .tree-frog { width: 5.5rem; }

  /* over the scene: the question card stays a card, not a banner across the whole width */
  .hud { left: 1rem; right: 1rem; top: 0.9rem; }
  .bubble { left: 50%; right: auto; top: 3.4rem; width: min(36rem, 100% - 2rem); translate: -50% 0; padding: 0.8rem 1rem 0.85rem; }
  .question { font-size: 2rem; }
  .pop { font-size: 3.6rem; }
  .me-chip { left: 1rem; top: 0.9rem; width: 3.2rem; height: 3.2rem; }
  .me-chip.pond-chip { right: 1rem; }
  .pond-foot { bottom: 1.4rem; }

  /* the panel's words, a size up */
  .tagline { font-size: 1.75rem; }
  .steps li { padding: 0.55rem 0.3rem 0.6rem; }
  .verdict { font-size: 2.2rem; }
  .medal { margin: 0 auto -0.4rem; }
  .range { font-size: 1.75rem; }

  /* a mouse can point: say what will answer */
  @media (hover: hover) {
    .go:not(:disabled):hover { filter: brightness(1.08); }
    .ghost:hover, .link:hover, .choices button:hover { background: rgb(247 243 227 / 0.12); }
    .choices button[aria-pressed="true"]:hover { background: var(--yellow); }
    .widths button:not(.on):hover { background: #fff; }
    .frogs button:hover { background: rgb(247 243 227 / 0.2); }
    .me-chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--navy); }
    .home-link:hover { background: var(--night); }
  }
}

/* ---------- Play on a computer: the whole window ----------
   The pond on top with the question card and the frog, the deep water below holds the controls.
   The design: design/desktop/play.html?v=d. Same test as the wide screen above, so a phone never gets it. */
@media (min-width: 56rem) and (min-height: 34rem) {
  #app:has(> .play), #app:has(> .home), #app:has(> .climb), #app:has(> .profile), #app:has(> .plan) { width: 100vw; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .play { flex-direction: column; }
  .play .stage { flex: 1 1 0; min-height: 18rem; }

  /* over the scene */
  .play .hud { left: 1.8rem; right: 1.8rem; top: 1.2rem; }
  .play .hud-logo { display: block; width: 8.5rem; height: auto; }
  .play .pips { gap: 0.4rem; }
  .play .pips i { width: 1.4rem; height: 1.4rem; }
  .play .alt { padding: 0.15rem 0.85rem 0.25rem 0.5rem; border: 3px solid var(--night); border-radius: 999px; font-size: 1.5rem; }
  .play .alt img { width: 2rem; height: 2rem; }
  .play .alt b { font-size: 1.8rem; }
  .play .bubble { top: 5.8rem; width: min(52rem, 100% - 22rem); padding: 0.8rem 1.5rem 0.95rem; text-align: center; border-width: 4px; border-radius: 12px; box-shadow: 0 6px 0 var(--navy); }
  .play .fly-number { display: block; margin-bottom: 0.3rem; font-size: 1.15rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--pink-dark); }
  .play .question { font-size: clamp(2rem, 4.2cqh, 2.8rem); }
  .play .meter { position: absolute; z-index: 3; right: 1.8rem; top: 6.2rem; bottom: 1.4rem; width: 3.2rem;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 0.4rem 0;
    border-radius: 999px; background: rgb(14 20 40 / 0.6); }
  .play .meter img { width: 2.3rem; height: 2.3rem; transition: opacity 0.6s, filter 0.6s; }
  .play .meter img.dim { opacity: 0.35; filter: grayscale(1); }
  .play .meter img.here { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 50%; }
  .play .fly { width: 4rem; height: 4rem; margin: -2rem 0 0 -2rem; }
  .play .pop { font-size: 4rem; }

  /* the frog and its perch, sized by the scene's height */
  .play .frog { width: min(33cqh, 26cqw); }
  .play .frog[data-pose="catch"] { width: min(40cqh, 32cqw); }
  .play .frog[data-pose="cheer"], .play .frog[data-pose="jump"] { width: min(36cqh, 28cqw); }
  .play .perch { width: min(39cqh, 30cqw); }
  .play .perch[data-kind="leaf"], .play .perch[data-kind="cloud"] { width: min(43cqh, 34cqw); }
  .play .perch[data-kind="branch"] { left: calc(50% - 39cqh); width: 70cqh; }
  /* the frog sits lower than on a phone: the question card above it is wider than tall */
  .play .frog, .play .perch, .play .stem.reed { top: 79%; }
  @media (max-height: 50rem) {
    .play .frog { width: min(28cqh, 24cqw); }
    .play .frog[data-pose="catch"] { width: min(34cqh, 28cqw); }
    .play .frog[data-pose="cheer"], .play .frog[data-pose="jump"] { width: min(31cqh, 26cqw); }
    .play .perch { width: min(34cqh, 28cqw); }
    .play .bubble { top: 5.2rem; padding: 0.6rem 1.3rem 0.7rem; }
    .play .question { font-size: 1.9rem; }
    .play .deck { row-gap: 0.6rem; padding-top: 0.6rem; }
    .play .tape { height: 5.6rem; }
    .play .tape-ticks b { bottom: 3.4rem; }
    .play .tape-band, .play .tape-mark { top: 1.85rem; }
  }

  /* the deep water: the controls, centred, with the scale from edge to edge */
  .play .deck, .home .deck, .climb .deck {
    width: auto; flex: none; overflow: visible; justify-content: normal;
    display: grid; grid-template-columns: minmax(1.5rem, 1fr) minmax(0, 44rem) minmax(0, 26rem) minmax(1.5rem, 1fr);
    column-gap: 1.4rem; row-gap: 0.85rem; align-items: center;
    padding: 0.9rem 0 calc(1.1rem + env(safe-area-inset-bottom));
    border-left: 0; border-top: 5px solid #000;
    background: linear-gradient(#1d4a66, var(--navy) 30%, var(--night));
  }
  .play .deck > *, .home .deck > *, .climb .deck > * { grid-column: 2 / 4; }
  .play .tape { grid-column: 1 / -1; height: 6.2rem; margin: 0; border-top: 0; }
  .play .tape-ticks b { bottom: 3.9rem; font-size: 1.4rem; }
  .play .tape-ticks i:not(.big) b { font-size: 1.15rem; }
  .play .tape-ticks i.big { height: 1.8rem; }
  .play .tape-band, .play .tape-mark { top: 2.1rem; }
  .play .tape-hint { font-size: 1.2rem; bottom: 0.45rem; }
  .play .range { font-size: 2.1rem; min-height: 2.2rem; }
  .play .tools, .play .after { grid-column: 2; }
  .play .tools { gap: 0.6rem; }
  .play .calc-open { padding: 0.2rem 0.9rem; border-radius: 9px; box-shadow: 0 5px 0 var(--night); }
  .play .calc-open img { height: 3.4rem; }
  .play .clock { font-size: 1.8rem; min-width: 3rem; }
  /* the calculator floats in the corner, clear of the scale */
  .calc { left: auto; right: 1.8rem; bottom: 1.2rem; width: 25rem; padding: 1.6rem 1.7rem 1.8rem; background-color: transparent; }
  .play .widths { gap: 0.6rem; counter-reset: key; }
  .play .widths button { position: relative; padding: 0.45rem 0 0.5rem; border-radius: 9px; box-shadow: 0 5px 0 var(--night); }
  .play .widths button.on { box-shadow: 0 2px 0 var(--night); }
  /* the key that picks each width */
  .play .widths button::before { counter-increment: key; content: counter(key); position: absolute; top: 0.3rem; left: 0.45rem;
    padding: 0 0.3rem; border: 2px solid currentColor; border-radius: 4px; font-size: 0.95rem; line-height: 1.1; opacity: 0.5; }
  .play .widths small { font-size: 1.2rem; }
  .play .widths b { font-size: 2.1rem; }
  .play .after { min-height: 4.2rem; }
  .play .answer { font-size: 1.8rem; }
  .play .go { grid-column: 3; padding: 0.85rem; font-size: 2.2rem; }
  .play .keys { display: block; text-align: center; font-size: 1.2rem; letter-spacing: 0.08em; opacity: 0.55; }
}

/* ---------- Home on a computer: the same pond and deep water as Play ---------- */
@media (min-width: 56rem) and (min-height: 34rem) {
  .home { flex-direction: column; }
  .home .stage, .home .pond-box { flex: 1 1 0; min-height: 18rem; }
  .home .logo { top: 1.4rem; width: min(30rem, 44cqh, 50cqw); }
  .home .frog, .home .perch { top: 81%; }
  .home .frog[data-pose="write"] { width: min(46cqh, 36cqw); }
  .home .perch { width: min(40cqh, 31cqw); }
  .home .me-chip { left: 1.8rem; top: 1.2rem; width: 3.6rem; height: 3.6rem; }
  .home .me-chip.pond-chip { left: auto; right: 1.8rem; }
  .home .pond-foot { bottom: 1.4rem; }
  /* the pond after today's round: pond.js sizes everything by the pond's width, so on a wide screen the frog floats
     in a 4:3 middle part; the water itself still runs from edge to edge */
  .home .pond-box { justify-content: center; background: #3F9BA6 url("img/pond/water.webp") center / cover; }
  .home .pond { flex: none; height: 100%; aspect-ratio: 4 / 3; max-width: 100%; background: none; }

  /* the panel: the tagline across, the three steps beside the Play button, the date beside the two other doors */
  .home .deck { row-gap: 0.9rem; padding-top: 1.2rem; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
  .home .tagline { grid-row: 1; font-size: 2.1rem; }
  .home .steps { grid-column: 2; grid-row: 2; gap: 0.6rem; }
  .home .steps li { padding: 0.55rem 0.4rem 0.65rem; font-size: 1.3rem; border-radius: 9px; }
  .home .steps li::before { font-size: 2rem; }
  .home .go { grid-column: 3; grid-row: 2; align-self: stretch; font-size: 2.4rem; }
  .home .pair { grid-column: 3; grid-row: 3; }
  .home .fine { grid-column: 2; grid-row: 3; text-align: left; font-size: 1.2rem; }

  @media (max-height: 50rem) {
    .home .logo { width: min(24rem, 40cqh, 46cqw); }
    .home .frog[data-pose="write"] { width: min(40cqh, 32cqw); }
    .home .perch { width: min(35cqh, 28cqw); }
    .home .deck { row-gap: 0.6rem; padding-top: 0.8rem; }
  }
}

/* ---------- The result on a computer ----------
   app.js builds it differently there (showEnd): a wide scene of the frog at its height with the verdict on a card,
   the tree of every frog as a column on the right, and the deep water below. ".climb" is only ever set on a computer. */
@media (min-width: 56rem) and (min-height: 34rem) {
  .climb { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
  .climb > .stage:not(.tree) { grid-column: 1; grid-row: 1; min-height: 0; }
  .climb > .tree { grid-column: 2; grid-row: 1; height: auto; min-height: 0; border-left: 5px solid #000; }
  .climb > .deck { grid-column: 1 / -1; grid-row: 2; max-height: 46vh; }

  .climb .frog, .climb .perch, .climb .stem.reed { top: 80%; }
  .climb .frog { width: min(36cqh, 28cqw); }
  .climb .frog[data-pose="splash"], .climb .frog[data-pose="astronaut"] { width: min(40cqh, 30cqw); }
  .climb .perch { width: min(39cqh, 30cqw); }
  .climb .perch[data-kind="leaf"], .climb .perch[data-kind="cloud"] { width: min(43cqh, 34cqw); }
  .climb .perch[data-kind="branch"] { left: calc(50% - 39cqh); width: 70cqh; }

  /* the verdict: a card over the scene, like the question in a round */
  .verdict-card {
    position: absolute; z-index: 3; left: 50%; top: 1.4rem; translate: -50% 0; width: min(40rem, 100% - 3rem);
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 1.1rem;
    padding: 0.8rem 1.4rem 0.9rem 0.9rem; background: var(--cream); color: var(--navy);
    border: 4px solid var(--navy); border-radius: 12px; box-shadow: 0 6px 0 var(--navy);
  }
  .verdict-card .medal { grid-row: 1 / 3; width: 5.2rem; height: 5.2rem; margin: 0; }
  .verdict-card .verdict { text-align: left; font-size: clamp(1.8rem, 4.6cqh, 2.6rem); }
  .verdict-card .total { text-align: left; font-size: 1.4rem; }
  .verdict-card .total b { color: var(--navy); font-size: 2.6rem; }

  /* the deep water: the five flies and the ways out on the left, today's board on the right (it scrolls in its own box) */
  .climb .deck { row-gap: 0.8rem; align-content: start; padding-top: 1.1rem; }
  .climb .catches, .climb .share, .climb .pair, .climb .fine { grid-column: 2; }
  .climb .catches li { font-size: 1.7rem; padding: 0.45rem 0 0.5rem; }
  .climb .catches .missed { font-size: 1.35rem; padding-top: 0.6rem; }
  .climb .fine { text-align: left; }
  .climb .board-box { grid-column: 3; grid-row: 1 / span 4; align-self: stretch; contain: size; min-height: 12rem; overflow-y: auto; overscroll-behavior: contain;
    padding: 0.7rem 0.9rem; border-radius: 10px; background: rgb(14 20 40 / 0.45); scrollbar-width: thin; scrollbar-color: rgb(247 243 227 / 0.25) transparent; }

  /* the leaderboard: the same, but the board is the point, so it takes the wide column and the doors go on the right */
  .board-screen .verdict-card { grid-template-columns: auto auto; justify-content: center; width: auto; max-width: min(40rem, 100% - 3rem); }
  .verdict-card:not(:has(.total)) .medal { grid-row: auto; } /* before today's round there is no score: just the medal and the title */
  .board-screen .board-box { grid-column: 2; grid-row: 1 / span 3; min-height: max(14rem, 30vh); }
  .board-screen .deck > .go, .board-screen .deck > .ghost { grid-column: 3; align-self: start; }
}

/* ---------- The tree's title, and the profile, on a computer ---------- */
@media (min-width: 56rem) and (min-height: 34rem) {
  /* beside the scene, the tree needs to say what it is: a label that stays at the top while it scrolls */
  .climb .tree-label { display: block; position: sticky; top: 0.7rem; z-index: 4; width: fit-content; margin: 0 auto -2.3rem;
    padding: 0.15rem 0.8rem 0.25rem; border: 3px solid var(--night); border-radius: 999px; background: var(--navy); color: var(--cream); font-size: 1.25rem; }
  .climb .tree-label::before { content: "\25B2\00A0"; color: var(--yellow); }
  .climb .tree-label::after { content: "\00A0\25BC"; color: var(--yellow); }

  /* the profile: the player's frog in the pond on top, everything to choose in three columns in the deep water */
  .profile { flex-direction: column; }
  .profile .stage { flex: 1 1 0; height: auto; min-height: 14rem; }
  .profile .hud { left: 1.8rem; right: 1.8rem; top: 1.2rem; }
  .profile .home-link { padding: 0.15rem 0.8rem 0.25rem; border: 3px solid var(--night); border-radius: 999px; font-size: 1.4rem; }
  .profile .frog, .profile .perch { top: 82%; }
  .profile .frog { width: min(42cqh, 30cqw); }
  .profile .perch { width: min(42cqh, 32cqw); }
  .profile .deck {
    width: auto; max-height: 72vh; overflow-y: auto; justify-content: normal;
    display: grid; column-gap: 2.2rem; row-gap: 1rem; align-items: start;
    grid-template-columns: minmax(1.5rem, 1fr) repeat(3, minmax(0, 23rem)) minmax(1.5rem, 1fr);
    grid-template-areas:
      ". title  title  title   ."
      ". name   lang   account ."
      ". frog   colour account ."
      ". frog   look   account ."
      ". frog   stats  guesses ."
      ". frog   places home    .";
    padding: 1.1rem 0 calc(1.4rem + env(safe-area-inset-bottom));
    border-left: 0; border-top: 5px solid #000;
    background: linear-gradient(#1d4a66, var(--navy) 30%, var(--night));
  }
  .profile .deck > .verdict { grid-area: title; text-align: left; font-size: 2.2rem; }
  .profile .part-name { grid-area: name; }
  .profile .part-frog { grid-area: frog; }
  .profile .part-language { grid-area: lang; }
  .profile .part-colour { grid-area: colour; }
  .profile .part-stats { grid-area: stats; }
  .profile .part-places { grid-area: places; }
  .profile .part-account { grid-area: account; }
  .profile .part-look { grid-area: look; }
  .profile .part-guesses { grid-area: guesses; }
  .profile .deck > .ghost:last-child { grid-area: home; align-self: end; }
}

/* ---------- The paid plan on a computer ----------
   The proud frog and the golden fly in the pond on top; in the deep water, the pitch and the four perks on the left,
   the way to pay (or the thank-you) on the right. */
@media (min-width: 56rem) and (min-height: 34rem) {
  .plan { flex-direction: column; }
  .plan .stage { flex: 1 1 0; height: auto; min-height: 14rem; }
  .plan .hud { left: 1.8rem; right: 1.8rem; top: 1.2rem; }
  .plan .home-link { padding: 0.15rem 0.8rem 0.25rem; border: 3px solid var(--night); border-radius: 999px; font-size: 1.4rem; }
  .plan .frog, .plan .perch { top: 82%; }
  .plan .frog { width: min(42cqh, 30cqw); }
  .plan .perch { width: min(42cqh, 32cqw); }
  .plan .fly { left: 60%; top: 30%; width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem; }
  .plan .deck {
    width: auto; max-height: 60vh; overflow-y: auto; justify-content: normal;
    display: grid; grid-template-columns: minmax(1.5rem, 1fr) minmax(0, 44rem) minmax(0, 26rem) minmax(1.5rem, 1fr);
    column-gap: 2rem; row-gap: 0.9rem; align-items: start;
    padding: 1.1rem 0 calc(1.4rem + env(safe-area-inset-bottom));
    border-left: 0; border-top: 5px solid #000;
    background: linear-gradient(#1d4a66, var(--navy) 30%, var(--night));
  }
  .plan .deck > * { grid-column: 2; }
  .plan .verdict { grid-column: 2 / 4; grid-row: 1; text-align: left; font-size: 2.2rem; }
  .plan .pitch { grid-row: 2; text-align: left; font-size: 1.45rem; }
  .plan .perks { grid-row: 3 / span 2; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .plan .deck:not(:has(.pitch)) .perks { grid-row: 2 / span 3; }
  .plan .perks li { padding: 0.7rem 0.5rem 0.8rem; font-size: 1.2rem; border-radius: 9px; }
  .plan .perks img { width: 4rem; height: 4rem; }
  .plan .deck > .go, .plan .deck > .google, .plan .deck > .thanks { grid-column: 3; grid-row: 2; }
  .plan .deck > .go { font-size: 1.9rem; }
  .plan .deck > .thanks { text-align: left; font-size: 1.8rem; }
  .plan .deck > .fine { grid-column: 3; grid-row: 3; text-align: left; }
  .plan .deck > .ghost:last-child { grid-column: 3; grid-row: 4; }
}

@media (prefers-reduced-motion: reduce) {
  .world { transition: none; }
  .frog.hop .frog-img, .frog.hop .frog-film, .frog.hop::before, .pop.run, .fly .up, .fly .down, .plan .fly, .pond-lap i { animation: none; }
  .fly .down { opacity: 0; }
}

/* The privacy page (privacy.html): plain reading text on the game's colours. */
.privacy { height: auto; font-family: var(--plain); font-size: 1rem; line-height: 1.5; letter-spacing: 0; }
.privacy main { max-width: 38rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.privacy h1, .privacy h2 { font-family: var(--pixel); font-weight: normal; color: var(--yellow); }
.privacy h1 { font-size: 2.5rem; }
.privacy h2 { font-size: 1.6rem; margin-top: 1.75rem; }
.privacy p, .privacy ul { margin-top: 0.75rem; }
.privacy ul { list-style: disc; padding-left: 1.25rem; }
.privacy li + li { margin-top: 0.4rem; }
.privacy a { color: var(--yellow); }
.privacy .when { opacity: 0.7; font-size: 0.9rem; }
