/* The garden's lanterns and the lantern ceremony (10 Nov 2026; garden.js, lanterns.js). Its own sheet, loaded by the
   lessons page after site.css. Jeff: "lanterns.. awesome", not a cemetery, not a kids' game: each lesson is a paper
   lantern on a low wooden stand beside its tile, dark while the lesson is still to do and lit gold once it is done.
   The painted garden, when its pictures are there, lies under everything; the page draws only what changes. */

/* --- the painted garden under a part --------------------------------------------------------------------------- */
.jg-art { position: absolute; inset: 0; overflow: hidden; background: #2d6a48; }
.jg-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.jg-art .jg-dusk { opacity: 0; transition: opacity 2.4s ease-in-out; }
.jg-trail.dusk .jg-art .jg-dusk { opacity: 1; }
/* evening by the clock (12 Nov): the change at 7 pm and 6 am is a slow fade, and lit lanterns glow brighter at night */
.jg-trail.clock .jg-art .jg-dusk { transition-duration: 20s; }
.jg-trail.dusk .jg-lan.lit .jg-lan-halo { transform: scale(1.35); }
.jg.painted .jg-lit { filter: drop-shadow(0 0 6px rgba(255, 214, 110, 0.9)); mix-blend-mode: screen; }

/* --- a stop: the lantern, then the lesson's tile ----------------------------------------------------------------- */
.jg .jg-stop { width: 10rem; transform: translate(-50%, -58px); }
.jg-row { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.jg .jg-stop .lm-flip { width: 40px; height: 56px; }
.jg .jg-stop .lm-flip.wide { width: 82px; }
.jg-row .jg-n { left: auto; right: -12px; bottom: -6px; }

.jg-lan { position: relative; display: block; width: 46px; height: 74px; flex: none; }
.jg-lan-halo { position: absolute; left: 50%; top: 26px; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 205, 110, 0.72) 0%, rgba(255, 190, 90, 0.28) 38%, rgba(255, 190, 90, 0) 70%);
  opacity: 0; transition: opacity 0.9s ease; }
.jg-lan.lit .jg-lan-halo { opacity: 1; }
/* drawn here when there is no painted sprite: a paper lantern with dark wooden ribs on a low stand */
.jg-lan-cap { position: absolute; left: 9px; right: 9px; top: 0; height: 7px; border-radius: 3px 3px 1px 1px; background: #3a2414; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset; }
.jg-lan-paper { position: absolute; left: 3px; right: 3px; top: 6px; height: 46px; border-radius: 13px / 16px;
  background:
    repeating-linear-gradient(0deg, rgba(58, 36, 20, 0.34) 0 1.5px, rgba(0, 0, 0, 0) 1.5px 9px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0) 28%, rgba(255, 255, 255, 0.16) 52%, rgba(0, 0, 0, 0.22)),
    linear-gradient(180deg, #e9dcc0, #cdbb97);
  box-shadow: 0 0 0 1.5px #3a2414, 0 6px 8px rgba(0, 0, 0, 0.35); transition: background 0.9s ease, box-shadow 0.9s ease; }
.jg-lan.lit .jg-lan-paper {
  background:
    repeating-linear-gradient(0deg, rgba(120, 56, 12, 0.3) 0 1.5px, rgba(0, 0, 0, 0) 1.5px 9px),
    radial-gradient(60% 55% at 50% 58%, #fff7cf 0%, #ffd873 42%, #f39a35 100%);
  box-shadow: 0 0 0 1.5px #6b3a12, 0 0 18px 4px rgba(255, 196, 96, 0.75), 0 6px 8px rgba(0, 0, 0, 0.3); }
.jg-lan-stand { position: absolute; left: 6px; right: 6px; bottom: 0; height: 24px;
  background:
    linear-gradient(#4e2e18, #4e2e18) 50% 0 / 100% 4px no-repeat,
    linear-gradient(#5e3820, #3a2212) 0 4px / 5px 20px no-repeat,
    linear-gradient(#5e3820, #3a2212) 100% 4px / 5px 20px no-repeat,
    linear-gradient(#4e2e18, #4e2e18) 50% 14px / 100% 3px no-repeat;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.4)); }
/* a painted sprite: dark and lit versions, one faded over the other */
.jg-lan.pic img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.4)); }
.jg-lan.pic .jg-lan-on { opacity: 0; transition: opacity 0.9s ease; }
.jg-lan.pic.lit .jg-lan-on { opacity: 1; }
.jg-lan.lit .jg-lan-paper, .jg-lan.lit.pic .jg-lan-on { animation: jgLanBreath 3.6s ease-in-out infinite; }
@keyframes jgLanBreath { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
/* the next lesson is found by its tile's glow (13 Nov; below), not a ring round its lantern */
/* a part just finished: its lanterns glow together */
.jg.glow .jg-lan.lit .jg-lan-halo { animation: jgLanSwell 2.4s ease-in-out; }
@keyframes jgLanSwell { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.9); } }
/* on the painted garden the label reads over a picture: a little more solid */
.jg.painted .jg-label { background: rgba(255, 249, 232, 0.96); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg.tall .jg-stop { width: 8.4rem; }
.jg.tall .jg-lan { width: 38px; height: 62px; }
.jg.tall .jg-lan-paper { height: 38px; }
.jg.tall .jg-lan-stand { height: 20px; }

/* --- the way into the ceremony, once every lesson is finished ---------------------------------------------------- */
.lm-lanterns { display: flex; justify-content: center; margin: 4px 0 0; }

/* --- the lantern ceremony --------------------------------------------------------------------------------------- */
html.lc-open { overflow: hidden; }
/* the garden shows through the ceremony, but its sticky bar (Learn to play, the search) does not: the lanterns rise
   over the garden, never over the search box (16 Nov check of the lift) */
html.lc-open .lessons-head, html.lc-open .lessons-head-space { visibility: hidden; }
.lc { position: fixed; inset: 0; z-index: 200; overflow: hidden; color: #fff6e2;
  background: linear-gradient(180deg, #2d3f6e 0%, #6a5a8e 46%, #e09a62 78%, #f0b878 100%); transition: background 3s ease; }
.lc-sky { position: absolute; inset: 0; opacity: 0; transition: opacity 3s ease;
  background: linear-gradient(180deg, #0c1230 0%, #1f2350 42%, #4b3566 72%, #b05a3c 100%); }
.lc.night .lc-sky { opacity: 1; }
.lc-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff6d8; opacity: 0.85; animation: lcTwinkle 3.2s ease-in-out var(--d, 0s) infinite; }
@keyframes lcTwinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.95; } }
.lc-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 40vh; background: var(--lc-garden, linear-gradient(180deg, rgba(20, 50, 34, 0) 0%, #14321f 40%, #0b2014 100%)) center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 34%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 34%); }
.lc-stage { position: absolute; inset: 0; pointer-events: none; }

/* a sky lantern: open at the foot, a small flame inside, her words on the paper */
.lc-lan { position: absolute; bottom: 14vh; width: clamp(74px, 7vw, 100px); aspect-ratio: 5 / 7.6; margin-left: calc(clamp(74px, 7vw, 100px) / -2);
  display: grid; place-items: center; opacity: 0;
  animation: lcRise var(--time, 7s) cubic-bezier(.3, .05, .5, 1) var(--delay, 0s) forwards; }
.lc-lan.wish { width: clamp(140px, 14vw, 190px); aspect-ratio: 5 / 7; margin-left: calc(clamp(140px, 14vw, 190px) / -2); z-index: 2; }
.lc-paper { position: absolute; inset: 0; clip-path: polygon(22% 100%, 6% 30%, 12% 10%, 30% 0, 70% 0, 88% 10%, 94% 30%, 78% 100%);
  background: radial-gradient(70% 60% at 50% 78%, #fff3c0 0%, #ffcd78 38%, #f08f3c 78%, #d9692c 100%); }
.lc-lan::before { content: ""; position: absolute; left: 50%; top: 52%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 196, 100, 0.5) 0%, rgba(255, 180, 90, 0.16) 40%, rgba(255, 180, 90, 0) 68%); }
.lc-flame { position: absolute; left: 50%; bottom: 3%; width: 16%; aspect-ratio: 2 / 3; transform: translateX(-50%); border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 70%, #fffbe6, #ffe07a 55%, rgba(255, 190, 80, 0)); animation: lcFlame 0.9s ease-in-out infinite alternate; }
@keyframes lcFlame { from { transform: translateX(-50%) scale(1, 1); } to { transform: translateX(-50%) scale(0.86, 1.14); } }
.lc-lan.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lc-words { position: relative; z-index: 1; padding: 0 9%; margin-top: -10%; text-align: center; color: #4a1f08;
  font: 700 16px/1.12 var(--g-font-body, var(--font, inherit)); text-wrap: balance; overflow-wrap: break-word; }
.lc-lan.wish .lc-words { font-size: clamp(17px, 1.5vw, 22px); }
@keyframes lcRise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.82); }
  12% { opacity: 1; }
  55% { transform: translate(var(--sway, 12px), calc(var(--rise, 60vh) * -0.55)) scale(0.92); }
  100% { opacity: 1; transform: translate(calc(var(--sway, 12px) * -0.6), calc(var(--rise, 60vh) * -1)) scale(0.8); }
}
/* held: where the lanterns end up, for the last picture and for "reduce motion" */
.lc.held .lc-lan { animation: none; opacity: 1; transform: translate(calc(var(--sway, 12px) * -0.6), calc(var(--rise, 60vh) * -1)) scale(0.8); }

/* lifting off the path (16 Nov, plan answer 14): the sky goes clear over the garden at dusk, each lantern starts at its
   own stop (--dx, --dy from its place in the sky, small as the stop's lantern) and rises to its place; the night sky
   comes back behind them once the last one is up. The stop's own lantern goes dark while its sky lantern is up. */
.lc.tour { background: rgba(12, 16, 44, 0.3); transition: background 0.7s ease; }
.lc.tour .lc-ground { opacity: 0; transition: opacity 2.5s ease; }
.lc.tour.night .lc-ground { opacity: 1; }
.lc-lan.lift { bottom: auto; margin-top: calc(clamp(74px, 7vw, 100px) * -0.76); animation-name: lcLift; animation-timing-function: cubic-bezier(.35, .1, .4, 1); animation-delay: 0s; }
.lc-lan.lift.wish { margin-top: calc(clamp(140px, 14vw, 190px) * -0.7); }
@keyframes lcLift {
  0% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s0, 0.4)); }
  10% { opacity: 1; }
  50% { transform: translate(calc(var(--dx) * 0.35 + var(--sway, 12px)), calc(var(--dy) * 0.42)) scale(0.7); }
  100% { opacity: 1; transform: translate(0, 0) scale(0.8); }
}
.lc.held .lc-lan.lift { transform: scale(0.8); }
.jg-lan.flown { opacity: 0.25; transition: opacity 0.5s ease; }

.lc-panel { position: absolute; left: 50%; top: 50%; width: min(34rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  transform: translate(-50%, -50%); padding: 1.6rem 1.6rem 1.7rem; border-radius: 22px; text-align: center;
  background: rgba(20, 24, 54, 0.82); border: 1px solid rgba(255, 227, 168, 0.4); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
.lc-panel[hidden] { display: none; }
.lc.held .lc-panel { top: auto; bottom: 4vh; transform: translateX(-50%); }
.lc-panel h2 { margin: 0 0 0.5rem; font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: #ffe9b8; }
.lc-panel p { margin: 0 0 1.1rem; font-size: 1.1rem; line-height: 1.5; color: #fff6e2; }
.lc-picks { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0.7rem; }
.lc-pick { min-height: 52px; padding: 0.4rem 0.7rem; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; font-size: 17px; color: #fff6e2;
  background: rgba(255, 227, 168, 0.12); border: 2px solid rgba(255, 227, 168, 0.45); }
.lc-pick:hover { background: rgba(255, 227, 168, 0.22); }
.lc-pick[aria-pressed="true"] { background: #ffe3a8; color: #3a1c08; border-color: #ffe3a8; }
.lc-panel input { width: 100%; min-height: 52px; padding: 0.4rem 0.8rem; margin-bottom: 1rem; border-radius: 12px; font: inherit; font-size: 18px;
  color: #2a1608; background: #f3e6c4; border: 2px solid #ffe3a8; text-align: center; }
.lc .button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
.lc-go { font-size: 1.25rem; min-height: 60px !important; padding: 0 1.8rem; }
.lc-acts { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.lc-pick:focus-visible, .lc-panel input:focus-visible, .lc-skip:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lc-skip { position: absolute; top: 14px; right: 14px; min-height: 48px; padding: 0 1.1rem; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700;
  color: #fff6e2; background: rgba(12, 18, 48, 0.6); border: 2px solid rgba(255, 246, 226, 0.6); }
.lc-skip[hidden] { display: none; }

@media (max-width: 600px) {
  .lc-picks { grid-template-columns: 1fr; }
  .lc-panel { padding: 1.2rem 1rem 1.3rem; }
  .lc-lan { bottom: 22vh; }
}
@media (prefers-reduced-motion: reduce) {
  .jg-lan.lit .jg-lan-paper, .jg-lan.lit.pic .jg-lan-on, .jg.glow .jg-lan.lit .jg-lan-halo, .lc-star, .lc-flame { animation: none; }
  .jg-art .jg-dusk, .jg-lan-halo, .jg-lan-paper, .lc, .lc-sky { transition: none; }
  .lc-lan { animation: none; opacity: 1; transform: translate(calc(var(--sway, 12px) * -0.6), calc(var(--rise, 60vh) * -1)) scale(0.8); }
}

/* --- the painted parts: one garden cut in three (the school year, 12 Nov: the path and the stream run on from one
   part into the next), so the pictures butt together with no gap and no frame of their own ------------------- */
.jg-trail:has(.jg.painted) { display: grid; gap: 0; padding: 0; background: #1c3a23; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); }
.jg.painted { border-radius: 0; overflow: hidden; }
/* labels on a picture: warm parchment, never a white box */
.jg.painted .jg-label { background: #f3e6c4; color: #2a1d0c; box-shadow: 0 3px 0 rgba(60, 40, 12, 0.35), 0 6px 10px rgba(0, 0, 0, 0.35); }
.jg.painted .jg .jg-stop .lm-link:hover .jg-label, .jg.painted .jg-stop .lm-link:hover .jg-label { background: #f8eccd; }
.jg.painted .jg-sign { background: #f3e6c4; }
.jg.painted .jg-n { background: #f3e6c4; color: #2a1d0c; }
.jg.painted .jg-lan { width: 54px; height: 86px; }
.jg.painted.tall .jg-lan { width: 44px; height: 70px; }

/* each part's sign once the part is finished (12 Nov): a gold edge and a soft glow in the part's season color (the
   basics fall gold, Reading the card winter silver, the Charleston spring pink), the badge in color and a check after
   the name; a part still to do keeps the plain sign */
.jg-sign { --season: #c9962c; transition: box-shadow 0.6s ease, background 0.6s ease; }
.jg-card .jg-sign { --season: #8fa6b8; }
.jg-charleston .jg-sign { --season: #df7fa2; }
.jg-tick { display: none; }
.jg-sign.done { box-shadow: 0 0 0 3px var(--season), 0 0 16px 4px color-mix(in srgb, var(--season) 70%, transparent), 0 3px 8px rgba(0, 0, 0, 0.3); }
.jg-sign.done .jg-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--season); color: #fff; font: 700 0.85rem/1 system-ui, sans-serif; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.jg-badge { transition: filter 0.6s ease; }
.jg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .jg-sign, .jg-badge { transition: none; } }

/* the garden moments (12 Nov): a finished lesson's coins counted up at its stop; a finished part's sign lighting up
   and its season blowing across the picture */
.jg-plus { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); z-index: 6; pointer-events: none;
  padding: 3px 10px; border-radius: 999px; background: #2a1d0c; color: #ffe08a; font: 700 0.95rem/1.2 system-ui, sans-serif;
  white-space: nowrap; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); animation: jgPlus 2.6s ease-out forwards; }
@keyframes jgPlus { 0% { opacity: 0; transform: translate(-50%, 10px); } 12% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 1; transform: translate(-50%, -26px); } 100% { opacity: 0; transform: translate(-50%, -40px); } }
.jg-sign.lighting { animation: jgSignLight 2.4s ease-out; }
@keyframes jgSignLight { 0% { transform: scale(1); } 20% { transform: scale(1.12); } 45% { transform: scale(0.98); } 100% { transform: scale(1); } }
.jg-burst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.jg-burst > span { position: absolute; top: -20px; opacity: 0; animation: jgBurst 3s ease-in forwards; }
.jg-burst-leaf { width: 14px; height: 10px; border-radius: 0 70% 0 70%; }
.jg-burst-petal { width: 11px; height: 8px; border-radius: 60% 0 60% 0; }
.jg-burst-snow { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); }
@keyframes jgBurst { 0% { opacity: 0; top: -20px; transform: translateX(0) rotate(0); } 10% { opacity: 1; }
  85% { opacity: 1; } 100% { opacity: 0; top: 105%; transform: translateX(var(--drift)) rotate(var(--spin)); } }
@media (prefers-reduced-motion: reduce) { .jg-plus, .jg-sign.lighting, .jg-burst { animation: none; display: none; } }

/* the stops (12 Nov, Jeff: "the lanterns are a bit big.. the tiles should be the big things"): the lesson's tile is
   the main thing, about twice its old size, and the lantern a third smaller beside it, as its light */
.jg .jg-stop { width: 11rem; transform: translate(-50%, -96px); }
.jg.tall .jg-stop { width: 9rem; transform: translate(-50%, -78px); }
/* 13 Nov (Jeff: "the tiles seem to get a little lost"): the tile a quarter bigger again (72 by 100 to 90 by 125; on a
   phone 56 by 78 to 66 by 92, as big as the first stop under a part's sign allows), centered on the path, and the lantern smaller, tucked behind its right edge on the
   plinth, so the tile is the main thing at the stop. The number sits at the tile's foot on the left. */
.jg .jg-row { display: block; width: max-content; margin: 0 auto; }
.jg .jg-stop .lm-flip { width: 90px; height: 125px; }
.jg .jg-stop .lm-flip.wide { width: 184px; }
.jg.tall .jg-stop .lm-flip { width: 66px; height: 92px; }
.jg.tall .jg-stop .lm-flip.wide { width: 136px; }
.jg .jg-row > .jg-lan { position: absolute; z-index: 0; right: -21px; bottom: 9px; width: 26px; height: 42px; }
.jg.tall .jg-row > .jg-lan { right: -17px; bottom: 7px; width: 22px; height: 36px; }
.jg .jg-row > .jg-n { left: -13px; right: auto; bottom: 5px; }
.jg.tall .jg-row > .jg-n { left: -12px; bottom: 3px; width: 22px; height: 22px; }
/* the lantern's light, sized to the smaller lantern; it glows round the tile's edge */
.jg .jg-row .jg-lan-halo { top: 14px; width: 84px; height: 84px; margin: -42px 0 0 -42px; }
/* the drawn lantern (no painted sprite), drawn at the smaller size */
.jg .jg-row .jg-lan-cap { left: 6px; right: 6px; height: 5px; }
.jg .jg-row .jg-lan-paper { left: 2px; right: 2px; top: 4px; height: 26px; border-radius: 8px / 10px; }
.jg .jg-row .jg-lan-stand { left: 4px; right: 4px; height: 13px; }
/* Kora stands left of the plinth */
.jg-kora { transform: translate(calc(-100% - 58px), -96%); }
.jg.tall .jg-kora { transform: translate(calc(-100% - 48px), -86%); }

/* the tile built like a real American Mah Jongg tile (13 Nov, Jeff: "the tiles seem to get a little lost"): an ivory
   face on a jade back, so a thick edge shows along the right side and the bottom (ivory, then the jade layer), and a
   soft shadow on the ground under it. Face down, the jade back is on top and the ivory layer shows along the edge.
   --jg-rim is the tile's outer line; a finished tile's is gold (below). */
.jg .jg-stop { --jg-rim: 0 0 0 1px rgba(92, 70, 36, 0.5);
  --jg-edge: 2px 2px 0 0 #f3ead2, 4px 6px 0 0 #1f7d52, 4px 6px 0 1px #0b4029, 0 12px 14px rgba(0, 0, 0, 0.45); }
.jg.tall .jg-stop { --jg-edge: 2px 2px 0 0 #f3ead2, 3px 5px 0 0 #1f7d52, 3px 5px 0 1px #0b4029, 0 10px 12px rgba(0, 0, 0, 0.45); }
.jg .jg-stop .lm-tile { box-shadow: var(--jg-rim), var(--jg-edge); }
.jg .jg-stop .lm-back i { box-shadow: inset 0 0 0 3px #0d4a31, 0 0 0 1px rgba(8, 40, 26, 0.6), 2px 2px 0 0 #146a44, 4px 6px 0 0 #efe4c6, 4px 6px 0 1px #8c7650, 0 12px 14px rgba(0, 0, 0, 0.45); }
.jg.tall .jg-stop .lm-back i { box-shadow: inset 0 0 0 3px #0d4a31, 0 0 0 1px rgba(8, 40, 26, 0.6), 2px 2px 0 0 #146a44, 3px 5px 0 0 #efe4c6, 3px 5px 0 1px #8c7650, 0 10px 12px rgba(0, 0, 0, 0.45); }

/* each stop stands on a low stone plinth, so it reads as a place on the path: a pale top the tile stands on, a darker
   front, and its shadow on the ground. The plinth sits on the path point (the stop is lifted by its height). */
.jg .jg-row { padding-bottom: 12px; }
.jg .jg-row::before { content: ""; position: absolute; z-index: 0; left: -8px; right: -28px; bottom: 0; height: 17px; border-radius: 5px 5px 4px 4px;
  background: linear-gradient(180deg, #dcd5c1 0, #c2bba6 5px, #7c7564 6px, #5a5446 100%);
  box-shadow: inset 0 0 0 1px rgba(40, 34, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 9px -3px rgba(0, 0, 0, 0.5); }
.jg .jg-row > * { position: relative; z-index: 1; }
.jg .jg-row > .jg-n { position: absolute; z-index: 2; }
.jg.tall .jg-row { padding-bottom: 8px; }
.jg.tall .jg-row::before { height: 12px; left: -6px; right: -22px; }
/* a lesson stop is placed by its margins, not a transform, so the stops share one layer: every label is drawn over
   any tile of the next stop and over a quiz pavilion, and stays readable where the phone's path puts stops close */
.jg .lm-stop { transform: none; z-index: auto; margin: -133px 0 0 -5.5rem; }
.jg .lm-stop .jg-row { z-index: 2; }
.jg .lm-stop .jg-label { position: relative; z-index: 3; }
.jg.tall .lm-stop { transform: none; margin: -94px 0 0 -4.5rem; }
/* on a phone the part's sign is a little smaller, so the first stop's tile clears it */
.jg.tall .jg-sign { top: 8px; padding: 3px 12px 3px 3px; gap: 6px; }
.jg.tall .jg-badge { width: 30px; height: 30px; }
.jg.tall .jg-sign h3 { font-size: 1.05rem; }
.jg.tall.sign-right .jg-sign { right: 8px; }
.jg.tall:not(.sign-right) .jg-sign { left: 8px; }

/* progress on the tile itself (13 Nov): a finished lesson's tile has a thin gold rim (in place of the separate check
   badge) once it has turned face up; the next stop is marked plainly (the end of this sheet); a lesson further on is a little faded. The
   path's old gold ring round every lesson left is not drawn here: the faded tiles say it. The quiz stops do the same:
   passed is the gold rim, open a warm ring, shut is faded. */
.jg .lm-stop.done .lm-flip::after { content: none; }
.jg .lm-stop.done .lm-flip.up { --jg-rim: inset 0 0 0 2px #e2b23c, 0 0 0 1px #9a6f14; }
.jg .lm-stop.left .lm-flip { box-shadow: none; }
.jg .lm-stop:not(.done):not(.now) .jg-row { opacity: 0.8; filter: saturate(0.7) brightness(0.92); }

/* quieter labels (13 Nov), so the tile leads: a tighter card with a lighter shadow, and the coins line ("Earned 300",
   "300 coins") smaller and lighter. On a computer no word goes under 16 px (1 Nov), so there it is lighter, not smaller. */
.jg .jg-stop .jg-label { gap: 0; padding: 2px 8px 3px; border-radius: 8px; max-width: 8.2rem; }
.jg.tall .jg-stop .jg-label { max-width: 7.6rem; }
.jg.painted .jg-stop .jg-label { box-shadow: 0 2px 0 rgba(60, 40, 12, 0.28), 0 4px 7px rgba(0, 0, 0, 0.28); }
.jg .jg-stop .jg-name { line-height: 1.15; }
.jg .jg-stop .jg-pay { gap: 3px; font: 600 max(0.72rem, var(--fine-min, 0px))/1.15 var(--g-font-body, inherit); color: #7a5c22; }
.jg .jg-stop.done .jg-pay { color: #3f6e50; }
/* a lesson started, not finished (13 Nov): a small dark pill of the videos watched under its name, quiet beside the
   gold of the next stop's pennant; dark ink on cream, never pale gold on white */
.jg .jg-stop .jg-started { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; background: #2f4a3a;
  color: #fff8e6; font: 700 max(0.68rem, var(--fine-min, 0px))/1.45 var(--g-font-body, inherit); white-space: nowrap; }
.jg .jg-stop .jg-coin-dot { width: 9px; height: 9px; }

/* the gates: the archway over the start of the path, the moon gate at its end; under the stops, never in the way */
.jg-gate { position: absolute; z-index: 1; pointer-events: none; height: auto; transform: translate(-50%, -82%);
  filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); }
.jg-gate-start { width: 24%; transform: translate(-60%, -78%); }   /* just before lesson 1, so the path runs out of the arch */
.jg-gate-end { width: 34%; transform: translate(-50%, -70%); }
.jg.tall .jg-gate-start { width: 44%; transform: translate(-60%, -112%); }
.jg.tall .jg-gate-end { width: 60%; }

/* the garden alive (12 Nov, garden-life.js): koi in the ponds, fall leaves, winter snow, spring petals and blossoms,
   the stream's light. One layer over the picture and under the stops; nothing in it takes a click. It moves by
   transform and opacity only; a little dimmer in the evening, and not there at all for "reduce motion". */
.jg-life { position: absolute; inset: 0; overflow: hidden; pointer-events: none; contain: strict; transition: opacity 2.4s ease-in-out; }
.jg-trail.dusk .jg-life { opacity: 0.72; }
.jg-life > * { position: absolute; left: 0; top: 0; display: block; will-change: transform, opacity; }
.jg-life svg { display: block; overflow: visible; }
.jg-ring { border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 50%; }
.jg-flake { display: block; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #fff 48%, rgba(255, 255, 255, 0) 75%);
  box-shadow: 0 0 0 0.5px rgba(90, 110, 130, 0.35), 0 1px 3px rgba(40, 60, 80, 0.45); }
.jg-glint { height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0)); }
.jg-bloomlight { width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 250, 240, 0.9) 22%, rgba(255, 214, 228, 0.55) 45%, rgba(255, 190, 212, 0) 70%); }
@media (prefers-reduced-motion: reduce) { .jg-life { display: none; } }

/* the card hut in spring: the stall, and a little printed card pinned on its board; a tap opens the card library */
.jg-hut { position: absolute; z-index: 1; width: 21%; transform: translate(-50%, -88%); display: block; border-radius: 12px;
  filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); transition: transform 0.25s ease; }
.jg-hut img { display: block; width: 100%; height: auto; }
.jg-hut:hover, .jg-hut:focus-visible { transform: translate(-50%, -90%) scale(1.04); }
.jg-hut:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; }
.jg-hut-card { position: absolute; left: 44%; top: 46%; width: 22%; height: 15%; display: grid; align-content: center; gap: 6%;
  padding: 2% 3%; background: #fbf6e9; border-radius: 3px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); transform: rotate(-2deg); overflow: hidden; }
.jg-hut-card i { font: 700 clamp(3px, 0.4vw, 6px)/1 system-ui, sans-serif; font-style: normal; white-space: nowrap; letter-spacing: 0.04em; }
.jg-hut-card .r { color: #c0392b; } .jg-hut-card .g { color: #1e7b45; } .jg-hut-card .b { color: #2457a6; }
.jg.tall .jg-hut { width: 34%; }
@media (prefers-reduced-motion: reduce) { .jg-hut { transition: none; } }

/* the Registrar's Office beside the archway (13 Nov): sized like the card hut, with a name plate under it so it reads
   as a place to tap; a tap opens the Registrar's panel (the syllabus, and enrolling for a guest). When Kora names it,
   it glows for a moment (.called). */
.jg-reg { position: absolute; z-index: 1; width: 20%; padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
  transform: translate(-50%, -88%); display: block; filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); transition: transform 0.25s ease, filter 0.4s ease; }
.jg-reg img { display: block; width: 100%; height: auto; }
.jg-reg-plate { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px 4px;
  border-radius: 999px; border: 2px solid #c9962c; background: #fff8e6; color: #2a1d0c; font-size: 0.82rem; font-weight: 700;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-reg:hover, .jg-reg:focus-visible { transform: translate(-50%, -90%) scale(1.04); }
.jg-reg:hover .jg-reg-plate { background: #fff1cf; }
.jg-reg:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; border-radius: 12px; }
.jg-reg.called { filter: drop-shadow(0 0 14px rgba(255, 215, 106, 0.95)) drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); }
.jg-reg.called .jg-reg-plate { box-shadow: 0 0 0 3px #ffd76a, 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg.tall .jg-reg { width: 28%; }     /* between lesson 1's label and lesson 3's tile on a phone */
.jg.tall .jg-reg-plate { font-size: 0.74rem; padding: 2px 8px 3px; }

/* the Practice Hall over the Practice every day signpost (16 Nov, work list 64): built as the Registrar's Office, its
   sign's words on its plate; a tap opens its own small map (smallmap.js). Gold-rimmed plate once all five are done. */
.jg-hall { position: absolute; z-index: 2; width: 15%; padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
  transform: translate(-50%, -88%); display: block; filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); transition: transform 0.25s ease; }
.jg-hall img { display: block; width: 100%; height: auto; }
.jg-hall:hover, .jg-hall:focus-visible { transform: translate(-50%, -90%) scale(1.04); }
.jg-hall:hover .jg-hall-plate { background: #fff1cf; }
.jg-hall:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; border-radius: 12px; }
.jg-hall.done .jg-hall-plate { border-color: #1e7b45; }
.jg.tall .jg-hall { width: 40%; }
.jg.tall .jg-hall-plate { display: none; }     /* on a phone the painted signpost above it carries the name (`board`) */
@media (prefers-reduced-motion: reduce) { .jg-hall { transition: none; } }
@media (prefers-reduced-motion: reduce) { .jg-reg { transition: none; } }
a.jg-hall { color: inherit; text-decoration: none; }     /* a link to its own small map (17 Nov) */

/* Orientation at the entrance (17 Nov, plan "Path 2 build" item 16): the Practice Hall's button, smaller, beside the
   archway and before lesson 2; on a phone its plate stays, as no signpost names it there. */
.jg-orient { width: 12%; }
.jg.tall .jg-orient { width: 34%; }
.jg.tall .jg-orient .jg-hall-plate { display: block; font-size: 0.74rem; padding: 2px 8px 3px; }

/* Core strategy on the lawn of The basics (17 Nov): the same button, its plate on a phone too. */
.jg-strat { width: 14%; }
.jg.tall .jg-strat { width: 34%; }
.jg.tall .jg-strat .jg-hall-plate { display: block; font-size: 0.74rem; padding: 2px 8px 3px; }
/* Advanced studies' academy past Core strategy (18 Nov): the same button, its plate on a phone too */
.jg-adv { width: 15%; }
.jg.tall .jg-adv { width: 26%; }
.jg.tall .jg-adv .jg-hall-plate { display: block; font-size: 0.74rem; padding: 2px 8px 3px; }
/* the Practice Hall in the winter part (17 Nov): no painted signpost above it there, so its plate names it on a phone */
.jg.tall .jg-practice { width: 34%; }
.jg.tall .jg-practice .jg-hall-plate { display: block; font-size: 0.74rem; padding: 2px 8px 3px; }

/* the signpost to Advanced studies by the entrance (17 Nov, Jeff: "a teleport to the advanced stuff sign"): a wooden
   board on a post with an arrow, the point under its post; on a phone the board takes two lines. */
.jg-teleport { position: absolute; z-index: 3; width: max-content; transform: translate(-50%, -100%); display: grid; justify-items: center;
  color: #2a1d0c; text-decoration: none; transition: transform 0.25s ease; }
.jg-teleport-board { position: relative; display: block; padding: 5px 12px 6px 12px; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #f0d9a4, #d9b97c); border: 2px solid #7a5428; font: 700 0.86rem/1.2 var(--g-font-body, inherit);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 246, 220, 0.5); }
.jg-teleport-arrow { position: absolute; top: 9px; right: -13px; width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  border-left: 13px solid #7a5428; }
.jg-teleport-leg { display: block; width: 6px; height: 18px; background: linear-gradient(90deg, #5e3820, #3a2212); }
.jg-teleport:hover, .jg-teleport:focus-visible { transform: translate(-50%, -102%) scale(1.04); }
.jg-teleport:hover .jg-teleport-board { background: linear-gradient(180deg, #f8e6bb, #e3c58c); }
.jg-teleport:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; border-radius: 8px; }
.jg.tall .jg-teleport-board { max-width: 5.6rem; padding: 3px 8px 4px; font-size: 0.74rem; line-height: 1.15; }
.jg.tall .jg-teleport-arrow { top: 8px; right: -11px; border-top-width: 7px; border-bottom-width: 7px; border-left-width: 10px; }
.jg.tall .jg-teleport-leg { height: 12px; }
@media (prefers-reduced-motion: reduce) { .jg-teleport { transition: none; } }

/* the stone rings by the entrance (18 Nov, Jeff: "a ring with purple flashy stuff", "the practice every day sign should
   be a portal.. maybe orange center", a green one for Core strategy): the painted ring, light swirling in its opening,
   a few sparks drifting off it, its name on a board under it. Each ring's colors are its own (--p-*: the light from its
   middle out, its glow, the streaks in the swirl, the sparks). The opening sits at 25.7 to 57.3 % of the picture's width
   and 19.5 to 58 % of its height (ring.webp, measured on the cut). */
.jg-portal, .jg-portal-flash { --p-core: #fbe9ff; --p-mid: #d58cff; --p-deep: #8a3ce0; --p-dark: #3d0f7a; --p-edge: #1d0640;
  --p-glow: 176, 92, 255; --p-streak: 240, 200, 255; --p-spark: #f4d4ff; }
.jg-portal { width: 8.5%; gap: 2px; grid-template-columns: 100%; }   /* every ring one size, whatever its name; a long board overhangs, centered */
.jg-portal-green { --p-core: #f0fff4; --p-mid: #7ef0a8; --p-deep: #1fae63; --p-dark: #0b6a3a; --p-edge: #04331c;
  --p-glow: 60, 220, 130; --p-streak: 220, 255, 230; --p-spark: #ffe28a; }
.jg-portal-orange { --p-core: #fff6e2; --p-mid: #ffc266; --p-deep: #f28a1e; --p-dark: #a8480a; --p-edge: #4a1c02;
  --p-glow: 255, 150, 40; --p-streak: 255, 236, 200; --p-spark: #fff0c8; }
.jg-portal-stone { position: relative; display: block; width: 100%; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.35)); }
.jg-portal-pic { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.jg-portal-glow { position: absolute; z-index: 2; left: 25.7%; top: 19.5%; width: 31.6%; height: 38.5%; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--p-core) 0 8%, var(--p-mid) 22%, var(--p-deep) 48%, var(--p-dark) 78%, var(--p-edge) 100%);
  box-shadow: 0 0 14px 4px rgba(var(--p-glow), 0.55); }
.jg-portal-glow::before, .jg-portal-glow::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(var(--p-streak), 0.85) 18%, transparent 30% 45%,
    rgba(var(--p-glow), 0.8) 55%, transparent 68% 80%, rgba(var(--p-streak), 0.75) 88%, transparent 96%);
  mix-blend-mode: screen; animation: jg-portal-spin 5s linear infinite; }
.jg-portal-glow::after { inset: 14%; animation-duration: 3.2s; animation-direction: reverse; opacity: 0.8; }
.jg-portal-spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%;
  background: var(--p-spark); box-shadow: 0 0 6px 2px rgba(var(--p-glow), 0.9); opacity: 0;
  animation: jg-portal-spark 2.6s ease-out infinite; }
@keyframes jg-portal-spin { to { transform: rotate(360deg); } }
@keyframes jg-portal-spark {
  0% { opacity: 0; transform: rotate(var(--a)) translateX(30%) scale(0.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(260%) translateY(-60%) scale(0.2); } }
.jg-portal:hover .jg-portal-glow, .jg-portal:focus-visible .jg-portal-glow { box-shadow: 0 0 20px 7px rgba(var(--p-glow), 0.75); }
.jg-portal:hover, .jg-portal:focus-visible { transform: translate(-50%, -100%) scale(1.06); }
.jg-portal .jg-teleport-board { font-size: 0.78rem; padding: 3px 9px 4px; white-space: nowrap; }
/* a phone: a finger's width at least (44 px), the board on two lines where its name is long */
.jg.tall .jg-portal { width: 18%; min-width: 44px; }
.jg.tall .jg-portal .jg-teleport-board { font-size: 0.68rem; max-width: 6.2rem; white-space: normal; padding: 2px 7px 3px; line-height: 1.15; }
/* a tap: the light spins up and brightens, then a flash of the ring's color spreads from it over the whole page and
   fades as its map shows */
.jg-portal.jump .jg-portal-glow { animation: jg-portal-charge 0.75s ease-in forwards; }
.jg-portal.jump .jg-portal-glow::before { animation-duration: 0.5s; }
.jg-portal.jump .jg-portal-glow::after { animation-duration: 0.35s; }
@keyframes jg-portal-charge { to { box-shadow: 0 0 40px 18px rgba(var(--p-glow), 1); filter: brightness(1.7); } }
.jg-portal-flash { position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y), var(--p-core) 0, rgba(var(--p-glow), 0.92) 18%, var(--p-dark) 60%);
  clip-path: circle(0 at var(--x) var(--y)); animation: jg-portal-burst 0.75s cubic-bezier(.6, 0, .4, 1) forwards; }
.jg-portal-flash.out { animation: jg-portal-fade 0.7s ease-out forwards; clip-path: circle(150% at var(--x) var(--y)); }
@keyframes jg-portal-burst { 60% { clip-path: circle(8% at var(--x) var(--y)); } to { clip-path: circle(150% at var(--x) var(--y)); } }
@keyframes jg-portal-fade { from { opacity: 1; } to { opacity: 0.0; } }
@media (prefers-reduced-motion: reduce) {
  .jg-portal-glow::before, .jg-portal-glow::after, .jg-portal-spark { animation: none; }
  .jg-portal:hover, .jg-portal:focus-visible { transform: translate(-50%, -100%); } }

/* --- a building's own small map (17 Nov, Jeff: "orientation should open another garden map"; smallmap.js) --------
   The garden's felt board, a bar with the way back and the building's name, and the yard: the painted picture, the
   building's cut-out at the top, the same stops as the garden, a small signpost before the lessons that need the
   game, and Kora at the next stop. */
.jg-yardpage { border-radius: 24px; padding: 16px; color: var(--g-cream, #fff6e2); display: grid; gap: 12px;
  background: radial-gradient(120% 90% at 50% 20%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%), url("/art/felt.webp?v=fe99c70726") center / cover, linear-gradient(160deg, var(--g-felt-top, #2f7a52), var(--g-felt-deep, #123d2a));
  box-shadow: inset 0 0 0 2px rgba(255, 233, 163, 0.18), 0 16px 34px rgba(0, 0, 0, 0.3); }
.jg-yardpage[hidden] { display: none; }
.jg-yard-bar { width: 100%; max-width: 70rem; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.jg-yard-bar h1 { margin: 0; font: 400 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--g-font-display, inherit); color: var(--g-gold-1, #ffe9a3); }
.jg-yard-back { min-height: 44px; display: inline-flex; align-items: center; }
.jg-yard .jg-yard-house { position: absolute; z-index: 1; width: 20%; height: auto; transform: translate(-50%, -88%); pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); }
.jg-yard.tall .jg-yard-house { width: 46%; }
.jg-yard-post { position: absolute; z-index: 2; width: max-content; transform: translate(-50%, -100%); display: grid; justify-items: center; pointer-events: none; }
.jg-yard-post-board { display: block; max-width: 11rem; text-wrap: balance; padding: 5px 10px 6px; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #e8cf9a, #d4b277); border: 2px solid #7a5428; color: #2a1d0c;
  font: 700 max(0.82rem, var(--fine-min, 0px))/1.25 var(--g-font-body, inherit); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-yard-post-leg { display: block; width: 6px; height: 22px; background: linear-gradient(90deg, #5e3820, #3a2212); }
.jg-yard.tall .jg-yard-post-board { max-width: 9.5rem; font-size: max(0.78rem, var(--fine-min, 0px)); }
@media (max-width: 600px) { .jg-yardpage { padding: 8px; border-radius: 18px; } .jg-yard-bar { gap: 10px; } }

/* a lesson not written yet (17 Nov, Advanced studies and Core strategy): its stop is covered, a cloth tied over the
   face-down tile, its name and "Not open yet" under it; it is not a link. Electives taken in any order carry no
   numbers. */
.jg-stop.covered .lm-link { cursor: default; }
.jg-stop.covered .lm-flip { position: relative; }
.jg-stop.covered .lm-flip::before { content: ""; position: absolute; inset: -6px -5px -4px; z-index: 2; border-radius: 10px 10px 6px 6px;
  background: radial-gradient(60% 30% at 50% 0%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%),
    repeating-linear-gradient(100deg, rgba(0, 0, 0, 0) 0 9px, rgba(0, 0, 0, 0.08) 9px 12px), linear-gradient(180deg, #8f6a9e, #5d3f6c);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.25), 0 6px 10px rgba(0, 0, 0, 0.35); }
.jg-stop.covered .lm-flip::after { content: ""; position: absolute; left: -6px; right: -6px; top: 42%; height: 7px; z-index: 3; background: #d8a640;
  box-shadow: 0 1px 0 #8a6418; border-radius: 3px; }
.jg-stop.covered .jg-pay { color: #6a5434; }
.jg-stop.covered .jg-lan { opacity: 0.6; }
.jg-yard.anyorder .jg-row > .jg-n { display: none; }
/* the academy is wide and low: larger at the top of its own map, so it reads as the place you are */
.jg-yard-advanced .jg-yard-house { width: 28%; }
.jg-yard-advanced.tall .jg-yard-house { width: 62%; }
.jg-yard-after .jg-yard-house { width: 26%; }
.jg-yard-after.tall .jg-yard-house { width: 58%; }

/* the garden past the graduation gate (17 Nov; smallmap.js, the `after` yard): Advanced studies' building is a link to
   its own map, the other paths stand as covered signposts that are not links */
.jg-yard .jg-yard-bldg { position: absolute; z-index: 2; width: 24%; transform: translate(-50%, -88%); display: block; color: inherit; text-decoration: none;
  filter: drop-shadow(0 8px 10px rgba(20, 40, 25, 0.35)); transition: transform 0.25s ease; }
.jg-yard.tall .jg-yard-bldg { width: 56%; }
.jg-yard .jg-yard-bldg img { display: block; width: 100%; height: auto; }
.jg-yard .jg-yard-bldg:hover, .jg-yard .jg-yard-bldg:focus-visible { transform: translate(-50%, -90%) scale(1.03); }
.jg-yard .jg-yard-bldg:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; border-radius: 12px; }
.jg-yard .jg-yard-bldg .jg-reg-plate { bottom: -10px; font-size: 0.9rem; }
.jg-yard.tall .jg-yard-bldg .jg-reg-plate { font-size: 0.8rem; }
.jg-yard-sign { position: absolute; z-index: 2; width: max-content; transform: translate(-50%, -100%); display: grid; justify-items: center; }
.jg-yard-sign-board { display: grid; gap: 2px; max-width: 10rem; padding: 6px 10px 7px; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #e8cf9a, #d4b277); border: 2px solid #7a5428; color: #2a1d0c; text-wrap: balance;
  font: 700 0.86rem/1.2 var(--g-font-body, inherit); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-yard-sign-cloth { display: block; margin: 2px -4px 0; padding: 2px 6px; border-radius: 4px; background: linear-gradient(180deg, #8f6a9e, #5d3f6c);
  color: #fff3dc; font-size: 0.74rem; font-weight: 700; }
.jg-yard-sign-leg { display: block; width: 6px; height: 20px; background: linear-gradient(90deg, #5e3820, #3a2212); }
.jg-yard.tall .jg-yard-sign-board { max-width: 8.5rem; font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) { .jg-yard .jg-yard-bldg { transition: none; } }

/* the quiz stop at each part's pavilion (12 Nov; quiz.py): a small pavilion, shut while the part's lessons are still to
   do, open with a warm light once they are done, gold with a check once the quiz is passed */
.jg .jg-quizstop { width: 10.5rem; transform: translate(-50%, -40px); z-index: 2; }
.jg-quizpic { position: relative; display: grid; place-items: center; width: 70px; height: 66px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 240, 0.95), rgba(243, 230, 196, 0.9)); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-pav { width: 52px; height: 48px; display: block; }
/* 13 Nov: the same states as the lesson tiles: shut is a little faded, open has a warm ring, passed has the gold rim
   (the check is on its label, "Passed"); the quiz that is next is marked like any next stop (the end of this sheet) */
.jg-quizstop.q-shut .jg-quizpic { opacity: 0.8; filter: saturate(0.7) brightness(0.92); }
.jg-quizstop.q-open .jg-quizpic { box-shadow: 0 0 0 3px #ffd76a, 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-quizstop.q-passed .jg-quizpic { box-shadow: inset 0 0 0 2px #e2b23c, 0 0 0 1px #9a6f14, 0 3px 8px rgba(0, 0, 0, 0.35); }
.jg-quizstop.q-passed .jg-qtick { display: none; }
.jg-qtick { position: absolute; right: -4px; top: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: #1a7a44; color: #fff; font: 700 15px/1 system-ui, sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.jg.tall .jg-quizstop { width: 8.6rem; }
.jg-qok { color: #1e7b45; font-weight: 800; }
.jg.tall .jg-quizpic { width: 58px; height: 54px; }
.jg.tall .jg-pav { width: 42px; height: 40px; }
/* the graduation gate, shut while a quiz is still to pass */
.jg-gradstop.shut .jg-gradpic { filter: grayscale(0.85) brightness(0.9); }
.jg-gradstop.shut.now .jg-gradpic { animation: none; }

/* an admin's look as a new player (/lessons?as=new, 12 Nov review) */
.lessons-preview { margin: 0; padding: 8px 16px; background: #fff3c4; color: #4a3a10; border-bottom: 1px solid #e3cf86;
  font: 600 0.95rem/1.35 var(--g-font-body, inherit); text-align: center; }
.lessons-preview a { color: #1d4a37; margin-left: 6px; }

/* --- the title band and its slim bar (12 Nov review, Jeff: the search "up top, inside the Learn to play header"; a
   locked header that shrinks to one slim bar when scrolling). lessonmap.js turns it into the bar once the band has
   scrolled away: it is then fixed under the site's own top bar (which stays above it, menus and all), and the empty
   space in its place keeps the page from moving. ---------------------------------------------------------------- */
.lessons-head-space { height: 0; }
.lessons-head .lh-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.lessons-head .lesson-search { position: relative; display: flex; align-items: center; gap: 10px; flex: 1 1 22rem; max-width: 40rem;
  margin: 0; padding: 0; background: none; box-shadow: none; color: inherit; }
.lessons-head .lesson-search label { flex: none; font: 400 1.2rem/1.15 var(--g-font-display, inherit); color: #fff; }
.lessons-head .lesson-search input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px; background: #fff; color: var(--ink); }
.lessons-head #lessonResults { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: min(60vh, 32rem); overflow: auto;
  padding: 10px 12px; border-radius: 14px; background: #fff8e8; color: #2a2318; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
.lessons-head #lessonResults h3 { margin: 2px 0 8px; font: 400 1.15rem/1.2 var(--g-font-display, inherit); color: #1d4a37; }
.lessons-head .search-hits { margin: 0; }
.lh-find { display: none; }
.lh-grad { margin: 0; }
.lh-grad .lh-short { display: none; }
.lh-grad button { font: 700 1rem/1.3 var(--g-font-body, inherit); color: #ffe9a3; background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 233, 163, 0.45);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 40px; }
.lh-grad button:hover, .lh-grad button:focus-visible { background: rgba(0, 0, 0, 0.3); }
.lh-grad button::before { content: ""; display: inline-block; width: 18px; height: 18px; margin: 0 8px -3px 0; background: url(/art/badges/graduate.webp) center / contain no-repeat; }

.lessons-head.slim { position: fixed; z-index: 15; top: var(--site-head-h, 0px); left: 0; right: 0; margin: 0; padding: 6px 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.lessons-head.slim .inner { display: flex; align-items: center; gap: 10px 16px; }
.lessons-head.slim .lh-title { flex: none; }
.lessons-head.slim .lh-title > :not(h1) { display: none; }
.lessons-head.slim h1 { margin: 0; font-size: 1.3rem; white-space: nowrap; }
.lessons-head.slim .lessons-next { flex: none; order: 3; }
.lessons-head.slim .lm-next { display: block; padding: 0; background: none; box-shadow: none; max-width: none; }
.lessons-head.slim .lm-coach, .lessons-head.slim .lm-next-words { display: none; }
.lessons-head.slim .lm-next .button { margin: 0; min-height: 40px; padding: 8px 16px; white-space: nowrap; }
.lessons-head.slim .lh-tools { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; order: 2; }
.lessons-head.slim .lesson-search { flex: 1 1 16rem; }
.lessons-head.slim .lesson-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lessons-head.slim .lesson-search input { min-height: 40px; }
.lessons-head.slim .lh-grad button { white-space: nowrap; min-height: 38px; padding: 5px 12px; font-size: 0.95rem; }
@media (max-width: 1000px) {
  .lessons-head.slim .lh-grad button { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
}
/* a phone: in the bar the search is an icon that opens it under the bar; the graduation line takes the rest */
@media (max-width: 640px) {
  .lessons-head .lesson-search label { display: none; }
  .lessons-head.slim { padding: 6px 10px; }
  .lessons-head.slim .inner { gap: 8px; }
  .lessons-head.slim h1 { font-size: 1.05rem; }
  .lessons-head.slim .lh-tools { gap: 8px; }
  .lessons-head.slim .lh-find { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.18); color: #fff; cursor: pointer; }
  .lessons-head.slim .lh-find svg { width: 20px; height: 20px; }
  .lessons-head.slim .lesson-search { display: none; position: absolute; left: 0; right: 0; top: 100%; max-width: none; padding: 8px 10px 10px;
    background: linear-gradient(160deg, var(--felt), var(--felt-deep)); box-shadow: 0 8px 14px rgba(0, 0, 0, 0.25); }
  .lessons-head.slim.find-open .lesson-search { display: flex; }
  .lessons-head.slim .lh-grad { min-width: 0; flex: 1 1 auto; }
  .lessons-head.slim .lh-grad .lh-long { display: none; }
  .lessons-head.slim .lh-grad .lh-short { display: inline; }
  .lessons-head.slim .lh-grad button { font-size: 0.78rem; line-height: 1.15; padding: 3px 10px; letter-spacing: 0; white-space: normal; text-align: left; }
  .lessons-head.slim .lh-grad button::before { display: none; }
  .lessons-head.slim .lh-grad button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; padding: 4px 10px; }
  .lessons-head.slim .lm-next .button { padding: 6px 9px; font-size: 0.85rem; letter-spacing: 0; }
  .lessons-head.slim .lessons-next { order: 4; }
}
@media (max-width: 420px) {
  .lessons-head.slim h1 { display: none; }
}

/* --- graduation in the gate (12 Nov review): the moon gate opens a scroll; small glowing prizes hang on it ---------- */
.jg-gate-end { pointer-events: auto; cursor: pointer; }
.jg-gradstop .jg-gradpic { position: relative; overflow: visible; }
.jg-gate-prizes { position: absolute; left: 50%; top: 34px; width: 0; height: 0; pointer-events: none; }
.jg-gate-joker, .jg-gate-coins { position: absolute; display: block; filter: drop-shadow(0 0 6px rgba(255, 215, 106, 0.95)); animation: jg-hint 2.8s ease-in-out infinite; }
.jg-gate-joker { left: -78px; top: -34px; width: 30px; transform: rotate(-8deg); }
.jg-gate-joker svg { display: block; width: 30px; height: auto; }
.jg-gate-joker.wrapped { top: -44px; left: -84px; width: 40px; }
.jg-gate-joker.wrapped .pw { width: 40px; height: 40px; }
.jg-gate-joker.wrapped .pw-art { width: 40px; height: 40px; }
.jg-gate-coins { left: 46px; top: -14px; width: 34px; height: 30px; animation-delay: 1.4s; }
.jg-gate-coins i { position: absolute; left: 3px; width: 28px; height: 10px; border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, #fff6c9, #f6c443 50%, #b98512); box-shadow: inset 0 0 0 1.5px #a0700c; }
.jg-gate-coins i:nth-child(1) { top: 18px; } .jg-gate-coins i:nth-child(2) { top: 11px; left: 0; } .jg-gate-coins i:nth-child(3) { top: 4px; left: 5px; }
.jg.tall .jg-gate-joker { left: -64px; } .jg.tall .jg-gate-coins { left: 34px; }
@keyframes jg-hint { 0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 215, 106, 0.6)); } 50% { filter: drop-shadow(0 0 10px rgba(255, 225, 130, 1)); } }
@media (prefers-reduced-motion: reduce) { .jg-gate-joker, .jg-gate-coins { animation: none; } }
.jg-gradstop.called .jg-gradpic { box-shadow: 0 0 0 4px #ffd76a, 0 0 26px 8px rgba(255, 205, 110, 0.85); border-radius: 50%; }

/* the scroll: cream paper with wooden rods top and bottom */
.lm-dlg.jg-scroll { max-width: min(34rem, calc(100vw - 24px)); padding: 26px 22px 22px; border: 0; border-radius: 6px; color: #2a2318;
  background: linear-gradient(180deg, #7a4a1e 0 10px, #f6ecd2 10px calc(100% - 10px), #7a4a1e calc(100% - 10px)), #f6ecd2;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.jg-scroll .lm-dlg-head h3 { font: 400 1.6rem/1.15 var(--g-font-display, inherit); color: #1d4a37; }
.jg-scroll-what { margin: 6px 0 12px; }
.jg-scroll .lm-prizes { justify-content: center; margin: 4px 0 10px; }
.jg-scroll .lm-prize { color: #2a2318; }
.jg-check-head { margin: 6px 0 6px; font: 700 1rem/1.3 var(--g-font-body, inherit); color: #1d4a37; }
.jg-check { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.jg-check li { display: flex; align-items: center; gap: 10px; font: 600 1rem/1.3 var(--g-font-body, inherit); }
.jg-check-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b8a77c; background: #fff; color: #fff; font-weight: 800; }
.jg-check li.ok .jg-check-mark { background: #1e7b45; border-color: #1e7b45; }
.jg-check li.ok > span:not(.jg-check-mark):not(.jg-sr) { color: #5a665d; }
.jg-check a { color: #1d4a37; }
.jg-scroll-shut { font-weight: 600; color: #5b3f12; }

/* --- where to go next (13 Nov, Jeff after lesson 1: "it needs to be more obvious where to go next", "the next lesson
   .. kinda pulses, but you cant really even see it", "can the path light up or something?"). One stop is next
   (garden.js): a gold "Next" pennant bobs over it, a gold ring with a dark edge and a strong warm glow surround it,
   and the way to it is lit like runway lights. With "reduce motion" all of it is there, holding still. ---------- */
.jg .lm-stop.now { z-index: 4; }   /* over Kora (3) as she walks past it, so its pennant and tile stay whole */
.jg .lm-stop.now .lm-flip, .jg-quizstop.now .jg-quizpic, .jg-gradstop.now .jg-gradpic {
  outline: 3px solid #ffe27a; outline-offset: 6px; animation: jgNextGlow 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 9px rgba(58, 36, 6, 0.55), 0 0 30px 16px rgba(255, 212, 92, 0.85); }
.jg .lm-stop.now .lm-flip { border-radius: 9px; }
.jg-quizstop.now .jg-quizpic, .jg-gradstop.now .jg-gradpic { outline-offset: 4px; border-radius: 50%; }
.jg .lm-stop.now .jg-row, .jg-quizstop.now .jg-quizpic { opacity: 1; filter: none; }
@keyframes jgNextGlow {
  0%, 100% { box-shadow: 0 0 0 9px rgba(58, 36, 6, 0.55), 0 0 22px 12px rgba(255, 208, 90, 0.7); }
  50% { box-shadow: 0 0 0 9px rgba(58, 36, 6, 0.55), 0 0 38px 20px rgba(255, 214, 96, 0.95); } }
.jg-gradstop.shut.now .jg-gradpic { filter: none; animation: jgNextGlow 2.4s ease-in-out infinite; }

/* the pennant: on a short pole over the stop, bobbing */
.jg-flag { position: absolute; left: 50%; bottom: calc(100% + 14px); z-index: 4; display: grid; justify-items: center; pointer-events: none;
  transform: translateX(-50%); animation: jgFlagBob 1.3s ease-in-out infinite; }
.jg .jg-row > .jg-flag { position: absolute; z-index: 4; }
.jg-flag::after { content: ""; width: 3px; height: 12px; background: #6b4510; border-radius: 0 0 2px 2px; }
.jg-flag-cloth { position: relative; padding: 4px 12px 5px; border-radius: 7px; white-space: nowrap; letter-spacing: 0.03em;
  font: 800 max(0.95rem, var(--fine-min, 0px))/1 var(--g-font-body, inherit); color: #3a2406;
  background: linear-gradient(180deg, #fff1b0, #f6c443 60%, #e0a52a); border: 2px solid #7a4e0e;
  box-shadow: 0 0 14px 4px rgba(255, 210, 90, 0.75), 0 4px 8px rgba(0, 0, 0, 0.4); }
.jg-quizpic > .jg-flag, .jg-gradpic > .jg-flag { bottom: calc(100% + 10px); }
.jg.tall .jg-flag { bottom: calc(100% + 10px); }
.jg.tall .jg-flag-cloth { padding: 3px 9px 4px; }
@keyframes jgFlagBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -7px); } }

/* the way: a warm band and its lights, sweeping toward the next stop; brighter once as she walks it back from a lesson */
.jg-way { pointer-events: none; filter: drop-shadow(0 0 4px rgba(255, 196, 70, 0.95)); }
.jg-way-band { stroke: #ffcf40; stroke-width: 16; opacity: 0.6; animation: jgWayBand 2.6s ease-in-out infinite; }
.jg.tall .jg-way-band { stroke-width: 19; }
@keyframes jgWayBand { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.8; } }
.jg-way-dot { fill: #ffe48a; stroke: #a8650a; stroke-width: 2; opacity: 0.75; transform-box: fill-box; transform-origin: center;
  animation: jgWaySweep 2.2s linear infinite; animation-delay: calc(var(--k, 0) * 1.1s); }
@keyframes jgWaySweep {
  0% { opacity: 0.6; transform: scale(0.9); fill: #ffe48a; }
  10% { opacity: 1; transform: scale(1.6); fill: #fffbe6; }
  30% { opacity: 0.85; transform: scale(1.1); fill: #ffe48a; }
  100% { opacity: 0.6; transform: scale(0.9); fill: #ffe48a; } }
.jg-way.arrive .jg-way-band { opacity: 0.85; animation: none; }
.jg-way.arrive .jg-way-dot { animation: jgWayOnce 1.1s ease-out var(--arrive, 0ms) both; }
@keyframes jgWayOnce {
  0% { opacity: 0.25; transform: scale(0.8); }
  25% { opacity: 1; transform: scale(2); fill: #ffffff; }
  100% { opacity: 0.95; transform: scale(1.1); fill: #ffe48a; } }
/* off screen, the lights hold still */
.jg.paused .jg-way-band, .jg.paused .jg-way-dot, .jg.paused .jg-flag, .jg.paused .now .lm-flip { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .jg .lm-stop.now .lm-flip, .jg-quizstop.now .jg-quizpic, .jg-gradstop.now .jg-gradpic, .jg-gradstop.shut.now .jg-gradpic {
    animation: none; box-shadow: 0 0 0 9px rgba(58, 36, 6, 0.55), 0 0 30px 16px rgba(255, 212, 92, 0.85); }
  .jg-flag { animation: none; }
  .jg-way-band { animation: none; opacity: 0.65; }
  .jg-way-dot, .jg-way.arrive .jg-way-dot { animation: none; opacity: 0.95; }
}

