/* MANAVGOAT discovery: one self-contained control, not the animation menu. */
.goat-controls{
 position:absolute;z-index:5;top:auto;right:auto;
 left:clamp(10px,1.8vw,23px);
 bottom:calc(clamp(10px,1.8vw,23px) + 2 * 43px + 6px + 8px);
}
.goat-toggle{
  display:flex;align-items:center;justify-content:center;
  width:43px;height:43px;padding:7px;border:1px solid var(--stroke);
  border-radius:13px;background:#fffefbf2;color:#526c4b;
  box-shadow:var(--shadow);cursor:pointer;
}
.goat-toggle svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round}
.goat-toggle:hover,.goat-toggle[aria-expanded="true"]{background:#e1f3e6}
.goat-panel{
  position:absolute;top:auto;left:calc(100% + 9px);right:auto;bottom:0;
  width:min(292px,calc(100vw - 75px));
  padding:15px;background:#fffefb;border:1px solid #b8d2c0;
  border-radius:15px;box-shadow:var(--shadow);font-size:13px;
  line-height:1.5;color:var(--ink);
}
.goat-panel[hidden]{display:none}
.goat-panel strong{font-size:15px}
.goat-panel p{margin:8px 0}
.goat-go-to{
  background:#e8f3e8;border:1px solid #9ac7ab;color:#23593e;
  padding:9px 11px;border-radius:10px;font:700 12px system-ui,sans-serif;
}
.goat-go-to:disabled{opacity:.5}
.goat-status{min-height:0;color:#2f7652;font-weight:700}
.stage.preparing .goat-controls{visibility:hidden}

@media(max-width:620px){
  .goat-controls{right:auto;left:9px;bottom:calc(9px + 2 * 39px + 6px + 8px)}
  .goat-toggle{width:39px;height:39px;border-radius:11px}
  .goat-panel{width:min(292px,calc(100vw - 75px))}
}

/* Highlight the discovery control and offer a genuinely independent finding popup. */
.goat-toggle{background:#dcefc8;border-color:#a7c992;color:#365638}
.goat-toggle:hover,.goat-toggle[aria-expanded="true"]{background:#cde8b4;border-color:#86b77e}
.goat-info-marker{position:absolute;z-index:7;width:33px;height:33px;border-radius:50%;background:#e1f2bd;border:2px solid #47845c;color:#224b3a;font:900 18px system-ui,sans-serif;box-shadow:0 4px 13px #163f2a44;transform:translate(-50%,-100%)}
.goat-info-marker[hidden],.goat-found-popup[hidden]{display:none!important}
.goat-info-marker:hover{background:#bde5cf}
.goat-found-popup{position:absolute;z-index:8;bottom:75px;left:50%;transform:translateX(-50%);width:min(300px,calc(100% - 36px));background:#fffefb;color:var(--ink);border:1px solid #a6d1b2;border-radius:15px;padding:15px 42px 15px 16px;box-shadow:0 12px 28px #153c2b38;font-size:13px;line-height:1.5}
.goat-found-popup strong{font-size:16px}
.goat-found-popup p{margin:7px 0 0}
#goatInfoClose{position:absolute;top:4px;right:7px;width:30px;height:30px;background:transparent;border:0;font-size:24px;color:#37624e}
.stage.preparing .goat-info-marker,.stage.preparing .goat-found-popup{display:none!important}

/* Near-only visual info bubble; z-index is BELOW open menu panels. */
.goat-info-marker{width:27px;height:27px;font-size:14px;z-index:3}
.goat-info-marker::after{content:"";position:absolute;top:21px;left:9px;border-width:7px 4px 0;border-style:solid;border-color:#47845c transparent transparent;pointer-events:none}
.goat-found-popup{z-index:4;bottom:auto;left:auto;transform:none;width:min(278px,calc(100% - 26px));padding:12px 37px 12px 14px;max-height:42dvh;overflow:auto}
.goat-found-popup strong{font-size:14px}
.goat-go-to[hidden]{display:none!important}

/* The discovery payoff is deliberately one short bleat, not a paragraph. */
.goat-found-popup .goat-bleat{margin:0;text-align:center;font:900 23px/1.4 system-ui,sans-serif;letter-spacing:.04em}
