/* V104: Auto-Labyrinth has its own illustrated neighbourhood, not cuddle-hedges. */
#app .zw104.zw93.main-content{
 background:#d7c79e url('/auto-maze-v104/world-portrait.webp') center/100% 100% no-repeat!important;
}
#app .zw104 .zw104-board{
 border:5px solid #a68b67!important;
 border-radius:24px;
 background:#b5c99b!important;
 box-shadow:inset 0 0 0 3px #f2debd,0 5px 6px #674e3d45;
}
#app .zw104 #zw93Canvas{z-index:2}
#app .zw104 .zw104-task{
 background:rgba(246,225,186,.96)!important;border:3px solid #b38a60!important;
 border-radius:22px!important;
 box-shadow:inset 0 0 0 3px rgba(255,250,215,.75),0 3px 2px #624e363b!important;
 left:21%;width:66%;height:9.5%;top:11%;
 justify-content:center;gap:8px;
}
#app .zw104 .zw104-task img{height:94%;object-fit:contain;max-width:40%}
#app .zw104 .zw104-task-car{width:22%;filter:drop-shadow(1px 1px 1px #705a4e61)}
#app .zw104 .zw104-task-house{width:35%;filter:drop-shadow(1px 2px 1px #705a4e61)}
#app .zw104 .zw104-arrow{font-size:clamp(21px,6vw,38px);color:#ac7861;line-height:1;transform:rotate(-4deg);text-shadow:1px 1px #fff8da}
#app .zw104 .zw104-title{font-size:clamp(18px,5vw,29px);color:#775944}
#app .zw104 .zw104-car{
 border:0!important;background:none!important;z-index:7!important;
 transition:left 140ms cubic-bezier(.2,.65,.3,1),top 140ms cubic-bezier(.2,.65,.3,1)!important;
 filter:drop-shadow(1px 3px 2px #5f493a88);
}
#app .zw104 .zw104-car img{animation:zw104-idle-car 4.9s ease-in-out infinite!important}
#app .zw104 .zw104-car.zw103-rolling img{animation:zw104-car-moving .35s ease-in-out infinite!important}
#app .zw104 .zw104-car .zw103-wheel{display:none!important}
#app .zw104 .zw104-house{
 position:absolute!important;z-index:5;transform:translate(-50%,-55%);
 object-fit:contain;filter:drop-shadow(0 4px 3px #80675361);
 pointer-events:none;
}
#app .zw104 .zw104-goalring{
 position:absolute!important;z-index:4;border:4px dashed #f5e7ba;border-radius:50%;
 transform:translate(-50%,-50%) rotate(-11deg);
 filter:drop-shadow(0 2px 1px #9e6d57);
 animation:zw104-goal-pulse 3.3s ease-in-out infinite;pointer-events:none;
}
#app .zw104 .zw104-house.zw104-arrived{
 animation:zw104-house-happy 1.1s ease-in-out 3;
}
#app .zw104 .zw104-success{
 display:flex;justify-content:center;align-items:center;width:min(210px,58%);height:min(160px,44%);
 border:0!important;gap:0;
}
#app .zw104 .zw104-success img{width:50%;height:95%;object-fit:contain;filter:drop-shadow(0 2px 2px #614c3a55)}
#app .zw104 .zw104-success.is-visible .zw104-win-car{
 animation:zw104-arrive .95s cubic-bezier(.2,.7,.3,1) both;
}
#app .zw104 .zw104-success.is-visible .zw104-win-house{
 animation:zw104-welcome 1.35s ease-in-out infinite;
}
#app .zw104 .zw104-levels{z-index:12}
@keyframes zw104-idle-car{0%,100%{transform:translateY(0) rotate(-1deg)}48%{transform:translateY(-2px) rotate(1deg)}}
@keyframes zw104-car-moving{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-2px) rotate(2deg)}}
@keyframes zw104-goal-pulse{0%,100%{opacity:.88;scale:1}50%{opacity:1;scale:1.09}}
@keyframes zw104-house-happy{0%,100%{transform:translate(-50%,-55%) rotate(0)}40%{transform:translate(-50%,-59%) rotate(-2deg)}70%{transform:translate(-50%,-55%) rotate(2deg)}}
@keyframes zw104-arrive{from{opacity:0;transform:translateX(-48px) rotate(-14deg)}to{opacity:1;transform:translateX(0) rotate(0)}}
@keyframes zw104-welcome{0%,100%{transform:rotate(-2deg)}55%{transform:rotate(2deg)}}
@media(orientation:landscape) and (max-height:650px){
 #app .zw104.zw93.main-content{background-image:url('/auto-maze-v104/world-landscape.webp')!important}
 #app .zw104 .zw104-task{left:66%;width:31%;top:19%;height:19%;gap:3px}
 #app .zw104 .zw104-title{left:65%!important;width:33%!important;top:3%!important;height:13%!important;font-size:clamp(15px,4.4vh,26px)}
 #app .zw104 .zw104-arrow{font-size:clamp(17px,4vh,28px)}
 #app .zw104 .zw104-success{width:min(180px,48%);height:min(130px,39%)}
}
@media(prefers-reduced-motion:reduce){
 #app .zw104 .zw104-car img,#app .zw104 .zw104-goalring{animation:none!important}
}
/* V104: ONE consistent hand-drawn restart, with large real touch target.
   Safe-area alignment and placement outside the main board. */
#app #zw95Restart{
 position:absolute!important;left:auto!important;right:max(14px,env(safe-area-inset-right,0px))!important;
 top:auto!important;bottom:max(14px,env(safe-area-inset-bottom,0px))!important;
 width:clamp(62px,17vw,78px)!important;height:clamp(62px,17vw,78px)!important;
 padding:0!important;margin:0!important;border:0!important;background:transparent!important;
 box-shadow:none!important;border-radius:50%!important;z-index:200!important;
 display:grid!important;place-items:center!important;touch-action:manipulation!important;
 filter:drop-shadow(0 4px 2px #634a3666);transition:transform .18s ease!important;
}
#app #zw95Restart img{width:100%;height:100%;object-fit:contain}
#app #zw95Restart:active{transform:scale(.88)!important}
#app #zw95Restart:focus-visible{outline:4px solid #fff1b3!important;outline-offset:3px!important}
#app .zw103 .zw94-restart,#app .zw94-connect .zw94-erase,
#app .zw91 .zw91-small-tools:has([data-tool="reset"]){display:none!important}
/* Avoid two different restart buttons appearing in Memory. */
#app .memory100-controls #memory100Restart{display:none!important}
@media(orientation:landscape) and (max-height:650px){
 #app #zw95Restart{
  top:39%!important;right:max(10px,env(safe-area-inset-right,0px))!important;
  bottom:auto!important;width:clamp(58px,16vh,73px)!important;height:clamp(58px,16vh,73px)!important;
 }
}
@media(max-height:640px) and (orientation:portrait){
 #app #zw95Restart{width:58px!important;height:58px!important;bottom:max(9px,env(safe-area-inset-bottom,0px))!important}
}

/* Keep the pictorial task and difficulty choices in separate visual zones. */
#app .zw104 .zw104-task{top:11%!important;left:20%!important;width:70%!important;height:11%!important;z-index:12!important}
#app .zw104 .zw104-levels{
 top:89.7%!important;left:12%!important;width:69%!important;height:9.4%!important;
 justify-content:center!important;align-items:center!important;gap:clamp(6px,2vw,18px)!important;
}
#app .zw104 .zw104-levels .zw93-level{
 width:clamp(50px,13.8vw,63px)!important;height:clamp(50px,13.8vw,63px)!important;
}
#app .zw104 .zw104-board{top:25.8%!important;height:62.2%!important}
@media(orientation:landscape) and (max-height:650px){
 #app .zw104 .zw104-task{top:19%!important;left:65.5%!important;width:32.5%!important;height:21%!important}
 #app .zw104 .zw104-levels{top:47%!important;left:64%!important;width:34%!important;height:18%!important;gap:4px!important}
 #app .zw104 .zw104-levels .zw93-level{width:clamp(45px,13vh,62px)!important;height:clamp(45px,13vh,62px)!important}
 #app .zw104 .zw104-board{left:2%!important;top:8%!important;width:59%!important;height:88%!important}
 #app #zw95Restart{top:auto!important;bottom:max(11px,env(safe-area-inset-bottom,0px))!important;right:max(17px,env(safe-area-inset-right,0px))!important}
}
@media(max-width:355px) and (orientation:portrait){
 #app .zw104 .zw104-levels{left:7%!important;width:76%!important;gap:3px!important}
 #app .zw104 .zw104-levels .zw93-level{width:50px!important;height:50px!important}
 #app .zw104 .zw104-task{left:19%!important;width:72%!important}
}

/* Respect each activity's bottom-row choices; a restart never covers food, paints or answers. */
#app #zw95Restart[data-mode="picnic"],
#app #zw95Restart[data-mode="feeding"],
#app #zw95Restart[data-mode="cooking"],
#app #zw95Restart[data-mode="connect"]{
 top:max(76px,18dvh)!important;bottom:auto!important;
 right:max(14px,env(safe-area-inset-right,0px))!important;left:auto!important;
}
@media(orientation:landscape) and (max-height:650px){
 #app #zw95Restart[data-mode="hands"],
 #app #zw95Restart[data-mode="animals"]{
  right:auto!important;left:max(13px,env(safe-area-inset-left,0px))!important;
  top:auto!important;bottom:max(12px,env(safe-area-inset-bottom,0px))!important;
 }
}
