*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#9dcc7d;color:var(--wm-ink);font-family:"Trebuchet MS","Arial Rounded MT Bold",system-ui,sans-serif}button{font:inherit}button:focus-visible{outline:none;filter:drop-shadow(0 0 8px #fff8e6)}[hidden]{display:none!important}.screen,.overlay,#app{position:absolute;inset:0;width:100%;height:100%}.screen{overflow:hidden}.image-button{border:0;padding:0;background:transparent;cursor:pointer}.image-button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.loading-screen{display:grid;place-items:center;background:linear-gradient(#afd88d,#f6e0a1)}.loading-tilo{width:min(42vw,340px);filter:drop-shadow(0 16px 15px rgb(82 54 27/.25));animation:pony-breathe 1.8s ease-in-out infinite}.loading-track{position:absolute;bottom:14%;width:min(54vw,360px);height:24px;padding:5px;border:3px solid #8a552c;border-radius:22px;background:#fff6d7;box-shadow:0 6px 0 rgb(138 85 44/.25)}.loading-track span{display:block;width:0;height:100%;border-radius:10px;background:linear-gradient(90deg,#f2c141,#f6df64);animation:load 1.05s ease forwards}
.intro-screen{background:#a6cf83}.intro-picture,.intro-picture img{position:absolute;inset:0;width:100%;height:100%}.intro-picture img{object-fit:cover}.play-button{position:absolute;z-index:3;left:50%;bottom:max(8vh,70px);width:clamp(88px,10vw,132px);aspect-ratio:1;transform:translateX(-50%);filter:drop-shadow(0 10px 8px rgb(72 49 28/.35));animation:play-pulse 1.6s ease-in-out infinite}.play-button:active{transform:translateX(-50%) scale(.92)}
.game-screen{background-image:image-set(url("assets/backgrounds/bg-barnyard-tilo-haysteps-landscape.webp") 1x);background-size:cover;background-position:center}.hud{position:absolute;z-index:12;top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));height:68px;display:grid;grid-template-columns:minmax(160px,1fr) auto minmax(180px,1fr);align-items:center;gap:10px}.round-progress,.level-path{display:flex;align-items:center;justify-content:center;gap:4px}.round-progress{justify-content:flex-start}.progress-star{width:36px;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 3px 2px rgb(76 53 28/.25))}.path-hoof{width:32px;aspect-ratio:1;object-fit:contain;opacity:.35;transform:rotate(-15deg)}.path-hoof.done,.path-hoof.current{opacity:1}.path-hoof.current{animation:hoof-bounce 1s ease-in-out infinite;filter:drop-shadow(0 0 8px #ffd95d)}.global-controls{justify-self:end;display:flex;gap:6px}.hud-button{width:58px;height:58px;filter:drop-shadow(0 5px 4px rgb(73 51 29/.28))}.hud-button.is-muted{filter:grayscale(.8) drop-shadow(0 5px 4px rgb(73 51 29/.28))}
.guide-button{position:absolute;z-index:10;top:72px;left:max(14px,env(safe-area-inset-left));width:min(31vw,360px);min-height:92px;border:0;background:transparent;padding:0;cursor:pointer;text-align:left;display:flex;align-items:center}.guide-character{position:relative;z-index:2;width:92px;height:92px;object-fit:contain;filter:drop-shadow(0 7px 5px rgb(54 42 28/.24));animation:ori-float 2.8s ease-in-out infinite}.speech-bubble{position:relative;left:-15px;display:grid;place-items:center;min-height:72px;flex:1;padding:12px 18px 12px 28px;background:url("assets/ui/ori-speech-normal.webp") center/100% 100% no-repeat;color:#4e3b2c;font-size:clamp(14px,1.65vw,22px);line-height:1.08;font-weight:800}.guide-button.speaking .speech-bubble{background-image:url("assets/ui/ori-speech-glow.webp")}
.playfield{position:absolute;z-index:4;top:22%;left:18%;right:16%;bottom:12%;display:grid;grid-template-rows:minmax(150px,1fr) minmax(120px,.75fr);place-items:center}.sequence-area{width:100%;display:flex;align-items:flex-end;justify-content:center;gap:clamp(2px,.8vw,12px);min-height:160px;padding:8px}.sequence-slot{position:relative;display:grid;place-items:end center;width:clamp(82px,10vw,140px);height:clamp(122px,19vh,190px);flex:0 1 140px}.sequence-slot::before{content:"";position:absolute;left:5%;right:5%;bottom:0;height:44%;background:url("assets/ui/fx-reward-sparklering.webp") center/contain no-repeat;opacity:.36;transform:scale(.7)}.sequence-slot.gap::before{opacity:.82;animation:ring-breathe 1.7s ease-in-out infinite}.sequence-slot.gap::after{content:"";position:absolute;left:28%;right:28%;bottom:8%;height:30%;background:url("assets/props/prop-barnyard-hoofprint-m.webp") center/contain no-repeat;opacity:.65;transform:rotate(-10deg)}.sequence-slot.proof{animation:proof-glow .8s ease both}.sequence-object{position:relative;z-index:2;display:block;object-fit:contain;filter:drop-shadow(0 8px 5px rgb(95 62 29/.22));transform-origin:center bottom}.sequence-object.nubo{animation:nubo-bob 2.4s ease-in-out infinite}.ribbon{position:absolute;z-index:3;width:44%;height:44%;object-fit:contain;right:9%;bottom:25%;filter:drop-shadow(0 3px 2px rgb(63 45 31/.22))}.trail-print{width:clamp(22px,2.8vw,40px);height:clamp(22px,2.8vw,40px);object-fit:contain;opacity:.18;align-self:center;margin-bottom:7%;transform:rotate(18deg)}.trail-print.lit{animation:trail-light .7s ease both}
.candidate-area{width:100%;display:flex;justify-content:center;align-items:center;gap:clamp(8px,2vw,26px);min-height:120px}.candidate{position:relative;width:clamp(92px,11vw,146px);height:clamp(98px,16vh,154px);border:0;padding:5px;background:transparent center/100% 100% no-repeat;cursor:pointer;filter:drop-shadow(0 8px 5px rgb(83 55 29/.2));transition:transform .18s ease,filter .18s ease}.candidate img.object{width:100%;height:100%;object-fit:contain;pointer-events:none}.candidate .ribbon{right:6%;bottom:22%}.candidate.selected,.candidate.correct-hint,.candidate.demo-focus{background-image:url("assets/ui/fx-reward-sparklering.webp")}.candidate.selected{transform:translateY(-8px) scale(1.05);filter:drop-shadow(0 0 7px #fff8db) drop-shadow(0 9px 5px rgb(83 55 29/.25))}.candidate.correct-hint{animation:hint-pulse 1.2s ease-in-out infinite}.candidate.wrong{animation:wobble .42s ease}.candidate:disabled{cursor:default}.candidate.demo-focus{animation:demo-pulse 1s ease-in-out infinite}
.tilo-character{position:absolute;z-index:6;right:max(1.5vw,env(safe-area-inset-right));bottom:3%;width:clamp(125px,16vw,230px);max-height:42%;object-fit:contain;filter:drop-shadow(0 12px 8px rgb(77 52 27/.28));transform-origin:center bottom;animation:pony-breathe 3s ease-in-out infinite}.tilo-character.cheer{animation:pony-cheer .75s ease}.tilo-character.oops{animation:pony-oops .55s ease}.bodi-helper{position:absolute;z-index:9;left:1%;bottom:11%;width:clamp(100px,13vw,180px);animation:bodi-enter .45s ease-out}.bodi-helper img{width:100%;height:auto;filter:drop-shadow(0 8px 6px rgb(71 49 27/.25))}.check-button{position:absolute;z-index:14;left:50%;bottom:max(10px,env(safe-area-inset-bottom));width:clamp(82px,8vw,106px);height:clamp(82px,8vw,106px);transform:translateX(-50%);filter:drop-shadow(0 9px 6px rgb(69 48 27/.28))}.check-button:active{transform:translateX(-50%) scale(.94)}.check-button[disabled]{opacity:.78;cursor:default}
.rune-button{position:fixed;z-index:50;left:max(7px,env(safe-area-inset-left));bottom:max(7px,env(safe-area-inset-bottom));width:64px;height:64px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 5px 4px rgb(61 44 26/.3))}
.overlay{z-index:30;display:grid;place-items:center;background:rgb(59 45 28/.48);backdrop-filter:blur(3px);padding:20px}.art-panel{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;background:url("assets/ui/ui-panel-pause.webp") center/100% 100% no-repeat;filter:drop-shadow(0 18px 14px rgb(47 34 22/.32))}.menu-panel{width:min(92vw,520px);min-height:min(88vh,560px);padding:72px 76px 62px;gap:12px}.menu-panel h2{margin:0 0 8px;color:#684225;font-size:clamp(24px,4vw,38px);text-align:center}.wood-button{width:100%;min-height:58px;border:4px solid #7d4c29;border-radius:22px;background:linear-gradient(#f7ce72,#e9a842);box-shadow:inset 0 4px 0 rgb(255 255 255/.45),0 6px 0 #7d4c29;color:#5a381f;font-size:clamp(18px,2.2vw,25px);font-weight:900;cursor:pointer}.wood-button:active{transform:translateY(4px);box-shadow:inset 0 3px 0 rgb(255 255 255/.4),0 2px 0 #7d4c29}.level-picker{width:100%;display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:12px}.level-picker button{min-height:48px;border:3px solid #7d4c29;border-radius:50%;background:#fff3bd;color:#664225;font-weight:900;cursor:pointer}.complete-panel{width:min(94vw,620px);height:min(90vh,600px);padding:42px 48px 32px;background-image:url("assets/ui/ui-panel-level-complete.webp")}.highfive{width:min(74%,390px);max-height:63%;object-fit:contain;filter:drop-shadow(0 10px 8px rgb(64 44 25/.23))}.earned-stars{display:flex;justify-content:center;margin-top:-12px}.earned-stars img{width:clamp(45px,7vw,72px);animation:star-pop .55s ease backwards}.earned-stars img:nth-child(2){animation-delay:.1s}.earned-stars img:nth-child(3){animation-delay:.2s}.earned-stars img:nth-child(4){animation-delay:.3s}.next-button{width:86px;height:86px;margin-top:2px;filter:drop-shadow(0 8px 5px rgb(71 49 28/.28))}
.finale-overlay{overflow:hidden;background:linear-gradient(#7fcbe7 0 44%,#9bc970 44%)}.finale-sky{position:absolute;inset:0;background:url("assets/backgrounds/bg-barnyard-tilo-haysteps-landscape.webp") center/cover no-repeat;filter:saturate(1.1) brightness(1.05)}.finale-sky::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 44%,rgb(255 247 181/.72),transparent 48%)}.finale-panel{width:min(94vw,760px);height:min(94vh,690px);padding:34px 60px 28px;background-image:url("assets/ui/ui-panel-celebration.webp")}.finale-friends{width:min(62%,410px);max-height:48%;object-fit:contain;filter:drop-shadow(0 9px 6px rgb(65 45 27/.24))}.leaf-medal{position:absolute;right:10%;top:16%;width:clamp(82px,12vw,130px);animation:medal-float 2s ease-in-out infinite}.final-stars{display:flex;gap:2px;margin-top:-8px}.final-stars img{width:clamp(36px,5.5vw,58px);animation:star-pop .55s ease backwards}.song-lyrics{margin:4px 0;text-align:center;color:#5f3c24;font-size:clamp(15px,2.1vw,23px);line-height:1.2;font-weight:900}.finale-panel .next-button{margin-top:5px}
.size-1{width:62%;height:62%}.size-2{width:70%;height:70%}.size-3{width:79%;height:79%}.size-4{width:89%;height:89%}.size-5{width:100%;height:100%}.candidate .size-1{width:60%;height:60%;margin:auto}.candidate .size-2{width:69%;height:69%;margin:auto}.candidate .size-3{width:78%;height:78%;margin:auto}.candidate .size-4{width:89%;height:89%;margin:auto}.candidate .size-5{width:100%;height:100%;margin:auto}
@keyframes load{to{width:100%}}@keyframes play-pulse{50%{transform:translateX(-50%) scale(1.08)}}@keyframes pony-breathe{50%{transform:translateY(-4px) scale(1.015)}}@keyframes ori-float{50%{transform:translateY(-7px) rotate(2deg)}}@keyframes hoof-bounce{50%{transform:translateY(-5px) rotate(-9deg)}}@keyframes ring-breathe{50%{transform:scale(1);opacity:1}}@keyframes nubo-bob{50%{transform:translateY(-5px)}}@keyframes proof-glow{40%{transform:translateY(-12px) scale(1.08);filter:drop-shadow(0 0 14px #ffe46f)}100%{transform:none}}@keyframes trail-light{50%,100%{opacity:1;filter:drop-shadow(0 0 7px #ffe066);transform:rotate(18deg) scale(1.2)}}@keyframes hint-pulse{50%{transform:translateY(-6px) scale(1.08);filter:drop-shadow(0 0 13px #fff0a4)}}@keyframes demo-pulse{50%{transform:translateY(-8px) scale(1.08);filter:drop-shadow(0 0 13px #fff4a8)}}@keyframes wobble{25%{transform:rotate(-5deg)}50%{transform:rotate(5deg)}75%{transform:rotate(-3deg)}}@keyframes pony-cheer{40%{transform:translateY(-22px) rotate(-4deg) scale(1.05)}}@keyframes pony-oops{35%{transform:translateX(-7px) rotate(-3deg)}70%{transform:translateX(5px) rotate(2deg)}}@keyframes bodi-enter{from{transform:translateX(-110%) rotate(-8deg)}to{transform:none}}@keyframes star-pop{from{opacity:0;transform:scale(.2) rotate(-25deg)}70%{transform:scale(1.15)}to{opacity:1;transform:none}}@keyframes medal-float{50%{transform:translateY(-7px) rotate(3deg)}}
@media (orientation:portrait){.game-screen{background-image:url("assets/backgrounds/bg-barnyard-tilo-haysteps-portrait.webp");background-position:center}.hud{height:112px;grid-template-columns:1fr auto;grid-template-rows:60px 42px;align-items:center}.global-controls{grid-column:2;grid-row:1}.round-progress{grid-column:1;grid-row:1}.level-path{grid-column:1/3;grid-row:2}.hud-button{width:54px;height:54px}.progress-star{width:30px}.path-hoof{width:27px}.guide-button{top:116px;left:8px;width:min(78vw,350px);min-height:76px}.guide-character{width:76px;height:76px}.speech-bubble{min-height:60px;font-size:14px}.playfield{top:25%;left:2%;right:2%;bottom:14%;grid-template-rows:minmax(160px,1fr) minmax(115px,.7fr)}.sequence-area{gap:0;align-items:flex-end;min-height:160px}.sequence-slot{width:min(19vw,82px);height:min(28vh,170px);flex:0 1 82px}.trail-print{width:14px;margin-inline:-4px}.candidate-area{gap:5px}.candidate{width:min(27vw,112px);height:min(22vh,132px)}.tilo-character{right:-1%;bottom:4%;width:min(30vw,150px);max-height:28%}.bodi-helper{bottom:11%;width:min(27vw,130px)}.check-button{bottom:max(9px,env(safe-area-inset-bottom));width:76px;height:76px}.rune-button{width:56px;height:56px}.menu-panel{padding:62px 30px 50px}.level-picker{grid-template-columns:repeat(3,1fr)}.complete-panel{padding:30px 28px 22px}.highfive{width:min(82%,350px)}.finale-panel{padding:26px 34px 22px}.finale-friends{width:min(75%,380px)}.leaf-medal{right:6%;top:13%}.song-lyrics{font-size:16px}}
@media (max-width:380px) and (orientation:portrait){.hud{left:6px;right:6px}.hud-button{width:50px;height:50px}.progress-star{width:27px}.path-hoof{width:24px}.guide-button{top:108px}.guide-character{width:70px;height:70px}.playfield{top:25%;bottom:13%}.sequence-slot{height:min(26vh,158px)}.candidate{height:min(19vh,118px)}.tilo-character{bottom:3%;width:29vw}.rune-button{width:52px;height:52px}.check-button{width:70px;height:70px}.song-lyrics{font-size:14px}}
@media (max-height:720px) and (orientation:landscape){.hud{height:58px}.hud-button{width:50px;height:50px}.guide-button{top:60px}.guide-character{width:78px;height:78px}.speech-bubble{min-height:61px}.playfield{top:20%;bottom:11%;grid-template-rows:minmax(130px,1fr) minmax(104px,.65fr)}.sequence-slot{height:min(24vh,158px)}.candidate{height:min(18vh,132px)}.tilo-character{width:14vw}.check-button{width:76px;height:76px}.rune-button{width:56px;height:56px}}
.ribbon{width:27%;height:27%;right:18%;bottom:18%}.candidate .ribbon{width:30%;height:30%;right:16%;bottom:17%}
.hud-button,.check-button,.play-button,.next-button{border-radius:50%}
#app[data-state="paused"] .check-button,#app[data-state="round-complete"] .check-button,#app[data-state="level-complete"] .check-button,#app[data-state="game-complete"] .check-button{display:none}
#app[data-state="paused"] .game-screen *{animation-play-state:paused!important}
.candidate{display:grid;place-items:end center;border-radius:40%}
.candidate:focus-visible{outline:4px solid #fff8e6;outline-offset:2px;box-shadow:none}
.candidate img.object.size-1{width:62%;height:62%;margin:0}
.candidate img.object.size-2{width:72%;height:72%;margin:0}
.candidate img.object.size-3{width:82%;height:82%;margin:0}
.candidate img.object.size-4{width:91%;height:91%;margin:0}
.candidate img.object.size-5{width:100%;height:100%;margin:0}
@media (orientation:portrait){.sequence-area.long-row .sequence-slot{width:min(16vw,72px);flex-basis:72px}.sequence-area.long-row .trail-print{width:12px;margin-inline:-5px}.tilo-character{right:-1%;bottom:2%;width:min(25vw,130px);max-height:25%}}
@media (orientation:portrait){.candidate{width:min(29vw,118px)}}

/* Level 2 deliberately uses stronger visual anchors before closer comparisons begin in level 3. */
#app[data-level="2"] .sequence-slot > img.object.size-1{width:52%;height:52%}
#app[data-level="2"] .sequence-slot > img.object.size-2{width:65%;height:65%}
#app[data-level="2"] .sequence-slot > img.object.size-3{width:80%;height:80%}
#app[data-level="2"] .sequence-slot > img.object.size-4{width:94%;height:94%}
#app[data-level="2"] .sequence-slot > img.object.size-5{width:108%;height:108%}
#app[data-level="2"] .candidate{width:clamp(108px,12vw,160px);overflow:visible}
#app[data-level="2"] .candidate img.object.size-1{width:clamp(72px,6vw,90px);height:clamp(72px,6vw,90px)}
#app[data-level="2"] .candidate img.object.size-3{width:clamp(96px,8.5vw,124px);height:clamp(96px,8.5vw,124px)}
#app[data-level="2"] .candidate img.object.size-5{width:clamp(118px,11vw,160px);height:clamp(118px,11vw,160px)}
@media (orientation:portrait){
  #app[data-level="2"] .candidate{width:min(30vw,118px)}
  #app[data-level="2"] .candidate img.object.size-1{width:70px;height:70px}
  #app[data-level="2"] .candidate img.object.size-3{width:90px;height:90px}
  #app[data-level="2"] .candidate img.object.size-5{width:108px;height:108px}
}

/* Audit 2026-09-11: reserve distinct spaces for navigation, progress and answers. */
.round-progress{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));left:auto;gap:3px}
.level-path{position:fixed;left:50%;top:25px;transform:translateX(-50%)}
.guide-button:disabled{cursor:default;opacity:1}
/* The illustrated tail belongs beside Ori; only the artwork is mirrored. */
.speech-bubble{min-width:0;background:none!important;isolation:isolate;padding-left:42px!important}
.speech-bubble::before{content:'';position:absolute;inset:0;z-index:-1;background:url('assets/ui/ori-speech-normal.webp') center/100% 100% no-repeat;transform:scaleX(-1)}
.guide-button.speaking .speech-bubble::before{background-image:url('assets/ui/ori-speech-glow.webp')}
#instructionText{min-width:0;overflow-wrap:break-word}
@media(orientation:landscape){.speech-bubble{padding-left:70px!important}}
.overlay-controls{position:absolute;right:24px;top:18px;display:flex;gap:8px}
.overlay-controls button,.overlay-sound{width:56px;height:56px;flex:0 0 56px;border-radius:50%}
.menu-panel{padding-top:76px;min-height:0;max-height:calc(100dvh - 32px)}
.menu-panel h2{font-size:clamp(22px,3vw,30px)}
.overlay-sound{position:absolute;right:28px;top:14px}
.level-picker{grid-template-columns:repeat(3,minmax(48px,1fr));gap:8px}
.complete-panel,.finale-panel{padding-top:82px}
@media (orientation:portrait){
  .round-progress{top:19px;right:max(8px,env(safe-area-inset-right));gap:1px}
  .progress-star{width:23px}
  .level-path{top:78px}
  .guide-button{top:111px}
  .playfield{top:30%;bottom:22%;grid-template-rows:minmax(130px,1fr) minmax(110px,.8fr)}
  .tilo-character{right:0;bottom:1%;max-height:19%;width:23vw;pointer-events:none}
  .bodi-helper{bottom:11%;width:22vw;pointer-events:none}
  .finale-sky{background-image:url("assets/backgrounds/bg-barnyard-tilo-haysteps-portrait.webp")}
  .overlay-controls{top:16px;right:22px}
  .menu-panel{width:100%;padding:78px 30px 36px;gap:10px}
  .menu-panel h2{font-size:23px;margin-bottom:4px}
  .finale-friends{max-height:37%;width:70%}
  .leaf-medal{top:27%;width:70px;right:6%}
}
@media (max-width:380px) and (orientation:portrait){
  .progress-star{width:23px}
  .playfield{top:30%;bottom:23%}
  .sequence-slot{height:135px}
  .candidate{height:110px}
  .finale-panel{padding:78px 25px 20px}
  .finale-friends{max-height:32%}
  .final-stars img{width:34px}
}
.menu-panel h2{max-width:230px;line-height:1.15}
@media (orientation:portrait){.menu-panel{padding-top:98px;padding-bottom:42px;gap:8px}.menu-panel h2{max-width:210px}}
.round-progress{padding:4px 6px;border-radius:16px;background:rgb(83 55 29/.48)}
.menu-panel{padding-top:120px}
@media (orientation:landscape){.guide-button{top:90px}}
@media (orientation:portrait){.round-progress{padding:4px;top:16px}.progress-star{width:21px}.menu-panel{padding-top:112px}}
@media (orientation:landscape){.guide-button{width:min(36vw,420px)}.speech-bubble{font-size:clamp(14px,1.5vw,20px);padding-right:28px}}
.menu-panel:has(#levelPicker:not([hidden])){padding-top:150px}
@media (orientation:portrait){.speech-bubble{padding-right:28px}}

/* Readable instructions and a shared physical scale for the row and choices. */
.guide-button{width:min(600px,60vw);min-height:104px}
.guide-character{flex:0 0 88px;width:88px;height:96px}
.speech-bubble{min-height:96px;padding:22px 32px 22px 34px;font-size:clamp(19px,2vw,24px);line-height:1.25}
.playfield{--bale-unit:min(10vw,17vh,138px);top:28%;bottom:15%;gap:18px;grid-template-rows:1fr 1fr}
.sequence-area{position:relative;min-height:0;height:100%;padding:16px 12px 24px;border-bottom:3px solid #b88b4b;border-radius:24px;background:linear-gradient(0deg, rgb(255 238 184/.65),rgb(255 245 205/.12));align-items:flex-end}
.sequence-area::after{content:'→';position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:28px;line-height:24px;color:#77502c}
#app .sequence-slot{flex:0 0 var(--bale-unit);width:var(--bale-unit);height:var(--bale-unit)}
.sequence-slot.gap{border:3px dashed #926431;border-radius:16px;background:rgb(255 248 219/.6)}
.sequence-slot.gap::after{content:'?';inset:0;display:grid;place-items:center;height:auto;background:none;opacity:1;transform:none;font-size:38px;font-weight:900;color:#79552f}
.sequence-slot.gap::before{display:none}
.candidate-area{min-height:0;height:100%;gap:16px;align-items:center}
#app .candidate{width:calc(var(--bale-unit) + 16px);height:calc(var(--bale-unit) + 16px);min-width:56px;min-height:56px;padding:8px;border:2px solid #b38a4b;border-radius:18px;background-color:rgb(255 244 209/.75)}
#app .candidate.selected{border-color:#56862d;box-shadow:0 0 0 3px #e4f5b1;transform:translateY(-5px)}
#app .sequence-slot img.object,#app .candidate img.object{width:calc(var(--bale-unit)*var(--bale-scale));height:calc(var(--bale-unit)*var(--bale-scale));margin:0;max-width:none;object-fit:contain}
#app .size-1{--bale-scale:.38}#app .size-2{--bale-scale:.52}#app .size-3{--bale-scale:.68}#app .size-4{--bale-scale:.84}#app .size-5{--bale-scale:1}
@media (orientation:portrait){
 .guide-button{top:110px;left:8px;width:calc(100% - 16px);min-height:100px}
 .guide-character{flex-basis:68px;width:68px;height:84px}
 .speech-bubble{font-size:clamp(18px,3.5vw,23px);min-height:96px;padding:20px 28px 20px 30px}
 .playfield{--bale-unit:min(23vw,13vh,132px);top:max(220px,29%);bottom:22%;left:4%;right:4%;gap:16px;grid-template-rows:1fr 1fr}
 .playfield:has(.long-row){--bale-unit:min(15vw,12vh,100px)}
 .playfield:has(.sequence-slot:nth-of-type(4)){--bale-unit:min(18vw,12vh,110px)}
 .playfield:has(.long-row){--bale-unit:min(15vw,12vh,100px)}
 .sequence-area{padding:8px 4px 25px}
 .candidate-area{gap:10px}
 .trail-print{width:12px;margin-inline:-3px}
}
@media (max-height:600px) and (orientation:landscape){.guide-button{top:76px;min-height:78px}.speech-bubble{min-height:76px;font-size:18px;padding-block:14px}.guide-character{height:76px}.playfield{top:32%;bottom:17%;gap:10px}}
#app .sequence-slot .ribbon,#app .candidate .ribbon{width:calc(var(--bale-unit)*var(--bale-scale,.68)*.32);height:calc(var(--bale-unit)*var(--bale-scale,.68)*.32);right:calc((100% - var(--bale-unit)*var(--bale-scale,.68))/2 + var(--bale-unit)*var(--bale-scale,.68)*.06);bottom:calc(var(--bale-unit)*var(--bale-scale,.68)*.2)}
#app .sequence-slot:has(.size-1),#app .candidate:has(.size-1){--bale-scale:.38}
#app .sequence-slot:has(.size-2),#app .candidate:has(.size-2){--bale-scale:.52}
#app .sequence-slot:has(.size-3),#app .candidate:has(.size-3){--bale-scale:.68}
#app .sequence-slot:has(.size-4),#app .candidate:has(.size-4){--bale-scale:.84}
#app .sequence-slot:has(.size-5),#app .candidate:has(.size-5){--bale-scale:1}
@media (orientation:portrait){.playfield:has(.sequence-area.long-row){--bale-unit:min(16vw,12vh,105px)}}

/* Juice is decorative: no touch interception, no change to mathematical size. */
#fx-layer{position:fixed;inset:0;pointer-events:none;z-index:40;overflow:hidden;contain:strict}
#fx-layer>div{position:absolute;pointer-events:none;will-change:transform,opacity}
.juice-star,.juice-reward-flight{background:url('assets/ui/ui-reward-star.webp') center/contain no-repeat;filter:drop-shadow(0 0 5px #fff0a0)}
.juice-reward-flight{z-index:2;filter:drop-shadow(0 0 12px #ffe69a)}
.juice-glow{border-radius:50%;background:radial-gradient(circle,#fff8e6 0%,var(--wm-gold,#f2c141) 30%,transparent 70%)}
.juice-dust{border-radius:50%;background:#e7d3a0}
.juice-arrival{animation:juice-hud-land .65s ease-out}
@keyframes juice-hud-land{40%{transform:scale(1.15)}100%{transform:scale(1)}}
#app[data-state='playing'] .candidate.selected{box-shadow:0 0 0 3px #ffe8a0}
#app[data-state='playing'] #checkButton:not(:disabled){animation:juice-ready 2s ease-in-out 3s infinite}
@keyframes juice-ready{50%{transform:translateX(-50%) scale(1.06)}}
.game-screen::before,.game-screen::after{content:'';position:absolute;top:30%;width:6px;height:20px;background:#ffe7a1;border-radius:60%;opacity:.35;pointer-events:none;animation:juice-straw 13s ease-in-out infinite}
.game-screen::before{left:4%}.game-screen::after{right:3%;animation-delay:-7s}
@keyframes juice-straw{0%,100%{transform:translate(0,0) rotate(15deg);opacity:0}30%{opacity:.35}70%{opacity:.25}100%{transform:translate(14px,200px) rotate(170deg);opacity:0}}
#app[data-state='paused'] .game-screen::before,#app[data-state='paused'] .game-screen::after{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){#fx-layer{display:none}.game-screen::before,.game-screen::after{display:none}#app #checkButton{animation:none}.juice-arrival{animation:none}}
body[data-star-in-flight='1'] #roundProgress img:nth-child(1),body[data-star-in-flight='2'] #roundProgress img:nth-child(2),body[data-star-in-flight='3'] #roundProgress img:nth-child(3),body[data-star-in-flight='4'] #roundProgress img:nth-child(4){visibility:hidden}

/* Character readability: warm rim light and a grounded shadow. */
.guide-character,.tilo-character,.bodi-helper img,.highfive,.finale-friends{filter:brightness(1.1) saturate(1.06) drop-shadow(0 -2px 1px #fff2c6b3) drop-shadow(2px 0 2px #ffe3a080) drop-shadow(-2px 0 2px #ffe3a080) drop-shadow(0 9px 5px rgb(65 42 24/.5))}
.guide-character{flex-basis:108px;width:108px;height:112px}
.tilo-character{width:clamp(170px,20vw,290px);max-height:40%;right:0;bottom:2%}
.bodi-helper{width:clamp(140px,17vw,220px);bottom:12%}
.highfive{width:82%}.finale-friends{width:70%}
@media(orientation:portrait){
 .guide-character{flex-basis:82px;width:82px;height:100px}
 .speech-bubble{padding-left:25px;padding-right:25px}
 .tilo-character{width:32vw;max-height:23%;right:0;bottom:1%}
 .bodi-helper{width:30vw;bottom:11%;max-height:23%}
 .highfive{width:88%}.finale-friends{width:78%}
}
@media(max-width:380px) and (orientation:portrait){.guide-character{flex-basis:78px;width:78px;height:96px}.tilo-character{width:31vw;max-height:23%}}


/* Larger task stars and vertically centered hay-bale artwork. */
.progress-star{width:44px}
#app .sequence-slot,#app .candidate{place-items:center}
#app .sequence-slot .ribbon,#app .candidate .ribbon{bottom:calc((100% - var(--bale-unit)*var(--bale-scale,.68))/2 + var(--bale-unit)*var(--bale-scale,.68)*.2)}
@media(orientation:portrait){
 .progress-star{width:29px}
 .round-progress{gap:1px;padding:4px;top:72px}
 .level-path{left:12px;top:78px;transform:none}
}
/* Keep the enlarged helper below answer cards on compact phones. */
@media(orientation:portrait){.bodi-helper{bottom:8%}}
/* Native controls remain handler targets; only the shared four-button row is visible. */
body[data-wm-controls-game='25'] #gameScreen .global-controls{visibility:hidden}
/* Preserve the complete story composition instead of cropping its characters. */
#introScreen{background:#cba465;overflow:clip}
#introScreen::before{content:'';position:absolute;inset:-20px;background:url('assets/backgrounds/intro-tilo-haysteps-landscape.webp') center/cover no-repeat;filter:blur(14px);opacity:.85}
#introScreen .intro-picture img{object-fit:contain}
#introScreen.wm-story-opening>.wm-story-title{top:max(8px,env(safe-area-inset-top))!important;max-width:calc(100% - 28px)!important;padding:8px 18px 10px!important;font-size:28px!important}
@media(orientation:portrait){#introScreen::before{background-image:url('assets/backgrounds/intro-tilo-haysteps-portrait.webp')}#introScreen.wm-story-opening>.wm-story-title{font-size:22px!important;padding:8px 12px 10px!important}}
