/* Marker roots must stay absolute. Relative positioning adds document-flow offsets
   to MapLibre's projected coordinates and makes objects drift during camera moves. */
.mw-walk-marker{position:absolute!important;top:0!important;left:0!important;display:block;width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;border:0!important;background:transparent!important;cursor:pointer;touch-action:manipulation}.mw-walk-glyph{position:absolute;bottom:0;left:50%;display:grid;place-items:center;width:55px;height:53px;transform:translateX(-50%) scale(var(--mw-resource-scale,.9));transform-origin:bottom center;filter:drop-shadow(0 2px 2px #203b3977);pointer-events:none}.mw-walk-glyph::before{content:'';position:absolute;inset:33px 3px -4px;border:2px solid #fff2b8;border-radius:50%;background:#f4d15d66;box-shadow:0 0 12px #fff2b8aa;transform:rotateX(45deg)}.mw-walk-marker small{position:absolute;bottom:-3px;right:-3px;padding:2px 6px;border-radius:9px;background:#31583c;color:#fff3ba;font:700 10px system-ui;border:1px solid #edd594}.mw-resource-distant small{display:none}.mw-log-stack{position:relative;display:block;width:43px;height:38px;transform:rotate(-9deg)}.mw-log-stack i{position:absolute;display:block;width:34px;height:14px;border:2px solid #71431f;border-radius:7px;background:linear-gradient(#efb45d,#ad652c);box-shadow:inset 0 -3px #6a3d2044}.mw-log-stack i::after{content:'';position:absolute;right:-2px;top:-2px;width:14px;height:14px;border:2px solid #835027;border-radius:50%;background:repeating-radial-gradient(circle,#eac68a 0 2px,#bc8750 3px 4px)}.mw-log-stack i:nth-child(1){left:0;top:22px}.mw-log-stack i:nth-child(2){left:9px;top:13px}.mw-log-stack i:nth-child(3){left:4px;top:3px}.mw-stone-stack{position:relative;font-size:37px}.mw-walk-marker.collecting .mw-walk-glyph::before{border-color:#fff0a1;background:#a3d85777;box-shadow:0 0 0 5px #f5e67855}
.mw-walk-ui{position:fixed;z-index:14;top:155px;left:12px;box-sizing:border-box;max-width:calc(100vw - 88px);padding:4px 7px;border:1px solid #d8c58a;border-radius:20px;background:#fffae9ee;box-shadow:0 2px 12px #23453026;color:#36503b;font:12px/1.4 system-ui!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}.mw-walk-status{display:none}.mw-walk-ui[data-expanded=true]{max-width:min(300px,calc(100vw - 88px));border-radius:15px;padding:7px 10px}.mw-walk-ui[data-expanded=true] .mw-walk-status{display:block;margin-bottom:5px}.mw-walk-status [role=status]{display:block;font:12px/1.35 system-ui!important;min-height:0}.mw-walk-status progress{display:block;width:100%;height:8px;accent-color:#6fa948;margin-top:5px}.mw-walk-actions{display:flex;gap:5px;align-items:center;white-space:nowrap}.mw-walk-actions button{padding:3px!important;min-height:32px!important;height:32px!important;min-width:34px!important;width:34px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#3f5b3e!important;font:20px/1 system-ui!important;cursor:pointer}.mw-walk-actions button[aria-pressed=true]{background:#dce5c7!important}.mw-walk-ui [data-mw-wallet]{font:700 11px/1.2 system-ui!important;color:#947126;white-space:nowrap;margin:0 3px}.mw-walk-ui[data-state=collecting]{border-color:#609845;background:#f5ffe8f5}.mw-walk-ui[data-state=reward]{border-color:#e7ae38;background:#fff3b9}.mw-walk-marker:focus-visible,.mw-walk-actions button:focus-visible{outline:3px solid #a8c688;outline-offset:3px}body.myworld-domain-open .mw-walk-marker,body.myworld-domain-open .mw-walk-ui{display:none!important}@media(min-width:1100px){.mw-walk-ui{left:235px;top:calc(var(--desktop-header,160px) + 20px)!important}}

/* Lift only the artwork: the halo and MapLibre anchor stay on the ground. */
.mw-resource-art{display:grid;place-items:center;position:relative;transform:translateY(calc(-1 * var(--mw-resource-lift,14px)));filter:saturate(1.35) brightness(1.1) drop-shadow(0 0 3px #fff2bd);animation:mw-resource-float 2.8s ease-in-out infinite}
.mw-walk-marker:nth-child(even) .mw-resource-art{animation-delay:-1.4s}
@keyframes mw-resource-float{0%,100%{transform:translateY(calc(-1 * var(--mw-resource-lift,14px)))}50%{transform:translateY(calc(-1 * (var(--mw-resource-lift,14px) + var(--mw-resource-bob,3px))))}}
@media(prefers-reduced-motion:reduce){.mw-resource-art{animation:none}}

/* Shared atlas retains transparent artwork and identical zoom behavior for each kind. */
.mw-resource-sprite{display:block;width:55px;height:55px;background-image:url('/myworld/assets/village-resources-v177.png');background-size:200% 200%;background-repeat:no-repeat}
.mw-resource-wood{background-image:url('/myworld/assets/firewood-v177.png');background-size:contain;background-position:center}
.mw-resource-apple{background-position:0 0}.mw-resource-pear{background-position:100% 0}.mw-resource-cherry{background-position:0 100%}.mw-resource-water{background-position:100% 100%}
.mw-resource-stone{background:none}.mw-resource-stone::before{content:'🪨';font-size:37px}
.mw-resource-art{filter:saturate(1.08) brightness(1.04) drop-shadow(0 0 2px #fff2bd)}
.mw-walk-glyph::before{border:0;background:#e6c76c22;box-shadow:0 0 8px #ffe8a54d}
.mw-walk-marker.collecting .mw-walk-glyph::before{border:2px solid #fff0a1}

/* Resource silhouettes remain readable after sunset and while regrowing. */
body[data-mw-light="Nuit"] .mw-resource-art{filter:brightness(1.2) drop-shadow(0 0 6px #ffe4a080)}
.mw-resource-cooling .mw-resource-art{opacity:.55;filter:saturate(.45) drop-shadow(0 0 3px #d8dfd6)}
.mw-resource-cooling .mw-walk-glyph::before{background:#b5c6cd33}
.mw-wolf-art{width:94px;height:70px;overflow:visible;transform:scaleX(var(--mw-wolf-facing,1));filter:drop-shadow(0 0 4px #c1d9f577)}
.mw-wolf-body{animation:mw-wolf-breathe .8s ease-in-out infinite;transform-origin:75px 70px}
.mw-wolf-legs-a,.mw-wolf-legs-b{transform-box:fill-box;transform-origin:50% 0%;animation:mw-wolf-step .8s ease-in-out infinite alternate}
.mw-wolf-legs-b{animation-delay:-.8s}.mw-wolf-tail{transform-origin:42px 60px;animation:mw-wolf-tail 1.6s ease-in-out infinite alternate}
.mw-wolf-marker small{background:#343e65;color:#ffe49d}.mw-wolf-marker .mw-walk-glyph::before{background:#b7c9ef33;box-shadow:0 0 12px #c5d5fa66}
@keyframes mw-wolf-step{from{transform:rotate(-14deg)}to{transform:rotate(14deg)}}
@keyframes mw-wolf-breathe{50%{transform:translateY(-1.5px)}}
@keyframes mw-wolf-tail{to{transform:rotate(-10deg)}}
@media(prefers-reduced-motion:reduce){.mw-wolf-body,.mw-wolf-legs-a,.mw-wolf-legs-b,.mw-wolf-tail{animation:none}}

.mw-home-daily{position:fixed;z-index:32;bottom:92px;left:12px;max-width:min(370px,90vw);max-height:45dvh;overflow:auto;background:#fff8e7;color:#173f38;padding:12px;border-radius:16px;box-shadow:0 4px 18px #0004;font:16px system-ui}.mw-home-daily summary{cursor:pointer;font-weight:700;min-height:32px}.mw-home-daily button{display:block;text-align:left;white-space:normal;width:100%;padding:14px;margin-top:7px;border:1px solid #bcccb2;border-radius:12px;background:#edf2df;color:#173f38;font:15px system-ui;min-height:48px}.mw-home-daily button:disabled{opacity:.6}

.mw-home-daily{bottom:90px;max-width:min(440px,calc(100vw - 24px));max-height:70dvh;padding:14px;font-size:17px;line-height:1.5}.mw-home-daily[open]{width:min(440px,calc(100vw - 24px))}.mw-home-daily summary{min-height:48px;display:flex;align-items:center}.mw-home-daily button{font-size:17px;min-height:60px;padding:14px;touch-action:manipulation}.mw-home-daily button small{display:block;font-size:14px;font-weight:400;margin-top:4px}.mw-home-daily h2{font-size:23px;margin:8px 0}.mw-home-daily h3{font-size:18px;margin:22px 0 8px}.mw-home-daily small{font-size:14px}.mw-home-story{background:#f2e7cc;padding:15px;border-radius:14px}.mw-home-daily button:focus-visible,.mw-home-daily summary:focus-visible{outline:4px solid #be790b;outline-offset:3px}.mw-home-daily button[aria-pressed=true]{background:#21523e;color:white}.mw-home-daily blockquote{margin:12px 0;padding:12px;border-left:4px solid #b98a27;background:#fffdf5}.mw-home-marker{min-width:56px;min-height:56px}.mw-home-glyph{font-size:42px;background:#fff6d9;border:2px solid #426c40;border-radius:50%;width:60px;height:60px;display:grid;place-items:center}@media(prefers-reduced-motion:reduce){.mw-home-marker *{animation:none!important}}

.mw-family-preview-banner{position:fixed;z-index:95;top:75px;left:50%;transform:translateX(-50%);width:min(540px,94vw);padding:10px;border:2px solid #c39439;border-radius:15px;background:#fff7db;color:#173f38;box-shadow:0 4px 18px #0004;font:15px system-ui}.mw-family-preview-banner b,.mw-family-preview-banner small{display:block}.mw-family-preview-banner button,.mw-family-preview-launch{min-height:44px;padding:10px;margin:5px;border-radius:10px;background:#244e3a;color:white;border:0;font:16px system-ui}.mw-family-preview-launch{width:calc(100% - 10px)}.mw-family-shops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mw-family-shops .mw-family-shop{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fffaf0}.mw-family-silhouette{display:grid;place-items:center;width:52px;height:68px;border-radius:45% 45% 12px 12px;background:var(--family-color);font-size:42px;color:#fff}.mw-family-shop b{font-size:16px}.mw-family-stall{background:#f2e7cc;padding:12px;border-radius:15px}.myworld-preview .mw-game-quit{z-index:96}

.mw-shop-map-marker{border:2px solid #fff3cb;border-radius:18px;background:var(--family-color,#42664a);color:white;box-shadow:0 3px 10px #0004;min-width:68px;min-height:74px;padding:5px;display:flex;flex-direction:column;align-items:center;cursor:pointer}.mw-shop-map-marker>span{font-size:35px}.mw-shop-map-marker small{font:14px system-ui;background:#fff8e8;color:#173f38;padding:3px 5px;border-radius:8px}.mw-shop-map-marker:focus-visible{outline:4px solid #f4b42e;outline-offset:3px}

.mw-family-character{display:block;object-fit:contain;object-position:center bottom;background:transparent;border:0;border-radius:0;filter:drop-shadow(1px 0 0 #fff8e4) drop-shadow(-1px 0 0 #fff8e4) drop-shadow(0 3px 3px #173f3835);user-select:none;pointer-events:none}.mw-family-character-card{width:100%;height:170px}.mw-family-character-scene{width:100%;height:260px}.mw-family-character-map{width:88px;height:132px}.mw-shop-map-marker.mw-shop-has-character{padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;min-width:88px;gap:0}.mw-shop-has-character small{border:1px solid #b5a57e;box-shadow:0 2px 5px #0003}.mw-family-scene{padding:14px;background:#f5ecd4;border-radius:16px;margin:14px 0;text-align:center}.mw-family-shops .mw-family-shop{padding:8px 5px}.mw-character-fallback{display:grid;place-items:center;font-size:52px;min-height:80px}.mw-family-stall>.mw-family-character{margin:auto}

.mw-commerce-marker{--shop-size:90px;min-width:44px;min-height:44px;width:var(--shop-size);height:auto;padding:0;display:flex;flex-direction:column;align-items:center;background:none!important;border:0!important;border-radius:0;box-shadow:none!important;overflow:visible}.mw-commerce-property{position:relative;display:block;width:100%;aspect-ratio:1/1;pointer-events:none}.mw-commerce-building{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;background:transparent;pointer-events:none}.mw-family-character-property{position:absolute;bottom:9%;left:56%;width:24%;height:43%;object-fit:contain;filter:drop-shadow(1px 1px 1px #183d3666)}.mw-commerce-owner-symbol{position:absolute;bottom:12%;left:60%;font-size:clamp(16px,2vw,30px)}.mw-commerce-marker>small{font:700 12px system-ui;white-space:nowrap;background:#fff8e8;padding:3px 7px;border-radius:8px;border:1px solid #ab925b;box-shadow:0 2px 5px #0003;margin-top:-8px;z-index:1}.mw-commerce-caption{display:none;font:13px system-ui;background:#fff9e8ee;color:#244c36;border-radius:7px;padding:2px 6px;white-space:nowrap}.mw-commerce-close .mw-commerce-caption{display:block}.mw-commerce-distant .mw-family-character-property,.mw-commerce-distant>small{display:none}.mw-commerce-property-scene{width:100%;max-width:360px;margin:auto}.mw-commerce-property-scene .mw-family-character-property{height:43%}

.mw-commerce-property{aspect-ratio:3/2}

/* One brief greeting in each ten-second cycle; each person has a stable offset. */
.mw-family-actor{position:relative;overflow:visible;transform-origin:50% 97%}.mw-family-pose{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;border:0;border-radius:0;background:transparent;pointer-events:none}.mw-family-pose-wave{opacity:0}.mw-can-greet .mw-family-pose-rest{animation:mw-greeting-rest 10s ease-in-out infinite;animation-delay:var(--greeting-offset,0s)}.mw-can-greet .mw-family-pose-wave{animation:mw-greeting-wave 10s ease-in-out infinite;animation-delay:var(--greeting-offset,0s);transform-origin:50% 97%}
@keyframes mw-greeting-rest{0%,72%,96%,100%{opacity:1}76%,92%{opacity:0}}
@keyframes mw-greeting-wave{0%,72%,96%,100%{opacity:0;transform:rotate(0)}76%{opacity:1;transform:rotate(0)}80%{opacity:1;transform:rotate(-2deg)}84%{opacity:1;transform:rotate(2deg)}88%{opacity:1;transform:rotate(-1.5deg)}92%{opacity:1;transform:rotate(1deg)}}
.mw-commerce-marker .mw-family-character-property{display:block;width:clamp(64px,calc(var(--shop-size) * .4),185px);height:clamp(96px,calc(var(--shop-size) * .6),278px);left:48%;bottom:4%;transform:translateX(-20%)}.mw-commerce-property-scene .mw-family-character-property{display:block;width:40%;height:62%;left:48%;bottom:4%}.mw-family-character-scene{height:300px}.mw-family-character-card{height:190px}
@media(prefers-reduced-motion:reduce){.mw-can-greet .mw-family-pose{animation:none!important}.mw-can-greet .mw-family-pose-rest{opacity:1}.mw-can-greet .mw-family-pose-wave{opacity:0}}
.mw-commerce-marker .mw-family-character-property,.mw-commerce-property-scene .mw-family-character-property{position:absolute}
/* Keep the enlarged character inside the merchant's clickable area. */
.mw-commerce-marker{padding-top:max(0px,calc(100px - var(--shop-size) * .66))}
