/* ═══════════════════════════════════════════════════════════
   Everyday Gestures · game stylesheet

   Loads after css/doors-core.css, which supplies the brand palette,
   the reset, the focus ring, and Atkinson Hyperlegible.

   site.css and lesson.css are deliberately NOT linked. lesson.css
   would give this game exactly one useful rule (the Atkinson body
   font, set below instead) at the cost of 10KB of unused components
   and global .card / .hero / .section / .footer / .icon / .chip
   definitions that collide with the names a game reaches for.
   Confirmed with Sean, July 25 2026.

   Every class here is prefixed eg- so nothing can collide with the
   shared stylesheets if that decision is ever revisited.

   PERFORMANCE RULE, v2 section 3.1: animate transform and opacity
   only. Never width, height, filter, or box-shadow. Those force a
   repaint every frame and are where low-end Android falls over.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Edge insets ──
     The Android system back gesture cannot be prevented from inside
     a page, so layout is the only defence. Left and right carry the
     most because those edges throw the participant out of the game
     entirely; top and bottom interrupt but are recoverable.

     Tuned on the real Lenovo at the step 4 checkpoint: 40px still
     let the Android back gesture steal swipes, 80px is the first
     value that held ("works as well as anything has", Sean, July 25
     2026). Capped at 8vw so a 390px phone is not asked to give up
     41 percent of its width to a tablet's margin: on the Lenovo the
     min() resolves to the full 80px, on a phone to roughly 31px,
     which matches the smaller reach of a phone-sized edge gesture.
     ?inset=N and ?insety=N still override from the address bar. */
  --eg-inset-x: min(80px, 8vw);
  --eg-inset-top: 24px;
  --eg-inset-bottom: 32px;

  --eg-header-h: 64px;
  --eg-radius: 14px;

  /* Interface chrome is DOORS purple game-wide, per Emily,
     replacing the per-screen colour shifts in the mockups
     (v2 section 2.3). */
  --eg-chrome: var(--purple);
  --eg-chrome-ink: #FFFFFF;
}

/* ── Page frame ─────────────────────────────────────────────
   The game fills the viewport and never scrolls. overscroll-behavior
   stops the pull-to-refresh reload that a downward swipe near the
   top would otherwise trigger, which lesson 4's scrolling row will
   fire against constantly (v2 section 3.2). */
html, body {
  height: 100%;
  overscroll-behavior: none;
  /* Pinch-zoom is blocked page-wide, not just inside the practice
     area. At the checkpoint, a pinch with one finger straying onto
     the teach column zoomed the whole viewport, and there is no way
     out that this audience could find: no JS can un-zoom a browser
     viewport, and Sean himself had to reload (July 25 2026).

     pan-x pan-y rather than none, so the menu dialog can still
     scroll by touch on short screens.

     Accessibility note for the step 9 pass: users who need zoom
     keep it via Chrome's "force enable zoom" accessibility setting,
     which overrides this. In-game text sizes start at 16px+. */
  touch-action: pan-x pan-y;
}

body {
  display: flex;
  flex-direction: column;
  /* Android Chrome's 100vh includes the strip behind the collapsing
     URL bar, which pushed the footer half off the classroom tablet's
     screen (step 4 checkpoint). --eg-vh is the real visible height,
     measured by main.js from window.innerHeight, correct on every
     browser including ones too old for dvh units. */
  height: 100vh;
  height: var(--eg-vh, 100vh);
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", Verdana, Geneva, sans-serif;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────────
   Left to right: logo, tip, settings, menu (v2 section 2.2). */

.eg-header {
  flex: none;
  min-height: var(--eg-header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--eg-chrome);
  color: var(--eg-chrome-ink);
}

.eg-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 8px;
  margin-right: auto;
}

.eg-logo img { height: 34px; width: auto; display: block; }

/* Every interactive element clears 44px, including the lesson 3
   pop-out menu when it arrives (build instructions section 3). */
.eg-iconbtn,
.eg-menubtn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}

.eg-iconbtn:hover,
.eg-menubtn:hover { background: rgba(255, 255, 255, 0.14); }

.eg-iconbtn svg,
.eg-menubtn svg { display: block; }

/* The word beside the three lines is doing real teaching. For many
   participants this game is where they meet that icon, and seeing
   icon and word together once gives the bare icon a name in every
   app afterward (v2 section 2.2). */
.eg-menubtn { padding-right: 16px; }

/* ── Stage ──────────────────────────────────────────────────
   The insets live here, between the chrome and the content. */

.eg-main {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: var(--eg-inset-top) var(--eg-inset-x) var(--eg-inset-bottom);
}

.eg-stage { height: 100%; }

.eg-screen {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 4fr) 6fr;
  gap: 28px;
  align-items: stretch;
}

/* Lessons 7 and 8 widen the practice area by narrowing the teaching
   column, NOT by stacking the teaching block above it.

   v2 section 2.4 asks for full width because "half of a ten-inch
   screen is a cramped space for a two-finger gesture", which is true
   about width. But stacking moves the teaching block from beside the
   practice area to above it, so it buys width by spending height,
   and a pinch cannot use width it has no height to match. Measured
   at 960x600, stacking took the largest square that fits from 350px
   down to 290px, on the two screens where hands struggle most.

   Narrowing the column instead costs no height at all.

   The teaching column still has to hold a two-line instruction and
   the hand demonstration, so it does not shrink to nothing: 3fr
   keeps it readable and still hands the practice area most of the
   gain. */
.eg-screen.is-wide { grid-template-columns: minmax(240px, 3fr) 7fr; }

/* ── Teaching column ────────────────────────────────────────── */

.eg-teach {
  min-width: 0;
  /* Grid items refuse to shrink below their content unless told.
     Without this, a tall tutorial panel forced the whole row taller
     than the track and the teach column spilled over the footer,
     by different amounts on different lessons (step 4 checkpoint:
     "1 and 2 partially occluded, 4 and 5 very, 7 and 8 perfect",
     7 and 8 being the ones with no panel). */
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eg-title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--purple);
}

/* A clear break between the gesture's name and what to do with it.
   They are two different things and should not read as one run-on
   line: the title names the gesture, the instruction is the ask. */
.eg-instruction {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 3px solid var(--p-purple);
  font-size: clamp(19px, 1.9vw, 24px);
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
}

/* NO TIP BOX. Removed July 25 2026: it sat above "Show me" and made
   that button look like it would demonstrate the tip rather than the
   gesture. The tip text still lives in copy.js and is one press away
   behind the question mark. A stripe along the bottom of the screen
   is the idea to come back to. */

/* Brandon's hand demonstration. It takes whatever height is left in
   the column and scales itself down to fit, so it never pushes the
   title, the instruction, or the button off the screen and never
   needs a breakpoint to tell it when to get out of the way.

   Removing the tip box freed up enough room that this now fits at
   600px of viewport height, which is roughly what the Lenovo has.
   That is why the earlier "collapse below 700px" rule is gone. */
.eg-tutorial-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 4px;
}

.eg-tutorial-panel img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left top;
}

/* Build placeholder for a panel whose art has not arrived. Loud on
   purpose, and only ever visible while the game is unlisted. Driven
   by the panelsNeedingArt list in copy.js: delete the entry and this
   disappears on its own. */
/* Bob is a thumbnail beside the heading, with the brief full width
   underneath (October 4 2026). Stacked, at full size, he took the
   whole panel on the Lenovo held sideways and the brief for Brandon
   never showed: the panel is about 210px tall there. */
.eg-tutorial-panel.eg-panel-todo {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  padding: 10px 14px;
  border: 3px dashed var(--orange);
  border-radius: var(--eg-radius);
  background: #FFF7EE;
}

/* The house placeholder. See the Bob Ross note in main.js. */
/* Two classes deep so it beats .eg-tutorial-panel img, which had been
   overriding the size cap and letting him grow to fill the panel. */
.eg-tutorial-panel .eg-panel-todo-bob {
  height: 44px;
  max-height: none;
  width: auto;
  border-radius: 8px;
}

/* Sizes chosen so the advanced-swipe brief fits whole at 960 by 600,
   the Lenovo held sideways (measured October 4 2026). Shorter screens
   scroll the brief rather than cut it. */
.eg-panel-todo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eg-panel-todo-why {
  grid-column: 1 / -1;
  align-self: stretch;
  min-height: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--mid);
  overflow-y: auto;
}

/* ── Practice column ────────────────────────────────────────── */

/* Holds the practice area and, from step 2, the trail canvas over
   it. Nothing else goes in this column: anything parked below the
   practice area comes straight out of practice height. */
.eg-practice-wrap {
  min-width: 0;
  min-height: 0;   /* same grid-item shrink rule as .eg-teach */
  position: relative;
  display: flex;
}

.eg-practice {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #FFFFFF;
  border: 6px solid #C9CCCE;
  border-radius: 18px;
  overflow: hidden;

  /* Stops the browser and the OS fighting the curriculum: double
     tap zooming the page, pinch zooming the viewport, tap and hold
     opening a context menu or selecting text (v2 section 3.2).
     Detection proper lands at step 3. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* The replay label: "The computer felt a short drag." Sits along the
   bottom of the practice area while the trail lingers above it.
   Light blue because this is guidance, not an error: the palette's
   own semantics (p-blue = instructions, tips, guidance). Enters and
   leaves by opacity and transform only, per the performance rules.
   z-index above the trail canvas (10): the words must stay readable
   over the fading comet they explain. */
.eg-felt {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 20;
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100% - 48px);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--p-blue);
  border: 1px solid #8FC5D8;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.eg-felt.is-showing {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.eg-stub {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--mid);
}

/* The trail canvas covers the practice area only, so a wrist resting
   outside it produces nothing. The engine (js/engine/pointer.js)
   owns its buffer size, capped at 1x device pixel ratio.

   z-index keeps the dot and trail painting above screen content no
   matter what order things were appended in: the dot represents the
   finger itself, and the finger is always on top. Screens keep their
   own stacking below 10. pointer-events: none so the canvas never
   swallows the touches it exists to display. */
.eg-trail {
  position: absolute;
  inset: 0;
  /* A canvas is a replaced element: inset alone positions it but
     leaves it at its intrinsic 300x150. The explicit size is what
     actually stretches it over the practice area. */
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Keyboard alternate. Delivers the lesson rather than the motor
   drill, so keyboard users get the full payoff and every joke
   (v2 section 2.7). Lives in the teaching column under the tip. */
.eg-showme {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--purple);
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}
.eg-showme:hover { background: var(--p-purple); }

/* ── Footer ─────────────────────────────────────────────────── */

.eg-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  background: var(--eg-chrome);
  color: var(--eg-chrome-ink);
}

.eg-navbtn {
  min-height: 44px;
  min-width: 88px;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}
.eg-navbtn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.eg-navbtn:disabled { opacity: 0.4; cursor: default; }

/* Next, once this screen's skill is earned (October 17 2026): lit in
   the earned gold so it clearly outranks Back, after a few pulses at
   the moment of earning (main.js earn()). */
.eg-navbtn.is-ready {
  background: #F6B92B;
  border-color: #F6B92B;
  color: var(--purple);
}
.eg-navbtn.is-ready:hover:not(:disabled) { background: #FFD25A; border-color: #FFD25A; }
.eg-navbtn.is-pulsing { animation: eg-next-pulse 0.75s ease-in-out 3; }
@keyframes eg-next-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 90, 0); transform: scale(1); }
  45%      { box-shadow: 0 0 0 8px rgba(255, 210, 90, 0.55), 0 0 22px 6px rgba(255, 210, 90, 0.75); transform: scale(1.08); }
}

.eg-progress { text-align: center; }
.eg-progress-text { font-size: 17px; font-weight: 700; }

/* Display only. Not tappable, not focusable, and styled so they do
   not read as buttons (v2 section 2.1). The line above already says
   "Lesson 3 of 8", so these carry no information on their own and
   are hidden from the text channel. */
.eg-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
  list-style: none;
}
/* Stars, one per skill (October 3 2026, were dots). Outlined until
   the skill is done on its screen, then gold. The one you are on has
   a yellow outline. Gold is not the brand yellow on purpose: an
   earned star should not look like the "you are here" marker. */
.eg-dots li {
  width: 20px;
  height: 20px;
}
.eg-dots svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill 0.3s ease, stroke 0.3s ease;
}
.eg-dots li.is-here svg { stroke: var(--p-yellow); stroke-width: 2.4; }
.eg-dots li.is-earned svg { fill: #F6B92B; stroke: #F6B92B; }
.eg-dots li.is-new svg { animation: eg-star-pop 0.8s ease-out; }
/* The per-skill icons (October 4 2026; PROGRESS_MARKS in main.js).
   Same outline, "you are here" and gold states as the stars, plus a
   touch larger because most of them are wider than a star. Inner
   details are never filled and go dark on gold; open strokes are
   never filled at all. With the switch on 'stars' none of this
   applies. */
.eg-dots.is-icons { gap: 10px; }
.eg-dots.is-icons li { width: 22px; height: 22px; }
.eg-dots svg .eg-mark-detail,
.eg-dots svg .eg-mark-line { fill: none; }
.eg-dots li.is-earned svg .eg-mark-detail { stroke: var(--purple); stroke-width: 1.4; }
/* Sparkles round an icon as it is earned (main.js sparkle()). */
.eg-dots li { position: relative; }
.eg-sparkles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.eg-sparkles i {
  position: absolute;
  left: -3px; top: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #FFE38A;
  box-shadow: 0 0 6px 2px rgba(246, 185, 43, 0.9);
  opacity: 0;
  animation: eg-spark 0.9s ease-out forwards;
}
.eg-sparkles i:nth-child(even) { background: #FFFFFF; width: 4px; height: 4px; left: -2px; top: -2px; }
@keyframes eg-spark {
  0%   { opacity: 1; transform: rotate(var(--a)) translateY(-6px) scale(0.6); }
  60%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1); }
}
@keyframes eg-star-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.7) rotate(-12deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ── Panels ─────────────────────────────────────────────────
   Menu, tip, and settings. Focus is trapped while open and Escape
   closes, handled in main.js. */

.eg-scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(33, 33, 33, 0.55);
}
.eg-scrim[hidden] { display: none; }

.eg-dialog {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 24px 26px;
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
}

.eg-dialog h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 14px;
}

.eg-dialog p { font-size: 19px; line-height: 1.55; }

.eg-menu-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.eg-menu-item,
.eg-menu-return {
  display: block;
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 11px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
}
.eg-menu-item:hover,
.eg-menu-return:hover { border-color: var(--purple); }
.eg-menu-item[aria-current="true"] {
  border-color: var(--purple);
  background: var(--p-purple);
  font-weight: 700;
}

.eg-menu-return {
  margin-top: 14px;
  border-color: var(--purple);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.eg-field { margin-bottom: 20px; }
.eg-field label { display: block; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.eg-field input[type="range"] { width: 100%; min-height: 44px; }

.eg-btn {
  min-height: 44px;
  padding: 10px 20px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--purple);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}
.eg-btn:hover { background: var(--p-purple); }

.eg-dialog-close { margin-top: 8px; }

/* The device note inside Help: quieter than the lesson tip above
   it, separated by a rule so it reads as an aside, not the lesson. */
.eg-help-device {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
}
.eg-help-device h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.eg-help-device p { font-size: 17px; line-height: 1.5; color: var(--mid); }
.eg-help-device[hidden] { display: none; }

/* ── Landscape advisory ─────────────────────────────────────
   WCAG 2.1 AA (1.3.4) prohibits locking content to one orientation
   unless the orientation is essential. A hard block would also
   strand anyone whose device has portrait lock switched on, which
   is common among people whose tablet has flopped around on them.
   So this suggests, and always offers a way past (v2 section 2.4). */

.eg-advisory {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 30;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  background: var(--p-yellow);
  border: 2px solid #E0D88A;
  border-radius: var(--eg-radius);
  padding: 18px 20px;
  text-align: center;
}
.eg-advisory[hidden] { display: none; }
.eg-advisory h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.eg-advisory p { font-size: 17px; line-height: 1.45; margin-bottom: 12px; }

/* ── Text channel ───────────────────────────────────────────
   Visually hidden, still read aloud. Never display:none, which
   would remove it from the accessibility tree entirely. */
.eg-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Debug readout ──────────────────────────────────────────
   ?debug=1. Step 4 is a leak check on a tablet with no development
   tools, so the counts have to be readable on the device itself. */
.eg-debug {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 40;
  padding: 4px 10px;
  background: rgba(33, 33, 33, 0.86);
  color: #FFFFFF;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.eg-debug[hidden] { display: none; }

/* ── Stacked fallback ───────────────────────────────────────
   Covers phones and stops a tablet breaking when it rotates
   (v2 section 2.4). */
@media (max-width: 760px) {
  .eg-screen,
  .eg-screen.is-wide {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 14px;
  }
  .eg-tutorial-panel { display: none; }
  .eg-title { font-size: 26px; }
}

/* Vertical space is the binding constraint on a ten-inch tablet in
   landscape, not horizontal. After insets, header, and footer there
   is roughly 448px of content height left, and the tutorial panel
   at mockup proportions wants more than that on its own. */
/* The panel scales itself rather than disappearing, so this only
   tightens the title. Below 480px there genuinely is no room for the
   illustration and it steps aside. */
@media (max-height: 700px) {
  .eg-title { font-size: clamp(24px, 3vw, 32px); }
}

@media (max-height: 480px) {
  .eg-tutorial-panel { display: none; }
}

/* ── Compact chrome for very short viewports ────────────────
   A phone held sideways has ~390px of height, and the full-size
   header, footer, and insets ate more than half of it at the step 4
   checkpoint, burying "Show me" under the footer. Everything
   tightens but no tap target drops below 44px. The dots go: the
   "Lesson 2 of 8" line already says everything they say. Top and
   bottom insets shrink because those OS edge gestures interrupt but
   are recoverable; the left and right insets hold at 80px because
   the back gesture is not. */
@media (max-height: 500px) {
  :root {
    --eg-inset-top: 8px;
    --eg-inset-bottom: 10px;
    --eg-header-h: 48px;
  }
  .eg-header { padding: 2px 12px; gap: 4px; }
  .eg-logo img { height: 26px; }
  .eg-footer { padding: 2px 12px; }
  .eg-dots { display: none; }
  .eg-progress-text { font-size: 15px; }
  .eg-navbtn { min-width: 72px; padding: 8px 16px; font-size: 16px; }
  .eg-teach { gap: 8px; }
  .eg-title { font-size: 22px; }
  .eg-instruction { margin-top: 0; padding-top: 8px; font-size: 17px; }
  .eg-showme { min-height: 44px; padding: 8px 18px; font-size: 16px; }
  .eg-screen { gap: 16px; }
  .eg-advisory { bottom: 66px; }
}

/* ── Phones held sideways: the game does not fit, so it scrolls ──
   Decision, Sean, July 25 2026: phones are designed for portrait.
   Below 420px of viewport height the fixed-viewport premise is
   abandoned rather than crammed: the page becomes an ordinary
   scrolling document with a full-size practice area, so "Keep going
   anyway" leads somewhere real instead of to a squeezed sliver
   (WCAG 1.3.4 requires both orientations to work; v2 section 2.4
   forbids enforcement). The advisory pointing upright is the actual
   answer. An alternate phone-landscape design is deferred until
   somebody wants it. */
@media (max-height: 420px) {
  html, body { height: auto; overflow-y: auto; }
  body { display: block; }
  .eg-main { height: auto; }
  .eg-stage { height: auto; }
  .eg-screen,
  .eg-screen.is-wide {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
  }
  .eg-practice-wrap { min-height: 320px; }
  .eg-tutorial-panel { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Step 5: screens 1 through 4

   Every rule below is scoped to one lesson's own classes (eg-l1-*
   through eg-l4-*), so nothing here can collide with the shell or
   with another screen. All motion is transform and opacity only,
   per the performance rule in v2 section 3.1.
   ═══════════════════════════════════════════════════════════ */

/* ── Fitting Brandon's art ─────────────────────────────────────
   FINAL ART, October 1 2026. Every SVG he delivered is one drawing
   centred on its own square canvas with wide margins around it. The
   margins are not waste: the canvas IS the registration. Two heads
   dropped into the same box line up to the pixel, because each
   drawing sits at the same coordinates inside the same square. That
   is what makes asleep-to-awake and the lesson 8 colour crossfade
   land without a twitch, and it is why nothing here trims a viewBox.

   The cost is that an untouched square canvas would render the
   drawing at about half size inside it. So the box is locked to the
   DRAWING's ratio, and the image is scaled up and pulled back inside
   the box until the drawing fills it exactly.

   Four numbers per asset, each measured off the file: where the
   drawing starts, and how much of the canvas it covers, as fractions
   of the canvas. Everything else is derived from them, so a
   re-export only ever changes these four.

       head, bare          x 0.1670  y 0.2500  w 0.6582  h 0.5020
       head, wearing a hat x 0.1670  y 0.1523  w 0.6582  h 0.6982

   Set the four on the ratio-locked box; the image inherits them. */
.eg-art {
  position: absolute;
  display: block;
  width: calc(100% / var(--art-w));
  height: auto;
  left: calc(-100% * var(--art-x) / var(--art-w));
  top: calc(-100% * var(--art-y) / var(--art-h));
  /* A tap has to reach the drawing, not the canvas it floats in. */
  pointer-events: none;
}

/* ── Lesson 1: Single Tap ──────────────────────────────────── */

/* He sits low on purpose, Sean, July 26 2026: the practice area
   clips at its edges, and centring him put the top of the hat's jump
   outside it, so the pom was cut off at the apex. The headroom above
   him is the hat's runway, not empty space. */
.eg-l1-wrap {
  position: absolute;
  inset: 0;
}

/* Head and hat are separate layers so the hat can leave; the reason
   is in 01-single-tap.js. The figure is sized by the head, and the
   hat is positioned against it and free to fly outside the box. */
/* The figure is locked to the head DRAWING's own ratio. Without that
   it took its height from whatever the practice area was, and the hat is
   positioned in percentages of that height: in tablet landscape the
   area is short, so top:-30% collapsed to almost nothing and the hat
   sat down on his face.

   THE RATIO LOCK, second attempt, July 26 2026. The first attempt was
   aspect-ratio plus an explicit width plus max-height, and that
   construct is a trap: aspect-ratio only derives the AUTO axis, so
   the moment max-height binds (any wide, short practice area, like
   the stacked layout in a portrait desktop window), the width does
   not follow it down, the box silently violates its own ratio,
   object-fit shrinks the head inside the letterboxed box, and the
   hat, sized in percentages of the BOX, comes out enormous and lands
   on his face. Fix: absolute position, inset plus margin auto, BOTH
   axes auto, BOTH maxes set. The abspos algorithm re-derives the free
   axis from the ratio after a clamp, so the box fits both caps and
   the ratio always holds. Lessons 2 and 6 carry the same primitive
   for the same reason; any step 7+ figure with % overlays should
   copy it rather than the width+max-height form. */
.eg-l1-figure {
  position: absolute;
  inset: 0;
  /* Bottom-seated: auto top absorbs the slack. The 9% resolves
     against WIDTH (margin %, like padding %, always does), which is
     what the old padding-bottom: 9% did too, so the seat is
     unchanged. */
  margin: auto auto 9% auto;
  width: auto;
  height: auto;
  max-width: 46%;
  max-height: 54%;
  /* The bare head's own drawing, 0.6582 by 0.5020 of its canvas.
     Within a percent and a half of the 381/280 the cropped PNG had,
     so the seat, the maxes and the hat's runway all still hold. */
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
  cursor: pointer;
}

/* Sits on the crown exactly where Mascot-Head-Hat-Pink.svg paints
   it. Brandon drew the hat twice: once on the head, once alone, at
   two different scales and neither registered to the other. These
   numbers carry the hat from the second drawing to where the first
   one puts it, measured off both files:

     the composite's head is the bare head moved down 9.86% of canvas
     the hat it wears is 65.9% the scale of the standalone hat

   So the hat now meets the head at the line Brandon drew, and the
   old forehead-coloured fringe that used to hide the seam is gone.

   The box is the hat's own edges; the art inside overhangs it. */
.eg-l1-hat {
  position: absolute;
  left: 29.93%;
  top: -38.96%;
  width: 42.83%;
  aspect-ratio: 4277 / 3613;
  --art-x: 0.2861;
  --art-y: 0.3193;
  --art-w: 0.4277;
  --art-h: 0.3613;
  cursor: pointer;
  /* Its own centre: the loop rotates the hat about itself as it
     travels. A pivot down at the brim would swing it like a pendulum
     instead. */
  transform-origin: 50% 50%;
}

/* A loop-the-loop, Sean, July 26 2026. The old straight hop was too
   small to be funny and too plain to deserve a slide whistle. The hat
   launches, traces a full circle at the top, and drops back onto his
   head, rotating once in the direction it is travelling so it reads as
   a loop rather than a spin that happens to be moving.

   Peak is 170% of the hat's own height, which puts the BOTTOM edge of
   the hat above the middle of the practice area at the top of the
   loop, per Sean.

   The circle is traced by sampling it every 45 degrees, centred 120%
   up with a radius of 50%. The X figures are NOT the same numbers as
   the Y ones: percentage translations resolve against the element's
   own axis, X against width and Y against height, and the hat box is
   wider than it is tall. Every X here is its true circular value
   scaled by height over width, without which the "loop" comes out as
   a visibly squashed ellipse. That factor was 142/167 when the hat
   was a cropped PNG and is 3613/4277 now that it is Brandon's SVG:
   0.850 against 0.845, which rounds to the same whole percent at
   every sample, so the numbers below did not move with the art.

   Timing is linear on purpose. Any easing function applies to each
   keyframe pair separately, which would make the hat hesitate at all
   eight points of the circle; the keyframe spacing does the pacing
   instead, so the rise is quick and the loop is steady. */
.eg-l1-hat.is-popping {
  animation: eg-l1-hat-pop 1.1s linear;
}

@keyframes eg-l1-hat-pop {
  0%   { transform: translate(0, 0)          rotate(0deg); }
  20%  { transform: translate(0, -70%)       rotate(-40deg); }
  26%  { transform: translate(30%, -85%)     rotate(-85deg); }
  33%  { transform: translate(42%, -120%)    rotate(-130deg); }
  40%  { transform: translate(30%, -155%)    rotate(-175deg); }
  47%  { transform: translate(0, -170%)      rotate(-220deg); }
  54%  { transform: translate(-30%, -155%)   rotate(-265deg); }
  61%  { transform: translate(-42%, -120%)   rotate(-310deg); }
  68%  { transform: translate(-30%, -85%)    rotate(-355deg); }
  75%  { transform: translate(0, -70%)       rotate(-360deg); }
  92%  { transform: translate(0, 4%)         rotate(-360deg); }
  100% { transform: translate(0, 0)          rotate(-360deg); }
}

/* A small squash as the hat leaves and again as it lands, so he
   reacts without the head shaking out from under a hat in mid-air. */
.eg-l1-head.is-recoiling {
  animation: eg-l1-head-recoil 1.1s ease-in-out;
  /* His chin, not the image's bottom edge. The drawing ends at 75.2%
     of its square canvas (--art-y plus --art-h) and the rest is empty
     margin, so "bottom" would plant the squash in thin air below him
     and the whole head would visibly slide on every tap. */
  transform-origin: 50% 75.2%;
}
.eg-l2-scene.is-open .eg-swiper-hs.eg-l2-head { transform-origin: 50% 56.8%; }

/* Squash on the launch, and again as the hat lands. The second one
   sits at 92% to meet the hat's touchdown in the loop above. */
@keyframes eg-l1-head-recoil {
  0%, 100% { transform: scale(1, 1); }
  10%      { transform: scale(1.04, 0.96); }
  26%      { transform: scale(0.99, 1.01); }
  92%      { transform: scale(1.03, 0.97); }
}

/* Two patterns, Sean, July 26 2026, from tablet testing.

   Landscape: the practice area is short and wide, so he shrinks and
   drops. The height he gives up is the height the hat needs to jump
   into, and a smaller head means the same 62% hop costs fewer pixels
   of headroom.

   Portrait: the area is tall and narrow. He can be bigger, and being
   bigger is what makes the jump read at all: the hop is a percentage
   of the hat, so a small hat barely moves. */
@media (orientation: landscape) {
  .eg-l1-figure { margin-bottom: 3%; max-width: 40%; max-height: 48%; }
}

@media (orientation: portrait) {
  /* The middle of his head sits on the lower-third line of the play
     area (Sean, July 26 2026), which puts the whole upper two thirds
     above him for the loop and keeps his face clear of the bottom
     edge. Done with insets rather than a translate: margin auto
     centres him inside the band from 33.33% down to the floor, so
     his centre rides the 66.67% line at any panel shape, and the
     ratio lock above keeps working because width and height both
     stay auto. */
  .eg-l1-figure {
    inset: 33.3334% 0 0 0;
    margin: auto;
    max-width: 72%;
    max-height: 34%;
  }
}

/* Lesson 1 stopped wiggling when the hat took over the payoff, but
   lesson 2's waking Swiper still animates with these. */
@keyframes eg-l1-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1, 1); }
  20% { transform: rotate(-8deg) scale(1.03, 0.97); }
  40% { transform: rotate(7deg) scale(0.98, 1.02); }
  60% { transform: rotate(-5deg) scale(1.02, 0.98); }
  80% { transform: rotate(3deg) scale(1, 1); }
}

.eg-l1-hee {
  position: absolute;
  top: 10%;
  left: 64%;
  font-size: 22px;
  font-weight: 800;
  color: var(--pink);
  pointer-events: none;
  animation: eg-l1-hee-pop 0.9s ease-out forwards;
}

@keyframes eg-l1-hee-pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  30% { opacity: 1; transform: translateY(-4px) scale(1.05); }
  70% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { opacity: 0; transform: translateY(-18px) scale(0.95); }
}

/* ── Lesson 2: Double Tap ──────────────────────────────────── */

.eg-l2-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* Wraps in two rows on purpose: the label is the full sentence from
   v2 section 4 lesson 2 ("How much time between taps?"), which is
   too long to share one line with a slider and a reset button at
   this width without either truncating or squeezing into a narrow
   wrapped column (found while testing in the browser). flex-basis:
   100% on the label is what forces the break. */
.eg-l2-controls {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 10px 2px;
}

.eg-l2-controls label {
  flex: 1 1 100%;
  font-size: 15px;
  font-weight: 700;
}
.eg-l2-controls input[type="range"] { flex: 1; min-width: 120px; min-height: 44px; }

/* Reset is a secondary control on this screen, so it dresses lighter
   than the standard button (Sean, July 27 2026: smaller, and it now
   also resets the scene). The 44px touch minimum is non-negotiable
   and stays; only the visual weight shrinks. */
.eg-l2-controls .eg-btn {
  min-height: 44px;
  padding: 4px 14px;
  font-size: 15px;
  font-weight: 600;
}
.eg-l2-dt-value {
  flex: none;
  min-width: 92px;
  text-align: right;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--mid);
}

.eg-l2-scene-outer {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Knock on the Can (October 6 2026; it was a door). The scene is the
   can plus headroom for his rise and the lid riding on his cap: the
   can's own aspect (3887 / 5039) with 75% of its height added above
   it (45% was not enough: the lid poked out over the slider). Same ratio-lock primitive
   as lesson 1's figure: inset plus margin auto cannot break the
   ratio, so every % position inside lines up at any size. */
.eg-l2-scene {
  position: absolute;
  inset: 6px;
  margin: auto;
  width: auto;
  height: auto;
  /* 78%, not 100%: the lid is wider than the can and leans out to the
     side, so a can as wide as a narrow upright column lost the lid's
     end off the edge (screenshot check). */
  max-width: calc(78% - 12px);
  max-height: calc(100% - 12px);
  aspect-ratio: 3887 / 8818;
}
.eg-l2-can {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 3887 / 5039;
  transform-origin: 50% 100%;
}
.eg-l2-can.is-stirring { animation: eg-l2-wobble 0.45s ease-in-out; }
@keyframes eg-l2-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  60% { transform: rotate(2.5deg); }
  85% { transform: rotate(-1deg); }
}

/* The layers inside the can, back to front. The numbers for the body,
   lid, mouth and head box are Find Swiper's (.eg-l5s-*): one drawing,
   three screens. */
.eg-l2-mouth,
.eg-l2-rise,
.eg-l2-body,
.eg-l2-lid { position: absolute; inset: 0; pointer-events: none; }
.eg-l2-mouth {
  inset: auto;
  left: 16%;
  top: 4%;
  width: 68%;
  height: 8%;
  border-radius: 50%;
  background: #14382A;
}
/* The can drawn twice (02-double-tap.js): the whole drawing behind
   Swiper, so the back of the rim and the dark inside sit behind him,
   and in front of him only the part below the front lip of the rim.
   The polygon traces that lip (the bottom edge of the opening in
   can-body.svg, a hair above it so the lip's black outline stays in
   front), in the body box's own percentages. */
/* .eg-l2-body.eg-l2-body-back, not .eg-l2-body-back alone: .eg-l2-body
   sets z-index 2 further down and won on order, so the back copy sat
   in front of him and he still looked behind the can (October 7 2026). */
.eg-l2-body.eg-l2-body-back,
.eg-l5s-body.eg-can-back,
.eg-l6-body.eg-can-back { z-index: 0; }
/* Find Swiper and Drag use the same cut (October 6 2026). */
.eg-l2-front,
.eg-can-front {
  clip-path: polygon(0% 2.25%, 1.36% 2.25%, 9.48% 3.11%, 17.60% 3.82%, 25.73% 4.38%,
    33.86% 4.79%, 42.00% 5.05%, 50.15% 5.16%, 58.30% 5.13%, 66.45% 4.95%, 74.61% 4.62%,
    82.78% 4.15%, 90.95% 3.54%, 99.13% 2.79%, 100% 2.79%, 100% 100%, 0% 100%);
}
/* Asleep he is right down inside, nightcap and all (October 6 2026;
   he used to sit with his eyes over the rim). */
.eg-l2-rise { z-index: 1; transform: translateY(10%); transition: transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.eg-l2-body {
  z-index: 2;
  --art-x: 0.3057;
  --art-y: 0.2480;
  --art-w: 0.3887;
  --art-h: 0.5039;
}
/* Asleep, the lid is down on the can but tipped up on its right-hand
   side, pivoting on its left edge, just enough of a gap for the z's
   to come out (Sean, October 6 2026). */
.eg-l2-lid {
  z-index: 3;
  transform-origin: 0% 0%;
  transform: rotate(-5deg);
  transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1), opacity 0.12s linear;
}
.eg-l2-lid-art {
  position: absolute;
  left: -3.3%;
  top: -8%;
  width: 106.5%;
  aspect-ratio: 4141 / 713;
  --art-x: 0.2930;
  --art-y: 0.4648;
  --art-w: 0.4141;
  --art-h: 0.0713;
}
.eg-l2-figure {
  position: absolute;
  left: 13%;
  top: 2%;
  width: 74%;
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
}
/* The nightcap sits on top of his head, between his ears, drooping
   to his right. */
/* Across the top of his head between his ears (Sean, October 6
   2026): narrower than his head and lower than it was (72% wide at
   -34%), so both ears stand clear of it, and nearly level when he
   is awake (it tipped 9 degrees onto his right ear). */
.eg-l2-cap {
  position: absolute;
  left: 25%;
  top: -22%;
  width: 52%;
  aspect-ratio: 120 / 90;
  transform-origin: 30% 90%;
  transform: rotate(-4deg);
  transition: transform 0.35s ease-out, top 0.3s ease-out, left 0.3s ease-out, width 0.3s ease-out;
}
.eg-l2-cap svg { display: block; width: 100%; height: 100%; }
.eg-l2-pom { transform-box: fill-box; transform-origin: 50% 0%; }
.eg-l2-can.is-stirring .eg-l2-pom { animation: eg-l2-pom 0.45s ease-in-out; }
@keyframes eg-l2-pom {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  70% { transform: translateY(3px); }
}

/* Sleeping z's (October 6 2026): three letters drifting up from the
   gap under the lid, each growing, swaying and fading, a third of a
   cycle apart so one is always on its way. DOORS purple, since the
   lesson's background is white. Gone the moment he wakes; with
   reduced motion they sit still beside the lid instead. */
/* The z's start in the gap under the tipped lid, its right-hand end. */
.eg-l2-zzz {
  position: absolute;
  left: 84%;
  top: -9%;
  width: 30%;
  height: 8%;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.2s;
}
.eg-l2-zzz span {
  position: absolute;
  left: 0;
  bottom: 0;
  font-weight: 800;
  font-size: clamp(18px, 3.4vmin, 34px);
  line-height: 1;
  color: #351D5B;
  opacity: 0;
  animation: eg-l2-z 3s ease-out infinite;
}
.eg-l2-zzz span:nth-child(2) { animation-delay: 1s; font-size: clamp(22px, 4.2vmin, 42px); }
.eg-l2-zzz span:nth-child(3) { animation-delay: 2s; }
@keyframes eg-l2-z {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15%  { opacity: 0.85; }
  50%  { transform: translate(0.9em, -1.8em) scale(1); }
  100% { transform: translate(0.4em, -3.8em) scale(1.25); opacity: 0; }
}
.eg-l2-scene.is-open .eg-l2-zzz { opacity: 0; }
.eg-l2-scene.is-open .eg-l2-zzz span { animation: none; }
.eg-reduced-motion .eg-l2-zzz span { animation: none; opacity: 0.8; }
.eg-reduced-motion .eg-l2-zzz span:nth-child(1) { transform: translate(0, -0.3em); }
.eg-reduced-motion .eg-l2-zzz span:nth-child(2) { transform: translate(0.7em, -1.3em); }
.eg-reduced-motion .eg-l2-zzz span:nth-child(3) { transform: translate(1.5em, -2.6em); }

/* Both heads occupy the box; only the awake one's opacity moves. The
   swap is quick, timed into the pop, so it reads as his eyes flying
   open rather than a fade. */
.eg-l2-head-awake { opacity: 0; transition: opacity 0.08s linear 0.12s; }

/* Awake: up he springs, the lid riding up on his cap, knocked crooked,
   the way Find Swiper and Drag carry it. It stays inside the scene:
   flung further it flew over the slider (screenshot check). */
/* Awake he stays inside too, so he springs a little higher than he
   did in front of the can (-40%), enough that his smile clears the
   front lip while his chin stays in the can; the lid rides up too. */
/* Higher since he has shoulders (October 7 2026), so they show above
   the front lip: -54.5%, up from -42.5%. */
.eg-l2-scene.is-open .eg-l2-rise { transform: translateY(-54.5%); }
.eg-l2-scene.is-open .eg-l2-lid  {
  /* Knocked up and off by his pop, then gone once he is at full
     height (Sean, October 6 2026): no landing to choreograph. */
  transform: translate(6%, -62%) rotate(9deg);
  opacity: 0;
  z-index: 5;
  transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1), opacity 0.2s linear 0.25s;
}
.eg-l2-scene.is-open .eg-l2-head-awake { opacity: 1; }
/* Awake he is swiper-head-shoulders.png, whose head sits higher in
   the box than head-awake.svg's did, so the cap slid down onto his
   brow (Sean, October 7 2026). Awake it perches between his ears:
   the white band covers the line between the inner ends of the two
   ears. Numbers from that drawing's ear tips, placed by .eg-swiper-hs. */
.eg-l2-scene.is-open .eg-l2-cap {
  left: 26.2%;
  top: -43.5%;
  width: 57%;
  transform: rotate(1deg);
}
.eg-l2-scene.is-open .eg-l2-head {
  animation: eg-l1-wiggle 0.5s ease-in-out 0.25s;
  /* His chin, not the image's bottom edge: the drawing ends at 75.2%
     of its canvas (--art-y plus --art-h) and the rest is margin. */
  transform-origin: 50% 75.2%;
}

/* ── Lesson 3: Tap and Hold ─────────────────────────────────── */

.eg-l3-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* The target floats ratio-true inside this box, and the menu sits
   right under it. The box is only as tall as Swiper and his ring
   need (4:3 of the width: the ring reaches 36% of the width above and
   below the box's middle), so on a tall screen the pair stays together
   in the middle instead of the menu landing far below the circle
   (Sean, October 6 2026: on upright screens it was not obvious what
   the buttons were for). When height is short it shrinks like before:
   min-height 0 lets it give height back to the menu. */
.eg-l3-target-outer {
  position: relative;
  flex: 0 1 auto;
  align-self: stretch;
  aspect-ratio: 4 / 3;
  min-height: 0;
}

.eg-l3-target {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 58%;
  max-height: 60%;
  /* The bare head, same as lessons 1, 8 and 9. The hat is laid over it
     below rather than being part of the drawing, so Swiper is the same
     size on this screen as on every other one. */
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
  /* Nudged down by half the hat's overhang. The box is the head, and
     the hat stands 38.96% of the box's height above it, so centring
     the box puts the head in the middle and everything the eye reads
     as Swiper, hat included, too high. Half that overhang is what
     brings the pair back to centre, and it carries the ring with it,
     which hangs off this same box. */
  transform: translateY(19.5%);
}

/* Head and hat together, exactly overlaying the target so the hat's
   percentages below resolve against the same box they always did.
   This is the element Spin, Sing and Sleep animate. */
.eg-l3-figure {
  position: absolute;
  inset: 0;
}

/* Lesson 1's numbers, which put the hat where Brandon's own one-piece
   drawing paints it. Kept in step with .eg-l1-hat and .eg-l7-hat. */
.eg-l3-hat {
  position: absolute;
  left: 29.93%;
  top: -38.96%;
  width: 42.83%;
  aspect-ratio: 4277 / 3613;
  --art-x: 0.2861;
  --art-y: 0.3193;
  --art-w: 0.4277;
  --art-h: 0.3613;
  pointer-events: none;
}

/* Sized larger than the DRAWING so the ring surrounds him rather than
   tracing his silhouette. That distinction is the whole reason the
   target below is ratio-locked: the ring is a percentage of its box,
   and if the box were the art's square canvas the ring would be
   drawn around a half-empty rectangle instead of around Swiper. */
/* Big enough to go round him AND his hat, and centred on the pair
   rather than on the head alone.

   The box this hangs off is the head's drawing, and the hat sits above
   it on a negative offset, so the figure is taller than the box it is
   measured in: it runs from -38.96% to 100% of the box's height, which
   makes its centre 30.5% down rather than 50%. Sizing the ring off the
   box the obvious way left it a circle the head completely covered.

   Width and height are both percentages of the box's WIDTH, so the
   ring stays a circle: 163.9% is 125% of the width expressed against
   the shorter height. Everything here derives from the hat's numbers
   on .eg-l3-hat, so the two move together. */
.eg-l3-ring {
  position: absolute;
  left: -12.5%;
  top: -51.4%;
  width: 125%;
  height: 163.9%;
  transform: rotate(-90deg); /* fill starts at 12 o'clock */
  pointer-events: none;
}

.eg-l3-ring-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 4;
}

.eg-l3-ring-fill {
  fill: none;
  stroke: var(--orange);
  stroke-width: 5;
  stroke-linecap: round;
  /* No transition during a hold: holdprogress drives this directly,
     roughly every animation frame, and a transition would lag behind
     rather than track the finger. Draining after an early release is
     the one moment worth easing. */
}

.eg-l3-ring-fill.is-draining { transition: stroke-dashoffset 0.3s ease; }

/* His eyes close; the colour stays in the picture. The swap is a cut
   rather than a crossfade, because it happens under a 1.3s nod and a
   fade would read as him dissolving rather than dozing off. */
.eg-l3-asleep { opacity: 0; }
.eg-l3-figure.is-sleeping .eg-l3-asleep { opacity: 1; }
.eg-l3-figure.is-sleeping .eg-l3-swipe { opacity: 0; }

.eg-l3-figure.is-sleeping {
  animation: eg-l3-sleep 1.3s ease-in-out;
  transform-origin: center bottom;
}

@keyframes eg-l3-sleep {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(-6deg) translateY(6px); }
}

.eg-l3-figure.is-spinning {
  animation: eg-l3-spin 0.7s ease-in-out;
  transform-origin: center center;
}

@keyframes eg-l3-spin {
  0% { transform: rotate(0deg) scale(1); }
  60% { transform: rotate(360deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}

.eg-l3-figure.is-singing {
  animation: eg-l3-sing 0.5s ease-in-out;
  transform-origin: center bottom;
}

@keyframes eg-l3-sing {
  0%, 100% { transform: scale(1, 1); }
  40% { transform: scale(1.06, 0.94); }
  70% { transform: scale(0.97, 1.04); }
}

.eg-l3-star,
.eg-l3-note,
.eg-l3-zzz {
  position: absolute;
  top: 6%;
  right: 6%;
  font-size: 26px;
  pointer-events: none;
  animation: eg-l1-hee-pop 0.9s ease-out forwards;
}

.eg-l3-menu {
  display: flex;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
}

.eg-l3-menu.is-popping {
  animation: eg-l3-menu-pop 0.35s ease-out forwards;
}

@keyframes eg-l3-menu-pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.eg-l3-menu-btn {
  min-height: 48px;
  min-width: 48px;
  padding: 10px 18px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--purple);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}
.eg-l3-menu-btn:hover { background: var(--p-purple); }

/* ── Lesson 4: Swipe (the busy box) ────────────────────────── */

.eg-l4-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
}

/* .eg-l4-opener was removed with the naming-moment line, Sean, July 26
   2026: the mascot rename to Swiper ended the collision the joke rested
   on. The three rows now fill the practice area on their own. */

.eg-l4-rows {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eg-l4-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
}

.eg-l4-row-label {
  flex: none;
  width: 84px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mid);
}

/* Row 1: Toggle. Only transform changes under motion; the colour
   swap on the track and knob is instant, not transitioned, per the
   transform/opacity-only performance rule. */
.eg-l4-toggle-track {
  position: relative;
  flex: none;
  width: 64px;
  height: 34px;
  border-radius: 999px;
  background: var(--line);
}

.eg-l4-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--mid);
  transition: transform 0.25s ease;
}

.eg-l4-toggle.is-on .eg-l4-toggle-track { background: var(--p-green); }
.eg-l4-toggle.is-on .eg-l4-toggle-knob {
  transform: translateX(30px);
  background: var(--green);
  border-color: var(--green);
}

/* Row 2: Notification, the Gmail mirror. The action word sits under
   the card and is exposed as the card slides; the card follows the
   finger with no transition (is-dragging) and transitions only for
   the snap-back and the archive exit. */
.eg-l4-notif-track {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.eg-l4-notif-action {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
  border-radius: 10px;
}
.eg-l4-notif-action.is-showing { display: flex; }
/* Archive is exposed on the left as the card moves right; Read is
   exposed on the right as the card moves left, the Gmail way. */
.eg-l4-notif-action.is-archive { justify-content: flex-start; background: var(--green); }
.eg-l4-notif-action.is-read { justify-content: flex-end; background: var(--blue); }

/* The word yields, the way back never does: on a narrow track the
   label ellipsizes down to nothing before Undo gives up a pixel. A
   clipped ARCHIVE is cosmetic; a clipped Undo is a stranded learner
   (Sean's phone, portrait, July 27 2026). */
.eg-l4-notif-action-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* While an archive waits (is-pending, set by the screen), a phone
   track's uncovered strip is barely wider than the button itself, so
   the word goes entirely and the strip belongs to Undo. Measured on
   a 395px viewport: 159px track, 127px strip, 91px button. */
@media (max-width: 480px) {
  .eg-l4-notif-action.is-pending .eg-l4-notif-action-label { display: none; }
  .eg-l4-notif-action.is-pending .eg-l4-notif-undo { margin-left: 0; }
}

/* The way back from an archive. Sits in the strip the card uncovers,
   sized past the 44px minimum because it is the one control on this
   screen someone presses while worried. */
.eg-l4-notif-undo {
  flex: none;
  margin-left: 14px;
  min-height: 44px;
  padding: 6px 22px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  background: #FFFFFF;
  color: var(--green);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}
.eg-l4-notif-undo:hover { background: #F2F2F2; }

.eg-l4-notif-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--p-blue);
  font-size: 15px;
  color: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Following the finger: transforms land every frame, a transition
   would lag one behind (v2 section 3.1). */
.eg-l4-notif-card.is-dragging { transition: none; }
.eg-l4-notif-card.is-gone { opacity: 0.25; }

.eg-l4-notif-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
}
.eg-l4-notif-card.is-unread .eg-l4-notif-dot { opacity: 1; }

.eg-l4-notif-text { flex: 1; font-weight: 400; }
.eg-l4-notif-card.is-unread .eg-l4-notif-text { font-weight: 800; }

.eg-l4-notif-tag {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--mid);
  font-size: 12px;
  font-weight: 700;
  color: var(--mid);
  background: #FFFFFF;
}
.eg-l4-notif-card.is-unread .eg-l4-notif-tag {
  color: var(--blue);
  border-color: var(--blue);
}

/* Row 3: Pictures, the filmstrip. A continuous strip slid directly:
   no transition, the drag and the coast drive translateX every
   frame. Frames are family pictures (Bob until the family exists). */
.eg-l4-pics-viewport {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--p-purple);
}

.eg-l4-pics-track {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  will-change: transform;
}

.eg-l4-pic {
  flex: none;
  height: calc(100% - 12px);
  aspect-ratio: 4 / 3;
  padding: 4px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(33, 33, 33, 0.25);
}

.eg-l4-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  pointer-events: none;
}

/* ── Lesson 5a: Scroll (Find Swiper) ──────────────────────────
   The inertial scroller, promoted from lesson 4's old row 4 to a
   full screen. No transition on the track: the drag and the coast
   drive translateY directly, every frame (v2 section 3.1).

   October 3 2026: the inbox became a column of garbage cans with
   Swiper in the last (see 05-scroll.js). Each can is lesson 6's
   composition with the same art numbers; --can-h is set from the
   viewport by the module, so everything below is a share of it. */

.eg-l5s-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 10px 14px;
}

.eg-l5s-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
}

.eg-l5s-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Room above the first lid and below the last can. */
  padding: calc(var(--can-h) * 0.14) 0 calc(var(--can-h) * 0.08);
  will-change: transform;
}

/* One can per slot, a gap between them the lid can sit in. */
.eg-l5s-can {
  position: relative;
  flex: none;
  height: var(--can-h);
  aspect-ratio: 3887 / 5039;
  margin-bottom: calc(var(--can-h) * 0.22);
}
.eg-l5s-can:last-child { margin-bottom: 0; }

/* Headroom for him: risen, his lid's top is 45% of a can above the
   can, so the last one gets that much more space above it. */
/* 0.42, up from 0.3, since he rises 12% higher with his shoulders
   (October 7 2026). */
.eg-l5s-can.is-last { margin-top: calc(var(--can-h) * 0.42); }

.eg-l5s-stack { position: absolute; inset: 0; }

.eg-l5s-body,
.eg-l5s-head,
.eg-l5s-lid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.eg-l5s-body {
  z-index: 2;
  --art-x: 0.3057;
  --art-y: 0.2480;
  --art-w: 0.3887;
  --art-h: 0.5039;
}

/* Same numbers as .eg-l6-head-art, .eg-l6-lid-art and .eg-l6-mouth:
   one drawing, two screens. If lesson 6 is re-tuned, these follow. */
.eg-l5s-head-art {
  position: absolute;
  left: 13%;
  top: 2%;
  width: 74%;
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
}

.eg-l5s-lid-art {
  position: absolute;
  left: -3.3%;
  top: -8%;
  width: 106.5%;
  aspect-ratio: 4141 / 713;
  --art-x: 0.2930;
  --art-y: 0.4648;
  --art-w: 0.4141;
  --art-h: 0.0713;
}

.eg-l5s-mouth {
  position: absolute;
  left: 16%;
  top: 4%;
  width: 68%;
  height: 8%;
  border-radius: 50%;
  background: #14382A;
}

/* Swiper with a neck and shoulders (Sean's drawing, October 7 2026),
   for Double Tap awake and Find Swiper. It sits in the same box as
   head-awake.svg (.eg-l2-figure, .eg-l5s-head-art) and is placed so
   its head lands where that drawing's head was: eyes on the same
   spot, about 4% bigger. The shoulders run down inside the can, out
   of sight behind its front. */
.eg-swiper-hs {
  position: absolute;
  display: block;
  left: -27.05%;
  top: -16.86%;
  width: 158%;
  height: auto;
  pointer-events: none;
}

.eg-l5s-head { z-index: 1; transition: transform 0.28s ease-out; }
.eg-l5s-lid  { z-index: 3; transition: transform 0.28s ease-out; }

/* Found: up he comes with the lid riding on his head, exactly
   lesson 6's rise (head -42.5%, lid -39.5%). He stays inside the can,
   behind its front lip (October 6 2026; he used to come up in front
   of it at -40%), and only the lid comes to the front. */
/* 12% higher since he has shoulders (October 7 2026), so they show
   above the front lip; the lid rises with him. */
.eg-l5s-head.is-up { transform: translateY(-54.5%); }
.eg-l5s-lid.is-up  { transform: translateY(-51.5%); z-index: 5; }

/* ── Lesson 5b: Advanced Swipe (the throw) ───────────────────
   A court: sky above, floor below, distance rings flat on the
   floor, ball resting bottom-left. The ball flies on transform
   only, driven frame by frame from the screen module. */

.eg-l5b-court {
  position: absolute;
  inset: 0;
  /* Sizes below are in container units so the court can size its
     figures by its own width as well as its height (October 4 2026).
     Held upright, the Lenovo gives a tall narrow court; sized from
     height alone, Swiper grew as wide as the court and stood in front
     of the hoop, the net at his head and the circles under his feet.
     --eg-l5b-t is Swiper's height: 42% of the court's height, or less
     when the court is too narrow for that, so he stays about a third
     of its width. Held sideways the height term wins and nothing
     changes. */
  container-type: size;
  --eg-l5b-t: min(42cqh, 43cqw);
  overflow: hidden;
  border-radius: var(--eg-radius);
  background: linear-gradient(#EAF4F9 62%, #F7EFE3 62%);
}

.eg-l5b-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
}

/* The hoop at the far end, its post standing on the rings' own ground
   line so the two read as being on one floor.

   11.4%, not the rings' own 30%: the rings are children of .eg-l5b-floor
   and this hangs off the court, so the same percentage would mean two
   different heights. 30% of the floor's 38% is 11.4% of the court,
   which is the same line. Behind the ball, in front of nothing. */
.eg-l5b-hoop {
  position: absolute;
  right: 3%;
  bottom: 11.4%;
  /* 62% of the height, or about a third of the width on a narrow court. */
  height: min(62cqh, 79cqw);
  aspect-ratio: 3906 / 9082;
  --art-x: 0.3047;
  --art-y: 0.0459;
  --art-w: 0.3906;
  --art-h: 0.9082;
  pointer-events: none;
}

/* The thrower, standing on the ball's own ground line at the near end.
   A stand-in; see 05-advanced-swipe.js. */
.eg-l5b-thrower {
  position: absolute;
  left: 2%;
  bottom: 11.4%;
  height: var(--eg-l5b-t);
  aspect-ratio: 6094 / 7314;
  --art-x: 0.1953;
  --art-y: 0.1357;
  --art-w: 0.6094;
  --art-h: 0.7314;
  pointer-events: none;
}

/* Rings drawn as flat ellipses. Their real rects are the landing
   truth the module reads, so position lives here only. */
.eg-l5b-ring {
  position: absolute;
  bottom: 30%;
  width: 13%;
  aspect-ratio: 2.6 / 1;
  border: 3px solid var(--orange);
  border-radius: 50%;
  opacity: 0.75;
}
.eg-l5b-ring-1 { left: 38%; }
.eg-l5b-ring-2 { left: 60%; border-color: var(--pink); }
/* No third ring since October 3 2026: the hoop is the third target. */

/* At rest on Swiper's tail. Placed from his size rather than the
   court's, so it stays on the tail when he shrinks on a narrow court.
   The three factors are the old landscape position measured against
   him (court 455 by 401, him 168 tall): left edge 0.1075 of his height
   in from his box, bottom 0.107 of his height above the ground, width
   0.488 of his height. */
.eg-l5b-ball {
  position: absolute;
  left: calc(2cqw + 0.1075 * var(--eg-l5b-t));
  bottom: calc(11.4cqh + 0.107 * var(--eg-l5b-t));
  width: min(96px, calc(0.488 * var(--eg-l5b-t)));
  aspect-ratio: 2100 / 2090;
  --art-x: 0.3955;
  --art-y: 0.3955;
  --art-w: 0.2100;
  --art-h: 0.2090;
  will-change: transform;
  pointer-events: none;
}
/* The net is drawn in code since October 7 2026 (engine/net.js), on
   two canvases over the whole court: one behind the ball for the far
   strings, one in front for the near strings and the front of the rim.
   So the ball no longer fades to read as going through (it was 0.85). */
.eg-l5b-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Lesson 6: Drag (the carry) ────────────────────────────
   Tray on one side, Swiper's can on the other, and the carry always
   crosses the longest run the panel has: side by side in landscape,
   stacked in portrait. */

.eg-l6-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2%;
}

/* The tray holds one slot per snack. The cast grew from three to
   five when Brandon's art landed and went back to four on October 3
   2026, when the syrup bottle came off. Four full 56px slots fit a
   short landscape practice area (a 1024x600 Lenovo gives the column
   about 326px; four want about 262, five wanted 332). The tray is
   still allowed to shrink, and the slots give up height down to the
   44px touch minimum, as a net for a panel shorter than that. */
.eg-l6-tray {
  display: flex;
  gap: 8px;
  flex: none;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: var(--eg-radius);
  background: #F7EFE3;
}

/* The slot keeps its place in the tray while the snack inside it
   travels, so the tray never reflows mid-carry. 56px clears the 44px
   minimum with room, because this one is grabbed rather than tapped,
   and 44 is the floor it is never allowed below.

   flex-basis does the shrinking and covers both orientations at once:
   it is the height in the landscape column and the width in the
   portrait row, and the matching min- keeps the hand's share. */
.eg-l6-slot {
  position: relative;
  flex: 0 1 56px;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
}

/* The snack carries the drag transform, written from JS every move.
   The face carries the CSS animations. Two elements so a keyframe and
   a per-frame translate never fight over the same transform. */
/* Fills its slot rather than hugging its contents. That is what gives
   the snack inside a parent of KNOWN size: sized by content, a face
   asking for a percentage of it asks a box that is waiting on the
   face, and the pair collapse to nothing. */
.eg-l6-snack {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  will-change: transform;
}

/* Above the can while it is in your hand, so the carry stays visible
   right up to the moment it is eaten. */
.eg-l6-snack.is-held { z-index: 6; }

/* Only for the trips the screen drives itself: the glide home, the
   last hop to his mouth, and the Show me carry. Never during a real
   drag, where a transition would put the snack behind the finger. */
.eg-l6-snack.is-gliding { transition: transform 0.35s ease; }

/* The snack itself. A square it is fitted into by its longest side:
   06-drag.js sets width, height, aspect-ratio and the --art numbers
   per snack, since every one of Brandon's five is a different shape.
   position: relative so the art inside has something to hang off. */
/* The snack itself, fitted by its LONGEST side into its slot, so a
   tray of five very different shapes reads as five snacks of the same
   weight: the poutine is more than twice as wide as it is tall, the
   bag of chips taller than it is wide. 06-drag.js sets the
   --art numbers, the aspect-ratio, and which axis takes the size.

   A share of the slot rather than a fixed 52px, so a snack shrinks
   with its slot instead of bursting out of it when the tray is tight. */
.eg-l6-face {
  --eg-snack-size: 92%;
  position: relative;
  display: block;
  width: var(--eg-snack-size);
  height: var(--eg-snack-size);
  user-select: none;
}

/* Picked up. Grows and rises a little: "this is in your hand now",
   said in the one channel a finger is already watching. */
.eg-l6-face.is-lifting { animation: eg-l6-lift 0.18s ease-out forwards; }

@keyframes eg-l6-lift {
  0%   { transform: scale(1) translateY(0); }
  100% { transform: scale(1.25) translateY(-6px); }
}

/* Munched. No chewing animation, per v2: it goes behind the bounce. */
.eg-l6-face.is-eaten { animation: eg-l6-eaten 0.4s ease-in forwards; }

@keyframes eg-l6-eaten {
  0%   { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; }
}

.eg-l6-face.is-arriving { animation: eg-l6-arrive 0.35s ease-out; }

@keyframes eg-l6-arrive {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Sized deliberately small against the panel. Left to fill the space
   the can is 60% of the practice area's width, which looks generous
   and leaves almost nothing to carry across: the distance between the
   tray and him IS the lesson, so the scenery yields to it. */
.eg-l6-can {
  position: relative;
  flex: 0 0 44%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The can is four layers: the mouth behind, his head above that, the
   can's front wall in front of him, and the lid on top. They came as
   three separate drawings on two different canvases and none of them
   is registered to any other, so THE STACK BOX IS THE CAN and the
   other two are placed against it by the numbers below. The box holds
   the can's own ratio so that stays true at every size.

   Same ratio-lock primitive as lesson 1's figure (see the note
   there): the old height:100% + max-width form let a narrow column
   squash the stack's ratio, which slid the CSS mouth ellipse and the
   peek rise off the drawn can. */
/* Seated at the foot of its column, not centred in it, and capped
   short of the full height on purpose: the space above the can is the
   runway his head and the lid rise into, the same bargain lesson 1
   strikes for the hat's loop. Filling the column would clip both of
   them against the top of the practice area. */
.eg-l6-stack {
  position: absolute;
  inset: 0;
  margin: auto auto 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70%;
  aspect-ratio: 3887 / 5039;
}

.eg-l6-head,
.eg-l6-body,
.eg-l6-lid {
  position: absolute;
  pointer-events: none;
}

/* The can fills the stack: the stack is the can. */
.eg-l6-body {
  inset: 0;
  z-index: 2;
  --art-x: 0.3057;
  --art-y: 0.2480;
  --art-w: 0.3887;
  --art-h: 0.5039;
}

/* The two movers are stack-sized, and the drawing inside each is
   placed against the can. That is deliberate: a translate in percent
   resolves against the element's OWN height, so a mover the size of
   the stack is what keeps the CSS rise and PEEK_RISE in 06-drag.js
   the same number. Size the mover to the drawing instead and the two
   silently stop meaning the same thing. */
.eg-l6-head,
.eg-l6-lid {
  inset: 0;
}

.eg-l6-head { z-index: 1; }
.eg-l6-lid  { z-index: 3; transition: transform 0.28s ease; }

/* Which of his three faces is showing. Stacked, not swapped by src,
   so no frame of the bite waits on a network fetch. */
.eg-l6-face-awake,
.eg-l6-face-chomp,
.eg-l6-face-chew { opacity: 0; }

.eg-l6-head-art[data-face="awake"] .eg-l6-face-awake,
.eg-l6-head-art[data-face="chomp"] .eg-l6-face-chomp,
.eg-l6-head-art[data-face="chew"]  .eg-l6-face-chew { opacity: 1; }

/* Him, down inside the can at rest with the can's front wall in front
   of him, so all that shows is what he raises above the rim. */
.eg-l6-head-art {
  position: absolute;
  left: 13%;
  top: 2%;
  width: 74%;
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
}

/* Wider than the can, because a lid overhangs its rim: Brandon drew
   it 41.41 against the can's 38.87 on the same canvas, so 106.5% of
   the can is his own proportion rather than a guess.

   It sits on the rim with its skirt over the can's lip (Sean, October
   3 2026: it was sunk into the can, and his ears showed behind the
   handle). Compared against renders at -2, -8, -10, -12 and -14.1%:
   higher than -8 and the dark of the opening shows under the skirt,
   along with his ear tips. */
.eg-l6-lid-art {
  position: absolute;
  left: -3.3%;
  top: -8%;
  width: 106.5%;
  aspect-ratio: 4141 / 713;
  --art-x: 0.2930;
  --art-y: 0.4648;
  --art-w: 0.4141;
  --art-h: 0.0713;
}

/* The lid stays on his head (Sean, October 3 2026). It used to slide
   off and tip aside; now it rides up with him like a hat and its rim
   comes down over his ear tips, which is how a lid sits on a raccoon.

   The numbers are measured, not eyeballed. His ears start at the very
   top of his drawing. From the resting -8% above, -37% puts the lid's
   bottom edge half a lid below them when he is up (his -40%), and -23%
   does the same at the lower bob he sinks to while he chews (his -26%).
   Move the resting top and these two move by the same amount. Change his rise and
   these two move with it, by the same amount.

   In front of him while he is up, so the rim covers his ears rather
   than tucking behind them. Landscape bought the headroom for this by
   shrinking the can a little; see the landscape block below. */
/* October 6 2026: he stays inside the can now, behind its front lip,
   so he rises to -42.5% and no longer bobs down while he chews (lower,
   and the lip would hide his chewing). The lid keeps its place half a
   lid over his ears: -39.5% for both. */
.eg-l6-lid.is-peeking  { transform: translateY(-39.5%); z-index: 5; }
.eg-l6-lid.is-munching { transform: translateY(-39.5%); z-index: 5; }

/* The inside of the can, which the art still does not paint: Brandon
   drew the can closed and sent the lid as its own piece, so with him
   raised, what shows behind him has to be the dark of the can and not
   the page. This is the last stand-in on the screen and it stays on
   the art list.

   Deliberately narrower than the can's mouth, so it only has to cover
   the middle where he was and never pokes out past the can's own
   silhouette. The rim reaches full width about 5% down the drawing,
   so the ellipse sits just inside that.

   Colour is Brandon's own: the can is painted in the brand green
   (#24634C, 74% of its pixels) and shaded with #14382A, which is the
   value used here. */
.eg-l6-mouth {
  position: absolute;
  left: 16%;
  top: 4%;
  width: 68%;
  height: 8%;
  border-radius: 50%;
  background: #14382A;
}

/* Up when a snack is on its way, down again once he has it. The rise
   is 40% of the can, which clears the rim and shows his whole face;
   PEEK_RISE in 06-drag.js has to agree with it, since that is what
   tells the snack where his mouth has moved to. It is 40 and not the
   old 10 because his head is its own drawing now, at a real head's
   size against the can, instead of a small one painted into the can's
   own picture. */
.eg-l6-head {
  transition: transform 0.28s ease;
}

/* Mutually exclusive, and set that way from the module rather than
   left to the cascade: these two carry equal specificity, so source
   order would be deciding it otherwise, which is the trap lesson 3's
   spin fell into (build log 5f). */
/* Up, and in front of the can while he is up. The lid comes up with
   him and sits in front of him in turn (z-index 5 on the lid). */
/* Inside the can (October 6 2026): no z-index lift, so the can's
   front lip stays over his chin. -42.5% must match PEEK_RISE. */
.eg-l6-head.is-peeking { transform: translateY(-42.5%); }
.eg-l6-head.is-munching { transform: translateY(-42.5%); }

/* Mounting joy, v2 section 4 lesson 6. A wiggle for the first few, and
   a woozy sway with stars once he has had too many. The can sways
   rather than spinning: a spinning garbage can reads as a bug, and the
   wooziness is his, not the furniture's. */
.eg-l6-can.is-wiggling { animation: eg-l6-wiggle 0.55s ease-in-out; }
.eg-l6-can.is-dizzy { animation: eg-l6-dizzy 0.9s ease-in-out; }

.eg-l6-can.is-wiggling,
.eg-l6-can.is-dizzy { transform-origin: center bottom; }

@keyframes eg-l6-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1, 1); }
  25%      { transform: rotate(-3deg) scale(1.02, 0.98); }
  60%      { transform: rotate(3deg) scale(0.99, 1.02); }
}

@keyframes eg-l6-dizzy {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-7deg); }
  45%      { transform: rotate(6deg); }
  70%      { transform: rotate(-4deg); }
  88%      { transform: rotate(2deg); }
}

/* Reuses lesson 1's pop keyframe, as lesson 3's glyphs already do. */
.eg-l6-star {
  position: absolute;
  top: 4%;
  right: 16%;
  font-size: 26px;
  pointer-events: none;
  animation: eg-l1-hee-pop 0.9s ease-out forwards;
}

/* Landscape: the tray stacks beside him, and both sit on a common
   floor line rather than floating at two different heights. */
@media (orientation: landscape) {
  .eg-l6-scene { align-items: flex-end; padding-bottom: 5%; }
  /* 64%, not the base 70%: with the lid riding on his head, the top of
     it went about 4px past the practice area at 70% on a 1024x600
     Lenovo and was clipped. 64% leaves about 16px. Portrait has the
     room already and keeps 70 (October 3 2026). */
  .eg-l6-stack { max-height: 64%; }
  .eg-l6-tray { flex-direction: column; gap: 6px; padding: 8px; }
  /* Four slots since October 3 2026 (the syrup bottle came off), so
     the full 56px fits again: 4 x 56 plus three 6px gaps plus the
     padding and border is about 262px, inside the ~326px a 1024x600
     Lenovo gives the practice area in landscape. Five slots needed 48
     to fit; if a fifth snack ever returns, so does 48. The shrink below
     stays as a second net. */
  .eg-l6-slot { flex-basis: 56px; height: 56px; width: 56px; }
  /* Full height here. The headroom his head and lid rise into is
     bought once, by .eg-l6-stack's own max-height; holding the column
     short as well spent it twice and left the can barely half the
     height of the panel it is the subject of. */
  .eg-l6-can { height: 100%; }
}

/* Portrait: the can goes up top and the tray sits along the bottom,
   under the hand rather than beside it, and the carry runs the long
   way up the panel. */
@media (orientation: portrait) {
  /* The scene stops short of the bottom so the tray stays clear of
     the orientation advisory, which sits along the bottom of the
     practice area on a tablet held upright. Without it the tray is
     behind the advisory and the lesson looks like it has no snacks
     at all until the advisory is dismissed.

     Held off with `bottom`, not padding. Percentage padding resolves
     against the container's WIDTH, so in a narrow portrait column
     15% came out as 37px rather than the ~150px intended (the same
     trap as build log 5g). `bottom` resolves against height. */
  .eg-l6-scene {
    flex-direction: column-reverse;
    bottom: 15%;
    /* Headroom for the lid, same reason as landscape: portrait puts
       him at the very top of the scene, with nothing above him. */
    top: 7%;
  }
  .eg-l6-tray { flex-direction: row; }
  /* flex-basis is the height here, the column direction's main size,
     which is what the stack's 100% then resolves against. */
  .eg-l6-can { flex: 0 0 44%; width: 100%; }
}

/* ── Lesson 7: Pinch to Zoom ───────────────────────────────
   Swiper in the middle, freely resizable by transform: scale, and
   a dashed outline at the target size behind him. The outline is
   sized in px by the module against the figure's measured base,
   because it has to equal the figure at the target scale exactly,
   whichever cap bound the figure's box. */
.eg-l7-wrap {
  position: absolute;
  inset: 0;
}

/* The ratio-lock primitive from lesson 1 (see the note there). */
.eg-l7-figure {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 40%;
  max-height: 42%;
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
  will-change: transform;
}

/* Lesson 1's numbers exactly, and for the same reason: they put the
   hat where Brandon's own composite paints it. Kept in step with
   .eg-l1-hat if either ever moves. */
.eg-l7-hat {
  position: absolute;
  left: 29.93%;
  top: -38.96%;
  width: 42.83%;
  aspect-ratio: 4277 / 3613;
  --art-x: 0.2861;
  --art-y: 0.3193;
  --art-w: 0.4277;
  --art-h: 0.3613;
  transform-origin: 50% 50%;
  transition: transform 0.3s ease;
}

/* Woozy at the size extremes: a wobble, the hat askew, stars. The
   edge reads in the body, never in an error message (v2 lesson 7).
   The wobble animates the standalone `rotate` property, not
   `transform`, deliberately: the module drives transform: scale()
   inline, and a keyframe on transform would override the scale for
   the whole animation. Standalone rotate composes with it and is
   compositor-only, so the transform-and-opacity rule holds. */
/* Letting go near the outline: he eases into it (October 4 2026). */
.eg-l7-figure.is-settling {
  transition: transform 0.22s ease-out;
}

.eg-l7-figure.is-woozy {
  animation: eg-l7-wobble 0.9s ease-in-out infinite;
}

.eg-l7-hat.is-askew {
  transform: rotate(11deg) translateX(6%);
}

@keyframes eg-l7-wobble {
  0%, 100% { rotate: 0deg; }
  25%      { rotate: -2.5deg; }
  75%      { rotate: 2.5deg; }
}

.eg-l7-outline {
  position: absolute;
  inset: 0;
  margin: auto;
  border: 3px dashed var(--mid);
  border-radius: 16px;
  opacity: 0.7;
}

.eg-l7-outline.is-matched {
  border-color: var(--green);
  border-style: solid;
  opacity: 1;
  animation: eg-l7-matched 0.5s ease-out;
}

@keyframes eg-l7-matched {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.eg-l7-star {
  position: absolute;
  top: 12%;
  right: 24%;
  font-size: 26px;
  pointer-events: none;
  animation: eg-l1-hee-pop 0.9s ease-out forwards;
}

/* ── Lesson 8: Rotate (turn the dial) ──────────────────────
   Swiper and his crossfading hat on one side, the COLOUR CONTROL
   sign, the dial, and the colour's name on the other. The dial art
   is an opaque box on white (flagged in build plan section 8), so
   the column keeps breathing room around it: a rotating square's
   corners sweep 21% of its side beyond the box, and they must
   never sweep across the sign or the name. */
.eg-l8-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2%;
  padding: 2%;
}

/* The flex half is a plain positioned box; the ratio lock only
   holds for absolutely positioned boxes (lesson 1's note), so the
   figure floats inside it rather than being the flex item itself. */
.eg-l8-figure-col {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
}

/* Big and vertically centred on his own side (Sean, July 26 2026):
   the hand turning the dial lives over the machine, so he stays
   clear of it. */
/* Big and vertically centred on his own side (Sean, July 26 2026):
   the hand turning the dial lives over the machine, so he stays
   clear of it.

   The box is now the hatted drawing, 0.6582 by 0.6982 of its canvas,
   where it used to be the bare head with the hat flying above the
   box on negative offsets. Same raccoon, same height on screen: the
   hat's space moved inside the box, so max-height grew to pay for it
   (74% plus the old hat's 30% overhang is the 96% here). */
.eg-l8-figure {
  position: absolute;
  inset: 0;
  /* Pushed down by half the hat's overhang, the same correction
     lesson 3 makes: centring the BOX centres his head, which leaves
     everything the eye reads as Swiper sitting high. */
  margin: auto;
  transform: translateY(19.5%);
  width: auto;
  height: auto;
  max-width: 86%;
  max-height: 70%;
  /* The bare head, same as lessons 1, 3 and 8, with the hat flying
     above it on negative offsets.

     70, not the 96 this carried while the hat was part of the drawing.
     The hat stands 38.96% of the box's height above the box, so the
     figure is 1.39 boxes tall and only 1/1.39 = 72% of the column can
     go to the box itself. Leave it at 96 and the head is half again
     too big, the hat is cut off at the top and he runs off the side. */
  aspect-ratio: 6582 / 5020;
  --art-x: 0.1670;
  --art-y: 0.2500;
  --art-w: 0.6582;
  --art-h: 0.5020;
}

/* Five hats stacked dead on top of each other on his crown; the module
   drives opacity, and only ever two are non-zero. Lesson 1's numbers,
   so the hat lands where Brandon's own one-piece drawing paints it,
   and all five are the same six paths with a different fill, so
   nothing moves as the colour changes.

   This screen used to crossfade five whole drawings of Swiper wearing
   each colour. Just as steady, but it made his head a different size
   here than everywhere else, because Brandon draws the head smaller in
   the hatted versions to leave room for the hat (Sean, October 1 2026).

   Opacity is the whole mechanism: animating filter is forbidden (v2
   section 3.1), so the colour lives in the art and the crossfade
   lives on the compositor. */
.eg-l8-hat {
  position: absolute;
  left: 29.93%;
  top: -38.96%;
  width: 42.83%;
  aspect-ratio: 4277 / 3613;
  --art-x: 0.2861;
  --art-y: 0.3193;
  --art-w: 0.4277;
  --art-h: 0.3613;
  opacity: 0;
  pointer-events: none;
  /* Each click swaps which hat is opaque; this makes the swap a fast
     crossfade instead of a cut. */
  transition: opacity 0.15s ease-out;
}

.eg-l8-dial-col {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  /* min-height 0, or the machine sets a min-content floor and the
     portrait column overflows the practice area in both directions:
     the same grid/flex trap step 5e fixed on .eg-teach. */
  min-height: 0;
}

/* The machine, composed to Brandon's mockup: one ratio-locked box
   (the lesson 1 primitive), every part positioned in percentages
   of it, so the arrangement survives every practice shape the way
   lesson 2's door does. The box's ratio is the mockup's machine
   group with a strip added at the bottom for the colour's name. */
.eg-l8-machine {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 94%;
  max-height: 98%;
  aspect-ratio: 540 / 970;
}

/* Paint order in the machine, Sean, October 1 2026: THE DIAL GOES
   UNDER EVERYTHING ELSE. Brandon's dial is a square canvas with the
   knob floating in the middle of it, so on the white practice area it
   looks like it occupies only the knob; the moment it overlaps
   another object, its layer is what gives it away. The dots arc past
   the pointer's side and the active one grows a step toward it, so
   the dots are where it showed.

   AMENDED October 3 2026 (Sean): the pointer goes OVER the dots, its
   tip landing on the centre of the one it aims at. That is safe now:
   the dots are transparent cuts (the white squares are gone), the
   dial's box is the knob, and the knob never reaches the ring, so
   the pointer's tip is the only part of the dial that meets a dot.
   The signs and the name stay above everything.

   Declared rather than left to DOM order, because source order
   silently deciding a layer is the trap lesson 3's spin fell into
   (build log 5f) and lesson 6's head carries a note about. Reordering
   the appends in 08-rotate.js cannot now change what sits in front. */
.eg-l8-dot { z-index: 1; }
.eg-l8-dial { z-index: 2; }

.eg-l8-sign-top,
.eg-l8-sign-control,
.eg-l8-colour { z-index: 3; }

/* Positions measured off the mockup. Heights follow each PNG's own
   ratio from its width. */
.eg-l8-sign-top {
  position: absolute;
  top: 0;
  left: 2%;
  width: 96%;
  height: auto;
}

/* The selector dots: individual cuts of Sean's selector-dots.png,
   each centred on the same machine-fraction constants the module
   computes the detent angles from, so the pointer aims at a dot
   exactly by construction. Bigger than the source arc drew them
   (Sean). The active one grows a step so pointer and dot pair up
   at a glance; transform only, and the translate keeps the centre
   put while it scales. */
.eg-l8-dot {
  position: absolute;
  width: 11.25%;
  height: auto;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out;
}

.eg-l8-dot.is-active {
  transform: translate(-50%, -50%) scale(1.45);
}

/* Dial and dots run 25% over the mockup's own proportions (Sean,
   July 26 2026): they are the object of the screen.

   THE BOX IS THE KNOB (October 3 2026). A square centred on the
   knob's circle in dial.svg (233.92, 277.29, radius 110.96 plus its
   4-unit stroke, so 226 units across), which makes the box's centre
   the point the dial turns about. The pointer overhangs the box and
   paints outside it. Before this the box was the whole drawing,
   knob plus pointer, whose middle is about 30px off the knob's, so
   the knob drifted at every stop.

   Same drawn size as before: 42.37% of 540 for 226 units is the
   same 1.012px per unit that 50.9% gave the old box.

   The box may only ever change size around its centre: left and top
   keep that centre on the module's HUB constant (0.4905, 0.5103),
   because the detent angles are computed from that point.
   left = 49.05 - w/2; top = 51.03 - h/2, h = w x 540/970. */
.eg-l8-dial {
  position: absolute;
  top: 39.235%;
  left: 27.865%;
  width: 42.37%;
  aspect-ratio: 1 / 1;
  --art-x: 0.23619;
  --art-y: 0.32091;
  --art-w: 0.44144;
  --art-h: 0.44144;
  will-change: transform;
  cursor: pointer;
  /* The click: each detent jump animates this fast snap rather
     than tweening freely, which is what makes it feel like stops
     instead of soup. */
  transition: transform 0.13s ease-out;
}

.eg-l8-sign-control {
  position: absolute;
  top: 70.6%;
  left: 20%;
  width: 56%;
  aspect-ratio: 6055 / 3301;
  --art-x: 0.1973;
  --art-y: 0.3350;
  --art-w: 0.6055;
  --art-h: 0.3301;
}

/* The visible half of the text channel: the colour's name, big and
   plain, named in words so nobody identifies a colour by eye. */
.eg-l8-colour {
  position: absolute;
  top: 88.5%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-lesson);
  font-size: clamp(18px, 4vh, 30px);
  font-weight: 800;
  color: var(--ink);
  text-transform: capitalize;
}

/* The full-turn beat: one bounce from the raccoon. */
.eg-l8-figure.is-turned {
  animation: eg-l1-wiggle 0.5s ease-in-out;
}

/* Portrait: the two columns become two rows, Swiper above the
   machine. The machine's own ratio keeps its parts arranged; only
   its outer caps change. */
@media (orientation: portrait) {
  .eg-l8-wrap { flex-direction: column; align-items: stretch; }
  .eg-l8-figure-col { flex: 0 0 30%; }
  .eg-l8-figure { max-width: 62%; max-height: 92%; }
  .eg-l8-dial-col { flex: 1 1 auto; width: 100%; }
  .eg-l8-machine { max-height: 100%; max-width: 80%; }
}

/* ── Reduced motion ─────────────────────────────────────────
   Swap wiggles, spins, and flights for gentle fades. The sound and
   text channels stay intact, so nothing is lost (v2 section 2.7). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── The opener: Tap (October 3 2026) ─────────────────────────
   Sean's brief: a big blue sky, Everyday Gestures in fancy script
   written by Swiper skywriting from a plane, and one tap to start
   that counts as the first skill. See js/opener.js.

   PLACEHOLDERS under the asset policy: the clouds (CSS) and the
   plane (inline SVG in opener.js) are made by Claude and rough on
   purpose. The pilot is Brandon's head-awake.svg. */

@font-face {
  font-family: "Pacifico";
  src: url("../../../../fonts/pacifico-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

.eg-op {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--eg-radius);
  background: linear-gradient(#2F8FD8 0%, #5AB3EC 55%, #A9DDF7 100%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.eg-op-sky { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
/* Layers on the opener, back to front: a far-away plane (.is-far,
   below half size), the clouds, the flyer, the title, the button and
   its note. */
.eg-op-title-wrap { z-index: 3; }
.eg-op-start, .eg-op-note { z-index: 4; }
.eg-op > .eg-op-plane { z-index: 2; transform-origin: 0 0; }
.eg-op > .eg-op-plane.is-far { z-index: 0; }

/* A cloud is three white blobs: the box and its two pseudo-elements. */
.eg-op-cloud {
  position: absolute;
  width: 120px;
  height: 40px;
  border-radius: 40px;
  background: #FFFFFF;
  opacity: 0.92;
  animation: eg-op-drift 60s linear infinite;
}
.eg-op-cloud::before,
.eg-op-cloud::after {
  content: "";
  position: absolute;
  background: #FFFFFF;
  border-radius: 50%;
}
.eg-op-cloud::before { width: 56px; height: 56px; left: 16px; top: -28px; }
.eg-op-cloud::after  { width: 44px; height: 44px; left: 58px; top: -18px; }

.eg-op-cloud-1 { left: 6%;  top: 58%; transform: scale(1.3); animation-duration: 70s; }
.eg-op-cloud-2 { left: 66%; top: 44%; transform: scale(0.9); animation-duration: 55s; animation-delay: -20s; }
.eg-op-cloud-3 { left: 78%; top: 62%; transform: scale(1.1); animation-duration: 80s; animation-delay: -35s; }
.eg-op-cloud-4 { left: 6%;  top: 86%; transform: scale(0.7); animation-duration: 65s; animation-delay: -10s; }

@keyframes eg-op-drift {
  from { translate: 0 0; }
  50%  { translate: 40px 0; }
  to   { translate: 0 0; }
}

/* The title, white and soft-edged like smoke. The clip that uncovers
   it behind the plane is set inline by opener.js every frame; before
   the font is ready it starts fully hidden. */
.eg-op-title-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.eg-op-title {
  margin: 0;
  font-family: "Pacifico", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: clamp(40px, 10vmin, 104px);
  line-height: 1.2;
  color: #FFFFFF;
  white-space: nowrap;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.95),
    0 0 12px rgba(255, 255, 255, 0.8),
    0 0 26px rgba(255, 255, 255, 0.55),
    0 2px 3px rgba(20, 70, 120, 0.25);
  /* Fully hidden: right and left edges of the clip meet half an em
     left of the E. The margins match CLIP_V and CLIP_PAD_EM in
     opener.js; see the note there. */
  clip-path: inset(-0.75em calc(100% + 0.5em) -0.75em -0.5em);
}

/* The plane flies along the title's line. It sits at the left edge
   and is moved by transform from opener.js. */
.eg-op-plane {
  position: absolute;
  left: 0;
  top: calc(14% - 1vmin);
  width: clamp(150px, 30vmin, 290px);
  aspect-ratio: 220 / 110;
  pointer-events: none;
  will-change: transform;
  transform: translateX(-120%);
}
.eg-op-plane svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The opener's plane has an inner box (opener.js tilts it); the end
   page's plane does not. */
.eg-op-plane-body { position: absolute; inset: 0; }
/* Swiper in the cockpit: his head over the fuselage, behind the plane's
   own body so the plane reads as something he is sitting in. */
.eg-op-pilot {
  position: absolute;
  left: 36%;
  top: -14%;
  width: 34%;
  height: auto;
  pointer-events: none;
}
.eg-op-prop { animation: eg-op-prop 0.12s linear infinite; transform-origin: 200px 62px; }
@keyframes eg-op-prop { 50% { transform: scaleY(0.2); } }



/* Reduced motion: no flight, the plane parked to the right of the
   title, the clouds still. */
.eg-op-plane.is-parked { left: auto; right: 4%; transform: none; }
.eg-reduced-motion .eg-op-cloud,
.eg-reduced-motion .eg-op-prop { animation: none; }

/* The start button: the biggest target in the game, with a ring that
   pulses outward from it until it is pressed. */
.eg-op-start {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  width: min(460px, 86%);
  min-height: 132px;
  padding: 34px 48px 22px;
  border: none;
  border-radius: 0;
  /* THE BUTTON IS A CLOUD (Sean, October 6 2026). The box has no fill
     of its own: the cloud drawing inside it (opener.js, START_CLOUD_SVG)
     fills it, so what looks tappable is exactly what is tappable. It
     is the biggest, brightest cloud in the sky (fully opaque, the
     others slightly see-through) and keeps a pulse, so it still reads
     as the thing to tap. No shadow: clouds don't cast one in the air.
     The lettering is the brand pink, #CB3275 (Sean): 4.9 to 1 on the
     white, 4.0 to 1 on the gold after the tap, both fine for bold text
     this size. The hint lines call it "the white cloud". */
  --cloud: #FFFFFF;
  background: none;
  color: #CB3275;
  font: inherit;
  font-size: clamp(24px, 4.2vmin, 36px);
  font-weight: 800;
  cursor: pointer;
  touch-action: none;
}
.eg-op-start-cloud,
.eg-op-start-pulse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.eg-op-start-cloud path { fill: var(--cloud); }
/* The pulse: the same outline in white, growing out from the edge and
   fading, over and over until the tap. */
.eg-op-start-pulse path { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 5; vector-effect: non-scaling-stroke; }
.eg-op-start-pulse { transform-origin: 50% 55%; animation: eg-op-pulse 1.6s ease-out infinite; }
@keyframes eg-op-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to   { transform: scale(1.12, 1.3); opacity: 0; }
}
.eg-op-start-label { position: relative; z-index: 1; }
.eg-op-start.is-pressed { transform: translateX(-50%) translateY(4px); }
/* After the tap the cloud turns soft gold, like the star just earned. */
.eg-op.is-done .eg-op-start { --cloud: #FFE7A0; }
.eg-op.is-done .eg-op-start-pulse { animation: none; opacity: 0; }
.eg-reduced-motion .eg-op-start-pulse { animation: none; opacity: 0.6; }

/* The line under the button: praise after the tap, a gentle word for
   anything else. */
.eg-op-note {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  max-width: 88%;
  margin: 0;
  /* Yellow on a dark green band, not white on the pale lower sky,
     which was hard to read (Sean, October 3 2026). Empty until there
     is something to say, so the band only appears with words. */
  padding: 8px 18px;
  border-radius: 12px;
  background: #14382A;
  text-align: center;
  font-size: clamp(17px, 2.6vmin, 24px);
  font-weight: 700;
  color: #FFD54A;
}
.eg-op-note:empty { display: none; }

/* ── The demo hand (October 3 2026) ───────────────────────────
   Show me's pointing hand, moved by engine/demo.js. Above everything
   in the practice area, and never a target itself. PLACEHOLDER art
   (inline SVG, made by Claude); Brandon's tutorial hand replaces it. */
.eg-demo-hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  width: 58px;
  aspect-ratio: 60 / 84;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
  will-change: transform;
}
.eg-demo-hand svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 33% 4%;
  transition: transform 0.12s ease-out;
}
/* Pressing: the hand dips toward the glass. */
.eg-demo-hand.is-pressing svg { transform: scale(0.88); }
.eg-demo-hand.is-arriving { opacity: 0; }
.eg-demo-hand { transition: opacity 0.25s ease-out; }

/* Step markers for screens that teach in order (Swipe's 1, 2, 3). */
.eg-demo-badge {
  position: absolute;
  z-index: 39;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: var(--purple);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 800;
  line-height: 30px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: eg-demo-badge-in 0.3s ease-out;
}
/* The lesson rebuilt after Show me (October 4 2026): a short fade so
   the reset reads as the screen going back, not a glitch. JS skips it
   under reduced motion. */
.is-fresh { animation: eg-fresh-in 0.35s ease-out; }
@keyframes eg-fresh-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes eg-demo-badge-in {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* The second hand for Pinch and Rotate: the same drawing, mirrored,
   so the two read as a thumb-and-finger pair from either side. */
.eg-demo-hand.is-second svg { transform: scaleX(-1); transform-origin: 67% 4%; }
.eg-demo-hand.is-second.is-pressing svg { transform: scaleX(-1) scale(0.88); }

/* ── The end page (October 3 2026) ────────────────────────────
   The opener's sky in early evening, so the fireworks show, with
   Swiper's plane towing a "The End" banner back and forth across it.
   See js/ending.js. Placeholders: banner, towline and fireworks. */
/* Night, October 4 2026 (Sean: "make the sky darker altogether"):
   deep navy overhead to indigo low down, with a faint warm glow on
   the horizon so it reads as a night sky and not a black box. The
   clouds are barely there. The early-evening sky it replaced was
   linear-gradient(#1D3E7A 0%, #3E6FB8 50%, #E9A46A 100%). */
.eg-end {
  background:
    radial-gradient(120% 45% at 50% 105%, rgba(233, 140, 90, 0.35), transparent 70%),
    linear-gradient(#060B1F 0%, #0E1838 45%, #241A4A 85%, #3A2350 100%);
}
.eg-end .eg-op-cloud { opacity: 0.06; }

/* Stars: tiny dots, each twinkling on its own timing (ending.js). */
.eg-end-stars { position: absolute; inset: 0; }
.eg-end-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0.8;
  animation: eg-end-twinkle 3s ease-in-out infinite;
}
.eg-end-stars span.is-big {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.7);
}
@keyframes eg-end-twinkle {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 0.15; transform: scale(0.6); }
}
.eg-end.is-still .eg-end-stars span { animation: none; }

.eg-end-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Plane, towline and banner travel together, left to right, over and
   over, along the upper sky. */
.eg-end-flight {
  position: absolute;
  left: 0;
  top: 18%;
  display: flex;
  align-items: center;
  pointer-events: none;
  animation: eg-end-fly 11s linear infinite;
  will-change: transform;
}
@keyframes eg-end-fly {
  from { transform: translateX(-110%); }
  to   { transform: translateX(calc(100vw)); }
}
.eg-end-flight .eg-op-plane {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  flex: none;
}
.eg-end-rope {
  flex: none;
  width: clamp(24px, 5vmin, 50px);
  height: 2px;
  margin-top: 2%;
  background: #FFFFFF;
  opacity: 0.85;
}
.eg-end-banner {
  flex: none;
  padding: 0.15em 0.9em 0.3em;
  background: #FFF6E3;
  border: 3px solid #B23A6E;
  border-radius: 6px 18px 18px 6px;
  font-family: "Pacifico", "Brush Script MT", cursive;
  font-size: clamp(26px, 6vmin, 60px);
  line-height: 1.2;
  color: #B23A6E;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transform-origin: right center;
  animation: eg-end-flutter 0.9s ease-in-out infinite alternate;
}
@keyframes eg-end-flutter {
  from { transform: skewY(-2deg) scaleY(0.97); }
  to   { transform: skewY(2deg) scaleY(1.02); }
}

.eg-end-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 52%;
  margin: 0;
  text-align: center;
  font-size: clamp(22px, 4vmin, 38px);
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0, 20, 60, 0.6);
}

.eg-end-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}
/* Play again is the opener's Start cloud (October 7 2026), centred
   where the two buttons used to sit, in bubblegum pink with deep blue
   lettering: #1A3E8C on #FFB3D6 is 6.0 to 1. Pink because nothing
   else in the night sky is. It keeps the Start cloud's white pulse. */
.eg-end-actions .eg-end-btn {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  --cloud: #FFB3D6;
  color: #1A3E8C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.eg-end-actions .eg-end-btn::after { display: none; }
.eg-end-actions .eg-end-btn.is-pressed,
.eg-end-actions .eg-end-btn:active { transform: translateY(4px); }

/* Reduced motion: the plane and banner hold still in the sky. */
.eg-end.is-still .eg-end-flight { animation: none; transform: translateX(8%); }
.eg-end.is-still .eg-end-banner { animation: none; }


/* ── The lettering trial (October 6 2026) ─────────────────────
   Switched on from the menu (body.eg-type-new; main.js). Headings and
   controls in DejaVu Sans Condensed, running text in Sylexiad Serif.
   Both are embedded, so every device shows the same letters (Android,
   the Lenovos' system, has no Verdana at all).

   WHY DEJAVU, NOT VERDANA CONDENSED: Verdana belongs to Microsoft and
   Monotype; a copy that came with Windows or a Mac may not be embedded
   in a website, and the condensed cut is sold separately as Verdana
   Pro Condensed with a web licence priced by page views. DejaVu Sans
   descends from Bitstream Vera, Verdana's close cousin, and is free to
   embed (licence: fonts/dejavu-LICENSE.txt). Swapping in Verdana Pro
   Condensed later, if CAMH buys it, is two @font-face lines.

   Sylexiad Serif is already embedded for the site (doors-core.css).
   Today the game's text is Atkinson Hyperlegible (style.md: chosen
   for low-vision readers); Sylexiad was chosen for dyslexic readers.
   The trial is how the team decides between them. */
@font-face {
  font-family: "DejaVu Sans Condensed";
  src: url("../../../../fonts/dejavu-sans-condensed-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans Condensed";
  src: url("../../../../fonts/dejavu-sans-condensed-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

body.eg-type-new {
  font-family: "Sylexiad Serif Medium", Georgia, serif;
}
body.eg-type-new :is(h1, h2, h3, button, .eg-title, .eg-progress-text,
  .eg-menu-return, .eg-ghost-caption, .eg-demo-badge, .eg-op-start) {
  font-family: "DejaVu Sans Condensed", Verdana, Geneva, sans-serif;
}
/* Sylexiad has no italic, so a slanted instruction would be the
   browser faking one: exactly what a dyslexia-friendly face should not
   get. Upright under the trial. */
body.eg-type-new .eg-instruction { font-style: normal; }
/* The skywriting title keeps its script face. */
body.eg-type-new .eg-op-title { font-family: "Pacifico", "Brush Script MT", cursive; }
.eg-type-btn { margin: 4px 0 12px; width: 100%; }


/* ── Full screen and the version (October 17 2026) ──────────
   The button sits with Tip and Settings and carries words like Menu.
   Its icon shows the corners going out, or coming in once on. On a
   narrow phone header the words drop and the icon stays, still 44px
   to tap, with the words kept for screen readers. */
.eg-fsbtn { padding-right: 14px; }
.eg-fsbtn[hidden] { display: none; }
.eg-fsbtn .eg-fs-in { display: none; }
.eg-fsbtn.is-on .eg-fs-out { display: none; }
.eg-fsbtn.is-on .eg-fs-in { display: inline; }
@media (max-width: 520px) {
  .eg-fsbtn { padding-right: 12px; }
  .eg-fs-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* The version line at the foot of Menu and Tip: small and quiet, but
   readable when a presenter needs to check which copy is open. */
.eg-version { margin: 14px 0 0; font-size: 14px; opacity: 0.75; text-align: center; }

/* ═══════════════════════════════════════════════════════════
   PHONES (October 8 2026)
   Sean's play-through on his iPhone was unplayable, for two reasons.
   ═══════════════════════════════════════════════════════════ */

/* 1. The footer: Back, nine skill icons and Next need about 500px,
   and a phone upright has 360 to 390. The page laid itself out 500
   wide to make room, and everything else measured against that. On
   narrow screens the buttons slim down and the icons shrink to fit
   (never below 14px). Tap targets stay 44px tall. */
@media (max-width: 520px) {
  .eg-footer { gap: 8px; padding: 8px 10px; }
  .eg-navbtn { min-width: 64px; padding: 10px 12px; }
  .eg-progress { flex: 1 1 auto; min-width: 0; }
  .eg-dots.is-icons { gap: clamp(2px, 1vw, 10px); }
  .eg-dots.is-icons li {
    width: clamp(14px, calc((100vw - 190px) / 10), 22px);
    height: clamp(14px, calc((100vw - 190px) / 10), 22px);
  }
}

/* 2. The layout: phones get the one-card layout from the gestures-alt
   trial (html.eg-card, set in main.js by the screen's shorter side,
   or ?layout=card). Every rule here is scoped to it, so the Lenovos
   and laptops are untouched. The lesson bar runs along the top of the
   card (the skill's name as the heading, the instruction as body
   text, Show me), and the practice area fills the rest. */
html.eg-card .eg-screen {
  display: flex;
  gap: 0;
}
html.eg-card .eg-lesson-bar {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 18px 12px;
  border-bottom: 2px solid #E6E8EA;
  background: #FFFFFF;
}
html.eg-card .eg-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.15;
}
html.eg-card .eg-instruction {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  padding-top: 0;
  border-top: 0;
  font-size: clamp(19px, 2.1vw, 24px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
}
html.eg-card .eg-showme {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}
html.eg-card .eg-practice-wrap {
  flex: 1;
  flex-direction: column;
  background: #FFFFFF;
  border: 6px solid #C9CCCE;
  border-radius: 18px;
  overflow: hidden;
}
html.eg-card .eg-practice {
  border: 0;
  border-radius: 0;
}
/* Double Tap's timing slider stays in Settings on a phone: in the
   card it sat where the can should be. */
html.eg-card .eg-l2-controls { display: none; }

/* Upright: Show me drops under the instruction so the instruction
   gets the full width. */
@media (max-width: 760px) {
  html.eg-card .eg-lesson-bar { grid-template-columns: minmax(0, 1fr); padding: 8px 12px 10px; }
  html.eg-card .eg-showme { grid-column: 1; grid-row: 3; justify-self: start; margin-top: 6px; }
  html.eg-card .eg-title { font-size: clamp(22px, 6vw, 28px); }
  html.eg-card .eg-instruction { font-size: clamp(18px, 4.6vw, 21px); }
}
/* Sideways: very little height, so the bar tightens. */
@media (max-height: 500px) {
  html.eg-card .eg-lesson-bar { padding: 4px 14px 6px; }
  html.eg-card .eg-title { font-size: 19px; }
  html.eg-card .eg-instruction { font-size: 16px; }
}

/* ── The ghost hand (October 6 2026, from gestures-alt) ───────
   The demo hand playing as a hint (engine/demo.js, ghost mode): see-
   through, no shadow, and the game does not react to it. Ripples
   where it presses, a dotted trail where it moves, its caption just
   above the fingertip. Never a target, never announced. */
.eg-demo-hand.is-ghost { opacity: 0.55; filter: none; }
.eg-demo-hand.is-ghost.is-arriving { opacity: 0; }

.eg-ghost-ripple,
.eg-ghost-dot {
  position: absolute;
  z-index: 38;
  pointer-events: none;
  border-radius: 50%;
}
.eg-ghost-ripple {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 4px solid rgba(53, 29, 91, 0.55);
  animation: eg-ghost-ripple 1s ease-out forwards;
}
.eg-ghost-ripple::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 3px solid rgba(53, 29, 91, 0.45);
}
@keyframes eg-ghost-ripple {
  from { transform: scale(0.3); opacity: 1; }
  to   { transform: scale(1.4); opacity: 0; }
}
.eg-ghost-dot {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: rgba(53, 29, 91, 0.4);
  animation: eg-ghost-dot 0.9s ease-out forwards;
}
@keyframes eg-ghost-dot {
  from { opacity: 1; }
  to   { opacity: 0; transform: scale(0.4); }
}
.eg-ghost-caption {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 41;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--purple);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* 3. The end page on a phone upright (October 9 2026). Sean's iPhone:
   the congratulations line sat at 52% and Play again's cloud (132px
   tall) covered it, since the card is only about 440px tall. On narrow
   screens the line moves up under the banner, a touch smaller, and the
   cloud shrinks and drops lower. Still well over 44px to tap. */
@media (max-width: 520px) {
  .eg-end-line { top: 37%; font-size: clamp(20px, 5.6vw, 24px); line-height: 1.3; }
  .eg-end-actions { bottom: 6%; }
  .eg-end-actions .eg-end-btn { width: min(260px, 78%); min-height: 100px; padding: 24px 32px 16px; }
}

/* Star power on the opener's easter egg (Sean, October 9 2026): from
   the tap until the loop is done, Swiper and his plane
   cycle through the colour wheel with a warm glow, like Mario after a
   power-up. A smooth hue turn, not a strobe: brightness hardly changes,
   so it is not a flash in the accessibility sense. Never with reduced
   motion (the egg skips straight to the skill there anyway). */
.eg-op-plane-body.is-powered {
  animation: eg-op-powered 0.45s linear infinite;
}
@keyframes eg-op-powered {
  from { filter: hue-rotate(0deg)   saturate(1.6) drop-shadow(0 0 10px rgba(255, 230, 120, 0.9)); }
  to   { filter: hue-rotate(360deg) saturate(1.6) drop-shadow(0 0 10px rgba(255, 230, 120, 0.9)); }
}
.eg-reduced-motion .eg-op-plane-body.is-powered { animation: none; }

/* The end page: tap Swiper and he giggles, and the plane wiggles
   (Sean, October 9 2026; ending.js). */
.eg-end-flight .eg-end-plane.is-wiggling { animation: eg-end-wiggle 0.6s ease-in-out; }
@keyframes eg-end-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-9deg); }
  40% { transform: rotate(7deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(3deg); }
}

/* ── Advanced Swipe, Turn and shoot court (October 15 2026) ──
   screens/05-advanced-swipe-turn.js. The court is drawn in code on the
   canvas; these rules only stack the pictures over it. Sizes and
   positions are set by the screen, from its own camera. */
.eg-l5c-court { position: absolute; inset: 0; overflow: hidden; background: #137a9b; }
.eg-l5c-court > * { position: absolute; left: 0; top: 0; pointer-events: none; }
.eg-l5c-floor { width: 100%; height: 100%; z-index: 1; }
.eg-l5c-shadow { z-index: 2; border-radius: 50%; background: rgba(40, 20, 5, 0.45); filter: blur(2px); }
.eg-l5c-hoop { display: block; max-width: none; }
.eg-l5c-hoop-back { z-index: 2; }
.eg-l5c-hoop-front { z-index: 4; }
.eg-l5c-ball { z-index: 5; display: block; max-width: none; will-change: transform; }
.eg-l5c-swiper { z-index: 6; width: 100%; height: 100%; will-change: transform; }
.eg-l5c-pose { position: absolute; display: block; max-width: none; visibility: hidden; }
.eg-l5c-pose.is-on { visibility: visible; }
