/* Page-local mascot overlay. Original map controls remain unchanged. */
.jd-mascot-controls{max-width:732px;margin:10px auto 0;padding:9px 14px;border:1px dashed #a9bda8;border-radius:12px;background:#fffaf0;color:#506245;font:12px/1.6 system-ui,sans-serif;display:flex;gap:5px 14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.jd-mascot-controls a{color:#506245;font-weight:700}.jd-mascot-controls small{display:block;font-size:10px;color:#707861}
.jd-friend{position:absolute;right:12px;bottom:36px;z-index:700;pointer-events:none;font-family:inherit}
.jd-friend [hidden]{display:none!important}.jd-friend[data-obscured=true]{visibility:hidden}
.jd-friend button{pointer-events:auto;font-family:inherit;cursor:pointer}
.jd-friend-avatar{display:block;width:84px;height:126px;padding:0;border:0;background:none;filter:drop-shadow(0 4px 3px #122e2630);transform-origin:50% 90%;animation:jd-market-greet 7s ease-in-out infinite}
.jd-friend-avatar svg{width:100%;height:100%;overflow:hidden}
.jd-friend-bubble{position:absolute;right:0;bottom:153px;width:max-content;max-width:calc(100vw - 112px);padding:8px 32px 8px 11px;min-height:0;border:1px solid #d8c8ab;border-radius:18px 18px 5px 18px;background:#fffdf6;color:#4a5135;box-shadow:0 6px 16px #40351d20;pointer-events:auto}
.jd-friend-bubble::after{content:'';position:absolute;right:32px;bottom:-7px;width:12px;height:12px;transform:rotate(45deg);background:#fffdf6;border-bottom:1px solid #d8c8ab;border-right:1px solid #d8c8ab}
.jd-friend-bubble p{margin:0;font-size:13px;line-height:1.45;word-break:keep-all}.jd-friend-bubble strong{display:block;font-size:13px;margin-bottom:2px}
.jd-friend-close{position:absolute;right:2px;top:2px;width:28px;height:28px;border:0;background:transparent;color:#6c775d;font-size:20px}
.jd-friend-label{display:block;text-align:center;font-size:10px;background:#fffdf2e8;border-radius:12px;color:#506245;padding:3px 5px;margin-top:4px}
.jd-friend-controls{display:flex;gap:5px;flex-wrap:wrap}.jd-friend-controls button{min-height:36px;padding:4px 8px;font-size:10px;border:1px solid #d9dfcf;border-radius:20px;background:#f6f7ed;color:#506245;cursor:pointer}
.jd-friend button:focus-visible,.jd-mascot-controls button:focus-visible{outline:3px solid #56804f;outline-offset:3px}
.jd-friend[data-paused=true] .jd-friend-avatar{animation:none}
@keyframes jd-market-greet{0%,70%,100%{transform:translateY(0) rotate(0)}80%{transform:translateY(-3px) rotate(-2deg)}90%{transform:translateY(-1px) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.jd-friend-avatar{animation:none!important}}
@media(max-width:740px){.jd-mascot-controls{margin:8px 20px 0}.jd-friend{right:10px;bottom:34px}.jd-friend-avatar{width:72px;height:108px}.jd-friend-bubble{bottom:135px}}

/* Compact settings remain outside the map and available when the mascot is hidden. */
.jd-mascot-controls{box-sizing:border-box;width:100%;max-width:449px;margin:4px auto 8px;padding:0;border:0;border-radius:0;background:none;display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;font:12px/1.4 system-ui,sans-serif}.jd-mascot-controls [hidden]{display:none!important}.jd-mascot-controls button{min-height:36px;cursor:pointer}.jd-mascot-controls button:focus-visible{outline:3px solid #2e7357;outline-offset:2px}
/* Follow the map in the original ordered layout. */
.layout>.jd-mascot-controls{order:1}
