/* Supplied lesson artwork. These selectors exclude chapter doors and screen-down art. */
.lesson-illustration{display:block;max-width:100%;height:auto;object-fit:contain;pointer-events:none;mix-blend-mode:multiply}
.door-inside:has(.door-reveal-illustration){overflow:hidden}
.door-inside .door-reveal-illustration{width:200px;max-width:none;height:200px;flex-shrink:0;margin-bottom:0;opacity:0;transform:translateX(-10px);transition:transform .6s ease,opacity .4s}
.is-open .door-inside .door-reveal-illustration{opacity:1;transform:translateX(0)}
.discovery-day-2:has(.illustrated-envelope-card) .discovery-visual{height:340px}
.illustrated-envelope-card{height:184px;border-radius:5px;transform:translateY(6px);background:#fff8eb}
.illustrated-envelope-card .lesson-illustration{width:100%;height:100%;object-fit:contain}
.is-open .illustrated-envelope-card{transform:translateY(-136px)}
.joy-meadow>.lesson-illustration.movement-joy{width:108px;max-width:none;height:108px;mask-image:radial-gradient(ellipse,#000 58%,transparent 74%)}
.favourite-choices .lesson-illustration{width:157px;height:157px;margin-bottom:12px;object-fit:contain;border-radius:8px}
.illustrated-picture-spread>.lesson-illustration{width:100%;height:calc(100% - 20px);margin:auto;object-fit:contain}
.illustrated-voice{width:280px;height:280px;inset:auto;left:50%;bottom:0;transform:translateX(-50%);background:none}
.illustrated-voice>.lesson-illustration{width:100%;height:100%}
.illustrated-voice>.voice-bubble{right:11%;top:29%;width:29%;padding:0;background:none;border:0;border-radius:0;color:var(--paper);font-size:20px;line-height:1.5;transform:rotate(0)}
.illustrated-memories{gap:10px 3px;padding:15px 8px}
.illustrated-memories>.lesson-illustration{width:100%;height:110px;object-fit:contain}
.celebration-scene.illustrated-celebration{width:230px;height:200px}
.illustrated-celebration>.lesson-illustration{width:100%;height:100%;object-fit:contain}
.illustrated-celebration .new-paw{left:auto;right:12px;bottom:12px}
.illustrated-keepsake>.lesson-illustration{width:100%;height:100%;object-fit:contain}
.next-page-invite>.next-page-butterfly{width:80px;height:80px;flex-shrink:0;object-fit:contain;mask-image:radial-gradient(ellipse,#000 58%,transparent 75%)}
@media(max-width:760px){
 .discovery-day-2:has(.illustrated-envelope-card) .discovery-visual{height:315px}
 .illustrated-envelope-card{height:170px}
 .is-open .illustrated-envelope-card{transform:translateY(-126px)}
 .favourite-choices .lesson-illustration{width:140px;height:140px;margin-bottom:11px}
 .illustrated-voice{width:260px;height:260px}
 .illustrated-voice>.voice-bubble{font-size:18px}
 .illustrated-memories>.lesson-illustration{height:100px}
 .celebration-scene.illustrated-celebration{width:210px;height:175px}
 .next-page-invite>.next-page-butterfly{width:58px;height:58px}
}
@media(prefers-reduced-motion:reduce){.door-reveal-illustration{transition:none!important}}
/* Reserve the whole picture height so the voice guidance stays readable. */
.discovery-day-6:has(.illustrated-voice) .discovery-visual{height:300px}
@media(max-width:760px){.discovery-day-6:has(.illustrated-voice) .discovery-visual{height:280px}}

/* The completion cutout has real alpha; retain its original painted colours. */
.illustrated-celebration>.illustration-celebration{mix-blend-mode:normal}

/* Day 5: two supplied book illustrations, one action and a quiet type scale. */
body .magic-lesson .discovery-5{font:400 16px/1.65 var(--serif);padding:32px 0}
body .magic-lesson .discovery-5 .eyebrow{font:inherit;letter-spacing:.08em;margin:0 0 8px;color:var(--gold)}
body .magic-lesson .discovery-5 h1{font:400 32px/1.35 var(--serif);letter-spacing:normal}
body .magic-lesson .discovery-5 .chapter-discovery{max-width:520px;margin:16px auto 0;padding:0}
body .magic-lesson .discovery-5 .reveal-quote{max-width:none;min-height:27px;margin:0 auto 12px;text-align:center}
body .magic-lesson .discovery-5 .reveal-quote>span,
body .magic-lesson .discovery-5 .reveal-quote small{font:inherit}
body .magic-lesson .discovery-5 .reveal-quote small:empty{display:none}
body .magic-lesson .discovery-5 .discovery-object{width:100%;padding:0;box-shadow:none}
body .magic-lesson .discovery-5 .discovery-object:focus-visible{outline:3px solid var(--blue);outline-offset:6px}
body .magic-lesson .discovery-5 .storybook-picture{display:block;position:relative;width:100%;aspect-ratio:4/3;pointer-events:none}
body .magic-lesson .discovery-5 .storybook-picture img{position:absolute;inset:0;margin:auto;display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:normal;transition:opacity .25s ease}
body .magic-lesson .discovery-5 .storybook-picture .storybook-closed-art{width:75%;aspect-ratio:1}
body .magic-lesson .discovery-5 .storybook-open-art{opacity:0}
body .magic-lesson .discovery-5 .is-open .storybook-closed-art{opacity:0}
body .magic-lesson .discovery-5 .is-open .storybook-open-art{opacity:1}
body .magic-lesson .discovery-5 .discovery-label{font:inherit;min-height:44px;padding:8px 12px;text-underline-offset:5px}
body .magic-lesson .discovery-5 .daily-reassurance{display:none}
body .magic-lesson .discovery-5 .discover-next{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin:8px auto 0;font:inherit}
body .magic-lesson .discovery-5 .discover-next>span{font:inherit}
@media(max-width:600px){body .magic-lesson .discovery-5 h1{font-size:28px}}

/* Day 4: one calm type scale and four transparent illustrated choices. */
body .magic-lesson .discovery-4{font:400 16px/1.65 var(--serif);padding:32px 0}
body .magic-lesson .discovery-4 h1{font:400 32px/1.35 var(--serif);letter-spacing:normal}
body .magic-lesson .discovery-4 .discovery-intro{margin-top:12px;font:inherit}
body .magic-lesson .discovery-4 .chapter-discovery{max-width:880px;margin:24px auto 0}
body .magic-lesson .discovery-4 .reveal-quote{min-height:32px;max-width:none;margin:0 auto;text-align:center}
body .magic-lesson .discovery-4 .reveal-quote>span{font:700 16px/1.6 var(--serif)}
body .magic-lesson .discovery-4 .reveal-quote small{font:400 16px/1.6 var(--serif);margin:4px auto 0}
body .magic-lesson .discovery-4 .favourite-choices{grid-template-columns:repeat(4,minmax(0,1fr));max-width:none;gap:16px;margin:20px 0 30px}
body .magic-lesson .discovery-4 .favourite-choices button{height:auto;padding:24px 10px 28px;border:2px solid #b7a27b88;background:transparent;box-shadow:none;border-radius:50% 50% 8px 8px / 20% 20% 8px 8px}
body .magic-lesson .discovery-4 .favourite-choices button[aria-pressed=true]{border-color:var(--blue);background:#fff9ef55}
body .magic-lesson .discovery-4 .favourite-choices button:focus-visible{outline:3px solid var(--blue);outline-offset:5px}
body .magic-lesson .discovery-4 .favourite-choices button:after{display:grid;place-items:center;left:calc(50% - 13px);line-height:1}
body .magic-lesson .discovery-4 .choice-illustration{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;margin:0 0 12px;pointer-events:none;mix-blend-mode:normal}
body .magic-lesson .discovery-4 .favourite-choices button>span:last-child{font:400 16px/1.5 var(--serif);min-height:24px}
body .magic-lesson .discovery-4 .choice-note{font:inherit;color:var(--muted);max-width:50ch;margin:0 auto}
body .magic-lesson .discovery-4 .daily-reassurance{display:none}
body .magic-lesson .discovery-4 .discover-next{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin:12px auto 0;font:inherit}
body .magic-lesson .discovery-4 .discover-next>span{font:inherit}
body .lesson-day-4 .phrase-row .english-phrase{font:400 24px/1.5 var(--serif)}
body .lesson-day-4 .pocket-phrases>span{font:400 22px/1.5 var(--serif)}
@media(max-width:600px){
 body .magic-lesson .discovery-4 h1{font-size:28px}
 body .magic-lesson .discovery-4 .favourite-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 14px}
 body .magic-lesson .discovery-4 .favourite-choices button{padding:18px 8px 24px}
 body .magic-lesson .discovery-4 .reveal-quote>span{font-size:16px}
 body .lesson-day-4 .pocket-phrases{display:flex;flex-direction:column;gap:12px}
 body .lesson-day-4 .pocket-phrases>span{font-size:20px}
}

/* Day 6: one quiet, tap-led exchange, with no automatic motion or sound. */
body .magic-lesson .conversation-discovery{font:400 16px/1.6 var(--serif);padding:32px 0;text-align:center}
body .magic-lesson .conversation-discovery .eyebrow{font:inherit;letter-spacing:.08em;margin:0 0 8px;color:var(--gold)}
body .magic-lesson .conversation-discovery h1{font:400 32px/1.35 var(--serif);letter-spacing:normal;margin:0}
body .magic-lesson .conversation-toggle{display:block;width:min(100%,520px);margin:16px auto 0;padding:0;border:0;background:none;box-shadow:none;border-radius:16px;color:var(--blue);font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
body .magic-lesson .conversation-toggle:focus-visible{outline:3px solid var(--blue);outline-offset:6px}
body .magic-lesson .conversation-scene{position:relative;display:block;width:100%;aspect-ratio:5/4;pointer-events:none}
body .magic-lesson .conversation-bear{position:absolute;left:0;bottom:0;width:72%;height:auto;mix-blend-mode:normal;transform-origin:45% 92%;transition:transform .55s cubic-bezier(.2,.7,.2,1)}
body .magic-lesson .conversation-bubble{position:absolute;display:flex;flex-direction:column;justify-content:center;gap:5px;width:44%;padding:18px 16px;border-radius:45% 48% 42% 44% / 40% 43% 38% 44%;font:400 22px/1.3 var(--serif);box-sizing:border-box;transition:opacity .35s ease,transform .45s cubic-bezier(.2,.7,.2,1)}
body .magic-lesson .conversation-bubble:after{content:'';position:absolute;bottom:8px;left:14px;width:20px;height:18px;background:inherit;clip-path:polygon(100% 0,0 100%,100% 75%)}
body .magic-lesson .conversation-bubble small{display:block;font:400 16px/1.4 var(--serif);color:inherit;margin:0}
body .magic-lesson .conversation-greeting{top:12%;right:0;background:#385575;color:#fff9ed;transform:translateY(0)}
body .magic-lesson .conversation-reply{top:52%;right:1%;background:#f0ce8c;color:#233d59;opacity:0;visibility:hidden;transform:translateY(10px) scale(.94);transition:opacity .35s ease,transform .45s cubic-bezier(.2,.7,.2,1),visibility .35s}
body .magic-lesson .is-replied .conversation-greeting{opacity:.9;transform:translateY(-3px)}
body .magic-lesson .is-replied .conversation-reply{opacity:1;visibility:visible;transform:translateY(0) scale(1)}
body .magic-lesson .is-replied .conversation-bear{transform:rotate(-1.5deg) translateY(-3px)}
body .magic-lesson .conversation-toggle .discovery-label{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;font:inherit;text-decoration:underline;text-underline-offset:5px}
body .magic-lesson .conversation-discovery .discover-next{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:8px auto 0;font:inherit}
body .magic-lesson .conversation-discovery .discover-next>span{font:inherit}
body .magic-lesson .conversation-discovery .daily-reassurance{display:none}
.conversation-announcement{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){
 body .magic-lesson .conversation-discovery h1{font-size:28px}
 body .magic-lesson .conversation-scene{aspect-ratio:1.15}
 body .magic-lesson .conversation-bubble{font-size:18px;padding:14px 10px}
 body .magic-lesson .conversation-greeting{top:8%}
 body .magic-lesson .conversation-reply{top:48%}
}
@media(prefers-reduced-motion:reduce){
 body .magic-lesson .conversation-discovery :is(.conversation-bear,.conversation-bubble){transition:none;transform:none}
}

/* Day 7: the supplied map stays intact, with readable speech beneath it. */
body .magic-lesson .map-discovery{font:400 16px/1.6 var(--serif);padding:28px 0;text-align:center}
body .magic-lesson .map-discovery .eyebrow{font:inherit;letter-spacing:.08em;margin:0 0 6px;color:var(--gold)}
body .magic-lesson .map-discovery h1{font:400 32px/1.35 var(--serif);letter-spacing:normal;margin:0}
body .magic-lesson .map-instruction{font:inherit;margin:10px 0 22px;color:var(--muted)}
body .magic-lesson .adventure-conversation{max-width:960px;margin:auto}
body .magic-lesson .adventure-map-scene{position:relative;width:100%;isolation:isolate}
body .magic-lesson .adventure-map-art{display:block;width:100%;height:auto;border-radius:16px}
body .magic-lesson .map-conversation-route{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
body .magic-lesson .map-character{position:absolute;min-width:44px;min-height:44px;background:transparent;border:2px solid transparent;border-radius:50%;box-shadow:none;cursor:pointer;transition:border-color .3s,box-shadow .3s}
body .magic-lesson .map-bear{left:20%;top:19%;width:14%;height:23%}
body .magic-lesson .map-joy{left:81%;top:26%;width:12%;height:17%}
body .magic-lesson .map-character:hover{border-color:#ba821b;box-shadow:0 0 0 5px #fff9e844}
body .magic-lesson .map-dialogue{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:24px auto 0;padding:0 5%;align-items:stretch}
body .magic-lesson .map-speech{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:18px 20px;border:2px solid transparent;border-radius:24px;min-height:112px;cursor:pointer;box-shadow:none;transition:transform .35s,box-shadow .35s,border-color .35s;font:inherit}
body .magic-lesson .map-speech:before{content:'';position:absolute;top:-14px;left:24%;width:25px;height:18px;background:inherit;clip-path:polygon(0 100%,100% 100%,35% 0)}
body .magic-lesson .map-speech-bear{background:#304d6d;color:#fff8eb}
body .magic-lesson .map-speech-joy{background:#f1d49e;color:#263f5b}
body .magic-lesson .map-speech-joy:before{left:auto;right:24%;transform:scaleX(-1)}
body .magic-lesson .map-speaker,body .magic-lesson .map-translation{font:400 16px/1.4 var(--serif);color:inherit}
body .magic-lesson .map-phrase{font:400 22px/1.35 var(--serif);color:inherit}
body .magic-lesson .map-translation:empty{display:none}
body .magic-lesson .map-prompt{font-size:16px;text-decoration:underline;text-underline-offset:4px}
body .magic-lesson .map-discovery[data-map-turn="0"] .map-speech-bear,
body .magic-lesson .map-discovery[data-map-turn="2"] .map-speech-bear,
body .magic-lesson .map-discovery[data-map-turn="1"] .map-speech-joy{transform:translateY(-4px);box-shadow:0 7px 16px #263f5b18;border-color:#aa751b}
body .magic-lesson :is(.map-speech,.map-character):focus-visible{outline:3px solid #80570f;outline-offset:5px}
body .magic-lesson .map-discovery .daily-reassurance{display:none}
body .magic-lesson .map-discovery .discover-next{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:20px auto 0;font:inherit}
body .magic-lesson .map-discovery .discover-next>span{font:inherit}
@media(max-width:600px){
 body .magic-lesson .map-discovery h1{font-size:28px}
 body .magic-lesson .map-instruction{margin:8px 0 18px}
 body .magic-lesson .map-dialogue{gap:12px;margin-top:20px;padding:0}
 body .magic-lesson .map-speech{padding:14px 10px;min-height:126px;border-radius:20px}
 body .magic-lesson .map-phrase{font-size:18px}
 body .magic-lesson .map-prompt{font-size:16px}
 body .magic-lesson .adventure-map-art{border-radius:10px}
}
@media(prefers-reduced-motion:reduce){
 body .magic-lesson .map-discovery :is(.map-character,.map-speech){transition:none;transform:none!important}
}
/* The artwork already carries the title. Keep its semantic heading without repeating it. */
body .magic-lesson .map-discovery h1{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(min-width:761px){
 body .magic-lesson .adventure-conversation{position:relative}
 body .magic-lesson .map-dialogue{position:absolute;inset:0;display:block;margin:0;padding:0;pointer-events:none}
 body .magic-lesson .map-speech{position:absolute;width:32%;min-height:104px;pointer-events:auto}
 body .magic-lesson .map-speech-bear{top:44%;left:3%}
 body .magic-lesson .map-speech-joy{top:62%;right:3%}
}
