/* Listening Lab: the ten level themes (see js/listening-themes.js). The header strip of each level has its own scenery (the three layers .ll-sc1 / .ll-sc2 /
   .ll-sc3 slide past at different speeds), its own ground, and its own traveller. Level 1 (walk home) is the base look in css/listening.css; every other level
   overrides what differs under .ll-track.th-N. The travellers keep the same behaviour in every theme (walk = move, hop on a right answer, wobble on a wrong one,
   idle animations), and the dotted path / yellow line follow the lane (--lane). */


/* ---------- the travellers: what moves while it travels ---------- */
.ll-walker .bobber { animation: ll-bob-soft 1.8s ease-in-out infinite alternate; }
.ll-walker.actor-person .bobber { animation: none; }
.ll-walker.walking .bobber { animation-duration: .45s; }
@keyframes ll-bob-soft { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
@keyframes ll-spin { to { transform: rotate(360deg); } }
@keyframes ll-flame { from { transform: scale(.85, .9); } to { transform: scale(1.5, 1.1); } }

.act-swim svg, .act-boat svg { overflow: hidden; } /* the water in front stays inside the picture */
/* swimming: a front-crawl stroke, kicking legs, waves moving */
.act-swim .wave { animation: ll-wave-shift 1.4s linear infinite; }
.act-swim.walking .wave { animation-duration: .5s; }
@keyframes ll-wave-shift { from { transform: translateX(0); } to { transform: translateX(-24px); } }
.act-swim.walking .stroke.near { animation: ll-stroke var(--T) linear infinite; }
.act-swim.walking .stroke.far { animation: ll-stroke var(--T) linear infinite; animation-delay: calc(var(--T) / -2); }
@keyframes ll-stroke { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
.act-swim.walking .kick.near { animation: ll-kick calc(var(--T) / 3) ease-in-out infinite alternate; }
.act-swim.walking .kick.far { animation: ll-kick calc(var(--T) / 3) ease-in-out infinite alternate-reverse; }
@keyframes ll-kick { from { transform: rotate(-15deg); } to { transform: rotate(15deg); } }

/* the aeroplane: the propeller always spins, the nose lifts while it flies */
.act-plane .prop { animation: ll-prop .14s linear infinite; }
@keyframes ll-prop { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.16); } }
.act-plane svg { transition: transform .5s; }
.act-plane.walking svg { transform: rotate(-6deg); }

/* the boat: rowing, the waves move */
.act-boat .wave { animation: ll-wave-shift 1.6s linear infinite; }
.act-boat.walking .wave { animation-duration: .6s; }
.act-boat.walking .oar { animation: ll-row var(--T) ease-in-out infinite alternate; }
@keyframes ll-row { from { transform: rotate(-30deg); } to { transform: rotate(26deg); } }

/* the bicycle: wheels spin, the leg pedals */
.act-bike.walking .wheel { animation: ll-spin var(--T) linear infinite; }
.act-bike.walking .pedal { animation: ll-pedal var(--T) ease-in-out infinite alternate; }
@keyframes ll-pedal { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }

/* the rocket: the flame always flickers, the rocket shakes while it flies */
.act-rocket .flame { animation: ll-flame .12s ease-in-out infinite alternate; }
.act-rocket.walking .shake { animation: ll-shake .08s linear infinite alternate; }
@keyframes ll-shake { from { transform: translate(0, -1px); } to { transform: translate(0, 1.2px); } }

/* the train: wheels turn, smoke puffs rise, the child waves */
.act-train.walking .wheel { animation: ll-spin calc(var(--T) / 1.6) linear infinite; }
.act-train .puff { animation: ll-puff 1.7s ease-out infinite; transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
.act-train .puff.p2 { animation-delay: .55s; }
.act-train .puff.p3 { animation-delay: 1.1s; }
@keyframes ll-puff { 0% { transform: translate(0, 0) scale(.5); opacity: .9; } 100% { transform: translate(-16px, -17px) scale(1.8); opacity: 0; } }
.act-train .wavearm { animation: ll-wavearm .5s ease-in-out infinite alternate; }
@keyframes ll-wavearm { from { transform: rotate(-12deg); } to { transform: rotate(28deg); } }

/* the balloon: it sways, the burner flickers */
.act-balloon .sway { animation: ll-sway2 2.4s ease-in-out infinite alternate; }
.act-balloon.walking .sway { animation-duration: 1s; }
.act-balloon .flame { animation: ll-flame .15s ease-in-out infinite alternate; }
@keyframes ll-sway2 { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* climbing (a person): reaching up with the arms, stepping up with the legs, leaning into the slope */
.act-climb svg { transform: rotate(9deg); transform-origin: 50% 100%; }
.ll-walker.act-climb.walking .thigh { animation: ll-climb-leg var(--T) ease-in-out infinite; }
.ll-walker.act-climb.walking .shin { animation: ll-climb-knee var(--T) ease-in-out infinite; }
.ll-walker.act-climb.walking .uarm { animation: ll-climb-arm var(--T) ease-in-out infinite; }
.ll-walker.act-climb.walking .farm { animation: ll-elbow var(--T) ease-in-out infinite; }
@keyframes ll-climb-leg { 0%, 100% { transform: rotate(-52deg); } 50% { transform: rotate(8deg); } }
@keyframes ll-climb-knee { 0%, 100% { transform: rotate(70deg); } 50% { transform: rotate(8deg); } }
@keyframes ll-climb-arm { 0%, 100% { transform: rotate(-165deg); } 50% { transform: rotate(-100deg); } }

/* running at the end (a person): faster, leaning forward */
.act-run { --T: .5s; }
.act-run svg { transform: rotate(6deg); transform-origin: 50% 100%; }

/* every traveller that is not a person: a wrong answer wobbles it, and the idle moves are body moves (it has no arms to wave) */
.ll-walker:not(.actor-person).trip { animation: ll-wobble 1.5s ease-in-out; }
@keyframes ll-wobble { 0%, 100% { transform: rotate(0); } 14% { transform: rotate(-14deg) translateY(2px); } 28% { transform: rotate(12deg); } 42% { transform: rotate(-10deg); } 56% { transform: rotate(8deg); } 76% { transform: rotate(-3deg); } }
.ll-walker:not(.actor-person).idle-wave { animation: ll-dance .8s ease-in-out 2; }
.ll-walker:not(.actor-person).idle-look { animation: ll-hop .5s ease-out 3; }
.ll-walker:not(.actor-person).idle-look svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .ll-walker .bobber, .ll-walker .lm { animation: none !important; } }

/* ---------- the levels: the size / place of the traveller and the scenery ---------- */
.ll-track.th-2 { --aw: 66px; --ah: 40px; --abase: 2px; --lane: 10px; --goalb: 6px; }
.ll-track.th-3 { --abase: 6px; --rise: 12px; --goalb: 18px; } /* a gentle climb that stays inside the strip */
.ll-track.th-4 { --aw: 72px; --ah: 40px; --abase: 18px; --rise: 8px; --lane: 9px; --goalb: 26px; }
.ll-track.th-5 { --aw: 64px; --ah: 46px; --abase: 2px; --lane: 10px; --goalb: 6px; }
.ll-track.th-6 { --aw: 64px; --ah: 54px; --abase: 5px; }
.ll-track.th-7 { --aw: 68px; --ah: 34px; --abase: 20px; --rise: 8px; --lane: 9px; --goalb: 24px; }
.ll-track.th-8 { --aw: 86px; --ah: 44px; --abase: 9px; }
.ll-track.th-9 { --aw: 40px; --ah: 62px; --abase: 6px; --rise: 8px; --lane: 9px; --goalb: 20px; }
.ll-track.th-2 .ll-road, .ll-track.th-2 .ll-dash, .ll-track.th-4 .ll-road, .ll-track.th-4 .ll-dash, .ll-track.th-5 .ll-road, .ll-track.th-5 .ll-dash,
.ll-track.th-7 .ll-road, .ll-track.th-7 .ll-dash, .ll-track.th-9 .ll-road, .ll-track.th-9 .ll-dash { display: none; }

/* 2 - the sea: sky, a horizon with boats and an island, waves */
.th-2 .ll-world { background: linear-gradient(#59c4ff 0%, #a9e4ff 41%, #1a8fe0 43%, #0a5aa8 100%); }
.th-2 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><path d='M58 33 Q70 16 84 33Z' fill='%236cc08a'/><path d='M30 33 V17 L42 31Z' fill='%23fff'/><path d='M26 33 H46 L43 37 H29Z' fill='%23c9783c'/><path d='M150 33 V21 L159 31Z' fill='%23fff'/><path d='M146 33 H162 L160 36 H148Z' fill='%23d14a4a'/><path d='M108 14 q3 -4 6 0 q3 -4 6 0' stroke='%23fff' fill='none' stroke-width='1.2'/></svg>"); }
.th-2 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round'><path d='M8 50 q6 -5 12 0 t12 0'/><path d='M70 58 q6 -5 12 0 t12 0'/><path d='M120 48 q6 -5 12 0 t12 0'/><path d='M28 66 q6 -5 12 0 t12 0'/><path d='M104 70 q6 -5 12 0 t12 0'/></g></svg>"); }

/* 3 - the mountain: big mountains with snow, pines and rocks, a rocky path that climbs */
.th-3 .ll-world { background: linear-gradient(#6fb6ff, #cfe9ff 62%, #eaf6ff); }
.th-3 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><path d='M0 76 V54 L26 24 L40 40 L62 12 L98 54 L124 30 L150 50 L176 22 L200 54 V76Z' fill='%237f96bd'/><path d='M26 24 L19 33 L26 30 L31 34Z M62 12 L52 26 L60 22 L66 27 L72 24Z M176 22 L169 31 L176 28 L182 32Z' fill='%23fff'/></svg>"); }
.th-3 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g fill='%232e7d4f'><path d='M28 62 l9 -22 l9 22z M31 50 l6 -17 l6 17z'/><path d='M104 62 l8 -19 l8 19z M107 51 l5 -14 l5 14z'/></g><rect x='36' y='60' width='3' height='5' fill='%236b4a2a'/><rect x='111' y='60' width='3' height='5' fill='%236b4a2a'/><ellipse cx='72' cy='64' rx='10' ry='5' fill='%238a8f99'/><ellipse cx='140' cy='65' rx='7' ry='4' fill='%239aa0aa'/></svg>"); }
.th-3 .ll-road { background: linear-gradient(#8a6a46, #4d3522); }
.th-3 .ll-dash { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 7px, transparent 7px 32px); background-size: 32px 3px; }

/* 4 - the sky: a deep-blue sky with clouds and speed streaks */
.th-4 .ll-world { background: linear-gradient(#1f6fe0 0%, #5aa8ff 50%, #bfe3ff 100%); }
.th-4 .ll-sc1 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='76' viewBox='0 0 240 76'><g fill='%23ffffff'><ellipse cx='40' cy='56' rx='30' ry='10'/><ellipse cx='62' cy='50' rx='20' ry='10'/><ellipse cx='150' cy='20' rx='26' ry='8'/><ellipse cx='170' cy='15' rx='16' ry='8'/><ellipse cx='214' cy='62' rx='24' ry='8'/></g></svg>"); }
.th-4 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><g fill='%23ffffff' fill-opacity='.8'><ellipse cx='30' cy='26' rx='16' ry='6'/><ellipse cx='42' cy='22' rx='10' ry='6'/><ellipse cx='120' cy='60' rx='18' ry='6'/><ellipse cx='134' cy='56' rx='11' ry='6'/><ellipse cx='176' cy='30' rx='14' ry='5'/></g></svg>"); }
.th-4 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g stroke='%23ffffff' stroke-opacity='.75' stroke-width='1.6' stroke-linecap='round'><path d='M10 18 h30 M90 30 h40 M40 54 h36 M120 66 h30 M132 10 h18'/></g></svg>"); }

/* 5 - the lake: a green far bank, calm water, reeds and lily pads */
.th-5 .ll-world { background: linear-gradient(#8fd9ff 0%, #d4f3ff 40%, #2db3a8 42%, #137a86 100%); }
.th-5 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><path d='M0 33 Q25 14 55 33 Q85 22 110 33 Q140 12 170 33 Q185 26 200 33 V35 H0Z' fill='%2362b57a'/><circle cx='30' cy='22' r='6' fill='%23418f5a'/><rect x='29' y='26' width='2' height='6' fill='%236b4a2a'/><circle cx='150' cy='20' r='7' fill='%23418f5a'/><rect x='149' y='25' width='2' height='7' fill='%236b4a2a'/></svg>"); }
.th-5 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g fill='%2352c27a'><ellipse cx='30' cy='56' rx='8' ry='3'/><ellipse cx='102' cy='64' rx='9' ry='3'/><ellipse cx='140' cy='52' rx='6' ry='2.4'/></g><circle cx='32' cy='55' r='1.8' fill='%23ff9bb5'/><g stroke='%23336b3a' stroke-width='1.6' stroke-linecap='round'><path d='M66 70 V52 M70 70 V48 M74 70 V54'/></g><g fill='%238b5a2b'><rect x='65' y='46' width='3' height='7' rx='1.4'/><rect x='69' y='42' width='3' height='7' rx='1.4'/></g></svg>"); }

/* 6 - the town: coloured houses, lamp posts and trees, a grey street with yellow marking */
.th-6 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><rect x='4' y='34' width='26' height='28' fill='%23ff9aa2'/><rect x='34' y='24' width='22' height='38' fill='%2390caf9'/><rect x='60' y='38' width='28' height='24' fill='%23ffd54f'/><rect x='94' y='30' width='24' height='32' fill='%23a5d6a7'/><rect x='124' y='22' width='30' height='40' fill='%23ce93d8'/><rect x='160' y='36' width='30' height='26' fill='%23ffab91'/><g fill='%23ffffff' fill-opacity='.85'><rect x='9' y='40' width='6' height='6'/><rect x='19' y='40' width='6' height='6'/><rect x='39' y='30' width='6' height='6'/><rect x='39' y='42' width='6' height='6'/><rect x='66' y='43' width='6' height='6'/><rect x='78' y='43' width='6' height='6'/><rect x='99' y='36' width='6' height='6'/><rect x='129' y='28' width='6' height='6'/><rect x='141' y='28' width='6' height='6'/><rect x='129' y='42' width='6' height='6'/><rect x='166' y='42' width='6' height='6'/></g></svg>"); }
.th-6 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><rect x='30' y='36' width='3' height='26' fill='%23444'/><circle cx='31.5' cy='34' r='4.5' fill='%23ffe27a'/><circle cx='100' cy='46' r='9' fill='%2330a95c'/><rect x='98.6' y='52' width='3' height='10' fill='%238b5a2b'/><rect x='136' y='38' width='3' height='24' fill='%23444'/><circle cx='137.5' cy='36' r='4.5' fill='%23ffe27a'/></svg>"); }
.th-6 .ll-road { background: linear-gradient(#4a4a52, #26262c); }
.th-6 .ll-dash { background: repeating-linear-gradient(90deg, #ffd43b 0 14px, transparent 14px 32px); background-size: 32px 3px; }

/* 7 - space: stars, a ringed planet, speed streaks */
.th-7 .ll-world { background: linear-gradient(#050a2a, #1b1360 60%, #3a1c7a); }
.th-7 .ll-sc1 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='76' viewBox='0 0 240 76'><g fill='%23ffffff'><circle cx='14' cy='12' r='1.4'/><circle cx='52' cy='40' r='1'/><circle cx='84' cy='18' r='1.6'/><circle cx='118' cy='56' r='1.2'/><circle cx='150' cy='10' r='1'/><circle cx='176' cy='36' r='1.6'/><circle cx='206' cy='62' r='1.2'/><circle cx='228' cy='22' r='1'/><circle cx='36' cy='66' r='1.2'/><circle cx='98' cy='34' r='.9'/></g><circle cx='160' cy='58' r='6' fill='%23ffe9a8'/></svg>"); }
.th-7 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><circle cx='46' cy='36' r='17' fill='%23ff8a65'/><ellipse cx='46' cy='36' rx='28' ry='6' fill='none' stroke='%23ffd54f' stroke-width='3' transform='rotate(-18 46 36)'/><circle cx='148' cy='18' r='8' fill='%2390caf9'/><circle cx='172' cy='58' r='5' fill='%23ce93d8'/></svg>"); }
.th-7 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.4' stroke-linecap='round'><path d='M12 16 h22 M82 28 h30 M44 54 h26 M118 66 h22 M138 10 h12'/></g></svg>"); }

/* 8 - the countryside: golden fields, telegraph poles, a railway with sleepers */
.th-8 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><path d='M0 50 Q30 36 60 50 T120 50 T180 50 L200 50 V76 H0Z' fill='%23d7c85a'/><path d='M0 58 Q40 46 80 58 T160 58 L200 58 V76H0Z' fill='%23a8c64e'/></svg>"); }
.th-8 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g stroke='%235a4630' stroke-width='2.2' stroke-linecap='round'><path d='M24 20 V62 M12 28 H36 M14 34 H34'/><path d='M104 20 V62 M92 28 H116 M94 34 H114'/></g><path d='M0 66 H160' stroke='%235a4630' stroke-width='1' stroke-opacity='.4'/><g stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.2'><path d='M36 28 Q70 36 92 28'/></g></svg>"); }
.th-8 .ll-road { background: linear-gradient(#8a7a68, #4a4034); }
.th-8 .ll-dash { background: repeating-linear-gradient(90deg, #3a2a1a 0 9px, transparent 9px 32px); background-size: 32px 3px; height: 4px; }

/* 9 - a sunset sky with big pink clouds, far balloons and birds */
.th-9 .ll-world { background: linear-gradient(#ff9a8b 0%, #ffc3a0 45%, #fff0c8 100%); }
.th-9 .ll-sc1 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='76' viewBox='0 0 240 76'><g fill='%23ffffff' fill-opacity='.8'><ellipse cx='36' cy='58' rx='30' ry='9'/><ellipse cx='58' cy='52' rx='18' ry='9'/><ellipse cx='150' cy='22' rx='24' ry='7'/><ellipse cx='170' cy='17' rx='14' ry='7'/><ellipse cx='214' cy='62' rx='22' ry='7'/></g><circle cx='104' cy='60' r='9' fill='%23fff3b0'/></svg>"); }
.th-9 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><g><ellipse cx='36' cy='30' rx='7' ry='9' fill='%2390caf9'/><rect x='34.4' y='39' width='3.2' height='4' fill='%238b5a2b'/><ellipse cx='120' cy='20' rx='6' ry='8' fill='%23ce93d8'/><rect x='118.6' y='28' width='2.8' height='3.6' fill='%238b5a2b'/><ellipse cx='170' cy='44' rx='6.5' ry='8.5' fill='%2380cbc4'/><rect x='168.6' y='52.4' width='2.8' height='3.6' fill='%238b5a2b'/></g></svg>"); }
.th-9 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g fill='none' stroke='%23553322' stroke-width='1.4' stroke-linecap='round'><path d='M20 22 q4 -5 8 0 q4 -5 8 0'/><path d='M100 40 q3 -4 6 0 q3 -4 6 0'/><path d='M134 14 q3 -4 6 0 q3 -4 6 0'/></g></svg>"); }

/* 10 - the finish: a night of celebration, golden mountains, confetti, a golden road */
.th-10 .ll-world { background: linear-gradient(#2b1065 0%, #6a2fb8 55%, #ffb340 100%); }
.th-10 .ll-sc1 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='76' viewBox='0 0 240 76'><g fill='%23ffe27a'><path d='M20 14 l2 5 5 2 -5 2 -2 5 -2 -5 -5 -2 5 -2z'/><path d='M120 30 l1.6 4 4 1.6 -4 1.6 -1.6 4 -1.6 -4 -4 -1.6 4 -1.6z'/><path d='M200 12 l2 5 5 2 -5 2 -2 5 -2 -5 -5 -2 5 -2z'/></g><g fill='%23ffffff'><circle cx='70' cy='18' r='1.4'/><circle cx='160' cy='44' r='1.2'/><circle cx='226' cy='40' r='1.2'/><circle cx='44' cy='46' r='1'/></g></svg>"); }
.th-10 .ll-sc2 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='76' viewBox='0 0 200 76'><path d='M0 76 V58 L30 32 L60 58 L92 28 L132 58 L162 36 L200 58 V76Z' fill='%23ffb340'/><path d='M30 32 L22 42 L30 39 L37 44Z M92 28 L83 40 L92 36 L100 42Z' fill='%23fff3c4'/></svg>"); }
.th-10 .ll-sc3 { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='76' viewBox='0 0 160 76'><g><rect x='14' y='20' width='5' height='3' fill='%23ff5a6e' transform='rotate(25 16 21)'/><rect x='52' y='44' width='5' height='3' fill='%2338bdf8' transform='rotate(-30 54 45)'/><rect x='88' y='16' width='5' height='3' fill='%234ade80' transform='rotate(40 90 17)'/><rect x='122' y='38' width='5' height='3' fill='%23ffd43b' transform='rotate(-20 124 39)'/><circle cx='36' cy='56' r='2' fill='%23ff9bb5'/><circle cx='104' cy='60' r='2' fill='%23ffffff'/><circle cx='146' cy='18' r='2' fill='%23c084fc'/></g></svg>"); }
.th-10 .ll-road { background: linear-gradient(#e0a417, #8c5e00); }

/* ---------- the end of a level: the traveller ARRIVES (js/listening.js: arrive) ----------
   When the last question is right (or the level ends Passed / Moved on and the traveller walks the rest of the way) it reaches its destination in its own way:
   goes into the house / the station / the school gate, swims onto the island, sails under the bridge, flies into the city, lands on the moon or at the castle -
   and the destination lights up, cheers, and a small "relax" emoji pops over it with sparkles. The climber and the runner stand beside the flag / the trophy and cheer.
   --dx / --dy: how far it moves to the destination; --vs: how small it is when it has gone in. */
.ll-walker { --dx: calc(var(--aw) / 2 + 34px); --dy: 0px; --vs: .45; }
.ll-walker.act-swim { --dx: calc(var(--aw) / 2 + 30px); --dy: 10px; --vs: .6; }
.ll-walker.act-plane { --dy: 8px; --vs: .4; }
.ll-walker.act-boat { --vs: .7; }
.ll-walker.act-bike { --vs: .5; }
.ll-walker.act-rocket { --dy: 12px; --vs: .3; }
.ll-walker.act-train { --vs: .75; }
.ll-walker.act-balloon { --dy: 4px; --vs: .5; }
.ll-walker.act-climb, .ll-walker.act-run { --dx: 5px; }
.ll-walker.arrive { left: calc((100% - 64px - var(--aw)) * var(--p) + 4px + var(--dx)); bottom: calc(var(--abase) + var(--rise) * var(--p) + var(--dy));
  transition: left .95s ease-in-out, bottom .95s ease-in-out; animation: ll-vanish .55s ease-in .55s forwards; }
.ll-walker.act-climb.arrive, .ll-walker.act-run.arrive { animation: ll-jump-small .6s ease-in-out .95s 4; }
.ll-walker.act-climb.arrive .uarm, .ll-walker.act-run.arrive .uarm { animation: ll-armsup .15s ease-out .95s forwards; }
@keyframes ll-jump-small { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ll-vanish { to { transform: scale(var(--vs)); opacity: 0; } }
@keyframes ll-armsup { to { transform: rotate(-155deg); } }

/* the destination: a warm glow behind it, a happy bounce (a waving flag, a lifted trophy) */
.ll-goal { isolation: isolate; }
.ll-goal::before { content: ''; position: absolute; inset: -16px; border-radius: 50%; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 235, 130, .95), rgba(255, 235, 130, 0) 68%); transition: opacity .5s .95s; }
.ll-track.arrived .ll-goal::before { opacity: 1; animation: ll-glow 1.1s ease-in-out 1.45s infinite alternate; }
.ll-track.arrived .ll-goal { animation: ll-goal-win .9s ease-in-out .95s 2; transform-origin: 50% 100%; }
.ll-track.th-3.arrived .ll-goal { animation: ll-flag-wave .45s ease-in-out .95s infinite alternate; transform-origin: 14% 92%; }
.ll-track.th-10.arrived .ll-goal { animation: ll-trophy .9s ease-out .95s forwards; }
@keyframes ll-glow { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.15); opacity: 1; } }
@keyframes ll-goal-win { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-4deg); } 70% { transform: scale(1.12) rotate(3deg); } }
@keyframes ll-flag-wave { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes ll-trophy { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.35); } 100% { transform: translateY(-4px) scale(1.2); } }
/* the "relax" emoji over the destination, and the sparkles that fly out of it */
.ll-relax { position: absolute; right: 8px; bottom: min(calc(var(--goalb) + 38px), 48px); font-size: 1.5rem; line-height: 1; pointer-events: none;
  animation: ll-relax-pop .6s cubic-bezier(.34, 1.56, .64, 1) both, ll-relax-float 1.8s ease-in-out .6s infinite alternate; }
@keyframes ll-relax-pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ll-relax-float { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.ll-spark { position: absolute; right: 16px; bottom: calc(var(--goalb) + 12px); font-size: .95rem; line-height: 1; pointer-events: none; opacity: 0; animation: ll-spark 1.1s ease-out forwards; }
@keyframes ll-spark { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--sx), var(--sy)) scale(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ll-walker.arrive, .ll-track.arrived .ll-goal, .ll-track.arrived .ll-goal::before, .ll-relax, .ll-spark { animation: none !important; transition: none !important; } .ll-relax { opacity: 1; } }
