/* Twiggle's Map (proof, 22 Nov 2026). A table-top world: the map lies on dark wood under a warm lamp; everything on it
   is felt, linen, clay and glass. Stop-motion timing (steps) for the little lives; reduced motion holds still. */

/* reading text: Andika, renamed "Twiggle Reader" in its Latin subset as its licence requires (Matt 23 Nov: "Yes, try Andika") */
@font-face{font-family:"Twiggle Reader";src:url(/assets/fonts/twiggle-reader-400-latin.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Twiggle Reader";src:url(/assets/fonts/twiggle-reader-400-italic-latin.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Twiggle Reader";src:url(/assets/fonts/twiggle-reader-700-latin.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Twiggle Reader";src:url(/assets/fonts/twiggle-reader-700-italic-latin.woff2) format("woff2");font-weight:700;font-style:italic;font-display:swap}
@font-face{font-family:"Twiggle Twigs";src:url(/assets/fonts/twiggle-twigs.woff2) format("woff2");font-weight:400 700;font-style:normal;font-display:swap}

:root{
  --wood:#21160e; --wood2:#2d1f14; --cream:#f3e8cf; --linen:#efe2c4; --ink:#33251a; --ink2:#5c4631;
  --amber:#f2a945; --blue:#8cc6ff; --blue-core:#e3f2ff; --moss:#6b7a3a; --indigo:#2f4a86; --bark:#6e4a2c;
  --felt-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --wood-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .09' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .38 0 0 0 0 .22 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --u:1px;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--wood);background-image:var(--wood-grain);color:var(--ink);font:17px/1.6 "Twiggle Reader","Andika",system-ui,sans-serif;overflow:hidden;-webkit-tap-highlight-color:transparent}
img{display:block;max-width:none}
button{font:inherit;color:inherit}
:focus-visible{outline:3px solid #ffd27a;outline-offset:3px}
button:focus:not(:focus-visible),a:focus:not(:focus-visible){outline:none}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- the stage and the map ---------- */
.stage{position:fixed;inset:0;overflow:hidden}
.viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;cursor:grab;touch-action:pan-x pan-y}
.viewport::-webkit-scrollbar{display:none}
.viewport.dragging{cursor:grabbing}
.map{position:relative;margin:0 auto;user-select:none;-webkit-user-select:none}
.map-img{width:100%;height:100%;pointer-events:none}
/* the lamp over the table: light falls from the upper left and fades toward the edges */
.map::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(120% 95% at 30% 25%,transparent 55%,rgba(20,12,6,.38) 100%),
             linear-gradient(115deg,rgba(255,214,150,.08),transparent 45%)}

/* ---------- little lives on the map ---------- */
.fx>*{position:absolute;pointer-events:none}
.glow{width:calc(var(--u)*var(--r,28));height:calc(var(--u)*var(--r,28));margin:calc(var(--u)*var(--r,28)/-2) 0 0 calc(var(--u)*var(--r,28)/-2);border-radius:50%;
  background:radial-gradient(circle,rgba(255,214,140,.95) 0,rgba(242,169,69,.55) 30%,rgba(242,169,69,0) 70%);mix-blend-mode:screen;
  animation:flicker 2.6s steps(1) infinite}
.glow:nth-child(3n){animation-duration:3.1s;animation-delay:-1.2s}
.glow:nth-child(3n+1){animation-duration:2.2s;animation-delay:-.5s}
@keyframes flicker{0%{opacity:.85}12%{opacity:.62}20%{opacity:.95}41%{opacity:.7}55%{opacity:.9}70%{opacity:.58}84%{opacity:1}}
.firefly{width:calc(var(--u)*7);height:calc(var(--u)*7);border-radius:50%;background:radial-gradient(circle,#fff6d0 0,#ffd27a 40%,rgba(255,210,122,0) 70%);mix-blend-mode:screen;animation:drift 9s steps(36) infinite}
.firefly:nth-child(2n){animation-duration:12s;animation-delay:-4s}
.firefly:nth-child(3n){animation-duration:10.5s;animation-delay:-7s}
@keyframes drift{0%{transform:translate(0,0);opacity:.2}20%{opacity:1}50%{transform:translate(calc(var(--u)*26),calc(var(--u)*-18));opacity:.4}75%{opacity:.95}100%{transform:translate(0,0);opacity:.2}}
.waterfall{background:repeating-linear-gradient(180deg,rgba(220,240,255,0) 0,rgba(220,240,255,.42) calc(var(--u)*6),rgba(220,240,255,0) calc(var(--u)*14));
  mix-blend-mode:screen;-webkit-mask:linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent);mask:linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent);
  animation:fall .8s steps(4) infinite;opacity:.75}
@keyframes fall{to{background-position:0 calc(var(--u)*28)}}
.aurora{mix-blend-mode:screen;opacity:.55;filter:blur(calc(var(--u)*6));
  background:linear-gradient(100deg,transparent 10%,rgba(90,255,190,.55) 30%,rgba(110,190,255,.35) 48%,transparent 62%),
             linear-gradient(80deg,transparent 30%,rgba(150,255,170,.45) 52%,transparent 70%);
  background-size:220% 100%,180% 100%;animation:sway 14s steps(56) infinite alternate;
  -webkit-mask:linear-gradient(180deg,#000 20%,transparent 95%);mask:linear-gradient(180deg,#000 20%,transparent 95%)}
@keyframes sway{to{background-position:100% 0,0 0}}

/* the memory stones: faint until Twiggle lands on them, then they glow and linger */
.stone{position:absolute;width:calc(var(--u)*22);height:calc(var(--u)*14);margin:calc(var(--u)*-7) 0 0 calc(var(--u)*-11);border-radius:50%;
  background:radial-gradient(circle at 50% 45%,rgba(227,242,255,.55),rgba(140,198,255,.25) 45%,rgba(140,198,255,0) 72%);
  opacity:.45;transition:opacity 2.6s ease,transform 2.6s ease;mix-blend-mode:screen}
.stone.lit{opacity:1;transform:scale(1.9);transition:opacity .12s,transform .12s;
  background:radial-gradient(circle at 50% 45%,#fff 0,var(--blue-core) 22%,rgba(140,198,255,.8) 45%,rgba(140,198,255,0) 75%)}
.stone.twinkle{opacity:.9;transition:opacity .5s}

/* the friends who live on the map */
.person{position:absolute;z-index:2;padding:0;border:0;background:none;cursor:pointer;transform:translate(-50%,-100%);transform-origin:50% 100%}
.place{z-index:4}
.person img{height:calc(var(--u)*var(--h,60));width:auto;filter:drop-shadow(0 calc(var(--u)*3) calc(var(--u)*3) rgba(20,10,0,.45));transform-origin:50% 100%;animation:breathe 3.2s steps(16) infinite}
.person.flip img{transform:scaleX(-1)}
.person:nth-child(2n) img{animation-duration:3.8s;animation-delay:-1.4s}
.person.hello img{animation:hello .7s steps(8) 1}
@keyframes breathe{0%,100%{scale:1 1}50%{scale:1.012 .985}}
@keyframes hello{0%{translate:0 0}35%{translate:0 calc(var(--u)*-16);scale:.96 1.05}60%{translate:0 0;scale:1.06 .92}100%{translate:0 0;scale:1 1}}
.person::after{content:"";position:absolute;pointer-events:none}
/* Lunice's nose and Granite's memory-stone glow softly; Birtreecher's lantern flickers (positions are % of each picture) */
.person.lunice::after{left:42%;top:13%;width:18%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,rgba(255,170,200,.9),rgba(255,140,180,0) 70%);mix-blend-mode:screen;animation:flicker 3s steps(1) infinite}
.person.granite::after{left:38%;top:47%;width:30%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,rgba(170,215,255,.95),rgba(90,160,255,0) 70%);mix-blend-mode:screen;animation:flicker 2.4s steps(1) infinite}
.person.birtreecher::after{left:3%;top:15%;width:28%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,rgba(255,214,140,.95),rgba(242,169,69,0) 70%);mix-blend-mode:screen;animation:flicker 2s steps(1) infinite}

/* ---------- the places: felt tags sewn onto the map ---------- */
.place{position:absolute;transform:translate(-50%,-50%) rotate(var(--rot,-2deg));padding:calc(var(--u)*7) calc(var(--u)*14) calc(var(--u)*6);
  border:0;border-radius:calc(var(--u)*10);cursor:pointer;color:var(--ink);
  font:700 calc(var(--u)*21)/1 "Twiggle Twigs",cursive;white-space:nowrap;
  background:var(--cream);background-image:var(--felt-noise);
  box-shadow:0 calc(var(--u)*3) 0 rgba(60,35,15,.35),0 calc(var(--u)*8) calc(var(--u)*14) rgba(15,8,2,.35);
  transition:transform .2s ease}
.place::before{content:"";position:absolute;inset:calc(var(--u)*3.5);border:calc(var(--u)*1.6) dashed rgba(92,70,49,.55);border-radius:calc(var(--u)*7);pointer-events:none}
.place::after{content:"";position:absolute;left:50%;top:calc(var(--u)*-9);width:calc(var(--u)*8);height:calc(var(--u)*8);margin-left:calc(var(--u)*-4);border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#d9b37a,#8a5a2b);box-shadow:0 calc(var(--u)*1) calc(var(--u)*2) rgba(0,0,0,.4)}
.place:hover,.place:focus-visible{transform:translate(-50%,-50%) rotate(0deg) scale(1.08)}
.place.here{background-color:#fff6df}
.place.beckon{animation:beckon 1.2s steps(6) 3}
@keyframes beckon{0%,100%{translate:0 0}50%{translate:0 calc(var(--u)*-8)}}

/* ---------- Twiggle, the guide ---------- */
.guide{position:absolute;padding:0;border:0;background:none;cursor:pointer;transform:translate(-50%,-100%);height:calc(var(--u)*var(--gh,104));z-index:5}
.rig{display:block;height:100%;transform-origin:50% 100%}
.rig .part{height:100%;width:auto;filter:drop-shadow(0 calc(var(--u)*3) calc(var(--u)*3) rgba(20,10,0,.5))}
.guide::before{content:"";position:absolute;left:var(--fx,50%);bottom:calc(var(--u)*-3);width:70%;height:calc(var(--u)*10);transform:translateX(-50%);border-radius:50%;
  background:radial-gradient(closest-side,rgba(10,5,0,.45),rgba(10,5,0,0));opacity:var(--shadow,1)}

/* Twiggle's cut-out rig: every part placed and turned about its own joint by map.js */
.rig.parts{position:relative;width:100%;height:100%;filter:drop-shadow(0 calc(var(--u)*3) calc(var(--u)*3) rgba(20,10,0,.5))}
.rig.parts .rp{position:absolute;height:auto;max-width:none;pointer-events:none;user-select:none}

/* ---------- things floating over the map ---------- */
.top{position:absolute;inset:0 0 auto 0;display:flex;justify-content:space-between;align-items:flex-start;padding:max(10px,env(safe-area-inset-top)) 14px 0;pointer-events:none;z-index:10}
.top>*{pointer-events:auto}
.brand{display:block;width:clamp(150px,22vw,250px);padding:6px 12px 10px;border-radius:40% 45% 42% 48%/50% 46% 54% 50%;
  background:radial-gradient(closest-side,rgba(243,232,207,.92),rgba(243,232,207,.7) 70%,rgba(243,232,207,0));}
.brand img{width:100%;height:auto;filter:drop-shadow(0 2px 2px rgba(40,20,5,.35))}
.sound{width:58px;height:58px;border-radius:50%;border:0;cursor:pointer;display:grid;place-items:center;
  background:var(--cream);background-image:var(--felt-noise);box-shadow:0 3px 0 rgba(60,35,15,.4),0 8px 16px rgba(10,5,0,.4);position:relative}
.sound::before{content:"";position:absolute;inset:4px;border-radius:50%;border:1.6px dashed rgba(92,70,49,.55)}
.sound svg{width:30px;height:30px;fill:none;stroke:var(--ink);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.sound .bell{fill:#d8a24a;stroke:var(--ink)}
.sound .clapper{fill:var(--ink);stroke:none}
.sound .waves{display:none}
.sound[aria-pressed="true"] .waves{display:inline}
.sound[aria-pressed="true"] .off{display:none}
.sound[aria-pressed="true"] svg{animation:ring .6s steps(6) 1}
@keyframes ring{25%{rotate:12deg}50%{rotate:-10deg}75%{rotate:6deg}}
/* the quick road to the films (Matt, 23 Nov: "kids that literally just want to visit the website and watch") */
.tools{display:flex;align-items:center;gap:12px}
.watch-btn{position:relative;display:flex;align-items:center;gap:10px;height:58px;padding:0 22px 0 9px;border-radius:999px;text-decoration:none;
  font:700 27px/1 "Twiggle Twigs",cursive;color:var(--ink);background:var(--cream);background-image:var(--felt-noise);
  box-shadow:0 3px 0 rgba(60,35,15,.4),0 8px 16px rgba(10,5,0,.4);transition:transform .15s}   /* cream felt like the place labels: the twig letters show */
.watch-btn::before{content:"";position:absolute;inset:4px;border-radius:999px;border:1.6px dashed rgba(92,70,49,.55);pointer-events:none}
.watch-disc{width:42px;height:42px;border-radius:50%;background:var(--indigo);display:grid;place-items:center;box-shadow:0 2px 0 #1c2d55}
.watch-disc::before{content:"";border:9px solid transparent;border-left:14px solid #fff8e8;border-right:0;margin-left:5px}
.watch-btn:hover,.watch-btn:focus-visible{transform:translateY(-2px)}
@media (max-width:600px){.tools{flex-direction:column;align-items:flex-end;gap:8px}
  .watch-btn{height:46px;font-size:25px;padding:0 15px 0 6px;gap:7px}.watch-disc{width:34px;height:34px}
  .watch-disc::before{border-width:7px;border-left-width:11px;margin-left:4px}}

.signpost{position:absolute;right:clamp(10px,2vw,22px);bottom:max(12px,env(safe-area-inset-bottom));z-index:10;display:block;width:150px;height:118px;text-decoration:none;color:#f8ead0}
.signpost .post{position:absolute;left:50%;bottom:0;width:12px;height:96px;margin-left:-6px;border-radius:4px;background:linear-gradient(90deg,#4a3020,#7a5234 45%,#4a3020)}
.signpost .board{position:absolute;left:0;top:6px;width:150px;padding:9px 10px 8px;text-align:center;font:700 20px/1 "Twiggle Twigs",cursive;
  border-radius:6px 14px 8px 12px;transform:rotate(-4deg);background:#7b5434;background-image:var(--wood-grain);
  box-shadow:inset 0 0 0 2px rgba(40,22,10,.35),0 4px 0 rgba(30,15,5,.45),0 10px 16px rgba(0,0,0,.4);text-shadow:0 1px 0 rgba(0,0,0,.45);transition:transform .2s}
.signpost:hover .board,.signpost:focus-visible .board{transform:rotate(0deg) scale(1.05)}

.hint{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);margin:0;z-index:9;pointer-events:none;
  padding:8px 16px 7px;border-radius:999px;font:700 18px/1 "Twiggle Twigs",cursive;color:var(--ink);background:rgba(243,232,207,.92);background-image:var(--felt-noise);
  box-shadow:0 6px 14px rgba(0,0,0,.35);transition:opacity .6s}
.hint.gone{opacity:0}
@media (max-width:600px){.hint{left:14px;transform:none;max-width:calc(100% - 190px);white-space:normal;font-size:19px;line-height:1.05}.signpost{width:120px;height:104px}.signpost .board{width:120px;font-size:20px}}

/* ---------- a place opens like a pop-up book page ---------- */
.page{border:0;padding:0;margin:auto;width:min(1120px,96vw);height:min(780px,94dvh);max-height:none;max-width:none;overflow:visible;background:transparent;color:var(--ink)}
.page::backdrop{background:rgba(14,8,3,.62);backdrop-filter:blur(2px)}
.page[open]{animation:popup .55s steps(9) both}
@keyframes popup{0%{transform:scale(.4) rotate(-6deg);opacity:0}40%{transform:scale(1.04) rotate(1deg);opacity:1}70%{transform:scale(.98) rotate(-.4deg)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.page[open]{animation:none}}
.page-inner{position:absolute;inset:0;overflow:auto;padding:26px 26px 92px;border-radius:30px 38px 26px 42px/36px 28px 40px 30px;
  background:var(--linen);background-image:var(--felt-noise),radial-gradient(120% 90% at 20% 0%,rgba(255,250,235,.7),transparent 60%);
  box-shadow:0 30px 60px rgba(0,0,0,.55),inset 0 0 0 6px rgba(120,90,60,.12)}
.page-inner::before{content:"";position:absolute;inset:12px;border:2.5px dashed rgba(92,70,49,.42);border-radius:22px 30px 20px 34px/28px 22px 32px 24px;pointer-events:none}
.back{position:absolute;left:24px;bottom:20px;display:flex;align-items:center;gap:10px;padding:10px 20px 10px 12px;border:0;border-radius:999px;cursor:pointer;
  font:700 23px/1 "Twiggle Twigs",cursive;color:var(--ink);background:var(--cream);background-image:var(--felt-noise);
  box-shadow:0 4px 0 rgba(60,35,15,.45),0 10px 18px rgba(0,0,0,.35)}   /* cream felt: the twig letters show */
.back-arrow{width:34px;height:34px;border-radius:50%;background:var(--indigo);position:relative;box-shadow:0 2px 0 #1c2d55}
.back-arrow::before{content:"";position:absolute;left:9px;top:10px;border:7px solid transparent;border-right:11px solid #fff8e8;border-left:0}
.back:hover{transform:translateY(-2px)}

/* page parts */
.page h2{font:700 clamp(34px,4.2vw,52px)/1.05 "Twiggle Twigs",cursive;margin:4px 0 4px;color:var(--ink)}
.page .lede{font-style:italic;color:var(--ink2);margin:0 0 14px;max-width:36em}
.scene{position:relative;border-radius:18px;overflow:hidden;box-shadow:0 14px 30px -12px rgba(0,0,0,.55);background:#10161f}
.scene img.bg{width:100%;height:100%;object-fit:cover}
.duo{display:grid;gap:22px;align-items:center}
@media (min-width:860px){.duo{grid-template-columns:1.3fr 1fr}}
.tip{display:inline-block;margin-top:10px;padding:6px 14px 5px;border-radius:999px;background:#fff6df;font:700 19px/1 "Twiggle Twigs",cursive;box-shadow:0 3px 0 rgba(60,35,15,.25)}
.counter{display:flex;gap:8px;margin:12px 0 0}
.counter i{width:26px;height:18px;border-radius:50%;background:#b8ad99;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2)}
.counter i.on{background:radial-gradient(circle at 50% 40%,#fff,#bfe0ff 40%,#6fb0ff);box-shadow:0 0 12px #79b8ff}

/* the film */
.player{position:relative;aspect-ratio:16/9;border-radius:18px;overflow:hidden;background:#000;box-shadow:0 14px 30px -12px rgba(0,0,0,.6)}
.player img{width:100%;height:100%;object-fit:cover}
.player iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* the film's place fills the page like every other place (Vimeo letterboxes the film inside its frame); phones keep 16:9 */
.page-inner.full .sp.player{aspect-ratio:auto;border-radius:inherit;box-shadow:none}
@media (max-aspect-ratio:1/1){.page-inner.full .sp.player{aspect-ratio:16/9;border-radius:30px 38px 0 0}
  .sp .play.mtn{top:68%;gap:6px}.play.mtn .play-disc{width:62px;height:62px}   /* small frame: keep the mountain's eyes clear */
  .play.mtn .play-disc::before{border-width:12px;border-left-width:19px;margin-left:7px}.play.mtn .play-label{font-size:18px}}
.play{position:absolute;left:76%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}
.play-disc{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:var(--cream);background-image:var(--felt-noise);
  box-shadow:0 0 0 8px rgba(140,198,255,.3),0 0 40px 10px rgba(110,180,255,.55);transition:transform .2s}
.play-disc::before{content:"";border:18px solid transparent;border-left:28px solid var(--ink);border-right:0;margin-left:10px}
.play:hover .play-disc,.play:focus-visible .play-disc{transform:scale(1.07)}
.play:focus-visible{outline:none}.play:focus-visible .play-disc{box-shadow:0 0 0 4px #f2a945,0 0 0 8px rgba(242,169,69,.35)}   /* the ring round the disc, not a box */
.play.mtn{left:50%;top:53%}   /* over the waterfall: the mountain's eyes stay clear */
.play-label{padding:6px 14px 5px;border-radius:999px;background:rgba(243,232,207,.95);font:700 19px/1 "Twiggle Twigs",cursive;white-space:nowrap}

/* Lunice's light */
.dark{position:relative;aspect-ratio:16/9;border-radius:18px;overflow:hidden;touch-action:none;cursor:none;background:#05070d}
.dark img.bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.dark .night{position:absolute;inset:0;background:rgba(3,5,12,.94);
  -webkit-mask:radial-gradient(circle calc(var(--lr,110px)) at var(--lx,-200px) var(--ly,-200px),transparent 0,transparent 45%,#000 100%);
          mask:radial-gradient(circle calc(var(--lr,110px)) at var(--lx,-200px) var(--ly,-200px),transparent 0,transparent 45%,#000 100%)}
.dark .light{position:absolute;left:var(--lx,-200px);top:var(--ly,-200px);width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,#fff0f6,#ffaacc 45%,rgba(255,150,190,0) 72%);mix-blend-mode:screen}
.glimmer{position:absolute;width:44px;height:30px;margin:-15px 0 0 -22px;border-radius:50%;opacity:0;transition:opacity .4s;
  background:radial-gradient(circle,#fff,#cfe8ff 30%,rgba(120,180,255,.7) 55%,rgba(120,180,255,0) 75%);mix-blend-mode:screen}
.glimmer.found{opacity:1;animation:pulse 1.4s steps(7) infinite}
@keyframes pulse{50%{transform:scale(1.25)}}

/* the bell, the lanterns, the pebbles */
.stage-card{position:relative;border-radius:18px;overflow:hidden;min-height:420px;display:grid;place-items:end center;padding:20px}
.meadow{background:linear-gradient(#cfe0c4,#a9c08a 60%,#7f9a5c);background-image:var(--felt-noise),linear-gradient(#d8e6cb,#a9c08a 62%,#7f9a5c)}
.twilight{background:linear-gradient(#17223b,#2a3550 55%,#3b3a3c);background-image:var(--felt-noise),linear-gradient(#141e36,#28324c 55%,#3a3637)}
.nook{background:linear-gradient(#3d2c20,#5a412d 60%,#3a281b);background-image:var(--felt-noise),radial-gradient(80% 70% at 50% 40%,#6c5038,#2c1e14)}
.big{height:min(380px,48dvh);width:auto;filter:drop-shadow(0 10px 10px rgba(0,0,0,.45));transform-origin:50% 100%}
.wobble{animation:wobble .6s steps(6) 1}
@keyframes wobble{25%{rotate:-4deg}50%{rotate:3deg}75%{rotate:-2deg}}
.hop{animation:hello .7s steps(8) 1}
.bellbtn{position:absolute;width:70px;height:70px;border-radius:50%;border:0;background:transparent;cursor:pointer}
.spark{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;pointer-events:none;border-radius:50%;background:radial-gradient(circle,#fff,#ffe9a8 40%,rgba(255,220,120,0) 70%);animation:spark .9s steps(9) forwards}
@keyframes spark{to{transform:translate(var(--dx),var(--dy)) scale(.3);opacity:0}}
.lantern{position:absolute;width:42px;height:52px;border:0;padding:0;cursor:pointer;background:none}
.lantern::before{content:"";position:absolute;left:12px;top:10px;width:18px;height:26px;border-radius:5px 5px 8px 8px;background:#4a3a2a;box-shadow:inset 0 0 0 3px #2a1f15}
.lantern::after{content:"";position:absolute;left:-10px;top:-6px;width:62px;height:62px;border-radius:50%;opacity:0;background:radial-gradient(circle,rgba(255,224,150,.95),rgba(242,169,69,.5) 35%,rgba(242,169,69,0) 70%);mix-blend-mode:screen;transition:opacity .25s}
.lantern.lit::before{background:#ffd27a;box-shadow:inset 0 0 0 3px #7a5a2a}
.lantern.lit::after{opacity:1;animation:flicker 2.4s steps(1) infinite}
.twins{display:flex;gap:30px;align-items:flex-end;justify-content:center}
.twins button{border:0;background:none;padding:0;cursor:pointer}
.pebbles{display:flex;gap:14px;justify-content:center;margin-top:16px;flex-wrap:wrap}
.pebble{width:54px;height:40px;border-radius:50% 46% 52% 48%/56% 52% 48% 44%;border:0;cursor:pointer;background:radial-gradient(circle at 40% 35%,#c9c2b4,#8f8778 60%,#6b6457);box-shadow:inset 0 -4px 0 rgba(0,0,0,.18),0 4px 6px rgba(0,0,0,.3);transition:box-shadow .3s,background .3s}
.pebble.glow1{background:radial-gradient(circle at 40% 35%,#fff,#bfe0ff 40%,#5b9ff0);box-shadow:0 0 18px #7ab8ff}
.pebble.glow2{background:radial-gradient(circle at 40% 35%,#fff,#ffd9a0 40%,#e89a3c);box-shadow:0 0 18px #ffbf6a}
.pebble.glow3{background:radial-gradient(circle at 40% 35%,#fff,#ffc4dd 40%,#e778a8);box-shadow:0 0 18px #ff9ac4}
.pebble.glow4{background:radial-gradient(circle at 40% 35%,#fff,#c7f5c9 40%,#5fbf74);box-shadow:0 0 18px #86e09a}
.lineup{display:flex;align-items:flex-end;justify-content:center;gap:clamp(4px,2vw,26px);flex-wrap:wrap;padding:20px 0}
.lineup button{border:0;background:none;padding:0;cursor:pointer;text-align:center;font:700 19px/1 "Twiggle Twigs",cursive;color:var(--ink)}
.lineup img{height:calc(var(--h)*1px);width:auto;margin:0 auto 6px;filter:drop-shadow(0 6px 6px rgba(0,0,0,.35));transform-origin:50% 100%}
.lineup button:hover img,.lineup button:focus-visible img{animation:hello .7s steps(8) 1}
/* the Episodes page: every episode, newest first, each one tap from playing */
.watch{max-width:1040px;margin:0 auto}
.eps{display:grid;gap:26px;margin-top:8px}
@media (min-width:860px){.eps{grid-template-columns:1.75fr 1fr;align-items:start}}
.ep h3{font:700 clamp(20px,1.9vw,25px)/1.15 "Twiggle Twigs","Twiggle Reader",system-ui,sans-serif;margin:14px 0 2px;color:#5a3418}
.ep .meta{font-style:italic;color:var(--ink2);margin:0 0 6px}
.ep p{margin:0 0 8px;max-width:38em}
.play.ctr{left:50%;top:50%}
.soon-card{position:relative;aspect-ratio:16/9;border-radius:18px;display:grid;place-items:center;background:#34503a;background-image:var(--felt-noise);
  box-shadow:inset 0 0 0 6px rgba(0,0,0,.12),0 14px 30px -12px rgba(0,0,0,.5)}
.soon-card::before{content:"";position:absolute;inset:10px;border:2.5px dashed rgba(255,248,232,.45);border-radius:12px}
.soon-card span{font:700 clamp(24px,2.6vw,31px)/1 "Twiggle Twigs",cursive;color:#fff2d6;text-shadow:0 2px 6px rgba(0,0,0,.4)}
.grown{max-width:44em}
.grown h3{font:700 22px/1.25 "Twiggle Reader",system-ui,sans-serif;margin:22px 0 6px}
.grown p{margin:0 0 10px}
.credit{margin:12px 0 4px;padding:14px 18px;border:1px solid #c9b48f;border-radius:10px;background:#fbf5e8;font-style:italic}
.credit .k{display:block;font-style:normal;font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:#8a5a1f;margin-bottom:4px}
.aurora-scene .sky{position:absolute;inset:0 0 45% 0;pointer-events:none;mix-blend-mode:screen;opacity:.7;filter:blur(8px);
  background:linear-gradient(100deg,transparent 15%,rgba(90,255,190,.6) 35%,rgba(110,190,255,.4) 50%,transparent 65%),linear-gradient(80deg,transparent 30%,rgba(150,255,170,.5) 52%,transparent 72%);
  background-size:220% 100%,180% 100%;animation:sway 10s steps(40) infinite alternate}
.aurora-scene.bloom .sky{opacity:1;filter:blur(4px)}
.refrain{font:700 clamp(24px,2.7vw,32px)/1.2 "Twiggle Twigs",cursive;color:#e8f4ff;text-shadow:0 2px 10px rgba(0,0,0,.6);position:absolute;left:24px;right:24px;bottom:20px;margin:0}

/* ---------- full-bleed scene pages: the place opens onto a frame of the film ---------- */
.page-inner.full{padding:0;overflow:hidden}
.page-inner.full::before{z-index:3}
.sp{position:absolute;inset:0;border-radius:inherit;overflow:hidden;background:#0b0f18}
.sp>picture,.sp>picture img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sp .dim{position:absolute;inset:0;background:rgba(2,4,12,.62);transition:opacity 1.2s;pointer-events:none}
/* a slim felt banner across the top-left: the title and one line, so the picture's touch spots stay clear */
.copy{position:absolute;left:22px;top:20px;z-index:4;max-width:min(700px,64%);padding:10px 18px 11px;border-radius:14px 20px 12px 18px;
  display:flex;flex-wrap:wrap;align-items:center;gap:2px 14px;
  background:rgba(243,232,207,.94);background-image:var(--felt-noise);box-shadow:0 10px 22px rgba(0,0,0,.4)}
.copy::before{content:"";position:absolute;inset:5px;border:2px dashed rgba(92,70,49,.45);border-radius:10px 15px 9px 14px;pointer-events:none}
.copy h2{font-size:clamp(30px,2.9vw,42px);margin:0}
/* the film's own page: the poster's mountain looks out from the top left, so its banner sits top right, narrower */
@media (min-aspect-ratio:1/1){.sp.player + .copy{left:auto;right:22px;max-width:min(420px,35%)}}
.copy p{flex-basis:100%;margin:0;font-size:16px;line-height:1.4;color:var(--ink2)}
.copy .tip{margin-top:4px;font-size:20px;padding:4px 12px 3px}
.copy .counter{margin:4px 0 0}
.hot{position:absolute;width:74px;height:74px;margin:-37px 0 0 -37px;border:0;border-radius:50%;background:transparent;cursor:pointer;z-index:2}
.hot::before{content:"";position:absolute;inset:16px;border-radius:50%;border:2.5px solid rgba(255,250,235,.85);box-shadow:0 0 12px rgba(255,240,200,.8);animation:invite 1.8s steps(9) infinite}
.hot.done::before{opacity:0;animation:none}
@keyframes invite{0%{transform:scale(.7);opacity:.95}70%{transform:scale(1.25);opacity:0}100%{opacity:0}}
.hot::after{content:"";position:absolute;left:50%;top:50%;width:var(--g,150px);height:var(--g,150px);margin:calc(var(--g,150px)/-2) 0 0 calc(var(--g,150px)/-2);border-radius:50%;opacity:0;pointer-events:none;mix-blend-mode:screen;transition:opacity .25s}
.hot.warm::after{background:radial-gradient(circle,rgba(255,232,170,.95),rgba(242,169,69,.55) 30%,rgba(242,169,69,0) 68%)}
.hot.blue::after{background:radial-gradient(circle,rgba(235,248,255,.95),rgba(120,185,255,.6) 30%,rgba(120,185,255,0) 68%)}
.hot.pink::after{background:radial-gradient(circle,rgba(255,236,244,.95),rgba(255,150,195,.6) 30%,rgba(255,150,195,0) 68%)}
.hot.friend::before{inset:22px;border-style:dashed;border-color:rgba(255,250,235,.7)}
.hot.friend::after{background:radial-gradient(circle,rgba(255,250,235,.9),rgba(255,230,190,.45) 32%,rgba(255,230,190,0) 68%)}
.hot.on::after{opacity:1;animation:flicker 2.4s steps(1) infinite}
/* a friend's words, as they say them (the film's own lines) */
.say-bubble{position:absolute;z-index:6;transform:translate(-50%,-100%);max-width:min(340px,70vw);padding:10px 16px 12px;border-radius:18px;
  background:var(--linen,#f6eedc);color:var(--ink,#2b2118);font:700 clamp(19px,1.9vw,24px)/1.2 "Twiggle Twigs",cursive;text-align:center;
  box-shadow:0 6px 18px rgba(20,10,0,.45);pointer-events:none;transform-origin:50% 100%;animation:saypop .35s steps(5)}
@keyframes saypop{0%{transform:translate(-50%,-100%) scale(.4);opacity:0}100%{transform:translate(-50%,-100%) scale(1);opacity:1}}
.say-bubble::after{content:"";position:absolute;left:50%;bottom:-10px;margin-left:-10px;border:10px solid transparent;border-bottom:0;border-top-color:var(--linen,#f6eedc)}
.say-bubble.go{transition:opacity .5s;opacity:0}
/* paper (labels.css: Matt's torn parchment scraps; "Texture is everything"). The frame holds the torn edge, so
   the felt stitch, the pin and the pill shapes go, and a soft shadow lifts the paper off the map. */
.place.paper{padding:calc(var(--u)*1.6) calc(var(--u)*3) calc(var(--u)*1.2);border-radius:0;filter:drop-shadow(0 calc(var(--u)*2) calc(var(--u)*2.5) rgba(30,15,5,.5))}
.place.paper::before,.place.paper::after{display:none}
.place.paper.here{filter:drop-shadow(0 calc(var(--u)*2) calc(var(--u)*2.5) rgba(30,15,5,.5)) drop-shadow(0 0 calc(var(--u)*7) rgba(255,226,150,.95))}
/* paper scraps: labels.css gives the torn frames, paper.js paints them seam-free on a canvas (see its header).
   A paper tag LIFTS off the map when pointed at: it rises and its shadow deepens. It no longer grows, which would soften
   the painted scrap and its picture letters. */
.place.paper{transition:translate .2s ease,filter .2s ease}
.place.paper:hover,.place.paper:focus-visible{transform:translate(-50%,-50%) rotate(var(--rot,-2deg));translate:0 calc(var(--u)*-4);
  filter:drop-shadow(0 calc(var(--u)*5) calc(var(--u)*4) rgba(30,15,5,.55))}
.place.paper.here:hover,.place.paper.here:focus-visible{filter:drop-shadow(0 calc(var(--u)*5) calc(var(--u)*4) rgba(30,15,5,.55)) drop-shadow(0 0 calc(var(--u)*7) rgba(255,226,150,.95))}
.copy.paperbox{padding:0 4px 0 2px;border-radius:0;filter:drop-shadow(0 8px 14px rgba(0,0,0,.45))}
.copy.paperbox::before{display:none}
/* the notes sit a little askew, like the place tags: hand-placed scraps */
/* the parchment hint is bigger than the old pill: centred, its curl overlapped the Granite & Basalt's Nooks tag, so it
   sits at the bottom left on every screen, clear of the labels (23 Nov) */
.hint.papernote{left:22px;padding:0 2px;border-radius:0;transform:rotate(-1deg);filter:drop-shadow(0 5px 10px rgba(0,0,0,.4))}
.say-bubble.papernote{padding:0 2px;border-radius:0;transform:translate(-50%,-100%) rotate(-1.5deg);animation-name:saypaper;filter:drop-shadow(0 6px 12px rgba(20,10,0,.45))}
@media (max-width:600px){.hint.papernote{left:14px}}
@keyframes saypaper{0%{transform:translate(-50%,-100%) rotate(-1.5deg) scale(.4);opacity:0}100%{transform:translate(-50%,-100%) rotate(-1.5deg) scale(1);opacity:1}}
.say-bubble.papernote::after{display:none}
/* every word on a scrap of the same paper (Matt, 23 Nov: "Just have the texture organic mindset for every aspect
   please"). Watch and Back sit on paper with their button sewn on at the left; the play labels, the satchel's tip, the
   credit line, the refrain, the found-stone words and the friends' names likewise. The tips are ink on the banner. */
.watch-btn{height:auto;padding:0;gap:0;background:none;box-shadow:none}
.watch-btn::before{display:none}
.watch-disc,.back-arrow{position:relative;z-index:1;flex:none;margin-right:-9px}
.watch-word.paper{padding:0 2px 0 6px;transform:rotate(-1.5deg);filter:drop-shadow(0 4px 7px rgba(10,5,0,.45))}
.back{padding:0;gap:0;background:none;box-shadow:none}
.back-word.paper{padding:0 2px 0 6px;transform:rotate(1deg);filter:drop-shadow(0 5px 9px rgba(0,0,0,.45))}
.play-label.paper{padding:0 2px;border-radius:0;transform:rotate(-1.5deg);filter:drop-shadow(0 5px 9px rgba(0,0,0,.45))}
.tip,.copy .tip{padding:0;border-radius:0;background:none;box-shadow:none;color:#8a3d12}
.tip::before{content:"\2726\00a0"}
.satchel-tip.paper{padding:0 2px;border-radius:0;filter:drop-shadow(0 5px 9px rgba(0,0,0,.35))}
.credit.paper{padding:0 6px 2px;border-radius:0}
.refrain.paper{color:var(--ink);text-shadow:none;padding:0 6px;font-size:clamp(15px,1.5vw,22px);transform:rotate(-1deg);filter:drop-shadow(0 8px 14px rgba(0,0,0,.5))}
.sp .aurora-scene .refrain.paper{max-width:none;white-space:nowrap;bottom:84px;right:20px}   /* each line of the verse whole */
/* phones: the frame is too small to carry the verse, so it sits on the page under the banner instead */
.refrain-flow{display:none}
@media (max-aspect-ratio:1/1){.sp .aurora-scene .refrain{display:none}
  .refrain.refrain-flow{display:block;position:relative;left:auto;right:auto;bottom:auto;margin:4px 18px 0;font-size:17px;white-space:normal;text-align:left}
  .refrain-flow br{display:none}}   /* one flowing sentence on a narrow screen: no line left with one word */
.found-stone .say.paper{color:var(--ink);text-shadow:none;padding:0 4px;filter:drop-shadow(0 8px 14px rgba(0,0,0,.5))}
.visit .who.paper{display:inline-block;color:var(--ink);text-shadow:none;padding:0 2px;transform:rotate(-2deg)}
.visit button:nth-child(2n) .who.paper{transform:rotate(1.5deg)}
@media (max-width:600px){.watch-btn{height:auto}.watch-word.paper{font-size:23px}}
@media (prefers-reduced-motion:reduce){.say-bubble{animation:none}}
.hot.flash::after{opacity:1;animation:none;transition:opacity .9s}
.puff{position:absolute;width:46px;height:30px;margin:-15px 0 0 -23px;border-radius:50%;pointer-events:none;background:radial-gradient(closest-side,rgba(255,255,255,.85),rgba(255,255,255,0));animation:puff 1.6s steps(12) forwards;z-index:2}
@keyframes puff{to{transform:translate(18px,-60px) scale(2.2);opacity:0}}
.visit{position:absolute;left:0;right:0;bottom:16px;z-index:4;display:flex;justify-content:center;align-items:flex-end;gap:clamp(6px,1.6vw,22px);padding:0 120px 0 200px}
.visit button{border:0;background:none;padding:0;cursor:pointer;text-align:center;font:700 17px/1 "Twiggle Twigs",cursive;color:#fff8e8;text-shadow:0 2px 4px rgba(0,0,0,.8)}
.visit img{height:calc(var(--h)*1px);width:auto;margin:0 auto 4px;filter:drop-shadow(0 6px 6px rgba(0,0,0,.5));transform-origin:50% 100%}
.visit button:hover img,.visit button:focus-visible img{animation:hello .7s steps(8) 1}
.sp .player-wrap{position:absolute;inset:auto 4% 7% 4%;top:auto}
.sp .dark{position:absolute;inset:0;border-radius:0;aspect-ratio:auto}
.sp .aurora-scene{position:absolute;inset:0;border-radius:0;cursor:pointer}
.sp .aurora-scene img,.sp .dark img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sp .aurora-scene .refrain{bottom:88px;text-align:right;left:auto;max-width:70%}
@media (max-aspect-ratio:1/1){.sp .aurora-scene .refrain{bottom:14px;left:14px;right:14px;max-width:none;font-size:21px;text-align:left}}
.back{z-index:6}
.page-inner.playing .copy{display:none}
.sp .play{z-index:3}
/* ---------- Twiggle's satchel: the memory stones found so far ---------- */
.satchel{position:relative;display:flex;align-items:center;gap:9px;margin-top:6px;padding:8px 14px 8px 10px;border:0;cursor:pointer;color:#fff2dc;
  border-radius:16px 22px 14px 20px;background:linear-gradient(#8b5b36,#6a4127);background-image:var(--felt-noise),linear-gradient(#8b5b36,#6a4127);
  box-shadow:inset 0 0 0 2px rgba(40,20,8,.35),0 4px 0 rgba(40,20,8,.45),0 10px 18px rgba(0,0,0,.4)}
.satchel::before{content:"";position:absolute;inset:4px;border:1.6px dashed rgba(255,230,190,.45);border-radius:12px 18px 10px 16px;pointer-events:none}
.satchel .bag{width:30px;height:26px;border-radius:5px 5px 11px 11px;background:#5a361f;box-shadow:inset 0 9px 0 #7a4c2c,inset 0 0 0 2px #3c2312;position:relative}
.satchel .bag::after{content:"";position:absolute;left:11px;top:6px;width:8px;height:8px;border-radius:50%;background:#d9b37a}
.satchel .slots{display:flex;gap:5px}
.satchel .slots i{width:15px;height:11px;border-radius:50%;background:rgba(0,0,0,.35);box-shadow:inset 0 1px 2px rgba(0,0,0,.55)}
.satchel .slots i.on{background:radial-gradient(circle at 45% 40%,#fff,#c7e4ff 40%,#5ea6f5);box-shadow:0 0 9px #7ab8ff}
.satchel-tip{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;padding:6px 12px 5px;border-radius:999px;
  background:rgba(243,232,207,.97);font:700 16px/1 "Twiggle Twigs",cursive;color:var(--ink);opacity:0;pointer-events:none;transition:opacity .3s;box-shadow:0 6px 12px rgba(0,0,0,.3)}
.satchel.open .satchel-tip,.satchel:hover .satchel-tip,.satchel:focus-visible .satchel-tip{opacity:1}
.satchel.bump{animation:bump .6s steps(6) 1}
@keyframes bump{30%{transform:scale(1.15)}60%{transform:scale(.95)}}
@media (max-width:600px){.satchel{padding:7px 9px}.satchel .bag{display:none}.satchel .slots{gap:3px}.satchel .slots i{width:11px;height:9px}}
.found-stone{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:8;display:flex;flex-direction:column;align-items:center;gap:14px;pointer-events:none;animation:pop .5s steps(6)}
.found-stone .orb{width:110px;height:82px;border-radius:50%;background:radial-gradient(circle at 45% 40%,#fff,#d8ecff 30%,#78b6ff 60%,rgba(120,182,255,0) 72%);box-shadow:0 0 50px 18px rgba(120,182,255,.6)}
.found-stone .say{font:700 clamp(24px,2.6vw,32px)/1 "Twiggle Twigs",cursive;color:#fff8e8;text-shadow:0 2px 10px rgba(0,0,0,.85);white-space:nowrap}
.found-stone.fly{transition:transform .8s ease-in,opacity .8s;transform:translate(-50%,-50%) translateY(-55vh) scale(.2);opacity:0}
@keyframes pop{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}100%{transform:translate(-50%,-50%) scale(1);opacity:1}}
/* when all eight are found: the mountain remembers (his eyes glow, the lights burn bright) */
.eye{width:calc(var(--u)*var(--r,30));height:calc(var(--u)*var(--r,30));margin:calc(var(--u)*var(--r,30)/-2) 0 0 calc(var(--u)*var(--r,30)/-2);border-radius:50%;opacity:0;
  background:radial-gradient(circle,rgba(255,236,170,1) 0,rgba(255,170,60,.7) 35%,rgba(255,170,60,0) 70%);mix-blend-mode:screen;transition:opacity 1.2s}
.map.remembers .eye{opacity:1;animation:flicker 1.6s steps(1) infinite}
.map.remembers .glow{animation-duration:.9s}
@media (prefers-reduced-motion:reduce){.map.remembers .eye{animation:none}.satchel.bump{animation:none}.found-stone{animation:none}}

/* the moon corner's mushrooms glow blue, not amber */
.glow.blue{background:radial-gradient(circle,rgba(225,245,255,.95) 0,rgba(130,195,255,.55) 32%,rgba(130,195,255,0) 70%);animation-duration:3.4s}
/* a phone held upright: the frame on top at its own shape, the words below on felt */
@media (max-aspect-ratio:1/1){
  .page-inner.full{overflow:auto;padding:0 0 92px}
  .sp{position:relative;inset:auto;aspect-ratio:16/9;border-radius:30px 38px 0 0}
  .copy{position:relative;left:auto;top:auto;max-width:none;margin:16px;background:transparent;box-shadow:none;padding:4px 6px}
  .copy::before{display:none}
  .visit{position:relative;bottom:auto;padding:6px 10px;flex-wrap:wrap}
  .visit button{color:var(--ink);text-shadow:none}
  .hot{width:56px;height:56px;margin:-28px 0 0 -28px}
}

@media (prefers-reduced-motion:reduce){
  .glow,.firefly,.waterfall,.aurora,.person img,.place.beckon,.sound svg,.glimmer.found,.lantern.lit::after,.aurora-scene .sky,.hot::before,.hot.on::after{animation:none!important}
  .stone{transition:none}
}

/* the picture letters (twig.js): each glyph its own 3D twig from Matt's ChatGPT sheets, set like text; the words stay
   real text for screen readers. Used where lettering is big enough to show the twig. */
.twig-word,.nw{display:inline-block;white-space:nowrap}
/* phones: the top bar is two rows: the title with the satchel under it on the left, Watch and the bell side by side on
   the right (a column of the two covered the moon's label) */
@media (max-width:600px){
  .top{display:grid;grid-template-columns:auto 1fr auto;align-items:start;row-gap:6px}
  .brand{grid-column:1;grid-row:1;width:132px}
  .satchel{grid-column:1;grid-row:2;justify-self:start;margin-top:0}
  .tools{grid-column:3;grid-row:1;flex-direction:row;align-items:center;gap:8px}
  .sound{width:46px;height:46px}.sound svg{width:24px;height:24px}
}
.twig-pic img{display:inline-block;height:var(--twig-h,1.033em);vertical-align:var(--twig-v,-.234em)}   /* (the page's img{display:block} would stack them) */

/* ---------- real materials everywhere (Matt, 23 Nov: "Just have the texture organic mindset for every aspect please") ----------
   The breakout screens open on one big sheet of Twiggle's map paper (his H1: labels.css frames it, paper.js paints it);
   the controls are his H2 props (tools-build-props.py): wooden buttons for actions, Moss Goat's bell for the sound, a
   wooden signpost, a felt patch, Twiggle's leather strap and the memory stones. */
.page.paper{filter:drop-shadow(0 24px 30px rgba(0,0,0,.55))}
.page.paper .page-inner{border-radius:0;background:none;box-shadow:none;scrollbar-width:thin;scrollbar-color:rgba(110,74,44,.55) transparent}
.page.paper .page-inner::before{display:none}
.page.paper .page-inner:focus-visible{outline:2px dashed rgba(138,61,18,.5);outline-offset:-10px}   /* a pencil line, still plain to keyboard users */
.page.paper .sp,.page.paper .page-inner.full .sp.player{border-radius:0;box-shadow:0 0 0 1px rgba(70,45,20,.35),0 4px 12px rgba(40,25,10,.4)}
.page.paper .ep .player{border-radius:0;transform:rotate(-.6deg)}
.page.paper .back{left:12px;bottom:10px}

/* wooden buttons: Watch, Play and Back */
.watch-disc,.back-arrow,.play-disc{border-radius:50%;box-shadow:none;background:url(/assets/img/props/button-play.webp) center/contain no-repeat}
.watch-disc::before,.back-arrow::before,.play-disc::before{display:none}
.back-arrow{background-image:url(/assets/img/props/button-back.webp)}
.watch-disc{width:52px;height:52px;filter:drop-shadow(0 3px 4px rgba(20,10,0,.55))}
.back-arrow{width:46px;height:46px;filter:drop-shadow(0 3px 4px rgba(20,10,0,.55))}
.play-disc{filter:drop-shadow(0 0 16px rgba(110,180,255,.9)) drop-shadow(0 6px 8px rgba(0,0,0,.5))}
.play:focus-visible .play-disc{box-shadow:0 0 0 4px #f2a945}
@media (max-width:600px){.watch-disc{width:42px;height:42px}}

/* the sound switch: Moss Goat's bell, in its knitted cosy while the sound is off, with "Sound" on a scrap beside it (Matt,
   23 Nov: "the bell is a touch of genius, but I think you need to say "Sound" next to it otherwise kids might not twig
   on to that"). While the sound is off the bell sways now and then; rung, it swings from its loop. */
.sound{display:flex;align-items:center;width:auto;height:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none;cursor:pointer}
.sound::before{display:none}
.sound-bell{position:relative;z-index:1;flex:none;display:block;width:48px;height:82px;margin-right:-8px;
  background:url(/assets/img/props/bell-cosy.webp) center top/contain no-repeat;
  filter:drop-shadow(0 4px 5px rgba(20,10,0,.6)) drop-shadow(0 0 10px rgba(255,236,190,.55));transform-origin:50% 4%;
  animation:nudge 7s steps(14) 3s infinite}
.sound[aria-pressed="true"] .sound-bell{background-image:url(/assets/img/props/bell.webp);animation:ring .6s steps(6) 1}
.sound-word.paper{padding:0 2px 0 6px;font:700 27px/1 "Twiggle Twigs",cursive;color:var(--ink);transform:rotate(1.5deg);filter:drop-shadow(0 4px 7px rgba(10,5,0,.45))}
.sound:hover,.sound:focus-visible{translate:0 -2px}
@keyframes nudge{0%,88%,100%{rotate:0deg}91%{rotate:7deg}94%{rotate:-5deg}97%{rotate:3deg}}
@media (prefers-reduced-motion:reduce){.sound-bell,.sound[aria-pressed="true"] .sound-bell{animation:none}}
/* phones: no room for Sound beside Watch, so the bell and its word take the row under the title, beside the strap
   (clear of the moon's label at the top right) */
@media (max-width:600px){
  .tools{display:contents}
  #watchBtn{grid-column:3;grid-row:1}
  #soundBtn{grid-column:2/4;grid-row:2;justify-self:start;align-self:start;margin:-6px 0 0 4px}
  .sound-bell{width:30px;height:50px;margin-right:-6px}
  .sound-word.paper{font-size:17px}
}

/* the hunt, said plainly (Matt, 23 Nov: "we need to let the kids know they need to collect the memory stones"): the strap's
   words show from the start until the first stone is found, then the count shows each time a child comes back with one */
.satchel.first .satchel-tip,.satchel.told .satchel-tip{opacity:1}
.satchel-tip.paper{left:0;transform:rotate(-1deg);white-space:normal;width:max-content;max-width:min(340px,28vw);text-wrap:balance}   /* hangs from the strap's left end, clear of the moon's label; wraps before it reaches Watch */
/* phones: below the bell row, on a slimmer scrap (paper-5's slices at a smaller scale) */
@media (max-width:600px){.satchel-tip.paper{top:calc(100% + 34px);white-space:normal;width:max-content;max-width:240px;font-size:15px}
  .satchel-tip.papersmall.paper-5{border-width:12.4px 32.6px 6.7px 13.5px}}

/* For grown-ups: a wooden signpost; the words sit on its board between the two nails */
.signpost{width:150px;height:auto;aspect-ratio:351/398;background:url(/assets/img/props/signpost.webp) center/contain no-repeat;
  filter:drop-shadow(0 6px 8px rgba(0,0,0,.5));transition:translate .2s}
.signpost .post{display:none}
.signpost .board{left:3%;top:26.5%;width:94%;padding:0;background:none;box-shadow:none;border-radius:0;transform:none;font-size:19px;line-height:1;white-space:nowrap}
.signpost:hover,.signpost:focus-visible{translate:0 -3px}
.signpost:hover .board,.signpost:focus-visible .board{transform:none}
@media (max-width:600px){.signpost{width:122px}.signpost .board{font-size:16px}}

/* Episode 2's "Coming soon": a patch of moss-green felt with its blanket stitch (labels.css .felt-1, painted by paper.js) */
.soon-card.paper{border-radius:0;box-shadow:none;filter:drop-shadow(0 10px 14px rgba(0,0,0,.4))}
.soon-card.paper::before{display:none}

/* Twiggle's leather strap: a memory stone glows in a pocket for every place's stone found (pocket centres measured on
   the strap, 23 Nov) */
.satchel{display:block;width:clamp(168px,16vw,224px);height:auto;aspect-ratio:1000/131;padding:0;margin-top:4px;border-radius:0;
  background:url(/assets/img/props/strap.webp) center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 4px 6px rgba(20,10,0,.55))}
.satchel::before,.satchel .bag{display:none}
.satchel::after{content:"";position:absolute;inset:-10px -4px}   /* a bigger target for small fingers */
.satchel .slots{position:absolute;inset:0;display:block}
.satchel .slots i{position:absolute;top:45%;width:7%;height:auto;aspect-ratio:240/174;transform:translate(-50%,-50%);border-radius:0;background:none;box-shadow:none}
.satchel .slots i.on{background:url(/assets/img/props/stone.webp) center/contain no-repeat;filter:drop-shadow(0 0 3px #8cc6ff) drop-shadow(0 0 7px rgba(120,182,255,.75))}
.satchel .slots i:nth-child(1){left:10.1%}.satchel .slots i:nth-child(2){left:21.9%}.satchel .slots i:nth-child(3){left:33.4%}.satchel .slots i:nth-child(4){left:45.2%}
.satchel .slots i:nth-child(5){left:56.4%}.satchel .slots i:nth-child(6){left:67.7%}.satchel .slots i:nth-child(7){left:78.7%}.satchel .slots i:nth-child(8){left:90.3%}
@media (max-width:600px){.satchel{width:150px;padding:0}}

/* the counters: pebbles; the moon's turn into memory stones, the grove's warm in the lantern light */
.counter i,.counter i.on{width:30px;height:22px;border-radius:0;box-shadow:none;background:url(/assets/img/props/pebble.webp) center/contain no-repeat}
#counter i.on{background-image:url(/assets/img/props/stone.webp);filter:drop-shadow(0 0 4px #8cc6ff) drop-shadow(0 0 9px rgba(120,182,255,.7))}
#lcount i.on{filter:sepia(.9) saturate(3) brightness(1.25) drop-shadow(0 0 6px #ffbf6a) drop-shadow(0 0 12px rgba(255,191,106,.6))}

/* "You found a memory stone!": the stone itself, glowing */
.found-stone .orb{width:120px;height:87px;border-radius:0;box-shadow:none;background:url(/assets/img/props/stone.webp) center/contain no-repeat;
  filter:drop-shadow(0 0 14px rgba(140,198,255,.95)) drop-shadow(0 0 34px rgba(120,182,255,.7))}

/* ---------- tablets and phones, looked at in Safari's engine and Firefox (23 Nov 2026) ----------
   The desktop look is as Matt approved it; what moved is only what covered a face, a name or a line of words. */
@media (min-aspect-ratio:1/1){
  .copy.at-right{left:auto;right:22px;max-width:min(520px,44%)}             /* Aurora Ridge: over the sky; it covered Birtreecher's face */
  .copy.at-mid{left:33%;top:8px;max-width:64%}                              /* the grove: it covered Birtreecher's face and the first lantern to light */
  .copy.at-mid h2{font-size:clamp(25px,2.3vw,34px)}
  .copy.at-foot{left:max(28.5%,288px);top:auto;bottom:12px;max-width:min(37%,380px)}              /* the nooks: on the rock; it covered Moss Goat's and Lunice's eyes */
  .copy.at-foot h2{font-size:clamp(20px,1.75vw,25px)}
  .sp .aurora-scene .refrain.paper{bottom:14px}                             /* the verse lies on the rocks, off Granite and Basalt */
  .visit{padding:0 14px 0 290px;gap:clamp(2px,1.4vw,20px)}                  /* the friends stand clear of the Back button; it covered Twiggle's name */
}
@media (max-aspect-ratio:1/1){                                              /* upright: the friends stand on the paper below the picture, all six in view */
  .visit{position:relative;left:auto;right:auto;bottom:auto;padding:6px 14px 0;flex-wrap:wrap;gap:8px 12px}
  .page[data-place="village"]{height:min(900px,94dvh)}
}
/* the scrolling pages (Watch, For grown-ups): the words fade out above the Back button and never run under it */
.page.paper .page-inner:not(.full){bottom:62px;padding-bottom:34px;
  -webkit-mask:linear-gradient(#000 calc(100% - 38px),transparent);mask:linear-gradient(#000 calc(100% - 38px),transparent)}
@media (max-aspect-ratio:1/1){.page.paper .page-inner.full{bottom:62px;padding-bottom:30px;
  -webkit-mask:linear-gradient(#000 calc(100% - 38px),transparent);mask:linear-gradient(#000 calc(100% - 38px),transparent)}}   /* upright, the places scroll too */
/* a short wide screen (an iPad on its side): a smaller poster, so the title and the story under it show */
@media (min-aspect-ratio:1/1) and (max-height:800px){.eps{grid-template-columns:1.4fr 1fr}}
/* an iPad held upright: the hunt's words hang further left, off the Watch button */
@media (min-width:601px) and (max-width:900px){.satchel-tip.paper{left:-32px}}
/* a small iPad on its side: a smaller title and a narrower scrap leave room between them for Lunice's label */
@media (min-width:901px) and (max-width:1100px) and (min-height:561px){.brand img{width:165px;height:auto}.satchel-tip.paper{max-width:230px}.hint.papernote{font-size:18px}
  .copy.at-mid{left:32%;max-width:67%}.copy.at-mid p{font-size:14.5px}}
/* the pictures clip and can never be scrolled: pressing Tab onto a light near the edge had shifted one (hidden still scrolls) */
.sp,.sp .dark,.sp .aurora-scene{overflow:hidden;overflow:clip}

/* a phone held sideways (and any other short wide window): smaller props round the map, and in the places the picture stands
   whole at the left with its words on the paper beside it */
@media (max-height:560px) and (min-aspect-ratio:1/1){
  .brand img{width:132px;height:auto}
  .watch-disc{width:36px;height:36px}.watch-word.paper,.sound-word.paper{font-size:18px}.sound-bell{width:28px;height:48px;margin-right:-6px}
  .satchel{width:132px}.satchel-tip.paper{font-size:13px;max-width:200px}
  .signpost{width:92px}.signpost .board{font-size:12px}
  .hint.papernote{font-size:13.5px;bottom:max(6px,env(safe-area-inset-bottom))}
  .page{width:min(1120px,98vw);height:96dvh}
  .page.papersheet.paper-sheet{border-width:23.3px 27.2px 20.3px 27.2px}
  .page-inner.full{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 1fr;gap:0 10px;overflow:hidden}
  .page-inner.full .sp,.page-inner.full .sp.player{position:relative;inset:auto;grid-row:1/3;height:100%;width:auto;max-width:72vw;aspect-ratio:16/9}
  .page-inner.full .copy,.page-inner.full .sp.player + .copy{position:relative;left:auto;right:auto;top:auto;bottom:auto;align-self:start;max-width:none;margin:2px 0 0}
  .page-inner.full .copy h2{font-size:21px}.copy p{font-size:14px;line-height:1.3}.copy .tip{font-size:16px}
  .copy .counter{gap:4px}.counter i,.counter i.on{width:24px;height:18px}
  .sp .aurora-scene .refrain.paper{display:none}
  .page-inner.full .refrain-flow.paper{display:block;position:relative;left:auto;right:auto;bottom:auto;align-self:start;margin:6px 0 0;font-size:12.5px;white-space:normal;text-align:left}
  .refrain-flow br{display:none}
  .visit{left:0;right:auto;bottom:4px;width:calc((96dvh - 44px)*16/9);padding:0 8px;gap:2px;justify-content:space-between}
  .visit button{font-size:12px}
  .page.paper .back{left:auto;right:10px;bottom:6px;font-size:17px}.back-arrow{width:36px;height:36px}
  .page.paper .page-inner:not(.full){bottom:40px;padding:8px 18px 30px;
    -webkit-mask:linear-gradient(#000 calc(100% - 16px),transparent);mask:linear-gradient(#000 calc(100% - 16px),transparent)}
  .page h2{font-size:24px;margin:0 0 2px}.watch .lede{display:none}
  .watch{max-width:530px;margin:0}.watch .eps{grid-template-columns:1.15fr 1fr;gap:16px}
  .watch .play-disc{width:74px;height:74px}
}

/* what pressing Play does, said plainly under the film (the ICO's guidance for embedded films) */
.ep .play-note{max-width:none;margin:10px 0 2px;font-size:14px;line-height:1.35;color:var(--ink2)}
.ep .play-note + h3{margin-top:6px}
.copy .play-note{flex-basis:100%;margin:4px 0 0;font-size:13.5px;line-height:1.3;color:var(--ink2)}
@media (max-height:560px) and (min-aspect-ratio:1/1){.ep .play-note,.copy .play-note{font-size:12px;margin-top:4px}}
/* Made by tools-build-labels.py from Matt's parchment sheets (G1 scraps, H1 page). Do not edit by hand.
   paper.js paints each scrap seam-free on a canvas (.paper-c), reading --ps for the slices, then hides the
   CSS frame (.paper-drawn zeroes its slices, so the picture's address stays readable). */
.paper{border-style:solid;border-color:transparent;border-image-repeat:stretch;background:none!important;box-shadow:none!important;isolation:isolate}
.paper.paper-drawn{border-image-slice:0}
.paper>.paper-c{position:absolute;display:block;z-index:-1;pointer-events:none}
.paper-1{border-image-source:url(/assets/img/label/paper-1.webp);border-image-slice:54 75 30 31 fill;--ps:54 75 30 31}
.place.paper-1{border-width:calc(var(--u)*9.28) calc(var(--u)*12.89) calc(var(--u)*5.15) calc(var(--u)*5.33)}
.paperbox.paper-1{border-width:30.4px 42.3px 16.9px 17.5px}
.papernote.paper-1{border-width:22.8px 31.7px 12.7px 13.1px}
.papersmall.paper-1{border-width:17.1px 23.8px 9.5px 9.8px}
.papertiny.paper-1{border-width:13.3px 18.5px 7.4px 7.6px}
.paper-2{border-image-source:url(/assets/img/label/paper-2.webp);border-image-slice:55 75 30 31 fill;--ps:55 75 30 31}
.place.paper-2{border-width:calc(var(--u)*9.33) calc(var(--u)*12.72) calc(var(--u)*5.09) calc(var(--u)*5.26)}
.paperbox.paper-2{border-width:30.6px 41.7px 16.7px 17.3px}
.papernote.paper-2{border-width:23.0px 31.3px 12.5px 12.9px}
.papersmall.paper-2{border-width:17.2px 23.5px 9.4px 9.7px}
.papertiny.paper-2{border-width:13.4px 18.3px 7.3px 7.5px}
.paper-3{border-image-source:url(/assets/img/label/paper-3.webp);border-image-slice:54 103 29 42 fill;--ps:54 103 29 42}
.place.paper-3{border-width:calc(var(--u)*9.36) calc(var(--u)*17.85) calc(var(--u)*5.03) calc(var(--u)*7.28)}
.paperbox.paper-3{border-width:30.7px 58.6px 16.5px 23.9px}
.papernote.paper-3{border-width:23.0px 43.9px 12.4px 17.9px}
.papersmall.paper-3{border-width:17.3px 33.0px 9.3px 13.4px}
.papertiny.paper-3{border-width:13.4px 25.6px 7.2px 10.5px}
.paper-4{border-image-source:url(/assets/img/label/paper-4.webp);border-image-slice:54 105 29 43 fill;--ps:54 105 29 43}
.place.paper-4{border-width:calc(var(--u)*9.36) calc(var(--u)*18.20) calc(var(--u)*5.03) calc(var(--u)*7.45)}
.paperbox.paper-4{border-width:30.7px 59.7px 16.5px 24.5px}
.papernote.paper-4{border-width:23.0px 44.8px 12.4px 18.3px}
.papersmall.paper-4{border-width:17.3px 33.6px 9.3px 13.8px}
.papertiny.paper-4{border-width:13.4px 26.1px 7.2px 10.7px}
.paper-5{border-image-source:url(/assets/img/label/paper-5.webp);border-image-slice:44 116 24 48 fill;--ps:44 116 24 48}
.place.paper-5{border-width:calc(var(--u)*9.28) calc(var(--u)*24.45) calc(var(--u)*5.06) calc(var(--u)*10.12)}
.paperbox.paper-5{border-width:30.4px 80.3px 16.6px 33.2px}
.papernote.paper-5{border-width:22.8px 60.2px 12.5px 24.9px}
.papersmall.paper-5{border-width:17.1px 45.1px 9.3px 18.7px}
.papertiny.paper-5{border-width:13.3px 35.1px 7.3px 14.5px}
.paper-6{border-image-source:url(/assets/img/label/paper-6.webp);border-image-slice:44 117 24 48 fill;--ps:44 117 24 48}
.place.paper-6{border-width:calc(var(--u)*9.28) calc(var(--u)*24.66) calc(var(--u)*5.06) calc(var(--u)*10.12)}
.paperbox.paper-6{border-width:30.4px 81.0px 16.6px 33.2px}
.papernote.paper-6{border-width:22.8px 60.7px 12.5px 24.9px}
.papersmall.paper-6{border-width:17.1px 45.5px 9.3px 18.7px}
.papertiny.paper-6{border-width:13.3px 35.4px 7.3px 14.5px}
.paper-sheet{border-image-source:url(/assets/img/label/sheet-land.webp);border-image-slice:54 63 47 63 fill;--ps:54 63 47 63}.papersheet.paper-sheet{border-width:38.9px 45.4px 33.8px 45.4px}
@media (max-aspect-ratio:1/1){.paper-sheet{border-image-source:url(/assets/img/label/sheet-port.webp);border-image-slice:63 47 63 54 fill;--ps:63 47 63 54}.papersheet.paper-sheet{border-width:22.7px 16.9px 22.7px 19.4px}}
.felt-1{border-image-source:url(/assets/img/label/felt-1.webp);border-image-slice:36 40 36 40 fill;--ps:36 40 36 40}.feltcard.felt-1{border-width:27.0px 30.0px 27.0px 30.0px}
/* Only on the real site (appended by tools-build-site.py). */
.map>picture{display:contents}   /* the map's <picture> takes no box, so the img still fills .map */
.noscript{position:fixed;left:50%;bottom:16px;z-index:50;transform:translateX(-50%);max-width:min(560px,92vw);margin:0;padding:14px 20px;border-radius:10px;background:#f3e3bd;color:#33251a;box-shadow:0 8px 20px rgba(0,0,0,.5);text-align:center}
