/* 00-tokens.css */
/* The app's colours, one name each. Navy and slate for everything; gold mainly for stars and rewards; green and red
 mainly for right and wrong (also trends, ticks and error lines). Use these names; never write a colour by hand. */
:root {
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --navy: #1e3a8a;
  --navy-deep: #172554;
  --navy-ink: #0f1d4a;
  --navy-night: #0b1430;
  --sky-400: #38bdf8;
  --surface: #f8f9ff;
  --surface-2: #eff4ff;
  --surface-3: #e5eeff;
  --line-soft: #eef2f7;
  --line-cool: #eef0f7;
  --ink-blue: #0b1c30;
  --ink-grey: #464555;
  --sky-wash: #eaf6ff;
  --gold: #e8ab5b;
  --gold-deep: #a06a1e;
  --gold-light: #fbf0dc;
  --gold-ink: #8a5a17;
  --gold-cream: #fdf7ec;
  --gold-sand: #f3d9a8;
  --gold-bright: #f2c15a;
  --gold-mid: #d2973b;
  --gold-soft: #e8c48e;
  --amber-500: #f59e0b;
  --amber-700: #b45309;
  --green-ok: #20bf6b;
  --green-ok-bg: #dcf7e8;
  --emerald-500: #10b981;
  --emerald-700: #047857;
  --green-600: #16a34a;
  --red-bad: #e5484d;
  --red-bad-bg: #ffe3e4;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --pink-d: #ff5c93;
  /* match-the-following: each pair of the answer picked has its own colour in the two columns (10-match-table.js); never
   green or red, which mean right and wrong */
  --pair-1: #3b82f6;
  --pair-1-bg: #eff6ff;
  --pair-2: #d97706;
  --pair-2-bg: #fffbeb;
  --pair-3: #0d9488;
  --pair-3-bg: #f0fdfa;
  --pair-4: #db2777;
  --pair-4-bg: #fdf2f8;
  --pair-5: #64748b;
  --pair-5-bg: #f1f5f9;
  --blue-d: #2c73ff;
  --blue: #bfe3ff;
  /* from the screen files: the games' forest and bark, the wrong-answer rose, input and hover washes */
  --bark: #7a4a1e;
  --black: #000000;
  --emerald-200: #a7f3d0;
  --emerald-50: #ecfdf5;
  --emerald-600: #059669;
  --field: #eff2fd;
  --forest-night: #06211d;
  --forest: #0f3a34;
  --gold-badge-bg: #fff7e0;
  --gold-badge: #f5b301;
  --gold-frame: #e9b45c;
  --desk-mint: #9ad9c3; /* OlyMatch's chalkboard tray on the school desk (art/match/bg_desk.webp) */
  --desk-wood: #ecc68e;
  --desk-wood-dark: #c48d52;
  --library-wood: #6f4c3c; /* OlyTower's library shelves (art/tower/bg_library.webp), beside the game on a wide screen */
  --library-leather: #7a1f24; /* OlyTower's red leather book covers (its 3D buttons, counters) */
  --green-500: #22c55e;
  --hover-wash: #f8faff;
  --line-tab: #eef2f6;
  --navy-bright: #2747a8;
  --navy-dusk: #111c38;
  --olyhoo-mouth: #7a2f35;
  --passage: #f7f6ff;
  --picture-wash: #f8f9fc;
  --rose-100: #ffe4e6;
  --rose-200: #fecdd3;
  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-50: #fff1f2;
  --rose-700: #be123c;
  --surface-mist: #e8eefb;
  /* "-rgb": a colour's base for see-through shades, used as rgba(var(--navy-rgb), 0.15) */
  --amber-100-rgb: 254, 243, 199;
  --amber-400-rgb: 251, 191, 36;
  --bark-night-rgb: 38, 20, 8;
  --desk-green-rgb: 40, 110, 88; /* the tray's cell lines and shading */
  --black-rgb: 0, 0, 0;
  --blue-800-rgb: 30, 64, 175;
  --dock-rgb: 247, 248, 255;
  --emerald-500-rgb: 16, 185, 129;
  --forest-mist-rgb: 6, 28, 24;
  --forest-shade-rgb: 4, 24, 22;
  --blue-100-rgb: 219, 234, 254;
  --blue-200-rgb: 191, 219, 254;
  --blue-50-rgb: 239, 246, 255; /* the light blues as numbers; never indigo or purple */
  --navy-deep-rgb: 23, 37, 84;
  --navy-rgb: 30, 58, 138;
  --sky-500-rgb: 14, 165, 233;
  --slate-200-rgb: 226, 232, 240;
  --slate-50-rgb: 248, 250, 252;
  --slate-900-rgb: 15, 23, 42;
  --white-rgb: 255, 255, 255;
}

/* 10-base.css */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  /* no pull-down-to-refresh: a pull at the top reloaded the whole app and sent the child back to
 Home, as a web page does and an app never does; the page still scrolls and bounces as before */
  overscroll-behavior-y: none;
}
/* an app, not a web page: on a touch screen a long press does not select text or offer to save a
 picture, and a double tap does not zoom; typing boxes still select, copy and paste. A computer keeps its mouse ways */
@media (hover: none) {
  body {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
  }
  input,
  textarea,
  select,
  [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
  }
  img {
    -webkit-user-drag: none;
  }
}
.screen {
  display: none;
}
.screen.on {
  display: block;
  animation: pop 0.25s ease-out;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes popFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
h1 {
  font-size: 28px;
  margin: 4px 0 6px;
}
h2 {
  font-size: 21px;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
  margin: 14px 0 8px;
}
p {
  line-height: 1.45;
}
@media (max-width: 999.98px) {
  .muted {
    color: var(--slate-500);
  }
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
}
.btn.sm {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
input[type='text'],
input[type='number'],
select {
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-900);
  width: 100%;
}
/* a box that opens only after the one before it is filled (State, then City, then School) */
input[type='text']:disabled {
  background: var(--slate-50);
  border-color: var(--slate-100);
  color: var(--slate-500);
}
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
}
/* a box with suggestions (City, School): the same chevron as a select, not the browser's own black arrow; shown while empty or typed in, so a chosen name such as
 "Coimbatore" keeps the whole width */
input[list]::-webkit-calendar-picker-indicator {
  /* newer Chrome draws the arrow even with display: none; no width and no opacity remove it there too */
  display: none;
  opacity: 0;
  width: 0;
  margin: 0;
  padding: 0;
}
input[list]:not(:disabled):placeholder-shown,
input[list]:not(:disabled):focus {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.btn.block {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}
.danger-zone {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--slate-200);
}
.danger-zone .linkbtn {
  padding: 0;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}
.credits > summary {
  list-style: none;
  cursor: pointer;
}
.credits > summary::-webkit-details-marker {
  display: none;
}
label.f {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin: 8px 0 4px;
}
@keyframes pulse {
  50% {
    transform: scale(1.07);
  }
}
.pic {
  display: flex;
  justify-content: center;
  margin: 6px 0 14px;
}
.pic .photos img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 14px;
}
.pic img.fig {
  display: block;
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  background: var(--white);
  border-radius: 14px;
  padding: 6px;
}
@keyframes spkPulse {
  50% {
    box-shadow: 0 0 0 8px rgba(var(--navy-rgb), 0.15);
  }
}
.pic .emoji {
  font-size: 84px;
  line-height: 1;
}
.photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.photos img {
  max-width: min(240px, 100%);
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 2px 0 var(--slate-200);
}
.photos img:only-child {
  max-width: min(300px, 100%);
  max-height: 240px;
}
/* parents */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--slate-200);
}
th {
  color: var(--slate-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
details summary {
  cursor: pointer;
  font-weight: 800;
}
/* confetti */
.burst {
  position: fixed;
  pointer-events: none;
  font-size: 26px;
  z-index: 50;
  animation: fly 1s ease-out forwards;
}
@keyframes fly {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--r));
    opacity: 0;
  }
}
.rain {
  position: fixed;
  top: -40px;
  pointer-events: none;
  font-size: 26px;
  z-index: 60;
  animation: rain var(--t) linear var(--d) forwards;
}
/* a star in a shower or a burst is the 3D star picture (05-sound-pictures.js showerBit) */
.rain img,
.burst img {
  display: block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
}
@keyframes rain {
  to {
    transform: translate(var(--dx), calc(100vh + 80px)) rotate(var(--r));
  }
}
@keyframes hooray {
  15% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
  30% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0;
  }
}
@keyframes bob {
  50% {
    transform: translateY(-6px);
  }
}
.btn.ghost:active {
  box-shadow: none;
}
.sechead h2 {
  margin: 0;
}
body {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  color: var(--slate-900);
}
@media (max-width: 999.98px) {
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  }
}
/* the thin "No internet" bar along the top: it pushes the page and the pinned headers down by
 its height, so it never covers a button or an answer */
:root {
  --net-top: 0px;
}
body.offline {
  --net-top: calc(28px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
}
.net-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--net-top);
  padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}
body.offline .wrap {
  margin-top: 28px;
}
.wrap {
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid rgba(var(--slate-200-rgb), 0.6);
  border-right: 1px solid rgba(var(--slate-200-rgb), 0.6);
}
@media (max-width: 999.98px) {
  .wrap {
    padding: 14px 14px 48px;
    max-width: 430px;
    padding: calc(14px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px 110px;
  }
}
.btn:active {
  transform: scale(0.97);
  box-shadow: none;
}
.btn.pink {
  box-shadow: 0 4px 0 var(--navy-deep); /* 3D */
}
.btn.pink:active {
  box-shadow: none;
}
/* bottom tab bar */
.tabbar {
  position: fixed;
  border-top: 1px solid var(--slate-200);
  z-index: 40;
  grid-template-columns: repeat(5, 1fr); /* Home, Friends, Arcade, Reports, Settings */
}
@media (max-width: 999.98px) {
  .tabbar {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(var(--white-rgb), 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 12px calc(12px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
    display: grid;
    box-shadow: 0 -4px 16px rgba(var(--black-rgb), 0.03);
  }
}
.tabbar button {
  background: none;
  display: flex;
  align-items: center;
}
@media (max-width: 999.98px) {
  .tabbar button {
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-400);
    padding: 2px 0;
  }
}
.tabbar button.dot .ti::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue-800);
  border: 2px solid var(--white);
}
body.inquiz .tabbar {
  display: none;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 999.98px) {
  .pagehead {
    margin: 2px 2px 12px;
  }
}
.chlist .ch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--slate-200);
}
.chlist .ch:first-child {
  border-top: none;
}
.chlist .ch .sc {
  margin-left: auto;
  font-weight: 800;
  white-space: nowrap;
}
/* the line icons (icon() in src/js/01-icons-owl-says.js) */
.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}
.btn {
  color: var(--white);
  font-size: 17px;
  padding: 12px 20px;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
  box-shadow: 0 4px 0 var(--navy-deep); /* 3D: a solid edge it presses into */
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tabbar button .ti {
  display: grid;
  place-items: center;
  font-size: 17px;
  position: relative;
  filter: none;
  opacity: 1;
}
@media (max-width: 999.98px) {
  .tabbar button .ti {
    width: 30px;
    height: 28px;
    border-radius: 8px;
    color: var(--slate-400);
  }
}
.tabbar button .ti .i3d {
  object-fit: contain;
}
@media (max-width: 999.98px) {
  .tabbar button .ti .i3d {
  width: 26px;
  height: 26px;
  }
}
/* the tabs not open: their 3D pictures a little quieter */
.tabbar button:not(.on) .ti .i3d {
  filter: saturate(0.55);
  opacity: 0.75;
}
.i3d {
  object-fit: contain;
}
.tabbar button.on .ti {
  filter: none;
  opacity: 1;
}
@media (max-width: 999.98px) {
  .tabbar button.on .ti {
    background: var(--blue-50);
    color: var(--navy);
  }
}
.avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--gold-light);
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--gold-sand);
}
.stars {
  font-size: 22px;
  letter-spacing: 2px;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  flex-wrap: wrap;
}
@keyframes sparkle {
  50% {
    transform: translateY(-3px) rotate(3deg) scale(1.03);
  }
}
.grad {
  background: linear-gradient(90deg, var(--navy-deep), var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fld {
  margin-bottom: 16px;
}
.fld label,
.fld .lab label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--slate-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.fld .lab {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inp {
  position: relative;
}
.inp.sel > .i:last-child {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--slate-500);
  pointer-events: none;
}
.inp input::placeholder {
  color: var(--slate-400);
  font-weight: 400;
}
.inp input:focus,
.inp select:focus {
  background: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(var(--blue-800-rgb), 0.15);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
}
.btn.cta {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  box-shadow:
    0 6px 0 var(--navy-ink),
    0 10px 20px -3px rgba(var(--navy-rgb), 0.45);
}
.btn.cta:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--navy-ink),
    0 4px 10px -2px rgba(var(--navy-rgb), 0.4);
}
.review h2 {
  font-size: 18px;
}
.cbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-700);
  display: grid;
  place-items: center;
  border: none;
  flex: none;
}
.cbtn:active {
  transform: scale(0.95);
}
.c-mid {
  text-align: center;
}
.c-mid h1 {
  font-size: 17px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: -0.02em;
}
.c-meta {
  margin-top: 3px;
}
.c-meta .chip {
  margin: 0;
  font-size: 11px;
}
@keyframes olyhooTap {
  0% {
    transform: none;
  }
  30% {
    transform: translateY(-14px) rotate(-8deg) scale(1.08);
  }
  60% {
    transform: translateY(0) rotate(6deg);
  }
  100% {
    transform: none;
  }
}
@keyframes olyhooPose {
  0% {
    transform: scale(0.7) translateY(8px);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes owlhop {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
}
@keyframes owlwiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}
@keyframes owltilt {
  0%,
  100% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(-7deg);
  }
}
.pset {
  padding: 0;
}
.qlist {
  margin-top: 4px;
}
.inst-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--slate-700);
}
.linkbtn {
  background: none;
  border: 0;
  padding: 8px 0 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.linkbtn.danger {
  color: var(--red-700);
  text-decoration: underline;
}

#nav-friends .ti {
  position: relative;
}
.inst-sheet {
  text-align: center;
  overflow: visible;
}
.inst-sheet img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: -74px auto 4px;
  filter: drop-shadow(0 8px 10px rgba(var(--slate-900-rgb), 0.25));
}
.inst-sheet h3 {
  font-family: Fredoka, Nunito, system-ui;
  font-size: 20px;
  margin: 2px 0 4px;
}
.inst-sheet .inst-steps {
  text-align: left;
  display: inline-block;
  margin: 0 0 10px;
  padding-left: 22px;
  font-weight: 700;
}
.inst-sheet .linkbtn {
  display: block;
  margin: 6px auto 0;
  color: var(--slate-500);
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  width: max-content; /* its own width: placed at 50%, it would otherwise wrap at half the screen */
  max-width: calc(100vw - 32px);
  text-align: center;
  background: var(--navy-deep);
  color: var(--white);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: 0.25s;
  z-index: 80;
  pointer-events: none;
}
#toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@keyframes olyhooBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.01);
  }
}
@keyframes olyhooSpeak {
  0% {
    transform: translateY(0) rotate(0);
  }
  20% {
    transform: translateY(-4px) rotate(-3deg) scale(1.03);
  }
  45% {
    transform: translateY(-1px) rotate(3deg) scale(1.01);
  }
  70% {
    transform: translateY(-4px) rotate(-2deg) scale(1.04);
  }
  85% {
    transform: translateY(-2px) rotate(2deg);
  }
  100% {
    transform: translateY(0) rotate(0);
  }
}
@keyframes olyhooPing {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  80%,
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
@keyframes olyhooBar {
  0%,
  100% {
    height: 3px;
  }
  50% {
    height: 11px;
  }
}
@keyframes pickWiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
@keyframes answerGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--emerald-500-rgb), 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--emerald-500-rgb), 0.25);
  }
}
@keyframes olyhooDock {
  0%,
  100% {
    transform: scale(1.15) translateY(2px) rotate(0);
  }
  30% {
    transform: scale(1.2) translateY(-1px) rotate(-2deg);
  }
  70% {
    transform: scale(1.18) translateY(1px) rotate(2deg);
  }
}
@keyframes olyhooHalo {
  0% {
    transform: scale(0.96);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(var(--navy-rgb), 0.4);
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 0 0 10px rgba(var(--navy-rgb), 0);
  }
  100% {
    transform: scale(0.96);
    opacity: 0.8;
  }
}
@keyframes olyhooSway {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-2.5deg);
  }
  75% {
    transform: rotate(2.5deg);
  }
}
@keyframes olyhooMouth {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1.3);
  }
}
@keyframes olyhooIdle {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015, 1.025);
  }
}
img[src*='flag_'] {
  outline: 1px solid var(--slate-300);
  outline-offset: 0;
  border-radius: 2px;
}
@media (max-width: 999.98px) {
  body,
  .wrap {
    background: var(--surface);
  }
}
.card {
  background: var(--white);
  margin-bottom: 14px;
  /* the app's 3D look: a light border and a solid edge underneath */
  border: 2px solid var(--slate-200);
}
@media (max-width: 999.98px) {
  .card {
    padding: 18px;
    border-radius: 18px;
    border: 2px solid var(--slate-200);
    border-bottom-width: 5px;
    box-shadow: none;
  }
}
.tile-ic,
.gk .ic,
.computer .ic,
.maths .ic,
.science .ic,
.english .ic,
.social .ic,
.tile-ic.gk,
.tile-ic.computer,
.tile-ic.maths,
.tile-ic.science,
.tile-ic.english,
.tile-ic.social {
  background: var(--surface-3);
  color: var(--navy);
  border: none;
  box-shadow: none;
}
.chip {
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
  background: var(--surface-2);
  border-color: transparent;
  color: var(--navy);
}
.btn,
.btn.pink,
.btn.cta {
  background: var(--navy);
}
.btn.ghost {
  color: var(--slate-700);
  border: 2px solid var(--slate-200);
  border-bottom-width: 4px; /* 3D: a white button's edge is light grey */
  box-shadow: none;
  background: var(--white);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--navy-deep);
}
.btn.ghost:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: none;
}
.tabbar button.on {
  font-weight: 800;
}
@media (max-width: 999.98px) {
  .tabbar button.on {
    color: var(--navy);
  }
}
.c-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}
.g-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin: 4px 0;
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 999.98px) {
  .or {
    color: var(--slate-400);
  }
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}
.code-row .btn {
  white-space: nowrap;
}
.tiny {
  font-size: 11px;
  line-height: 1.4;
  margin: 8px 0 0;
}
.acct {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acct .who {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-grey);
}
.tile-ic {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  vertical-align: middle;
  margin-right: 10px;
  font-size: 28px;
  line-height: 1;
}
.tile-ic.sm {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  margin: 0;
  font-size: 18px;
}
.tile-ic.big {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 6px;
  display: grid;
  font-size: 44px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 26%) 52px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--slate-700);
}
.sb-n em {
  font-style: normal;
  color: var(--slate-400);
  font-size: 11.5px;
  font-weight: 600;
}
.sb-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}
.sb-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-400), var(--navy));
}
.sb-s {
  text-align: right;
  color: var(--slate-900);
  font-size: 13.5px;
}
.sb-s em {
  font-style: normal;
  color: var(--slate-400);
  font-weight: 600;
  font-size: 12px;
}
button.sb {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}
.sb .tr {
  margin-left: 5px;
}
.tr {
  font-weight: 900;
  font-size: 13px;
}
.tr.up {
  color: var(--emerald-600);
}
.tr.down {
  color: var(--red-600);
}
/* simple delete: a small cross on each row; Select shows tick boxes, Select all and Delete (N) */
.rowx {
  flex: none;
  margin: 0 -4px 0 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--slate-400);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 999.98px) {
  .rowx {
    width: 30px;
    height: 30px;
  }
}
/* a phone has no mouse: a tapped item kept this look after the finger left */
@media (hover: hover) {
  .rowx:hover {
    background: var(--slate-100);
    color: var(--slate-600);
  }
}
.sel-t {
  float: right;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  color: var(--navy);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.coins {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-sand));
  color: var(--gold-ink);
  font-weight: 900;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 16px;
  box-shadow: inset 0 -2px 0 var(--gold);
}
@keyframes mtPop {
  40% {
    transform: scale(1.25);
    filter: brightness(1.8);
  }
  to {
    transform: scale(0.1);
    opacity: 0;
  }
}
@keyframes mtHint {
  50% {
    transform: scale(1.18) rotate(8deg);
  }
}
@keyframes bkBurst {
  40% {
    transform: scale(1.18);
    filter: brightness(1.7);
  }
  to {
    transform: scale(0.2) rotate(40deg);
    opacity: 0;
  }
}
@keyframes bkDrop {
  from {
    transform: scale(1.25);
  }
}
button.ch {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
}
@keyframes otipRing {
  to {
    box-shadow:
      0 0 0 9px rgba(var(--amber-400-rgb), 0.12),
      0 0 30px rgba(var(--amber-400-rgb), 0.9);
    transform: scale(1.02);
  }
}
@keyframes otipFly {
  from {
    transform: translate(-110vw, 30vh) rotate(-28deg);
  }
  60% {
    transform: translate(8px, -10px) rotate(6deg);
  }
  to {
    transform: none;
  }
}
@keyframes otipBob {
  50% {
    transform: translateY(-7px);
  }
}
@keyframes otipWave {
  from {
    transform: rotate(-7deg);
  }
  to {
    transform: rotate(6deg);
  }
}
@keyframes otipSpark {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4) translateY(4px);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) translateY(-6px);
  }
}
@keyframes otipPop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fcIn {
  from {
    transform: translateX(-50%) translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%);
    opacity: 1;
  }
}
.sechead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 2px 10px;
}
/* type scale: 13 / 15 / 17 / 20 / 24, and the big numbers */
.pagehead h1 {
  margin: 0;
}
@media (max-width: 999.98px) {
  .pagehead h1 {
    font-size: 24px;
  }
}
#ch-body .tile-ic.big {
  width: 96px;
  height: 96px;
  border-radius: 28px;
}
#ch-body h2 {
  font-size: 24px;
}
/* the star a child earns and plays with: the 3D gold star (art/ui3d/star-3d.webp), the same one everywhere */
.gstar {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.24em;
  object-fit: contain;
}
/* a text box with its button (email, code, password on Welcome): with big text the button drops to its own line */
.code-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.code-row input {
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  font-size: 15px;
  background: var(--slate-50);
  flex: 1 1 150px;
  min-width: 0;
}
.tile-ic .spic {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
/* the dim layer behind a question box (askBox): navy, like the rest of the app */
.askbox {
  position: fixed;
  inset: 0;
  background: rgba(var(--navy-deep-rgb), 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 16px;
}
/* what Olyhoo is talking about glows while it is said: a soft amber ring, one thing at a time */
@keyframes glowPulse {
  from {
    outline-color: var(--gold);
  }
  to {
    outline-color: var(--gold-light);
  }
}
/* the child's chip at the foot of the desktop menu (src/css/97-desktop.css): never on a phone or tablet */
@media (max-width: 999.98px) {
  .tb-me {
    display: none;
  }
}
/* the few words with a question report (noteBox) */
.ask-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 2px solid var(--slate-200);
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  resize: none;
}
/* the code box (Arcade lock) */
.code-in {
  display: block;
  width: 180px;
  margin: 10px auto 0;
  padding: 10px 12px;
  font-size: 26px;
  letter-spacing: 0.4em;
  text-align: center;
  border: 2px solid var(--slate-200);
  border-radius: 14px;
}
.askbox .linkbtn {
  display: block;
  margin: 2px auto 14px;
  font-size: 14px;
}
/* a picture that cannot load (no internet): a calm note in its place, never an empty space (src/js/05-sound-pictures.js) */
.pic-off {
  display: block;
  padding: 10px 12px;
  border: 2px dashed var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.opt .pic-off {
  padding: 6px 4px;
  font-size: 12px;
}

/* the update bar on Home, in the Play app (20-start.js updateBar): above the tab bar, the toast's look */
#upd-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(84px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border-radius: 18px;
  background: var(--navy-deep);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(var(--navy-deep-rgb), 0.25);
}
#upd-bar span {
  flex: 1;
  min-width: 0;
}
#upd-bar .btn {
  background: var(--white);
  color: var(--navy-deep);
  box-shadow: none;
}
#upd-bar .upd-x {
  border: 0;
  background: none;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

/* the install bar (20-get-app.js): an Android phone in a web browser, at the very top of the opening screen (front page
 or Home), in the page's flow so nothing sits under it; hidden on every other screen (by the code) */
#getapp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 10px 8px 14px;
  background: var(--navy-deep);
  color: var(--white);
}
#getapp img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
#getapp b {
  flex: 1;
  min-width: 0;
  font-size: 16px;
}
#getapp .getapp-go {
  background: var(--white);
  color: var(--navy-deep);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  text-decoration: none;
}
#getapp .getapp-x {
  border: 0;
  background: none;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

/* 90-arcade.css */
/* ---- Arcade: stars and games ---- */
.gm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.gm-head h2 {
  margin: 0;
}
.gm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gm-tile {
  position: relative;
  border: 0;
  border-radius: 20px;
  padding: 16px 12px 12px;
  background: linear-gradient(160deg, var(--g1), var(--g2));
  color: var(--white);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(var(--black-rgb), 0.12);
  text-align: left;
  min-height: 130px;
}
.gm-tile:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(var(--black-rgb), 0.12);
}
.gm-tile.poster {
  grid-column: auto;
  aspect-ratio: 1/1;
  min-height: 0;
  background-image: var(--poster); /* set per game in renderProfile */
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 12px; /* the picture fills the box; 12px of room round the name and badges */
}
.gm-tile.poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--forest-shade-rgb), 0) 45%, rgba(var(--forest-shade-rgb), 0.82));
  border-radius: inherit;
}
.gm-tile.poster > * {
  position: relative;
}
.gm-tile.poster b {
  font-family: Fredoka, Nunito, system-ui;
  font-size: 19px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(var(--black-rgb), 0.5);
}
.gm-tile.poster .gm-best {
  background: rgba(var(--forest-shade-rgb), 0.6);
  font-size: 12px;
  padding: 3px 10px;
}
.gm-art {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(var(--black-rgb), 0.2));
}
.gm-tile b {
  font-size: 17px;
  margin-top: auto;
}
.gm-cost {
  background: rgba(var(--white-rgb), 0.92);
  color: var(--gold-ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 900;
  font-size: 12.5px;
}
.gm-best {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(var(--black-rgb), 0.22);
  border-radius: 999px;
  padding: 2px 8px;
}
#s-game {
  position: fixed;
  top: var(--net-top);
  bottom: 0;
  left: 50%;
  width: min(100vw, calc(100vh * 0.62)); /* engines before dvh (Chrome 108) */
  width: min(100vw, calc(100dvh * 0.62));
  transform: translateX(-50%);
  z-index: 60;
  background: var(--forest);
  padding: 0;
  max-width: none;
}
#s-game::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: var(--forest-night);
  z-index: -1;
}
#s-game:not(.on) {
  display: none;
}
.gm-scr {
  position: fixed;
  top: var(--net-top);
  bottom: 0;
  left: 50%;
  width: min(100vw, calc(100vh * 0.62)); /* engines before dvh (Chrome 108) */
  width: min(100vw, calc(100dvh * 0.62));
  transform: translateX(-50%);
  z-index: 60;
  padding: 0;
  max-width: none;
  background: var(--forest) url(art/fly/forest.webp) center/cover;
  box-shadow: 0 0 0 100vw var(--forest-night);
  font-family: Fredoka, Nunito, system-ui;
}
.gm-scr:not(.on) {
  display: none;
}
/* OlyTower is played in a library: its shelves' wood beside the game on a wide screen */
#s-tower {
  box-shadow: 0 0 0 100vw var(--library-wood);
}
/* OlyMatch is played on a sunny school desk */
#s-match {
  background: var(--desk-wood) url(art/match/bg_desk.webp) center/cover;
  box-shadow: 0 0 0 100vw var(--desk-wood);
}
.gm-scr > .fly-hud,
.gm-scr > .mz-pad,
.gm-scr > .bk-stage,
.gm-scr > .fly-card {
  z-index: 1;
}
#hp-cv,
#fp-cv,
#mz-cv,
#so-cv,
#tw-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}
.mt-board {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(100vh - 250px));
  max-width: min(100%, calc(100dvh - 250px));
  aspect-ratio: 1;
  border-radius: 22px;
  /* a mint chalkboard tray in a light wooden frame, its 7 by 7 places marked with soft lines */
  background:
    linear-gradient(rgba(var(--desk-green-rgb), 0.16) 2px, transparent 2px) 0 0 / calc(100% / 7) calc(100% / 7),
    linear-gradient(90deg, rgba(var(--desk-green-rgb), 0.16) 2px, transparent 2px) 0 0 / calc(100% / 7) calc(100% / 7),
    radial-gradient(circle at 50% 40%, rgba(var(--white-rgb), 0.25), transparent 70%),
    var(--desk-mint);
  box-shadow:
    inset 0 0 0 3px rgba(var(--white-rgb), 0.45),
    inset 0 6px 14px rgba(var(--desk-green-rgb), 0.25),
    0 0 0 7px var(--desk-wood),
    0 0 0 10px var(--desk-wood-dark),
    0 18px 30px rgba(var(--bark-night-rgb), 0.35);
  touch-action: none;
  overflow: hidden;
}
.mt-t {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% / 7);
  height: calc(100% / 7);
  display: grid;
  place-items: center;
  transition: transform 0.22s cubic-bezier(0.3, 0.8, 0.4, 1.15);
  will-change: transform;
}
.mt-t img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(var(--desk-green-rgb), 0.45));
}
.mt-t.sel img {
  transform: scale(1.14);
  filter: drop-shadow(0 0 10px var(--gold-sand));
}
.mt-t.pop img {
  animation: mtPop 0.2s ease-in forwards;
}
/* a taped tile (Levels 21-30, a few from 31): two strips of sticky tape across it; it cannot be swapped; a line through
   it takes the tape off (it springs a little) */
.mt-t.tape::before,
.mt-t.tape::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 4%;
  top: 42%;
  height: 18%;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(var(--amber-100-rgb), 0.85), rgba(var(--amber-400-rgb), 0.78)); /* yellow masking tape, as the counter's roll */
  box-shadow:
    0 1px 2px rgba(var(--bark-night-rgb), 0.3),
    inset 0 0 0 1px rgba(var(--white-rgb), 0.6);
  transform: rotate(-35deg);
  pointer-events: none;
  z-index: 1; /* both strips over the tile's picture */
}
.mt-t.tape::after {
  transform: rotate(35deg);
}
.mt-t.freed img {
  animation: mtFreed 0.4s ease-out;
}
@keyframes mtFreed {
  40% {
    transform: scale(1.22) rotate(-6deg);
  }
}
.mt-t.stuck img {
  animation: mtStuck 0.32s ease-in-out;
}
@keyframes mtStuck {
  25% {
    transform: translateX(-5%);
  }
  75% {
    transform: translateX(5%);
  }
}
/* a pop's sparkles (each in its tile's colour) and the points floating up; a fallen tile squashes a little as it lands */
.mt-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(var(--white-rgb), 0.9);
  pointer-events: none;
  z-index: 2;
  animation: mtSpark 0.55s ease-out forwards;
}
@keyframes mtSpark {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.3);
    opacity: 0;
  }
}
.mt-pts {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: Fredoka, Nunito, system-ui;
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  text-shadow:
    0 2px 0 var(--navy-deep),
    0 0 8px rgba(var(--navy-rgb), 0.6);
  pointer-events: none;
  z-index: 3;
  animation: mtPts 0.9s ease-out forwards;
}
@keyframes mtPts {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160%) scale(1);
  }
}
.mt-t.land img {
  animation: mtLand 0.3s ease-out 0.16s;
}
@keyframes mtLand {
  40% {
    transform: scale(1.1, 0.84) translateY(6%);
  }
  75% {
    transform: scale(0.96, 1.05);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mt-t.land img,
  .mt-spark {
    animation: none;
  }
}
/* the start's demo: the line the swap makes glows */
.mt-t.glow img {
  animation: mtGlow 0.55s ease-in-out infinite alternate;
}
@keyframes mtGlow {
  to {
    transform: scale(1.16);
    filter: drop-shadow(0 0 10px var(--gold-sand)) brightness(1.15);
  }
}
.mt-demo {
  position: fixed;
  z-index: 96;
  pointer-events: none;
  transition:
    left 0.6s ease-in-out,
    top 0.6s ease-in-out;
}
.mt-demo .fh-glove {
  width: 50px;
  filter: drop-shadow(0 6px 8px rgba(var(--black-rgb), 0.35));
}
/* the start: the board waits a little smaller and grows at Play (as HooBlocks) */
.mt-board {
  transition: transform 0.35s ease;
}
#s-match.hero-up:not(.hero-end) .mt-board {
  transform: translateY(calc(-1 * min(58px, 7vh))) scale(0.74); /* centred between the title and the goal: no empty desk above it */
  transform-origin: 50% 0;
}
/* a short phone: the board a size smaller, so it never reaches the goal's line */
@media (max-height: 700px) {
  #s-match.hero-up:not(.hero-end) .mt-board {
    transform: translateY(-36px) scale(0.62);
  }
}
/* a new desk world every 10 levels */
#s-match.w-art {
  background-image: url(art/match/bg_art.webp);
}
#s-match.w-picnic {
  background-image: url(art/match/bg_picnic.webp);
}
#s-match.w-night {
  background-image: url(art/match/bg_night.webp);
}
.mt-t.hint img {
  animation: mtHint 0.5s ease-in-out 3;
}
#s-blocks {
  position: fixed;
  top: var(--net-top);
  bottom: 0;
  left: 50%;
  width: min(100vw, calc(100vh * 0.62)); /* engines before dvh (Chrome 108) */
  width: min(100vw, calc(100dvh * 0.62));
  transform: translateX(-50%);
  z-index: 60;
  padding: 0;
  max-width: none;
  background: var(--sky-wash) url(art/blocks/bg_toyland.webp) center/cover; /* a sunny land of toy blocks */
  box-shadow: 0 0 0 100vw var(--sky-wash);
  font-family: Fredoka, Nunito, system-ui;
}
#s-blocks > .fly-hud,
#s-blocks > .bk-stage,
#s-blocks > .fly-card {
  z-index: 1;
}
#s-blocks:not(.on) {
  display: none;
}
.bk-stage {
  position: absolute;
  top: calc(64px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  right: 12px;
  bottom: calc(12px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.bk-say {
  background: var(--white);
  color: var(--navy-deep);
  border-radius: 16px 16px 16px 5px;
  padding: 7px 13px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 22px;
  box-shadow: 0 6px 16px rgba(var(--black-rgb), 0.3);
  animation: otipPop 0.25s ease-out both;
}
.bk-say[hidden] {
  display: none;
}
.bk-board {
  position: relative; /* a cleared line's sparkles and points are placed over it */
  width: 100%;
  max-width: min(100%, calc(100vh - 330px));
  max-width: min(100%, calc(100dvh - 330px));
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 10px;
  border-radius: 22px;
  /* a light toy tray in the toy-block land: soft white, a white rim, empty places a pale sky blue */
  background: rgba(var(--white-rgb), 0.78);
  box-shadow:
    0 0 0 5px var(--white),
    0 0 0 8px rgba(var(--navy-rgb), 0.12),
    0 18px 34px rgba(var(--navy-deep-rgb), 0.22);
  touch-action: none;
}
.bk-c {
  position: relative;
  border-radius: 22%;
  background: rgba(var(--blue-100-rgb), 0.9);
  box-shadow: inset 0 2px 4px rgba(var(--navy-rgb), 0.16);
}
.bk-t,
.bk-c.on,
.bk-c.ghost::after,
.bk-c.bk-burst::after {
  background: var(--c); /* engines before color-mix (Chrome 111): the plain colour */
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--c) 62%, var(--white)),
    var(--c) 52%,
    color-mix(in srgb, var(--c) 72%, var(--black))
  );
  box-shadow:
    inset 0 3px 0 rgba(var(--white-rgb), 0.5),
    inset 0 -4px 0 rgba(var(--black-rgb), 0.28),
    0 2px 4px rgba(var(--black-rgb), 0.3);
  border-radius: 22%;
}
.bk-c.ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.45;
}
/* a cleared line's blocks flash and shrink away over the empty places (its own name: the page's confetti class .burst
   would make the whole place fly off and leave a hole) */
.bk-c.bk-burst::after {
  content: '';
  position: absolute;
  inset: 0;
  animation: bkBurst 0.38s ease-out forwards;
}
/* the hint, after a pause: the places the best shape goes glow, and that shape pulses in the tray */
.bk-p.hint {
  animation: bkHint 0.9s ease-in-out infinite;
}
@keyframes bkHint {
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px rgba(var(--amber-400-rgb), 0.9));
  }
}
.bk-c.aim:not(.on) {
  background: rgba(var(--amber-400-rgb), 0.32);
  box-shadow: inset 0 0 0 2px rgba(var(--amber-400-rgb), 0.75);
  animation: bkAim 1.4s ease-in-out infinite;
}
@keyframes bkAim {
  50% {
    background: rgba(var(--amber-400-rgb), 0.16);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bk-c.aim:not(.on),
  .bk-p.hint {
    animation: none;
  }
}
/* a gem on a block (Levels 11-20 and from 31; a gem, never the app's star coin): cleared with its line, it flies to the
   count at the top */
.bk-c.star::before,
.bk-c.ice::before {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.bk-c.star::before {
  inset: 16%;
  background: url(art/ui3d/gem.webp) center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(var(--black-rgb), 0.35));
}
/* a frozen block (Levels 21-30, a little from 31): a block of ice over it; a line cracks it (the block stays), the next clears it */
.bk-c.ice::before {
  inset: -4%;
  background: url(art/ui3d/ice.webp) center/contain no-repeat; /* the same 3D ice cube as the goal's count at the top: plainly ice, never a pale block */
  filter: drop-shadow(0 1px 2px rgba(var(--black-rgb), 0.3));
}
.bk-c.crack {
  animation: bkCrack 0.45s ease-out;
}
@keyframes bkCrack {
  0% {
    filter: brightness(1.8);
    transform: scale(1.12);
  }
  100% {
    filter: none;
    transform: none;
  }
}
.bk-fly {
  position: fixed;
  z-index: 97;
  pointer-events: none;
  transition:
    left 0.6s ease-in,
    top 0.6s ease-in,
    width 0.6s ease-in;
}
.bk-goal-ic {
  width: 22px;
  height: 22px;
}
/* a new world every 10 levels round the same board */
#s-blocks.w-candy {
  background-image: url(art/blocks/bg_candy.webp);
}
#s-blocks.w-snow {
  background-image: url(art/blocks/bg_snow.webp);
}
#s-blocks.w-space {
  background-image: url(art/blocks/bg_space.webp);
}
.bk-c.drop {
  animation: bkDrop 0.18s ease-out;
}
.bk-tray {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 104px;
  border-radius: 20px;
  background: rgba(var(--white-rgb), 0.7); /* the waiting pieces stand out from the toy blocks behind */
  box-shadow: 0 8px 20px rgba(var(--navy-deep-rgb), 0.16);
  align-items: center;
  justify-items: center;
  touch-action: none;
}
.bk-p {
  display: grid;
  gap: 3px;
  padding: 8px;
  cursor: grab;
  touch-action: none;
}
/* a three-block line drawn small in a how-to box */
.bk-p.bk-mini {
  padding: 0;
  cursor: default;
}
.bk-p.gone {
  visibility: hidden;
}
.bk-p.no {
  opacity: 0.38;
}
.bk-p i,
.bk-drag i {
  display: block;
}
.bk-p i.e,
.bk-drag i.e {
  visibility: hidden;
}
/* the piece under the finger while it is dragged: it exists only during a drag, so a clean-up of
 "styles no element uses" can remove it unnoticed, and the piece then stops following the finger.
 tests/flows/games-drag.mjs checks it on every push. */
.bk-drag {
  position: fixed;
  z-index: 95;
  display: grid;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(var(--black-rgb), 0.4));
}
/* kept in this file: it must come after ".gm-best" (both can style the same element) */
.ph-owl > *,
.ph-owl img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}
#fly-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}
.fly-hud {
  position: absolute;
  z-index: 1; /* above the Paused cover, so ✕ leaves a paused game */
  top: calc(12px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  font-family: Fredoka, Nunito, system-ui;
}
.fly-hud > * {
  pointer-events: auto;
}
.fly-x,
.fly-chip,
.fly-pow {
  background: rgba(var(--white-rgb), 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 6px 18px -2px rgba(var(--black-rgb), 0.14),
    inset 0 1px 0 rgba(var(--white-rgb), 0.8);
}
.fly-x {
  width: 44px;
  height: 44px;
  flex-shrink: 0; /* a round 44px tap target on every phone */
  border-radius: 50%;
  border: 0;
  color: var(--slate-700);
  display: grid;
  place-items: center;
  cursor: pointer;
}
/* music and sounds on or off, under ✕ in every game (16-game-music.js): two round 3D buttons; off greys the picture
 with a line through it */
.g-aud {
  position: absolute;
  z-index: 2; /* above the game and its Paused cover */
  top: calc(64px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  left: 12px;
  display: flex;
  gap: 8px;
}
.hero-up .g-aud {
  display: none; /* a start or end card shows its title there; the buttons come with the round */
}
/* in the top bar, beside pause: no longer a row of its own */
.fly-hud > .g-aud.in-bar {
  position: static;
}
.g-aud-b {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(var(--black-rgb), 0.18));
}
.g-aud-b img {
  display: block;
  width: 40px;
  height: 40px;
}
.g-aud-b.off img {
  filter: grayscale(1);
  opacity: 0.6;
}
.g-aud-b.off::after {
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: var(--red-600);
  transform: rotate(-45deg);
}
/* a top-bar button drawn as a 3D icon (art/ui3d): the picture is the button */
.fly-x.ui3d {
  background: none;
  box-shadow: none;
  padding: 0;
}
.fly-x.ui3d img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 3px 5px rgba(var(--navy-deep-rgb), 0.3));
}
.fly-x.ui3d:active img {
  transform: scale(0.92);
}
/* the 3D star coin and trophy in a game card's words and on its Play button */
.s3d {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.28em;
  object-fit: contain;
}
.fly-chip {
  border-radius: 16px;
  padding: 7px 12px;
  white-space: nowrap; /* "Level 7" stays one line on a 320px phone */
  font-weight: 700;
  color: var(--slate-800);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fly-chip small {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 700;
}
.fly-pen {
  margin-left: auto;
}
/* OlyMaze: the game's controls in one panel under the maze: hearts on the left, four big arrows in
 the middle (a swipe still works), points on the right; the close and the pause are top left, as in every other game
 */
.mz-pad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 12px calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}
.mz-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 64px;
}
/* the lives: a little Olyhoo each, a lost one faded; the stars beside the count */
.mz-lives {
  gap: 0;
  padding-inline: 8px;
}
.mz-lives img {
  width: 24px;
  height: auto;
  transition: opacity 0.3s;
}
.mz-lives img.gone {
  opacity: 0.22;
  filter: grayscale(1);
}
.mz-stars {
  gap: 4px;
}
.mz-stars img {
  width: 18px;
  height: 18px;
}
/* until Olyhoo first sets off, the arrows glow softly */
.mz-pad.wait .mz-arrows {
  animation: mzGlow 1.2s ease-in-out infinite;
}
@keyframes mzGlow {
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 18px rgba(var(--amber-400-rgb), 0.85));
  }
}
/* the start: the maze waits dimmed behind the name, the comets and Play; the panel comes at Play */
#s-maze.hero-up:not(.hero-end) > canvas {
  filter: blur(4px) brightness(0.4);
}
#s-maze.hero-up .mz-pad {
  visibility: hidden;
}
.fh-cast {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: auto 0;
}
.mz-cast {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 360px;
}
.mz-who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 96px;
  min-width: 0;
  padding: 14px 2px 12px;
  border-radius: 18px;
  background: rgba(var(--navy-rgb), 0.62);
  border: 1px solid rgba(var(--white-rgb), 0.18);
  color: var(--white);
  text-align: center;
}
.mz-who img {
  width: min(72px, 100%); /* as big as the card allows, never wider (a 320 px phone) */
  height: auto; /* the comet pictures are square */
  animation: fhBob 2s ease-in-out infinite;
}
.mz-who:nth-child(2) img {
  animation-delay: -0.5s;
}
.mz-who:nth-child(3) img {
  animation-delay: -1s;
}
.mz-who:nth-child(4) img {
  animation-delay: -1.5s;
}
.mz-who b {
  font-family: Fredoka, Nunito, system-ui;
  font-size: 20px;
  line-height: 1.2;
}
.mz-who small {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}
/* the helps row (from Level 3): smaller tiles than the comets', so the start fits a small phone */
.mz-helps .mz-who {
  padding: 8px 2px 7px;
}
.mz-helps .mz-who img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.mz-helps .mz-who b {
  font-size: 16px;
}
.mz-helps .mz-who small {
  font-size: 12px;
}
.mz-who em {
  position: absolute;
  top: -9px;
  right: -4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deep);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.mz-power {
  max-width: 330px;
  font-size: 14px;
  line-height: 1.25;
}
/* a little tighter, so "Planets Make Comets Sleepy" keeps one line on a phone (a 320 px one wraps it) */
#s-maze .mz-power {
  gap: 5px;
  padding-inline: 14px;
}
.mz-power img {
  width: 32px;
  height: 32px;
  flex: none;
  object-fit: contain;
}
.mz-power em {
  flex: none;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--gold-light);
  border-radius: 999px;
  padding: 2px 7px;
}
/* the end names the comet ("Dash Got You!"): a little smaller, so it stays on one line on a phone */
#s-maze .fh-title {
  font-size: 44px;
}
/* OlyTower's start: the move shown as a little scene, a book swinging over a stack of books and dropping onto it as the
   hand taps (or the Space key goes down), round and round */
#s-tower .fh-hand.glove {
  width: auto;
}
.tw-demo {
  position: relative;
  display: block;
  width: 210px;
  height: 190px;
}
.tw-demo .tw-stack {
  position: absolute;
  left: 30px;
  bottom: 0;
  width: 130px;
  height: auto;
}
.tw-demo .tw-book {
  position: absolute;
  left: 38px;
  top: 0;
  width: 112px;
  height: auto;
  animation: twBook 2.8s ease-in-out infinite;
}
.tw-demo .fh-glove {
  position: absolute;
  right: -6px;
  top: 34px;
  width: 66px;
  animation: twTap 2.8s ease-in-out infinite;
}
.tw-demo .fh-key {
  position: absolute;
  right: -46px;
  top: 40px;
}
.tw-demo .fh-key img {
  width: 96px;
  animation: twTap 2.8s ease-in-out infinite;
}
@keyframes twBook {
  0% {
    transform: translate(-46px, 0);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  22% {
    transform: translate(46px, 0);
  }
  40%,
  46% {
    transform: translate(0, 0);
  }
  58% {
    transform: translate(0, 82px);
  }
  62% {
    transform: translate(0, 76px);
  }
  66%,
  88% {
    transform: translate(0, 80px);
    opacity: 1;
  }
  96%,
  100% {
    transform: translate(0, 80px);
    opacity: 0;
  }
}
@keyframes twTap {
  0%,
  38%,
  56%,
  100% {
    transform: translateY(0) scale(1);
  }
  46% {
    transform: translateY(7px) scale(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tw-demo .tw-book,
  .tw-demo .fh-glove,
  .tw-demo .fh-key img {
    animation: none;
  }
  .tw-demo .tw-book {
    transform: translate(0, 80px);
  }
}
/* HooSort: the clock with its stopwatch; on Level 1 the hand that shows the first pour (over the tube to tap, then
   over where to pour), its words beside it */
.so-clock {
  gap: 5px;
}
/* Undo and + Tube under the tubes, where a thumb is, as sort puzzles have them; greyed while they can do nothing */
.so-tools {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  display: flex;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
}
.so-tool {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 20px 0 12px;
  border: 0;
  border-radius: 27px;
  background: rgba(var(--white-rgb), 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 6px 18px -2px rgba(var(--black-rgb), 0.16),
    inset 0 1px 0 rgba(var(--white-rgb), 0.8);
  color: var(--slate-800);
  font-family: Fredoka, Nunito, system-ui;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.so-tool img {
  width: 34px;
  height: 34px;
}
.so-tool:disabled {
  opacity: 0.45;
  cursor: default;
}
#s-sort.hero-up .so-tools {
  visibility: hidden;
}
.so-hand {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  transition:
    left 0.3s ease,
    top 0.3s ease;
}
.so-hand .fh-glove {
  width: 58px;
  height: auto;
  animation: fhPress 1s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(var(--navy-deep-rgb), 0.35));
}
.so-hand span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.85);
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
#s-sort.hero-end .so-hand {
  visibility: hidden;
}
/* on the start: over the start's shade, no words (the start says them) */
#s-sort .so-hand.start {
  z-index: 3;
}
#s-sort .so-hand.start span {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .so-hand .fh-glove {
    animation: none;
  }
}
/* caught: the comet that got Olyhoo (big, facing him) bumps into his side as he sees stars; a little burst where they meet */
#s-maze .fh-mid .fc-olyhoo {
  position: relative;
  z-index: 1;
  width: 195px;
  margin-left: 90px;
  animation: mzWobble 1.6s ease-in-out infinite;
}
@keyframes mzWobble {
  50% {
    transform: rotate(6deg) translateX(4px);
  }
}
.mz-caught {
  position: relative;
  width: 0;
  height: 0;
}
.mz-caught > img {
  position: absolute;
  z-index: 2;
  left: -195px;
  top: 52px;
  width: 146px;
  height: auto;
  animation: mzBump 1.6s ease-in-out infinite;
}
@keyframes mzBump {
  0%,
  100% {
    transform: translateX(0) rotate(-6deg);
  }
  50% {
    transform: translateX(10px) rotate(0deg);
  }
}
/* the other comets circle round Olyhoo's head, in front and then behind him */
.mz-orbit {
  position: absolute;
  left: 46px;
  top: 20px;
  width: 0;
  height: 0;
}
.mz-orbit span {
  position: absolute;
  left: -22px;
  top: -22px;
  animation:
    mzOX 1.5s ease-in-out infinite alternate,
    mzOZ 3s step-end infinite;
}
.mz-orbit img {
  display: block;
  width: 44px;
  height: 44px;
  animation: mzOY 1.5s ease-in-out infinite alternate;
  animation-delay: -0.75s;
}
.mz-orbit span:nth-child(2) {
  animation-delay: -1s;
}
.mz-orbit span:nth-child(2) img {
  animation-delay: -1.75s;
}
.mz-orbit span:nth-child(3) {
  animation-delay: -2s;
}
.mz-orbit span:nth-child(3) img {
  animation-delay: -2.75s;
}
@keyframes mzOX {
  from {
    transform: translateX(-100px);
  }
  to {
    transform: translateX(100px);
  }
}
@keyframes mzOY {
  from {
    transform: translateY(-24px);
  }
  to {
    transform: translateY(24px);
  }
}
@keyframes mzOZ {
  0% {
    z-index: 3;
  }
  50% {
    z-index: 0;
  }
}
/* the burst: a soft gold star where the comet meets Olyhoo */
.mz-caught > i {
  position: absolute;
  z-index: 2;
  left: -60px;
  top: 84px;
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(var(--white-rgb), 0.95) 0 22%, rgba(var(--amber-400-rgb), 0.85) 23% 40%, rgba(var(--amber-400-rgb), 0) 62%);
  clip-path: polygon(50% 0, 61% 36%, 100% 38%, 68% 60%, 79% 100%, 50% 74%, 21% 100%, 32% 60%, 0 38%, 39% 36%);
  animation: mzBonk 1.6s ease-in-out infinite;
}
@keyframes mzBonk {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mz-pad.wait .mz-arrows,
  .mz-who img,
  .mz-caught > img,
  .mz-caught > i,
  .mz-orbit span,
  .mz-orbit img,
  #s-maze .fh-mid .fc-olyhoo {
    animation: none;
  }
}
.mz-arrows {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  grid-template-rows: repeat(3, 60px);
  touch-action: none;
  cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(var(--black-rgb), 0.28));
}
/* one joined cross, like a game pad: the centre fills the gap between the arms and carries a small hub */
.mz-arrows::before {
  content: '';
  grid-area: 2 / 2;
  background: rgba(var(--white-rgb), 0.9);
}
.mz-arrows::after {
  content: '';
  grid-area: 2 / 2;
  place-self: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(var(--slate-900-rgb), 0.12);
}
.mz-arrows button {
  border: 0;
  border-radius: 0;
  background: rgba(var(--white-rgb), 0.9);
  color: var(--slate-700);
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: pointer;
  pointer-events: none;
}
.mz-arrows button.on {
  background: rgba(var(--white-rgb), 0.62);
  color: var(--navy);
}
.mz-arrows .mz-u {
  grid-area: 1 / 2;
  border-radius: 16px 16px 0 0;
}
.mz-arrows .mz-l {
  grid-area: 2 / 1;
  border-radius: 16px 0 0 16px;
}
.mz-arrows .mz-r {
  grid-area: 2 / 3;
  border-radius: 0 16px 16px 0;
}
.mz-arrows .mz-d {
  grid-area: 3 / 2;
  border-radius: 0 0 16px 16px;
}
/* every other game in its own world too, to go with its own 3D buttons (art/ui3d/<world>-*.webp): the counters and
 the Paused cover take the world's materials. OlyFly: the bridge's dark wood and gold; HooHop: the night forest and its
 teal mushroom light; HooFlap: the sky; HooSort: the lab's glass and steel; OlyTower: red leather and gold; HooBlocks:
 mint toy plastic; OlyMatch: the board's honey-wood frame */
#s-game .fly-chip {
  background: rgba(var(--bark-night-rgb), 0.72);
  color: var(--gold-cream);
  box-shadow:
    inset 0 0 0 2px var(--gold-mid),
    0 4px 10px rgba(var(--black-rgb), 0.25);
}
#s-game .fly-chip small {
  color: var(--gold-sand);
}
#s-hop .fly-chip {
  background: rgba(var(--forest-shade-rgb), 0.78);
  color: var(--white);
  box-shadow:
    inset 0 0 0 2px var(--emerald-200),
    0 0 10px rgba(var(--emerald-500-rgb), 0.35);
}
#s-hop .fly-chip small {
  color: var(--emerald-200);
}
#s-sort .fly-chip {
  background: rgba(var(--white-rgb), 0.88);
  color: var(--navy);
  box-shadow:
    inset 0 0 0 2px var(--slate-300),
    0 4px 10px rgba(var(--navy-rgb), 0.15);
}
#s-tower .fly-chip {
  background: var(--library-leather);
  color: var(--gold-cream);
  box-shadow:
    inset 0 0 0 2px var(--gold-mid),
    0 4px 10px rgba(var(--bark-night-rgb), 0.3);
}
#s-blocks .fly-chip {
  background: rgba(var(--white-rgb), 0.92);
  color: var(--emerald-700);
  box-shadow:
    inset 0 0 0 2px var(--emerald-200),
    0 4px 10px rgba(var(--emerald-500-rgb), 0.15);
}
#s-match .fly-chip {
  background: rgba(var(--white-rgb), 0.92);
  color: var(--slate-800);
  box-shadow:
    inset 0 0 0 2px var(--desk-wood-dark),
    0 4px 10px rgba(var(--bark-night-rgb), 0.2);
}
#s-game .fly-paused,
#s-hop .fly-paused {
  background: rgba(var(--forest-shade-rgb), 0.5);
}
#s-game .fly-paused b,
#s-hop .fly-paused b,
#s-tower .fly-paused b {
  text-shadow: 0 3px 0 rgba(var(--bark-night-rgb), 0.9);
}
#s-hop .fp-play {
  filter: drop-shadow(0 0 12px rgba(var(--emerald-500-rgb), 0.7)); /* the dark wood play button lit like the mushroom */
}
#s-flap .fly-paused {
  background: rgba(var(--sky-500-rgb), 0.3);
}
#s-flap .fly-paused b {
  text-shadow: 0 3px 0 var(--blue-700);
}
#s-sort .fly-paused {
  background: rgba(var(--navy-rgb), 0.3);
}
#s-tower .fly-paused {
  background: rgba(var(--bark-night-rgb), 0.45);
}
/* OlyMaze in its own world: the pad, the counters and the Paused cover are deep-space glass with the glowing blue rim
 of the maze's walls, to go with its own 3D buttons (art/ui3d/maze-*.webp) */
#s-maze .mz-arrows {
  /* one glowing rim round the whole cross (never a line between its arms) */
  filter: drop-shadow(0 0 1.5px var(--sky-400)) drop-shadow(0 0 10px rgba(var(--sky-500-rgb), 0.45)) drop-shadow(0 6px 14px rgba(var(--black-rgb), 0.4));
}
/* its 3D buttons glow like the walls (a button turned off keeps its plain grey) */
#s-maze .fly-x.ui3d img,
#s-maze .g-aud-b:not(.off) img,
#s-maze .fp-play {
  filter: drop-shadow(0 0 6px rgba(var(--sky-500-rgb), 0.75));
}
#s-maze .mz-pad.wait .mz-arrows {
  animation-name: mzGlowSky;
}
@keyframes mzGlowSky {
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 1.5px var(--sky-400)) drop-shadow(0 0 20px rgba(var(--sky-500-rgb), 0.9));
  }
}
#s-maze .mz-arrows::before,
#s-maze .mz-arrows button {
  background: rgba(var(--navy-deep-rgb), 0.82);
  color: var(--sky-400);
}
#s-maze .mz-arrows::after {
  background: rgba(var(--sky-500-rgb), 0.35);
  box-shadow: 0 0 8px rgba(var(--sky-500-rgb), 0.7);
}
#s-maze .mz-arrows button.on {
  background: rgba(var(--sky-500-rgb), 0.4);
  color: var(--white);
}
#s-maze .fly-chip {
  background: rgba(var(--navy-deep-rgb), 0.78);
  color: var(--white);
  box-shadow:
    0 0 10px rgba(var(--sky-500-rgb), 0.35),
    inset 0 0 0 2px rgba(var(--sky-500-rgb), 0.55);
}
#s-maze .fly-paused {
  background: rgba(var(--navy-deep-rgb), 0.55);
}
#s-maze .fly-paused b {
  text-shadow:
    0 0 14px rgba(var(--sky-500-rgb), 0.9),
    0 3px 0 var(--navy-deep);
}
/* a game's one-off top-bar button (HooBlocks and HooSort Undo, OlyMatch Shuffle); greyed while disabled */
.bk-undo {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.bk-undo img {
  width: 24px;
  height: 24px;
}
.bk-undo:disabled {
  opacity: 0.45;
  cursor: default;
}
.fly-pen img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin: -3px 0;
}
.fly-pow {
  border-radius: 999px;
  padding: 5px 10px 5px 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--rose-700);
  font-size: 13px;
  border: 1px solid var(--rose-200);
}
.fly-pow .ring {
  --f: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(var(--red-500) calc(var(--f) * 360deg), var(--slate-200) 0);
  display: grid;
  place-items: center;
}
.fly-pow .ring i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
}
.fly-pow .ring img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}
.fly-card {
  position: absolute;
  z-index: 2; /* over the top bar (.fly-hud, z-index 1) */
  left: 50%;
  bottom: calc(18px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  top: auto;
  transform: translateX(-50%);
  width: min(400px, 92vw);
  background: rgba(var(--white-rgb), 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 20px 18px 16px;
  text-align: center;
  border: 2px solid var(--slate-200); /* 3D, like every card */
  border-bottom-width: 5px;
  box-shadow: none;
  font-family: Nunito, system-ui;
  animation: fcIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.fly-card[hidden] {
  display: none;
}
.fc-title {
  font-family: Fredoka, Nunito, system-ui;
  font-weight: 700;
  font-size: 30px;
  margin: 6px 0 0;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}
/* the hero start (18-game-core.js gameCard, o.hero): no card over the game; its name big at the top, the level and goal
   under it, a tapping hand in the middle, Play at the foot over a soft shade so the words read on any scene */
.fly-card.fc-hero {
  inset: 0;
  transform: none;
  width: auto;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(var(--navy-rgb), 0.4) 0%, rgba(var(--navy-rgb), 0) 30%, rgba(var(--navy-rgb), 0) 55%, rgba(var(--navy-rgb), 0.72) 77%, rgba(var(--navy-rgb), 0.94) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: calc(70px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 22px calc(22px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  animation: fhIn 0.45s ease-out;
}
/* while a hero screen is up its own words say the level and the books: the top bar keeps only ✕ (no pills, no pause) */
/* OlyFly's first board or desk: the hand doing the move over the bridge, the world slowed (16-game-fly.js teach) */
.fly-teach {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 3;
}
.fly-teach > i {
  position: relative;
  width: 80px;
  height: 90px;
}
.fly-teach .fh-glove,
.fly-teach .fm-key {
  position: absolute;
  left: 50%;
  top: 50%;
}
.fly-teach .fh-glove {
  width: 64px;
  margin: -32px 0 0 -26px;
  filter: drop-shadow(0 6px 10px rgba(var(--navy-deep-rgb), 0.45));
}
.fly-teach .fm-key {
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-bottom-width: 5px;
  font-size: 20px;
}
.fly-teach .ft-u .fh-glove {
  animation: fmUp 1.1s ease-in-out infinite;
}
.fly-teach .ft-d .fh-glove {
  animation: fmDown 1.1s ease-in-out infinite;
}
.fly-teach > span {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.78);
  color: var(--white);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}
/* a cleared level's next goal, under its result, in the same navy chip */
.fh-next span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.62);
  border: 1px solid rgba(var(--white-rgb), 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
}
.fh-next b {
  font-weight: 800;
}
/* the stars and the best in the hero screens' top-right corner, in the top bar's own pill look */
.fh-corner {
  position: absolute;
  top: calc(12px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  right: 12px;
  display: flex;
  gap: 8px;
}
.fh-corner span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: rgba(var(--white-rgb), 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 6px 18px -2px rgba(var(--black-rgb), 0.14),
    inset 0 1px 0 rgba(var(--white-rgb), 0.8);
  color: var(--slate-800);
  font-family: Fredoka, Nunito, system-ui;
  font-size: 17px;
  font-weight: 700;
}
.fh-corner .s3d {
  width: 24px;
  height: 24px;
}
/* HooBlocks' start: the demo plays on the real board, so the board stays bright (no shade over the middle); the line
   of words sits just above Play, under the board; the Olyhoo beside it and the waiting shapes wait for Play */
.fly-card.fc-hero.fh-board {
  background: linear-gradient(180deg, rgba(var(--navy-rgb), 0.45) 0%, rgba(var(--navy-rgb), 0) 24%, rgba(var(--navy-rgb), 0) 76%, rgba(var(--navy-rgb), 0.9) 100%);
}
/* the hint just under the title and goal (HooHop: Olyhoo's demo run needs the lower half clear) */
.fh-hint.high {
  margin-top: 18px;
  margin-bottom: auto;
}
.fh-hint.low {
  margin-top: auto;
  margin-bottom: 10px;
  gap: 8px;
}
.screen.hero-up .bk-olyhoo,
.screen.hero-up .bk-tray {
  visibility: hidden;
}
/* on the start the board waits a little smaller (room for the words under it) and grows to full size at Play */
.bk-board {
  transition: transform 0.35s ease;
}
#s-blocks.hero-up:not(.hero-end) .bk-board {
  transform: scale(0.8);
  transform-origin: 50% 0;
}
.screen.hero-end .bk-stage {
  filter: blur(3px) brightness(0.92);
}
.bk-demo {
  position: fixed;
  z-index: 96;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(var(--black-rgb), 0.35));
}
.bk-demo .bk-drag-p {
  display: grid;
}
.bk-demo .bk-drag-p i {
  display: block;
}
.bk-demo .fh-glove {
  position: absolute;
  width: 54px;
  left: 50%;
  top: 60%;
}
/* behind a fall, a bump or a cleared level the game goes soft, so the result reads first */
.screen.hero-end > canvas {
  filter: blur(3px) brightness(0.92);
  transition: filter 0.4s;
}
/* the full-screen start and result cover the whole game, the top bar too: the bar's ✕ stays over them, so a tap on it
   still leaves the game */
.screen.hero-up > .fly-hud,
#s-blocks.hero-up > .fly-hud {
  z-index: 3; /* over the card (.fly-card: 2 on OlyFly, 1 in the other games; HooBlocks sets its own) */
}
.screen.hero-up .fly-chip,
.screen.hero-up .fly-pow,
.screen.hero-up .fly-x + .fly-x {
  visibility: hidden;
}
@keyframes fhIn {
  from {
    opacity: 0;
  }
}
.fh-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fh-title {
  margin: 0;
  font-family: Fredoka, Nunito, system-ui;
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  color: var(--white);
  text-shadow:
    0 3px 0 var(--navy-deep),
    0 8px 24px rgba(var(--navy-rgb), 0.55);
  letter-spacing: -0.01em;
}
.fh-tag {
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(var(--navy-rgb), 0.75);
}
/* OlyMaze's how-to-move: a little arrow pad and a little Olyhoo; the hand taps right, down, left, up in turn (4 s round)
   and at each tap Olyhoo goes that way round a square, collecting its stars (18-game-maze.js demo) */
.mz-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 8px 18px;
  border-radius: 18px;
  background: rgba(var(--navy-rgb), 0.62);
  border: 1px solid rgba(var(--white-rgb), 0.18);
}
.mz-mpad {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 22px);
  grid-template-rows: repeat(3, 22px);
}
.mz-mpad i {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}
.mz-mpad .u {
  grid-area: 1 / 2;
  animation: mzKeyU 4s infinite;
}
.mz-mpad .l {
  grid-area: 2 / 1;
  animation: mzKeyL 4s infinite;
}
.mz-mpad .r {
  grid-area: 2 / 3;
  animation: mzKeyR 4s infinite;
}
.mz-mpad .d {
  grid-area: 3 / 2;
  animation: mzKeyD 4s infinite;
}
/* the hand: on the right arrow, then down, left, up, pressing each */
.mz-mpad .mz-glove {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(var(--navy-deep-rgb), 0.4));
  animation: mzHand 4s infinite;
}
@keyframes mzHand {
  0%,
  22% {
    transform: translate(46px, 26px);
  }
  4% {
    transform: translate(46px, 31px) scale(0.92);
  }
  25%,
  47% {
    transform: translate(24px, 48px);
  }
  29% {
    transform: translate(24px, 53px) scale(0.92);
  }
  50%,
  72% {
    transform: translate(2px, 26px);
  }
  54% {
    transform: translate(2px, 31px) scale(0.92);
  }
  75%,
  97% {
    transform: translate(24px, 4px);
  }
  79% {
    transform: translate(24px, 9px) scale(0.92);
  }
  100% {
    transform: translate(46px, 26px);
  }
}
/* the arrow being tapped lights up gold */
@keyframes mzKeyR {
  1%,
  12% {
    background: var(--gold);
  }
  0%,
  14%,
  100% {
    background: var(--white);
  }
}
@keyframes mzKeyD {
  26%,
  37% {
    background: var(--gold);
  }
  0%,
  25%,
  39%,
  100% {
    background: var(--white);
  }
}
@keyframes mzKeyL {
  51%,
  62% {
    background: var(--gold);
  }
  0%,
  50%,
  64%,
  100% {
    background: var(--white);
  }
}
@keyframes mzKeyU {
  76%,
  87% {
    background: var(--gold);
  }
  0%,
  75%,
  89%,
  100% {
    background: var(--white);
  }
}
/* the square Olyhoo goes round, a star at the middle of each side */
.mz-box {
  position: relative;
  width: 70px;
  height: 70px;
}
.mz-box::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(var(--white-rgb), 0.3);
  border-radius: 6px;
}
.mz-box .mz-mo,
.mz-box .mz-st {
  position: absolute;
  left: 0;
  top: 0;
}
.mz-box .mz-mo {
  width: 26px;
  height: auto;
  animation: mzMove 4s infinite;
}
.mz-box .mz-st {
  width: 14px;
  height: 14px;
}
.mz-st.a {
  transform: translate(28px, 6px);
  animation: mzStarA 4s infinite;
}
.mz-st.b {
  transform: translate(50px, 28px);
  animation: mzStarB 4s infinite;
}
.mz-st.c {
  transform: translate(28px, 50px);
  animation: mzStarC 4s infinite;
}
.mz-st.d {
  transform: translate(6px, 28px);
  animation: mzStarD 4s infinite;
}
/* moving right from top-left just after the right tap, then down, left, up after theirs */
@keyframes mzMove {
  0%,
  3% {
    transform: translate(0, 0);
  }
  22%,
  28% {
    transform: translate(44px, 0);
  }
  47%,
  50% {
    transform: translate(44px, 44px);
  }
  53% {
    transform: translate(44px, 44px) scaleX(-1); /* turned round to go left */
  }
  72%,
  77% {
    transform: translate(0, 44px) scaleX(-1);
  }
  79% {
    transform: translate(0, 44px);
  }
  97%,
  100% {
    transform: translate(0, 0);
  }
}
@keyframes mzStarA {
  0%,
  12% {
    opacity: 1;
  }
  13%,
  99% {
    opacity: 0;
  }
}
@keyframes mzStarB {
  0%,
  37% {
    opacity: 1;
  }
  38%,
  99% {
    opacity: 0;
  }
}
@keyframes mzStarC {
  0%,
  62% {
    opacity: 1;
  }
  63%,
  99% {
    opacity: 0;
  }
}
@keyframes mzStarD {
  0%,
  87% {
    opacity: 1;
  }
  88%,
  99% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mz-mpad i,
  .mz-mpad .mz-glove,
  .mz-box .mz-mo,
  .mz-box .mz-st {
    animation: none;
  }
}
/* one chip for every line of information on the hero screens: the goal, the hint, the books and a best */
.fh-goal,
.fh-hint > span,
.fh-stats span,
.mz-power,
.mz-how {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.62);
  border: 1px solid rgba(var(--white-rgb), 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  text-shadow: none;
}
.fh-goal {
  margin-top: 6px;
}
.fh-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.fh-hand {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(var(--white-rgb), 0.95);
  color: var(--navy);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 8px rgba(var(--white-rgb), 0.25);
  animation: fhTap 1.3s ease-in-out infinite;
}
.fh-hand .i {
  width: 30px;
  height: 30px;
}
@keyframes fhTap {
  0%,
  60%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(var(--white-rgb), 0.25);
  }
  30% {
    transform: scale(0.86);
    box-shadow: 0 0 0 18px rgba(var(--white-rgb), 0);
  }
}
/* the 3D hand (18-game-core.js TAP_HAND): no circle behind it; it presses down and springs back */
.fh-hand.glove {
  width: 80px;
  height: auto;
  background: none;
  box-shadow: none;
  animation: none;
}
.fh-glove {
  width: 76px;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(var(--navy-deep-rgb), 0.35));
  transform-origin: 60% 100%;
  animation: fhPress 1.3s ease-in-out infinite;
}
@keyframes fhPress {
  0%,
  55%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(7px) scale(0.94);
  }
}
.fh-goal-pic {
  width: auto;
  height: 22px; /* one height for every game's goal picture, so every goal pill is the same height */
  max-width: 40px;
  filter: drop-shadow(0 2px 4px rgba(var(--navy-deep-rgb), 0.4));
}
/* OlyFly's three moves right under the goal, as HooHop's and HooFlap's: the demo's Olyhoo flying up stays in sight */
#s-game .fh-moves {
  margin: 22px 0 auto;
}
/* HooFlap's two moves, laid out as HooHop's (the hand placed the same way, Olyhoo at the foot where the desk and board
   are): a tap and he rises; no tap and he glides down */
#s-flap .fh-moves {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(340px, 100%);
  margin: 22px 0 auto;
}
#s-flap .fm > i {
  height: 84px;
}
div.fm .fm-oly {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 44px;
  height: auto;
  margin-left: -6px; /* a little right of the middle: the hand taps beside him, never over his face */
  filter: drop-shadow(0 4px 6px rgba(var(--navy-deep-rgb), 0.35));
}
/* each press is set off by the demo's flap (18-game-flap.js), so the tap and the rise happen together */
.fm-flapup .fh-glove.go,
.fm-flapup .fm-key.go {
  animation: fmTap 0.5s ease-out;
}
.fm-flapup .fm-oly.go {
  animation: fmRise 1.2s ease-out;
}
.fm-glide .fm-oly {
  animation: fmGlide 1.8s ease-in-out infinite;
}
/* the hand presses, and as it lets go Olyhoo goes up; then he sinks back for the next tap */
@keyframes fmTap {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(7px) scale(0.92);
  }
}
@keyframes fmRise {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-18px);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes fmGlide {
  0% {
    transform: translate(-8px, -30px) rotate(4deg);
    opacity: 0;
  }
  15%,
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(8px, 0) rotate(4deg);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fm-flapup .fm-oly.go,
  .fm-flapup .fh-glove.go,
  .fm-flapup .fm-key.go,
  .fm-glide .fm-oly {
    animation: none;
  }
}
/* HooHop's two moves: a desk under one tap, a board under two quick taps */
#s-hop .fh-moves {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(340px, 100%);
  margin: 22px 0 auto; /* right under the goal: Olyhoo's demo run below stays clear */
}
#s-hop .fm > i {
  height: 84px;
}
/* the hand taps above the desk or the board */
.fm-hop .fm-pic,
.fm-hop2 .fm-pic {
  bottom: 0;
  width: 58px;
  height: 42px;
  margin-left: -29px;
}
.fm-hop .fh-glove,
.fm-hop2 .fh-glove,
.fm-hop .fm-key,
.fm-hop2 .fm-key {
  top: 0;
}
.fm-hop .fh-glove,
.fm-hop2 .fh-glove {
  margin-top: 0;
}
.fm-hop .fm-key,
.fm-hop2 .fm-key {
  transform: translateX(-50%);
  white-space: nowrap;
}
/* each press set off by the demo's hop (18-game-hop.js): one for a desk, two quick ones for a board */
.fm-hop .fh-glove.go,
.fm-hop .fm-key.go {
  animation: fmTap 0.45s ease-out;
}
.fm-hop2 .fh-glove.go,
.fm-hop2 .fm-key.go {
  animation: fmTwice 0.8s ease-out;
}
@keyframes fmTwice {
  0%,
  35%,
  80%,
  100% {
    transform: translateY(0) scale(1);
  }
  15%,
  55% {
    transform: translateY(7px) scale(0.92);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fm-hop .fh-glove.go,
  .fm-hop .fm-key.go,
  .fm-hop2 .fh-glove.go,
  .fm-hop2 .fm-key.go {
    animation: none;
  }
}
/* a game with more than one move (OlyFly): a row of tiles, each the hand (or key) doing its move over the thing it is for */
.fh-moves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(380px, 100%);
}
div.fm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 9px;
  border-radius: 18px;
  background: rgba(var(--navy-rgb), 0.62);
  border: 1px solid rgba(var(--white-rgb), 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
}
div.fm > i {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 64px;
}
div.fm .fm-pic {
  position: absolute;
  left: 50%;
  width: 50px;
  height: 36px;
  margin-left: -25px;
  object-fit: contain;
}
/* the board low and the hand swiping up past it; the desk high and the hand diving down under it */
.fm-up .fm-pic {
  bottom: 0;
}
.fm-down .fm-pic {
  top: 0;
}
div.fm > i::after {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 900;
  font-style: normal;
  color: rgba(var(--white-rgb), 0.7);
}
.fm-lr > i::after {
  content: '← →';
  font-size: 16px;
  white-space: nowrap;
  top: auto;
  bottom: -6px;
  right: 50%;
  transform: translateX(50%);
}
.fm-up > i::after {
  content: '↑';
}
.fm-down > i::after {
  content: '↓';
}
div.fm .fh-glove,
div.fm .fm-key {
  position: absolute;
  left: 50%;
  top: 50%;
}
div.fm .fh-glove {
  width: 34px;
  margin: -14px 0 0 -12px;
  filter: drop-shadow(0 4px 6px rgba(var(--navy-deep-rgb), 0.4));
}
div.fm .fm-key {
  transform: translate(-50%, -50%);
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-bottom-width: 4px;
}
/* each swipe set off by the start's demo (16-game-fly.js pilot) as Olyhoo makes that move: left or right, up, down */
.fm-lr .fh-glove.go-l {
  animation: fmL 0.6s ease-out;
}
.fm-lr .fh-glove.go-r {
  animation: fmR 0.6s ease-out;
}
.fm-up .fh-glove.go {
  animation: fmUp 0.7s ease-out;
}
.fm-down .fh-glove.go {
  animation: fmDown 0.7s ease-out;
}
.fm-lr .fm-key.go,
.fm-up .fm-key.go,
.fm-down .fm-key.go {
  animation: fmKey 0.45s ease-out;
}
@keyframes fmL {
  0% {
    transform: translateX(18px);
  }
  100% {
    transform: translateX(-22px);
  }
}
@keyframes fmR {
  0% {
    transform: translateX(-18px);
  }
  100% {
    transform: translateX(22px);
  }
}
@keyframes fmKey {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  35% {
    transform: translate(-50%, -40%) scale(0.92);
  }
}
@keyframes fmUp {
  0% {
    transform: translateY(18px);
    opacity: 0;
  }
  20%,
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(-26px);
    opacity: 0;
  }
}
@keyframes fmDown {
  0% {
    transform: translateY(-26px);
    opacity: 0;
  }
  20%,
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(18px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  div.fm .fh-glove.go,
  div.fm .fh-glove.go-l,
  div.fm .fh-glove.go-r,
  div.fm .fm-key.go {
    animation: none;
  }
}
/* a hand that taps when the game says (HooHop's demo: each time Olyhoo hops) instead of on its own beat */
.fh-hand.sync .fh-glove {
  animation: none;
}
.fh-hand.sync .fh-glove.tap {
  animation: fhPress 0.3s ease-out; /* quick, so a double tap shows as two presses */
}
/* the 3D Space key on a computer, its name on its face */
.fh-key {
  position: relative;
  display: grid;
  place-items: center;
}
.fh-key img {
  width: 120px;
  height: auto;
  animation: fhPress 1.3s ease-in-out infinite;
}
.fh-key b {
  position: absolute;
  top: 42%;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  text-shadow: none;
  animation: fhPress 1.3s ease-in-out infinite;
}
/* the hero end's middle: Olyhoo, the score big, the books and a best */
.fh-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fh-mid .fc-olyhoo {
  width: 132px;
  height: auto;
  margin: 0;
  position: static;
  filter: drop-shadow(0 10px 18px rgba(var(--navy-deep-rgb), 0.45));
}
/* OlyTower's fall: books tumbling down the screen behind Olyhoo, each on its own (18-game-tower.js fallingBooks) */
.fh-fall {
  position: absolute;
  top: calc(64px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))); /* below the top bar: never over ✕ */
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.fh-fall img {
  position: absolute;
  top: -18%;
  width: 64px;
  opacity: 0.92;
  filter: drop-shadow(0 6px 8px rgba(var(--navy-deep-rgb), 0.35));
  animation: fhBook var(--t) linear var(--d) infinite;
}
@keyframes fhBook {
  0% {
    transform: translateY(0) rotate(0);
  }
  100% {
    transform: translateY(135vh) rotate(var(--r));
  }
}
@media (prefers-reduced-motion: reduce) {
  .fh-fall {
    display: none;
  }
}
.fly-card.fc-hero > .fh-top,
.fly-card.fc-hero > .fh-mid,
.fly-card.fc-hero > .fh-foot {
  position: relative;
  z-index: 1;
}
/* Olyhoo tumbling with the books (a wider picture) */
.fh-mid .fc-olyhoo[src$='olyhoo-roll.webp'] {
  width: 200px;
  animation: fhRoll 2.4s ease-in-out infinite;
}
/* HooFlap: the count of clouds and hills flown past, one big number at the top as in a flapping game, the level's
   goal small under it; gone while a full-screen card is up */
.fp-count {
  position: absolute;
  z-index: 1;
  top: calc(64px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  font-family: Fredoka, Nunito, system-ui;
  color: var(--white);
}
.fp-count b {
  font-size: 56px;
  line-height: 1;
  text-shadow:
    0 3px 0 var(--navy-deep),
    0 6px 16px rgba(var(--navy-rgb), 0.5);
}
.fp-count small {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(var(--navy-rgb), 0.8);
}
.screen.hero-up .fp-count {
  visibility: hidden;
}
/* Get Ready: after Play the hand taps beside the hovering Olyhoo until the first tap */
.fp-ready {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.fp-ready .fh-glove {
  width: 54px;
  animation: fhPress 1s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(var(--navy-deep-rgb), 0.35));
}
.fp-ready span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.7);
  color: var(--white);
  font-weight: 800;
  font-size: 18px;
}
/* HooFlap's bump: its own flying Olyhoo with a little storm cloud raining over his head, bobbing */
.fh-mid .fc-olyhoo[src$='olyhoo_down.webp'] {
  width: 170px;
  animation: fhBob 2s ease-in-out infinite;
}
@keyframes fhBob {
  50% {
    transform: translateY(8px) rotate(4deg);
  }
}
.fh-rain {
  position: relative;
  width: 110px;
  height: 70px;
  margin-bottom: -22px;
  z-index: 1;
  animation: fhBob 2.4s ease-in-out infinite;
}
.fh-rain img {
  width: 110px;
}
.fh-rain i {
  position: absolute;
  top: 46px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: rgba(var(--blue-200-rgb), 0.95);
  animation: fhDrop 0.8s linear infinite;
}
.fh-rain i:nth-of-type(1) {
  left: 30px;
}
.fh-rain i:nth-of-type(2) {
  left: 48px;
  animation-delay: 0.3s;
}
.fh-rain i:nth-of-type(3) {
  left: 66px;
  animation-delay: 0.15s;
}
.fh-rain i:nth-of-type(4) {
  left: 82px;
  animation-delay: 0.45s;
}
@keyframes fhDrop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(46px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fh-rain,
  .fh-rain i,
  .fh-mid .fc-olyhoo[src$='olyhoo_down.webp'] {
    animation: none;
  }
}
/* HooFlap's storm cloud: Olyhoo drenched, standing in his puddle under the raining cloud */
.fh-mid .fc-olyhoo[src$='olyhoo-drenched.webp'] {
  width: 150px;
  animation: none;
}
/* HooFlap too low: soft cloud puffs over the lower half of the gliding Olyhoo, drifting a little */
.fh-sink {
  position: relative;
  z-index: 2;
  width: 210px;
  height: 0;
  margin-bottom: -8px;
}
.fh-sink i {
  position: absolute;
  top: 84px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--white) 0%, rgba(var(--white-rgb), 0.96) 55%, rgba(var(--blue-100-rgb), 0.95) 100%);
  box-shadow: 0 6px 14px rgba(var(--navy-rgb), 0.18);
  animation: fhPuff 3s ease-in-out infinite alternate;
}
.fh-sink i:nth-child(1) {
  left: 0;
  top: 82px;
  width: 74px;
  height: 74px;
}
.fh-sink i:nth-child(2) {
  left: 52px;
  top: 64px;
  width: 96px;
  height: 92px;
  animation-delay: -0.8s;
}
.fh-sink i:nth-child(3) {
  left: 128px;
  top: 78px;
  width: 82px;
  height: 78px;
  animation-delay: -1.6s;
}
.fh-sink i:nth-child(4) {
  left: 18px;
  top: 112px;
  width: 190px;
  height: 44px;
  border-radius: 22px;
  animation-delay: -2.2s;
}
.fh-sink i:nth-child(5) {
  display: none;
}
@keyframes fhPuff {
  to {
    transform: translateY(-4px) scale(1.03);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fh-sink i {
    animation: none;
  }
}
/* Olyhoo tripping over a desk (HooHop): a wider picture */
.fh-mid .fc-olyhoo[src$='olyhoo-trip4.webp'] {
  width: 210px;
}
/* Olyhoo shrugging among spilled desk things (OlyMatch, out of swaps): a wider picture */
.fh-mid .fc-olyhoo[src$='olyhoo-shrug.webp'] {
  width: 210px;
}
/* Olyhoo buried in toy blocks (HooBlocks): a wider picture */
.fh-mid .fc-olyhoo[src$='olyhoo-blocks.webp'] {
  width: 210px;
}
/* Olyhoo seeing stars after a bump (OlyFly): a slow dizzy wobble */
.fh-mid .fc-olyhoo[src$='olyhoo-dizzy.webp'] {
  width: 190px;
  animation: fhDizzy 1.8s ease-in-out infinite;
}
@keyframes fhDizzy {
  0%,
  100% {
    transform: rotate(-6deg) translateX(-4px);
  }
  50% {
    transform: rotate(6deg) translateX(4px);
  }
}
@keyframes fhRoll {
  0%,
  100% {
    transform: rotate(-10deg) translateY(0);
  }
  50% {
    transform: rotate(10deg) translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fh-mid .fc-olyhoo[src$='olyhoo-dizzy.webp'],
  .fh-mid .fc-olyhoo[src$='olyhoo-roll.webp'] {
    animation: none;
  }
}
.fly-card.fc-hero .fh-score {
  font-family: Fredoka, Nunito, system-ui;
  font-weight: 700;
  font-size: 76px;
  line-height: 1;
  color: var(--white);
  text-shadow:
    0 4px 0 var(--navy-deep),
    0 10px 28px rgba(var(--navy-rgb), 0.6);
}
.fh-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.fh-foot {
  width: min(400px, 100%);
}
/* a cleared level on a short screen: Olyhoo with the cup smaller, so the result fits under the sign */
.fly-card.fh-tight .fh-mid .fc-olyhoo,
#s-maze .fly-card.fh-tight .fh-mid .fc-olyhoo {
  width: 84px;
}
.fc-hero .fc-done {
  color: var(--white);
  text-shadow: 0 1px 6px rgba(var(--navy-rgb), 0.8);
}
.fc-hero .fc-foot,
.fc-hero .fc-foot b {
  color: var(--white);
  justify-content: center;
}
.fc-hero .fc-foot {
  gap: 16px;
}
/* the start card's label over the title (OlyTower's library) and the level's goal under it */
.fc-tag {
  display: inline-flex;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fc-goal {
  display: inline-block;
  margin: 6px 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}
/* how to play: numbered steps, each a number, a picture and a few words on one line */
.fc-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
}
.fc-steps li {
  display: grid;
  grid-template-columns: 24px 36px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-top: 1px solid var(--slate-100);
}
.fc-steps li:first-child {
  border-top: 0;
}
.fc-steps b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.fc-steps i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-style: normal;
}
.fc-steps i .i {
  width: 20px;
  height: 20px;
}
.fc-steps span {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.25;
}
.fc-steps .fc-kbd {
  font-size: 10px;
}
.fc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.fc-grid div {
  display: grid;
  grid-template-columns: minmax(34px, auto) 1fr; /* a key's name (Space) widens its box; a picture stays 34px */
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  text-align: left;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-bottom-width: 4px; /* 3D, like the Play button under it */
  border-radius: 16px;
  padding: 8px 10px;
}
.fc-grid i {
  grid-row: 1/3;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-bottom-width: 3px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 16px;
}
/* a key's name in place of the tap picture, on a computer (18-game-core.js onKeys): the box widens to fit Space or the arrows */
.fc-grid i.key {
  width: auto;
  min-width: 34px;
  padding: 0 7px;
}
.fc-kbd {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy-ink);
  white-space: nowrap;
}
.fc-grid b {
  font-size: 13px;
  color: var(--slate-900);
  font-weight: 900;
  line-height: 1.1;
}
.fc-grid small {
  font-size: 10.5px;
  color: var(--slate-400);
  font-weight: 800;
}
.fc-pows {
  display: flex;
  justify-content: space-around;
  background: rgba(var(--blue-50-rgb), 0.8);
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  padding: 8px 4px 6px;
  margin-bottom: 14px;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--slate-700);
}
.fc-pows span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fc-pows .fc-pic {
  width: 38px;
  height: 38px;
}
.fc-pic {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.fc-pic.sm {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: -5px;
}
.fc-play {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  font-family: Fredoka, Nunito, system-ui;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(180deg, var(--navy-bright), var(--navy));
  box-shadow:
    0 8px 0 var(--navy-deep),
    0 16px 25px rgba(var(--navy-rgb), 0.35);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
.fc-play:active {
  transform: translateY(6px);
  box-shadow:
    0 2px 0 var(--navy-deep),
    0 6px 15px rgba(var(--navy-rgb), 0.35);
}
.fc-grid i .i {
  width: 20px;
  height: 20px;
  color: var(--navy);
}
.fc-grid i.two {
  display: flex;
  justify-content: center;
}
.fc-grid i.two .i {
  width: 15px;
  height: 15px;
}
.fc-grid i.two .i + .i {
  margin-left: -3px;
}
/* the app's own line icons (no emoji), in the stats' colour */
.fc-stats .i {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}
.fc-play .fc-rep {
  width: 28px;
  height: 28px;
  margin-right: -4px;
}
.fc-play em {
  font-style: normal;
  background: rgba(var(--white-rgb), 0.2);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 15px;
}
.fc-done {
  margin-top: 12px;
  min-height: 44px; /* a finger's tap, though it reads as a quiet link */
  padding: 0 14px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 900;
  color: var(--slate-500);
  font-size: 15px;
  cursor: pointer;
}
/* a start once Level 2 is reached: a quiet way to choose any level reached, under Not Now (18-game-core.js pickButton) */
.fc-reset {
  margin-top: 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: rgba(var(--white-rgb), 0.75);
  text-decoration: underline;
  cursor: pointer;
}
/* Choose a Level: over the game, a panel of every level reached, ten to a row, the one played next marked in gold */
.lv-pick {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-rows: minmax(0, 1fr); /* the panel fits the screen and its list scrolls (220 levels made it taller than the screen) */
  place-items: center;
  padding: calc(20px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px calc(20px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  background: rgba(var(--navy-deep-rgb), 0.55);
}
.lv-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(360px, 100%);
  max-height: 100%;
  padding: 18px 14px 14px;
  border-radius: 22px;
  background: rgba(var(--navy-rgb), 0.95);
  border: 1px solid rgba(var(--white-rgb), 0.2);
  color: var(--white);
}
.lv-panel h2 {
  margin: 0 0 8px;
  text-align: center;
  font-family: Fredoka, Nunito, system-ui;
  font-size: 24px;
}
.lv-x {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--white-rgb), 0.15);
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.lv-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lv-list h3 {
  margin: 10px 4px 6px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.8;
}
.lv-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.lv-grid button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.lv-grid button.now {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--white-rgb), 0.9);
}
.fc-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--slate-400);
}
.fc-foot b {
  color: var(--slate-900);
}
.fly-paused {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(var(--slate-900-rgb), 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--white);
  font-family: Fredoka, Nunito, system-ui;
  cursor: pointer;
}
.fly-paused[hidden] {
  display: none;
}
/* the 3D play button on a paused game (OlyTower first): a tap anywhere carries on; it breathes gently */
.fp-play {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 16px rgba(var(--navy-deep-rgb), 0.45));
  animation: olyhooBreathe 2.4s ease-in-out infinite;
}
.fly-paused b {
  font-family: Fredoka, Nunito, system-ui;
  text-shadow: 0 3px 0 var(--navy-deep);
}
.fly-paused b {
  font-size: 40px;
  font-weight: 700;
}
.fly-paused span {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.9;
}
.fc-score {
  font-family: Fredoka, Nunito, system-ui;
  font-size: 56px;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1;
  margin: 4px 0;
}
.fc-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 4px 0 16px;
  font-weight: 900;
  color: var(--slate-600);
}
/* kept in this file: it must come after ".fc-stats .i" (both can style the same element) */
.stile-st .i {
  width: 12px;
  height: 12px;
}
/* kept in this file: it must come after ".fc-pic.sm" (both can style the same element) */
[data-sharebox] [data-share] {
  justify-content: center;
  width: 100%;
}
/* the Arcade's owl card (#pr-card): big centred picture and name. The card is always hidden now (src/js/06-home-levels.js) */
#pr-card > .row {
  flex-direction: column;
  text-align: center;
  gap: 8px;
}
#pr-card .avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 30px;
}
#pr-card .avatar-lg img {
  width: 88px;
  height: 88px;
}
/* kept in this file: it must come after ".fc-stats .i" (both can style the same element) */
.q-streak .i {
  width: 18px;
  height: 18px;
}
/* kept in this file: it must come after ".fc-play em" (both can style the same element) */
.kt2-p em {
  font-style: normal;
  font-weight: 900;
  color: var(--navy);
}
/* kept in this file: it must come after ".ph-owl > *, .ph-owl img" (both can style the same element) */
.owl-badge {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--white), var(--gold-light));
  box-shadow:
    0 0 0 3px rgba(var(--white-rgb), 0.92),
    0 8px 18px -8px rgba(var(--slate-900-rgb), 0.5);
}
/* kept in this file: it must come after ".ph-owl > *, .ph-owl img" (both can style the same element) */
.owl-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  transform-origin: 50% 35%;
}
/* the parts of a game's box that only a wide screen shows (src/css/97-desktop.css) */
.gm-pic {
  display: none;
}
@media (max-width: 999.98px) {
  .gm-demo,
  .gm-lv,
  .gm-help,
  .gm-play {
    display: none;
  }
}
/* the picture, name and cost sit together on a wide screen (src/css/97-desktop.css); on a phone .gm-hero adds no box (display: contents) */
@media (max-width: 999.98px) {
  .gm-hero {
    display: contents;
  }
}
/* the Arcade locked by a parent */
.gm-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 12px;
  text-align: center;
}
.gm-locked > img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.gm-locked b {
  font-size: 20px;
  color: var(--navy-deep);
}
.gm-locked p {
  margin: 0 0 8px;
  color: var(--slate-600);
}
/* the Arcade on a phone or tablet: no box around the games and no 'Games' heading (the screen is already called
 Arcade); the tiles sit on the page and the star count moves up by the title. A wide screen keeps
 its own Arcade box (src/css/97-desktop.css) */
@media (max-width: 999px) {
  #pr-games {
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  #pr-games .gm-head {
    display: none;
  }
  .ph-stars {
    margin: 0 12px 0 auto;
  }
  /* locked: the stars at the top are enough */
  .gm-locked .coins {
    display: none;
  }
  /* every game's name reads on any picture: the name sits at the
 bottom on the darkest part of the box, with a stronger dark band behind it and a dark outline round each letter; the
 star cost and the Level badge (.gm-best) share one line under it, so the name stays low on the dark part */
  .gm-tile.poster {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-end;
    align-items: center;
    column-gap: 6px;
    row-gap: 6px;
  }
  .gm-tile.poster::before {
    background: linear-gradient(
      180deg,
      rgba(var(--forest-shade-rgb), 0) 32%,
      rgba(var(--forest-shade-rgb), 0.55) 58%,
      rgba(var(--forest-shade-rgb), 0.92)
    );
  }
  /* the name and the star cost sit inside .gm-hero, which is display: contents, so ".gm-tile.poster > *" never lifted
     them: they were drawn UNDER the dark band (the real reason the names looked dull); lift them above it */
  .gm-tile.poster .gm-hero > * {
    position: relative;
  }
  .gm-tile.poster b {
    flex-basis: 100%;
    margin-top: 0;
    font-size: 21px;
    line-height: 1.1;
    -webkit-text-stroke: 5px rgba(var(--forest-shade-rgb), 0.9);
    paint-order: stroke fill;
    text-shadow: 0 2px 8px rgba(var(--black-rgb), 0.6);
  }
  .gm-tile.poster .gm-best {
    margin-left: auto;
    background: rgba(var(--forest-shade-rgb), 0.75);
  }
}
/* Olyhoo's videos on YouTube: one slim strip at the top of the Arcade, one sentence */
#s-profile .pc-yt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--navy);
  text-decoration: none;
}
#s-profile .pc-yt-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-50);
}
#s-profile .pc-yt-ic .i {
  width: 22px;
  height: 22px;
}
#s-profile .pc-yt-t {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap; /* one line */
  overflow: hidden;
  text-overflow: ellipsis;
}
#s-profile .pc-yt-go {
  flex: none;
  padding: 7px 10px;
  border-radius: 99px;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
/* the smallest phones (320 px): a little smaller, so the YouTube strip's words are never cut short */
@media (max-width: 340px) {
  #s-profile .pc-yt {
    gap: 8px;
    padding: 9px 10px;
  }
  #s-profile .pc-yt-ic {
    width: 30px;
    height: 30px;
  }
  #s-profile .pc-yt-t {
    font-size: 13px;
  }
  #s-profile .pc-yt-go {
    padding: 6px 8px;
  }
  .fly-hud {
    gap: 5px;
  }
  .fly-chip {
    padding: 7px 7px; /* the close, pause, Undo, level and clock all fit on one line */
    gap: 4px;
  }
}
/* a won level's finish (18-game-core.js levelFinish): its light and the game's own shapes (leaves, toy
   cubes, paper, bubbles, stars) over the game, and the level's sign swinging down, which stays above the card; under the
   card, over the game and its top bar */
.lvf {
  position: absolute;
  inset: 0;
  z-index: 1; /* the card, the same or higher and later in the page, always covers it */
  overflow: hidden;
  cursor: pointer;
}
.lvf.done {
  pointer-events: none;
}
.lvf-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* once the card has come: the light and shapes fade away, the sign stays */
.lvf .lvf-cv {
  transition: opacity 0.6s;
}
.lvf.done .lvf-cv {
  opacity: 0.55;
}
.lvf.still .lvf-cv {
  opacity: 0;
}
.lvf-sign {
  position: absolute;
  left: 50%;
  top: calc(56px + env(safe-area-inset-top, 0px)); /* under the top bar, so its score stays in sight */
  width: min(86%, 360px);
  transform-origin: 50% 0;
  transform: translate(-50%, -110%);
  display: grid;
  place-items: center;
  pointer-events: none; /* dropping in, it passes over ✕: a tap there still reaches ✕ (a tap anywhere else still skips) */
}
.lvf-sign img {
  width: 100%;
  display: block;
  grid-area: 1/1;
}
.lvf-sign b {
  grid-area: 1/1;
  align-self: end;
  margin-bottom: 17%;
  font-family: Fredoka, Nunito, system-ui;
  font-weight: 700;
  font-size: clamp(26px, 8.4vw, 36px);
  color: var(--gold-badge-bg);
  white-space: nowrap;
  text-shadow:
    0 2px 0 rgba(var(--bark-night-rgb), 0.9),
    0 -1px 0 rgba(var(--bark-night-rgb), 0.6),
    2px 0 0 rgba(var(--bark-night-rgb), 0.6),
    -2px 0 0 rgba(var(--bark-night-rgb), 0.6),
    0 4px 10px rgba(var(--bark-night-rgb), 0.5);
}
/* HooSort: the glass lab panel (taller than the other signs, so a little narrower); navy words with a white edge,
   in its middle */
.lvf.lab .lvf-sign {
  width: min(78%, 320px);
}
.lvf.lab .lvf-sign b {
  align-self: center;
  margin: 0 0 2%;
  font-size: clamp(26px, 8vw, 35px);
  color: var(--navy-deep);
  text-shadow:
    0 2px 0 var(--white),
    0 -1px 0 var(--white),
    2px 0 0 var(--white),
    -2px 0 0 var(--white);
}
/* OlyMaze: the space banner; navy words with a soft white edge on its light moonlit glass, which stands out on the
   maze's navy sky */
.lvf.space .lvf-sign {
  width: min(82%, 340px);
}
.lvf.space .lvf-sign b {
  align-self: center;
  margin: 0;
  font-size: clamp(26px, 8vw, 35px);
  color: var(--navy-deep);
  text-shadow:
    0 2px 0 var(--white),
    0 0 8px rgba(var(--sky-500-rgb), 0.6);
}
/* HooFlap: the cloud banner; navy words with a white edge on its pale sky middle */
.lvf.sky .lvf-sign {
  width: min(84%, 350px);
}
.lvf.sky .lvf-sign b {
  align-self: center;
  margin: 0 0 1%;
  font-size: clamp(26px, 8vw, 35px);
  color: var(--navy-deep);
  text-shadow:
    0 2px 0 var(--white),
    0 -1px 0 var(--white),
    2px 0 0 var(--white),
    -2px 0 0 var(--white);
}
/* OlyTower: the carved library plaque; its words on the plate's middle */
.lvf.library .lvf-sign b {
  align-self: center;
  margin: 0 0 2%;
}
/* OlyMatch: the chalkboard sign; its words in white chalk on the slate */
.lvf.desk .lvf-sign b {
  align-self: center;
  margin: 0 0 3%;
  font-size: clamp(26px, 8vw, 35px);
  color: var(--white);
  text-shadow:
    0 0 6px rgba(var(--white-rgb), 0.45),
    0 2px 0 rgba(var(--desk-green-rgb), 0.9);
}
/* HooBlocks: the sign framed in toy blocks; its words sit on the cream plate in the middle, navy with a white edge */
.lvf.blocks .lvf-sign b {
  align-self: center;
  margin: 0 0 1%;
  font-size: clamp(24px, 7.6vw, 33px);
  color: var(--navy-deep);
  text-shadow:
    0 2px 0 var(--white),
    0 -1px 0 var(--white),
    2px 0 0 var(--white),
    -2px 0 0 var(--white);
}
.lvf-sign.in {
  animation: lvfSwing 1.3s cubic-bezier(0.25, 0.8, 0.3, 1) forwards;
}
@keyframes lvfSwing {
  0% {
    transform: translate(-50%, -110%) rotate(-6deg);
  }
  45% {
    transform: translate(-50%, 6%) rotate(4deg);
  }
  65% {
    transform: translate(-50%, 2%) rotate(-2.5deg);
  }
  82% {
    transform: translate(-50%, 4%) rotate(1.2deg);
  }
  100% {
    transform: translate(-50%, 3%) rotate(0);
  }
}
/* the card of a finished go counts its points up first; its buttons come once the count is done */
.fly-card.counting .fc-play,
.fly-card.counting .fc-done {
  opacity: 0;
  pointer-events: none;
}
.fly-card .fc-play,
.fly-card .fc-done {
  transition: opacity 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  .lvf-sign.in {
    animation: none;
    transform: translate(-50%, 3%);
  }
}
/* a won level on the boards: HooBlocks' blocks and OlyMatch's tiles glow, swell and pop, in a wave from the top corner */
.bk-c.fin {
  animation: finPop 0.6s var(--d, 0ms) cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}
.mt-t.fin img {
  animation: finPop 0.6s var(--d, 0ms) cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}
@keyframes finPop {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1.25) rotate(-6deg);
    filter: brightness(1.6) drop-shadow(0 0 8px rgba(var(--amber-400-rgb), 0.95));
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(20deg);
    filter: brightness(1.8);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bk-c.fin,
  .mt-t.fin img {
    animation: none;
  }
}
/* the panel beside a game is for a computer only (97-desktop.css shows it there) */
.g-side {
  display: none;
}

/* 91-game-olyhoo.css */
/* Olyhoo inside the games: these rules sit in the quiz app's 20-olyhoo.css and 40-home.css, which are not copied
   whole. Copied word for word; refresh them when those files change. */
.bk-olyhoo img.tapped {
  animation: olyhooTap 0.6s cubic-bezier(0.3, 0.8, 0.4, 1.2);
}
.fc-olyhoo {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: -70px auto 2px;
  filter: drop-shadow(0 6px 8px rgba(var(--slate-900-rgb), 0.25));
  animation: olyhooBreathe 3s ease-in-out infinite;
  transform-origin: 50% 90%;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .fc-olyhoo {
    animation: none;
  }
}
.bk-olyhoo {
  position: relative;
  height: 92px;
  align-self: flex-start;
  margin-left: 6px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.bk-olyhoo img {
  height: 92px;
  width: auto;
  filter: drop-shadow(0 6px 8px rgba(var(--black-rgb), 0.35));
  animation: otipBob 2.6s ease-in-out infinite;
}
.fc-done {
  text-transform: capitalize;
}

/* 95-utilities.css */
/* Small utilities (one setting each) for page templates; they replace fixed style="...".
 After every screen file (only the computer-only 97-desktop.css comes later), so a utility wins over a screen rule of the same weight; anything that must beat a stronger rule says why. */
.ai-c {
  align-items: center;
}
.c-gold {
  color: var(--gold-bright);
}
.c-red {
  color: var(--red-bad);
}

/* a thank-you that is not a right answer: navy, as green is kept for right answers */
.c-navy {
  color: var(--navy);
}
.c-soft {
  color: var(--slate-500);
}
.cur-p {
  cursor: pointer;
}
.d-flex {
  display: flex;
}
.fs-18 {
  font-size: 18px;
}
.fs-19 {
  font-size: 19px;
}
.fs-22 {
  font-size: 22px;
}
.fw-700 {
  font-weight: 700;
}
.fw-800 {
  font-weight: 800;
}
.fw-900 {
  font-weight: 900;
}
.fwrap-no {
  flex-wrap: nowrap;
}
.gap-14 {
  gap: 14px;
}
.gap-6 {
  gap: 6px;
}
.jc-c {
  justify-content: center;
}
.jc-sb {
  justify-content: space-between;
}
.m-0 {
  margin: 0;
}
.m-12-0-0 {
  margin: 12px 0 0;
}

.m-2-0-10 {
  margin: 2px 0 10px;
}
.m-2-0-8 {
  margin: 2px 0 8px;
}
.m-4-0 {
  margin: 4px 0;
}
.m-6-0-0 {
  margin: 6px 0 0;
}
.m-8-0-0 {
  margin: 8px 0 0;
}
.maxw-380 {
  max-width: 380px;
}
.mb-0 {
  margin-bottom: 0;
}
.minh-18 {
  min-height: 18px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 4px;
}
.mt-6 {
  margin-top: 6px;
}
.mt-8 {
  margin-top: 8px;
}
.op-75 {
  opacity: 0.75;
}
.pos-rel {
  position: relative;
}
.ta-c {
  text-align: center;
}
.w-full {
  width: 100%;
}
.wb-all {
  word-break: break-all;
}
.ws-no {
  white-space: nowrap;
}
.z-1 {
  z-index: 1;
}
.va-2 {
  vertical-align: -2px;
}
.measure {
  position: absolute;
  visibility: hidden;
  font-size: 16px;
}
.inline-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

/* 97-desktop.css */
/* ---- A computer (1000 px and wider). Phones and tablets never see any of this; last in name order, so it is the last
 word. Taken from inside the best learning apps on a laptop (Duolingo, Brilliant), in the app's own colours:
 - a white page with a menu on the left: two-tone icons, the page you are on in a light blue box, the child at its foot;
 - cards with a 2 px edge and a deeper one under what can be pressed (the phone's own 3D look, kept);
 - one thing to do first on each screen: carry on the test left halfway, start a test, check an answer;
 - a test is Olyhoo's side on the left and the question in a card of its own on the right, its edge red or green after
   Check; results are a celebration on the left and what to learn from on the right.
 One serif (Fraunces) for the big hellos, the page titles and the score; the rest in Plus Jakarta Sans. ---- */

/* ======== the sheets that slide up on a phone open in the middle ======== */
@media (min-width: 1000px) {
  .av-sheet {
    align-items: center;
  }
  .av-panel {
    max-width: 760px;
    border-radius: 24px;
  }
  .av-panel .av-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  /* Messages, a full page on a phone, is a window in the middle like the other sheets */
  .msg-sheet {
    align-items: center;
  }
  .msg-sheet .av-panel {
    height: auto;
    max-height: min(86vh, 760px);
    border-radius: 24px;
  }
}

/* ======== the page, the type and the menu ======== */
@media (min-width: 1000px) {
  body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--white);
  }
  .wrap {
    max-width: 1280px;
    padding: 30px 40px 40px;
    border: none;
    background: var(--white);
  }
  #s-welcome {
    max-width: 480px;
    margin: 0 auto;
  }
  .pagehead {
    margin: 0 0 22px;
  }
  .pagehead h1,
  #c-title {
    font-family: Fraunces, Georgia, serif;
    font-size: 40px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--navy-ink);
  }
  .sechead h2,
  .pl-h,
  h3.pc-sec,
  #r-learn-h,
  #pr-games .gm-head h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--navy-ink);
    text-transform: none;
  }
  .sechead h2,
  .pl-h {
    text-transform: capitalize; /* Title Case like the rest of the app */
  }

  /* the menu on the left */
  .tabbar {
    top: var(--net-top);
    bottom: 0;
    left: 0;
    width: 248px;
    max-width: none;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 92px 16px 22px;
    background: var(--white);
    border: 0;
    border-right: 2px solid var(--slate-200);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .tabbar::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 26px;
    width: 40px;
    height: 40px;
    background: url('art/owl.webp') center / contain no-repeat;
  }
  .tabbar::after {
    content: 'Olympiad Owl';
    position: absolute;
    left: 74px;
    top: 34px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--navy-ink);
  }
  .tabbar button {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: 52px;
    padding: 8px 14px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--slate-600);
  }
  .tabbar button:hover {
    background: var(--slate-50);
  }
  .tabbar button.on,
  .tabbar button.on:hover {
    background: var(--sky-wash);
    border-color: var(--blue-200);
    color: var(--navy);
    box-shadow: none;
  }
  /* the 3D pictures (art/ui3d tab-*), a little bigger on a computer */
  .tabbar button .ti,
  .tabbar button.on .ti {
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: none;
    color: inherit;
  }
  .tabbar button .ti .i3d {
    width: 30px;
    height: 30px;
  }
  /* the child at the foot of the menu */
  .tb-me {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--slate-50);
  }
  .tb-me img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--white);
  }
  .tb-me span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
  }
  .tb-me b {
    font-size: 14px;
    color: var(--slate-900);
  }
  .tb-me small {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-600);
  }
  body:not(.inquiz):has(#tabbar:not([hidden])) {
    padding-left: 248px;
  }

  /* cards: the phone's 2 px edge; what can be pressed keeps the deeper edge under it and sinks a little under the mouse */
  .card {
    border-radius: 22px;
    border-bottom-width: 2px;
    padding: 22px 24px;
    box-shadow: none;
  }
  .stile,
  .kc,
  .fr-act,
  .h-arc,
  .h-next,
  .kt2 {
    transition:
      transform 0.12s,
      border-color 0.2s,
      background 0.2s;
  }
  .stile:hover,
  .kc:hover,
  .fr-act:hover,
  .h-arc:hover,
  .kt2:hover {
    transform: translateY(1px);
    border-color: var(--blue-200);
    background: var(--hover-wash);
  }
  .btn:hover,
  .gm-play:hover,
  .h-arc-go:hover {
    filter: brightness(1.1);
  }
}

/* ======== Home: the hello across the top; carry on, then the subjects; the week, the month and the Arcade on the right ======== */
@media (min-width: 1000px) {
  #s-home.on {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto auto auto 1fr;
    column-gap: 32px;
    row-gap: 16px;
    align-items: start;
  }
  /* the right column: the week, the month and the Arcade, one under another whatever the left column holds */
  #s-home .h-side {
    grid-column: 2;
    grid-row: 2 / span 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  /* the dark header becomes the page's own hello, with the streak and stars beside it */
  #s-home .hero {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--navy-ink);
    overflow: visible;
  }
  #s-home .hero::before,
  #s-home .hero::after,
  #s-home .hero .xpbar,
  #s-home .hero .hs-row {
    display: none;
  }
  #s-home .hero > .row {
    grid-column: 1;
    justify-content: flex-start;
    gap: 18px;
  }
  #s-home .hero > .row > div:first-child {
    order: 2;
  }
  #s-home .hero h1 {
    font-family: Fraunces, Georgia, serif;
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.05;
    color: var(--navy-ink);
    margin: 0 0 8px;
  }
  #h-hello.long {
    font-size: 36px;
  }
  #h-hello.xlong {
    font-size: 30px;
  }
  .hero .cls {
    background: var(--sky-wash);
    color: var(--navy);
    border: 0;
  }
  .hero #h-avatar {
    width: 84px;
    height: 84px;
  }
  #s-home .hero .lvl {
    grid-column: 1;
    margin: 6px 0 0 102px;
    justify-content: flex-start;
    gap: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-600);
  }
  /* the streak and the stars: two small boxes on the right */
  #s-home .hero .tiles {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 300px;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #s-home .hero .tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 18px;
    box-shadow: none;
    color: var(--navy-ink);
  }
  #s-home .hero .tile .ic {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--gold-light);
    color: var(--gold-deep);
    box-shadow: none;
  }
  #s-home .hero .t-stars .ic {
    background: var(--sky-wash);
    color: var(--navy);
  }
  #s-home .hero .tile .ic .i {
    width: 20px;
    height: 20px;
  }
  #s-home .hero .tile .l {
    font-size: 12px;
    color: var(--slate-600);
  }
  #s-home .hero .tile .v {
    font-size: 16px;
    color: var(--navy-ink);
  }

  /* the test left halfway: one navy card to carry it on */
  .h-next:not([hidden]) {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 18px 24px;
    border: 0;
    border-radius: 22px;
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 5px 0 var(--navy-deep);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .h-next:hover {
    filter: brightness(1.08);
  }
  .h-next .spic {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }
  .hn-t {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .hn-t b {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
  }
  .hn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue-200);
    white-space: nowrap;
  }
  .hn-bar {
    flex: 0 1 240px;
    height: 8px;
    border-radius: 99px;
    background: rgba(var(--white-rgb), 0.18);
    overflow: hidden;
  }
  .hn-bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--sky-400);
  }
  .hn-go {
    padding: 13px 28px;
    border-radius: 14px;
    background: var(--gold);
    color: var(--navy-ink);
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 0 var(--gold-mid);
  }

  #s-home .sechead {
    grid-column: 1;
    grid-row: 3;
    margin: 8px 0 -4px;
  }

  /* the subjects: a picture beside each name, three to a row, so all of them fit one screen */
  #s-home #h-subjects {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  #h-subjects .stile {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    justify-items: start;
    min-height: 0;
    padding: 10px 14px;
    text-align: left;
    border-radius: 18px;
    border-bottom-width: 4px;
  }
  #h-subjects .stile .spic {
    grid-row: 1 / span 2;
    width: 56px;
    height: 56px;
  }
  #h-subjects .stile b {
    align-self: end;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy-ink);
  }
  #h-subjects .stile .stile-st,
  #h-subjects .stile .stile-d {
    position: static;
    align-self: start;
    margin-top: 3px;
    padding: 0;
    background: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-ink);
  }
  #h-subjects .stile .stile-d {
    color: var(--navy);
  }
  #h-subjects .stile-st .i {
    width: 13px;
    height: 13px;
  }
  /* Ready for AI: last, across the row, as a dashed card */
  #h-subjects .stile[data-ai] {
    grid-column: 1 / -1;
    grid-template-columns: 44px auto 1fr;
    grid-template-rows: auto;
    border-style: dashed;
    border-bottom-width: 2px;
    padding: 8px 16px;
  }
  #h-subjects .stile[data-ai] .spic {
    grid-row: 1;
    width: 44px;
    height: 44px;
  }
  #h-subjects .stile[data-ai] b {
    align-self: center;
  }
  #h-subjects .stile[data-ai] .stile-d {
    justify-self: end;
    align-self: center;
    margin: 0;
    padding: 4px 11px;
    border-radius: 99px;
    background: var(--sky-wash);
    font-size: 12.5px;
  }

  /* the right column */
  #s-home .h-week {
    display: block;
    order: -1; /* the week first, then the month */
    margin: 0;
    padding: 18px 20px;
  }
  #s-home .hw {
    margin: 0;
  }
  .h-week h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--navy-ink);
  }
  .h-week .wk {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-500);
  }
  .h-week .wk-d i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0 auto 4px;
    border-radius: 50%;
    background: var(--slate-100);
    color: var(--navy-ink);
  }
  .h-week .wk-d.on i {
    background: var(--gold);
    box-shadow: 0 3px 0 var(--gold-mid);
  }
  .h-week .wk-d.now i {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
  .h-week .wk-d i .i {
    width: 14px;
    height: 14px;
  }
  .h-week p {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-600);
    text-align: center;
  }
  /* the Arcade: a picture, its name and stars, Play */
  .h-arc {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    background: var(--white);
    border-bottom-width: 4px;
  }
  .h-arc > img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
  }
  .h-arc-t {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .h-arc-t b {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy-ink);
  }
  .h-arc-t small {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-ink);
  }
  .h-arc-go {
    padding: 8px 18px;
    border-radius: 12px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    color: var(--navy);
    font-weight: 800;
    box-shadow: 0 3px 0 var(--slate-200);
  }
}

/* a small laptop (1000 to 1279 px): a narrower right column and the subjects two to a row, so every name fits */
@media (min-width: 1000px) and (max-width: 1279px) {
  #s-home.on {
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 24px;
  }
  #s-home .hero .tiles {
    width: 260px;
  }
  #s-home #h-subjects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #s-home .hero .tile .v {
    font-size: 14px;
  }
  .hn-t b {
    font-size: 19px;
  }
  .h-next .spic {
    width: 52px;
    height: 52px;
  }
}

/* ======== Choosing a test: each test a tile with its stars; the Mock Exam tall and navy; topics two to a row ======== */
@media (min-width: 1000px) {
  .c-bar {
    position: static;
    margin: 0 0 22px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #c-title {
    gap: 14px;
  }
  #c-title .tile-ic {
    width: 56px;
    height: 56px;
  }
  .kgrid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
    gap: 14px;
  }
  .kgrid3 .kc {
    position: relative;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
    padding: 16px 18px;
    border: 2px solid var(--slate-200);
    border-bottom-width: 4px;
    border-radius: 20px;
    box-shadow: none;
  }
  .kgrid3 .kc .kc-b {
    align-items: flex-start;
  }
  .kgrid3 .kc .kc-row,
  .kgrid3 .kc3 .kc-t {
    justify-content: flex-start;
    text-align: left;
  }
  .kc-ic {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sky-wash);
    color: var(--navy);
  }
  .kc-ic .i {
    width: 32px;
    height: 32px;
  }
  .kc-t {
    font-size: 18px;
    font-weight: 800;
  }
  .kc-s {
    font-size: 13.5px;
  }
  .kc3 .kc-m {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--gold-light);
    font-size: 13px;
    color: var(--gold-ink);
  }
  .kc-tic {
    display: none;
  }
  /* the real paper stands out */
  .kgrid3 .kc[data-kind='full'] {
    grid-column: 4;
    grid-row: 1 / span 2;
    justify-content: space-between;
    padding: 22px;
    background: var(--navy) url('art/olyhoo-wizard.webp') right 10px top 10px / 96px no-repeat;
    border: 0;
    box-shadow: 0 5px 0 var(--navy-deep);
  }
  .kc[data-kind='full']:hover {
    background-color: var(--navy-bright);
  }
  .kc[data-kind='full'] .kc-t {
    font-family: Fraunces, Georgia, serif;
    font-weight: 500;
    font-size: 32px;
  }
  .kc[data-kind='full'] .kc-t,
  .kc[data-kind='full'] .kc-s {
    color: var(--white);
  }
  .kc[data-kind='full'] .kc-ic {
    background: rgba(var(--white-rgb), 0.15);
    color: var(--white);
  }
  .kc[data-kind='full'] .kc-m {
    top: auto;
    bottom: 20px;
    left: 22px;
    right: auto;
  }
  #s-choose .pl-h {
    margin: 28px 0 12px;
  }
  .ktopics2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .ktopics2 .kt2 {
    padding: 12px 16px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-bottom-width: 4px;
    border-radius: 16px;
  }
  .kt2-n {
    font-size: 15px;
    font-weight: 700;
  }
}

/* ======== A test: Olyhoo's side on the left; the question in a card of its own on the right ======== */
@media (min-width: 1000px) {
  body.inquiz .wrap {
    max-width: none;
    margin: 0;
    padding: 16px 22px 22px 400px;
  }
  #s-quiz.on {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 38px);
    padding: 20px 44px 28px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 26px;
    transition:
      border-color 0.35s,
      box-shadow 0.35s;
  }
  /* after Check the card's edge says how it went: red for a wrong answer, green for a right one */
  #s-quiz.on:has(#q-opts .opt.wrong) {
    border-color: var(--rose-300);
    box-shadow: 0 0 0 4px var(--rose-50);
  }
  #s-quiz.on:has(#q-opts .opt.right):not(:has(#q-opts .opt.wrong)) {
    border-color: var(--emerald-200);
    box-shadow: 0 0 0 4px var(--emerald-50);
  }
  #s-quiz .q-head,
  #s-quiz .q-card,
  #s-quiz .opts,
  #s-quiz #q-fb,
  #s-quiz .navrow {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
  #s-quiz .q-head {
    position: static;
    max-width: none;
    margin: 0 0 22px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #s-quiz .q-card {
    margin-top: auto;
    margin-bottom: 26px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  #s-quiz .q-topic {
    margin-left: 0;
  }
  #s-quiz .q-card .qtext {
    font-size: 30px;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--navy-ink);
  }
  #s-quiz .opts:not(.pics) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  #s-quiz .opts:not(.pics) .opt {
    min-height: 76px;
    padding: 14px 18px 14px 14px;
    font-size: 22px;
    font-weight: 800;
    border-radius: 18px;
    border-bottom-width: 4px;
  }
  /* the Check / Next row sits under the answers here, not in Olyhoo's column */
  /* the Check / Next row at the foot of the card; the question shares the space above it (the row is there, empty, before
   a pick, so the question never sits low; tests/flows/layout-rules.mjs) */
  #s-quiz .navrow {
    width: 100%;
    margin-top: auto;
    padding-top: 24px;
  }
  #s-quiz .navrow .btn {
    min-width: 220px;
    min-height: 54px;
    font-size: 17px;
  }
  /* Continue in the colour of how it went */
  #s-quiz:has(#q-opts .opt.wrong) .q-go {
    background: var(--red-bad);
    border-color: var(--red-bad);
    box-shadow: 0 4px 0 var(--red-700);
  }
  #s-quiz:has(#q-opts .opt.right):not(:has(#q-opts .opt.wrong)) .q-go {
    background: var(--green-ok);
    border-color: var(--green-ok);
    box-shadow: 0 4px 0 var(--emerald-700);
  }
  .opt:hover:not(.locked):not(:disabled) {
    border-color: var(--blue-300);
  }

  /* Olyhoo's side: what Olyhoo says in a bubble, Olyhoo standing big below it */
  .q-dock {
    left: 0;
    top: var(--net-top);
    bottom: 0;
    transform: none;
    width: 400px;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 26px 0 30px;
    background: linear-gradient(180deg, var(--white) 50%, var(--sky-wash));
  }
  .q-dock::after {
    display: none;
  }
  .q-dock .qd-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 0;
  }
  .q-dock .qd-bubble {
    order: 1;
    flex: none;
    max-width: 340px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 14px 18px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 20px 20px 20px 6px;
    box-shadow: none;
  }
  #s-quiz #q-say {
    max-height: none;
    font-size: 16px;
    line-height: 1.5;
  }
  #s-quiz:has(#q-opts .opt.wrong) .qd-bubble {
    background: var(--rose-50);
    border-color: var(--rose-200);
  }
  #s-quiz:has(#q-opts .opt.right):not(:has(#q-opts .opt.wrong)) .qd-bubble {
    background: var(--emerald-50);
    border-color: var(--emerald-200);
  }
  .olyhoo-talk.dock {
    order: 2;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 190px;
    height: 220px;
    margin: 0 0 6px;
    transform: none;
  }

  /* a reading passage: the passage on a soft page on the left of the card, the question and answers on the right */
  #s-quiz.on:has(#q-passage:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 36px;
    align-content: start;
  }
  #s-quiz:has(#q-passage:not([hidden])) .q-head {
    grid-column: 1 / -1;
  }
  #s-quiz:has(#q-passage:not([hidden])) .q-card {
    display: contents;
  }
  #s-quiz:has(#q-passage:not([hidden])) .q-card > .row,
  #s-quiz:has(#q-passage:not([hidden])) .qtext,
  #s-quiz:has(#q-passage:not([hidden])) .pic,
  #s-quiz:has(#q-passage:not([hidden])) .opts,
  #s-quiz:has(#q-passage:not([hidden])) #q-fb,
  #s-quiz:has(#q-passage:not([hidden])) .navrow {
    grid-column: 2;
    max-width: none;
  }
  #s-quiz:has(#q-passage:not([hidden])) #q-passage {
    grid-column: 1;
    grid-row: 2 / span 5;
    align-self: stretch;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    margin: 0;
    padding: 22px 26px;
    border-radius: 18px;
    background: var(--passage);
    font-size: 16px;
    line-height: 1.75;
  }
  #s-quiz:has(#q-passage:not([hidden])) .qtext {
    font-size: 24px;
  }
  #s-quiz:has(#q-passage:not([hidden])) .opts:not(.pics) {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #s-quiz:has(#q-passage:not([hidden])) .opts:not(.pics) .opt {
    min-height: 58px;
    font-size: 17px;
    font-weight: 700;
  }
}

/* ======== Results: a celebration on the left, what to learn from on the right ======== */
@media (min-width: 1000px) {
  #s-result.on {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 0;
    align-items: start;
    max-width: none;
    min-height: calc(100vh - 70px);
    margin: 0;
  }
  /* nothing to learn (all right): one column, in the middle of the screen, not at its top (18 Nov 2026) */
  #s-result.on:has(#r-learn[hidden]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
  }
  #s-result .owl-say {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0;
    padding: 30px 30px 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
  }
  #s-result .owl-say .bubble {
    font-size: 18px;
    font-weight: 700;
    background: var(--sky-wash);
    border: 0;
    box-shadow: none;
  }
  #s-result > .card.ta-c {
    grid-column: 1;
    grid-row: 2;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    padding: 18px 0 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  #s-result .bigscore {
    font-family: Fraunces, Georgia, serif;
    font-size: 54px;
    font-weight: 500;
    color: var(--navy-ink);
  }
  #s-result .r-won {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 4px;
    padding: 6px 16px;
    border-radius: 99px;
    background: var(--gold-light);
    color: var(--gold-ink);
    font-size: 16px;
    font-weight: 800;
  }
  #s-result .r-main,
  #s-result #r-chal {
    min-height: 54px;
    font-size: 17px;
  }
  #s-result #r-learn {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: stretch;
    margin: 0;
    padding: 30px 36px;
    border: 0;
    border-left: 2px solid var(--slate-200);
    border-radius: 0;
    box-shadow: none;
  }
  #r-review {
    display: grid;
    gap: 12px;
  }
  #r-review > * {
    padding: 16px 18px;
    border: 2px solid var(--slate-200);
    border-radius: 18px;
    background: var(--white);
  }
}

/* ======== Friends, a friend's challenge ======== */
@media (min-width: 1000px) {
  #s-friends.on {
    max-width: 1000px;
  }
  .fr-acts {
    gap: 16px;
    margin-bottom: 26px;
  }
  .fr-act {
    padding: 0 0 16px;
    overflow: hidden;
    border-bottom-width: 4px;
    border-radius: 22px;
  }
  .fr-pic {
    width: 100%;
    max-width: none;
    height: 170px;
    border-radius: 0;
    object-fit: cover;
  }
  .fr-act b {
    font-size: 19px;
    font-weight: 800;
  }
  .fr-act small {
    font-size: 14px;
  }
  #s-challenge {
    max-width: 560px;
    margin: 48px auto 0;
  }
  .f-how:not([hidden]) {
    display: block;
    padding: 24px 28px;
  }
  .f-how h2 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 800;
    color: var(--navy-ink);
  }
  .f-how ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: fh;
  }
  .f-how li {
    position: relative;
    padding: 0 0 0 40px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--slate-600);
    counter-increment: fh;
  }
  .f-how li::before {
    content: counter(fh);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--white);
    background: var(--navy);
    border-radius: 50%;
  }
  .f-how b {
    color: var(--navy-ink);
  }
}

/* ======== Parents' Corner: the chart and subjects on the left, the history on the right; Settings in two columns ======== */
@media (min-width: 1000px) {
  #p-body:has(.pc-side) {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
  }
  #p-body .pc-side > h3:first-child {
    margin-top: 0;
  }
  #s-parents h3.pc-sec {
    margin: 24px 0 12px;
    letter-spacing: 0;
  }
  #p-body .pc-side > h3.pc-sec:first-child {
    margin-top: 0;
  }
  #s-parents #p-settings:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
  }
  #s-parents #p-settings > .about-link {
    grid-column: 1 / -1;
  }
  /* the Undo and Save bar: no tab bar below it, so it sits at the foot of the page, beside the menu */
  #pd-bar {
    left: calc(248px + (100vw - 248px) / 2);
    right: auto;
    width: 440px;
    transform: translateX(-50%);
    bottom: 24px;
  }
}

/* ======== the Arcade: a header with the star bank; the games three to a row, each with its picture, name, star cost,
 how it is played and Play ======== */
@media (min-width: 1000px) {
  #s-profile.on {
    /* only while the Arcade is open: on every other screen it stays hidden (.screen, src/css/10-base.css) */
    display: flex;
    flex-direction: column;
  }
  /* Olyhoo's YouTube strip under the games here; phones and tablets keep it at the top (src/css/90-arcade.css) */
  #s-profile > #pr-yt {
    order: 1;
    margin: 24px 0 0;
  }
  .ph-stars {
    display: none; /* the games box's own count, lifted beside the title, says it */
  }
  #s-profile .pagehead {
    margin-bottom: 20px;
  }
  #s-profile .pagehead h1::before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    width: 48px;
    height: 48px;
    margin-right: 14px;
    border-radius: 14px;
    background: var(--blue-100) url('art/posters/fly.webp') center 40% / cover;
  }
  #pr-games {
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  #pr-games .gm-head h2 {
    display: none; /* the page title already says Arcade */
  }
  #pr-games .gm-head {
    justify-content: flex-end;
    margin: -78px 64px 34px 0;
  }
  #pr-games .gm-head .coins {
    font-size: 18px;
    padding: 8px 16px;
  }
  /* the Arcade on a computer: the phone's game posters, four a row, all eight on one screen (each row half the room under
     the title); a click starts the game at once (06-home-levels.js), so a poster shows Play and its star cost when the
     mouse is on it, and the keys are beside the game while it is played (16-arcade-stars.js gameSide) */
  #s-profile .gm-grid {
    max-width: none;
    margin: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max(220px, calc((100vh - 190px) / 2));
    gap: 18px;
  }
  #s-profile .gm-tile.poster {
    aspect-ratio: auto;
    padding: 16px;
    border-radius: 24px;
    background-position: center 30%;
    box-shadow: 0 8px 0 rgba(var(--black-rgb), 0.12);
    transition:
      transform 0.15s,
      box-shadow 0.15s;
  }
  #s-profile .gm-tile[data-game='hop'] {
    background-position: 40% 60%;
  }
  #s-profile .gm-tile.poster:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 0 rgba(var(--black-rgb), 0.12);
  }
  .gm-hero {
    display: contents;
  }
  #s-profile .gm-tile.poster .gm-hero > * {
    position: relative; /* above the poster's shade and its demo */
    z-index: 1;
  }
  #s-profile .gm-tile.poster b {
    font-size: 26px;
  }
  #s-profile .gm-tile .gm-cost {
    font-size: 14px;
    padding: 3px 11px;
  }
  #s-profile .gm-tile.poster .gm-best {
    top: 14px;
    right: 14px;
    font-size: 13px;
    padding: 4px 11px;
  }
  .gm-lv {
    display: none;
  }
  /* the name and star cost at the top; the phone start's moves at the foot, as frosted tiles */
  #s-profile .gm-tile.poster .gm-hero > b {
    margin-top: 0;
  }
  .gm-help {
    display: block;
    margin-top: auto;
    align-self: stretch;
  }
  .gm-moves {
    display: flex;
    gap: 8px;
  }
  .gm-move {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px 9px;
    background: rgba(var(--navy-deep-rgb), 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(var(--white-rgb), 0.22);
    border-radius: 16px;
    text-align: center;
  }
  .gm-move .gs-key img {
    height: 40px;
    max-width: 88px;
  }
  .gm-move .gs-space em {
    font-size: 12px;
    inset: 0 0 4px;
  }
  .gm-move .gs-space i {
    font-size: 11px;
    padding: 1px 6px;
    top: -6px;
  }
  #s-profile .gm-tile.poster .gm-move b {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--white);
    text-shadow: none;
  }
  /* the mouse on a poster: the game's moving demo fills it (the phone start's own), its how-to tiles step aside */
  #s-profile .gm-tile.poster > .gm-demo {
    position: absolute;
    z-index: 0;
    inset: 0 0 58px; /* Play has its own strip under it */
    width: 100%;
    height: 100%;
    object-fit: contain; /* the whole start in sight, the poster softened round it */
    background: rgba(var(--navy-deep-rgb), 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 24px 24px 0 0;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
  }
  #s-profile .gm-tile.poster:hover > .gm-demo {
    opacity: 1;
  }
  #s-profile .gm-tile.poster:hover:has(.gm-demo) {
    background-color: var(--navy-deep); /* under the demo and round Play */
    background-blend-mode: multiply;
  }
  #s-profile .gm-tile.poster:hover:has(.gm-demo) .gm-help,
  #s-profile .gm-tile.poster:hover:has(.gm-demo) .gm-hero {
    visibility: hidden; /* the demo shows the game's own name and moves */
  }
  /* Play, with the star it costs, over the poster while the mouse is on it */
  .gm-play,
  #s-profile .gm-play {
    display: inline-flex;
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 16px;
    background: var(--navy);
    color: var(--white);
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 4px 0 var(--navy-deep);
    z-index: 2;
    opacity: 0;
    transform: translateY(-4px);
    transition:
      opacity 0.15s,
      transform 0.15s;
  }
  #s-profile .gm-tile.poster:hover .gm-play,
  #s-profile .gm-tile.poster:focus-visible .gm-play {
    opacity: 1;
    transform: none;
  }
  .gm-play em {
    font-style: normal;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--gold);
  }
  #s-profile .gm-play .i {
    width: 18px;
    height: 18px;
  }
}

/* ======== small type and targets: the listed small text raised to 12 px and in the darker grey; targets of at least 40 px ======== */
@media (min-width: 1000px) {
  .stile-st,
  .hero .cls,
  #c-sub,
  .q-topic,
  #s-quiz .q-card .q-topic #q-topic,
  .tb-me small,
  #s-welcome .tiny,
  #s-welcome .tiny a,
  .acct-links,
  .acct-links a,
  #s-parents .sb-n em {
    font-size: 12px;
  }
  .or,
  #s-parents .sb-n em,
  #s-parents #p-credits summary,
  #s-parents .pc-bh,
  .muted,
  .small.muted {
    color: var(--slate-600);
  }
  #c-sub {
    color: var(--navy);
  }
  .q-spk,
  #s-quiz .q-card .q-spk {
    width: 44px;
    height: 44px;
  }
  .rowx,
  #s-parents .rowx,
  #s-friends .rowx {
    width: 40px;
    height: 40px;
  }
  #s-parents .rowx,
  #s-friends .rowx {
    color: var(--slate-500);
  }
  .acct-links a,
  #s-welcome .tiny a {
    display: inline-block;
    padding: 10px 2px;
  }
}

/* ======== the front page on a computer: the hello beside the sign-in card, in a wide page (its pieces are in
 src/css/35-front-page.css) ======== */
@media (min-width: 1000px) {
  html.land body .wrap {
    max-width: 1200px;
    padding: 0 40px;
    background: none;
  }
  html.land #s-welcome.on {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 48px;
    align-items: center;
    max-width: none;
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--navy-ink);
  }
  /* the sign-in card under the hello, in the first screen of a laptop (18 Nov 2026: at 1366 x 768 it began at the
     screen's bottom edge); the app's cards beside both */
  html.land #s-welcome #w-auth {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    justify-self: start;
    width: 100%;
    max-width: 460px;
    margin: 24px 0 0;
    padding: 20px 24px 16px;
    border-radius: 24px;
    border-bottom-width: 2px;
    box-shadow: 0 24px 50px rgba(var(--navy-deep-rgb), 0.08);
  }
  html.land #s-welcome .land-hero {
    grid-column: 1;
    grid-row: 2;
    padding: 28px 0 0;
  }
  /* the app's cards beside the hello, the first thing seen; the sign-in card comes under both (the menu's Sign Up
     leads to it) */
  html.land #s-welcome .land-top {
    grid-column: 2;
    grid-row: 2 / span 2;
    padding: 28px 0 0;
  }
  html.land #s-welcome .land-top .land-stage {
    height: 520px;
    margin: 0;
  }
  /* the numbers in one row of four under the hello and the cards */
  html.land #s-welcome .land-numbers {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 48px 0 0;
  }
  html.land #s-welcome .land-numbers .land-facts {
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
  }
  html.land #s-welcome .land-numbers .land-facts div {
    padding: 26px 8px;
  }
  html.land #s-welcome .land-numbers .land-facts b {
    font-size: 40px;
  }
  html.land #s-welcome .land-body {
    grid-column: 1 / -1;
  }
}

/* a computer with a mouse (an iPad turned sideways is as wide but has no keys) */
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  /* the keys' note under the Check row, until the child first uses a key (10-question-screen.js) */
  #s-quiz .q-keys:not([hidden]) {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 12px auto 0;
    font-size: 13px;
    color: var(--slate-500);
    text-align: center;
  }
  #s-quiz .q-keys kbd {
    display: inline-block;
    min-width: 22px;
    padding: 1px 6px;
    font: inherit;
    font-weight: 700;
    color: var(--navy-ink);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-bottom-width: 2px;
    border-radius: 6px;
  }
}

/* a game on a computer (16-arcade-stars.js gameSide fills it, html.g-wide while it shows), laid out like a games website:
   the game in a rounded frame in the middle, 62% of its height wide, with its bar under it; how to play and the
   numbers on the left, the other games on the right, the game's world softened behind the whole page */
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  html.g-wide {
    --gf-h: calc(100vh - var(--net-top) - 128px); /* the frame's height: 24 px above it, its bar and 24 px below */
    --gf-w: calc(var(--gf-h) * 0.62);
    --gs-w: min(360px, calc(50vw - var(--gf-w) / 2 - 56px)); /* a side column */
  }
  html.g-wide #s-game,
  html.g-wide #s-blocks,
  html.g-wide .gm-scr {
    top: calc(var(--net-top) + 24px);
    bottom: 104px;
    width: var(--gf-w);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(var(--black-rgb), 0.45);
  }
  html.g-wide #s-game::before {
    display: none;
  }
  /* OlyMatch's start in the frame: the board a little nearer the title (the frame is shorter than a phone) */
  html.g-wide #s-match.hero-up:not(.hero-end) .mt-board {
    transform: translateY(-34px) scale(0.6);
  }
  .g-back:not([hidden]) {
    position: fixed;
    inset: -40px;
    z-index: 59;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.62) saturate(1.1);
  }
  .g-side:not([hidden]) {
    display: block;
  }
  .g-side .gs-col {
    position: fixed;
    z-index: 61;
    top: calc(var(--net-top) + 24px);
    bottom: 104px;
    width: var(--gs-w);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
  }
  .g-side .gs-left {
    right: calc(50vw + var(--gf-w) / 2 + 32px);
  }
  .g-side .gs-right {
    left: calc(50vw + var(--gf-w) / 2 + 32px);
  }
  .g-side .gs-card {
    padding: 22px 22px;
    background: rgba(var(--white-rgb), 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 44px rgba(var(--navy-deep-rgb), 0.3);
    color: var(--navy-ink);
  }
  .g-side h2 {
    margin: 0 0 16px;
    font-family: Fredoka, Nunito, system-ui;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy-deep);
  }
  .g-side .gs-right h2 {
    margin: 0;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(var(--black-rgb), 0.4);
  }
  .g-side .gs-keys {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
  }
  .g-side .gs-keys div {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .g-side dt {
    flex: none;
    width: 104px;
    display: grid;
    place-items: center;
  }
  .g-side dd {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy-deep);
  }
  .gs-key {
    position: relative;
    display: inline-grid;
    place-items: center;
  }
  .gs-key img {
    display: block;
    max-width: 104px;
    height: 54px;
    object-fit: contain;
  }
  .gs-space em {
    position: absolute;
    inset: 0 0 6px;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 15px;
    font-weight: 800;
    color: var(--navy);
  }
  .gs-space i {
    position: absolute;
    top: -8px;
    right: -6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-deep);
    font-style: normal;
    font-size: 13px;
    font-weight: 900;
  }
  .g-side .gs-nums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
  }
  .g-side .gs-nums img {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto 6px;
    object-fit: contain;
  }
  .g-side .gs-nums b {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--navy-deep);
  }
  .g-side .gs-nums small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--slate-500);
  }
  /* the other games, three a row */
  .g-side .gs-more {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .g-side .gs-game {
    position: relative;
    aspect-ratio: 1/1;
    border: 3px solid rgba(var(--white-rgb), 0.9);
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(var(--black-rgb), 0.3);
    transition: transform 0.15s;
  }
  .g-side .gs-game:hover {
    transform: translateY(-3px) scale(1.04);
  }
  .g-side .gs-game::before {
    content: '';
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, rgba(var(--navy-deep-rgb), 0), rgba(var(--navy-deep-rgb), 0.85));
  }
  .g-side .gs-game b {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    font-family: Fredoka, Nunito, system-ui;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
  }
  /* full screen (the bar's button): the game alone, as tall as the screen */
  html.g-full {
    --gf-h: 100vh;
  }
  html.g-full #s-game,
  html.g-full #s-blocks,
  html.g-full .gm-scr {
    top: 0;
    bottom: 0;
    border-radius: 0;
  }
  html.g-full .g-side .gs-col,
  html.g-full .g-side .gs-bar {
    display: none;
  }
  .g-side .gs-full {
    flex: none;
    padding: 10px 12px;
    border: 2px solid var(--slate-200);
    border-radius: 12px;
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
  }
  /* the bar under the game: its picture, name and level, and Choose a Level */
  .g-side .gs-bar {
    position: fixed;
    z-index: 61;
    left: 50%;
    bottom: 24px;
    width: var(--gf-w);
    height: 64px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 0 8px;
    background: rgba(var(--white-rgb), 0.96);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(var(--black-rgb), 0.3);
  }
  .g-side .gs-bar img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
  }
  .g-side .gs-bar div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .g-side .gs-bar b {
    font-family: Fredoka, Nunito, system-ui;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-deep);
  }
  .g-side .gs-bar span {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-500);
  }
  .g-side .gs-pick {
    flex: none;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: var(--navy);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--navy-deep);
  }
}

/* 99-games-app.css */
/* Olyhoo Games: the home screen's own pieces (the posters and the game screens use the styles copied beside this file) */
.og-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
}
.og-head img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.og-head h1 {
  margin: 0;
  font-family: 'Fredoka', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
}
.og-quiz {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px auto 0;
  padding: 12px 16px;
  max-width: 340px;
  border-radius: 18px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  color: var(--navy);
  text-decoration: none;
}
.og-quiz img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.og-quiz b,
.og-quiz small {
  display: block;
}
.og-quiz small {
  color: var(--slate-500);
  font-weight: 600;
}
