/* Painted building and its hit targets move together when the camera zooms.
   The walk cycle is drawn in front of the house, behind its invisible door control. */
.coop-footprint {
  position:absolute;
  left:1.9%; bottom:41.8%; width:12.7%; aspect-ratio:600 / 432;
  pointer-events:none;
}
.coop-painting { z-index:1; }
.coop-painting::before {
  content:""; position:absolute; z-index:-1; left:8%; right:3%; bottom:5%; height:20%;
  background:radial-gradient(ellipse,#594a2d66,transparent 68%);
  transform:rotate(-6deg);
}
.coop-building { display:block; width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 1px 1px #58482c4d); }
/* Anchor hints outside the artwork and the coop's clipped hit area. */
.building-hint {
  position:absolute; z-index:4; bottom:calc(100% + 3px); width:max-content;
  max-width:min(19em,80vw); padding:4px 9px; border-radius:5px;
  background:#fcf6e9f5; color:#394837; box-shadow:0 2px 7px #313a3429;
  font:600 13px/1.45 var(--book),serif; text-align:start;
  visibility:hidden; pointer-events:none;
}
#coopHint { left:0; }
#kennelHint { right:0; }
#coopStation:focus-visible + .building-hint,
#dogHouse:focus-visible .building-hint { visibility:visible; }
@media (hover:hover) and (pointer:fine) {
  #coopStation:hover + .building-hint,
  #dogHouse:hover .building-hint { visibility:visible; }
}
#coopStation {
  position:absolute; inset:0; width:100%; height:100%; padding:0; background:transparent;
  border:0; box-shadow:none; cursor:pointer; pointer-events:auto; touch-action:manipulation;
  clip-path:polygon(0 34%,16% 22%,25% 0,88% 0,100% 30%,98% 74%,84% 83%,86% 100%,59% 100%,48% 84%,8% 78%,2% 64%);
}
#coopStation:focus-visible { background:#ffd98424; }
#viewport:has(#coopStation:focus-visible) .coop-building { filter:drop-shadow(0 0 2px #ffdf86) drop-shadow(0 0 5px #f8f1bd); }
.coop-nest {
  position:absolute; inset:auto; left:0; top:39%; width:29%; height:34%;
  min-width:25px; min-height:26px; padding:0; background:none; border:none;
  box-shadow:none; pointer-events:auto; cursor:pointer; touch-action:manipulation; z-index:1;
}
.coop-egg-clutch { position:absolute; left:4.1%; top:48.2%; width:19.7%; height:13.9%; pointer-events:none; }
.coop-egg-clutch img { position:absolute; bottom:1%; left:26%; width:54%; height:94%; object-fit:contain; filter:drop-shadow(0 1px 1px #674c32); }
.coop-egg-clutch img:nth-child(2) { left:2%; width:52%; bottom:-4%; transform:rotate(-13deg); }
.coop-egg-clutch img:nth-child(3) { left:49%; width:51%; bottom:-5%; transform:rotate(12deg); }
.coop-egg-clutch[data-clutch="1"] img:nth-child(n+2),.coop-egg-clutch[data-clutch="2"] img:nth-child(3) { display:none; }
.coop-pick-tag {
  position:absolute; bottom:calc(100% + 2px); left:50%; transform:translateX(-45%); white-space:nowrap;
  color:#594122; font:700 clamp(10px,.86vw,14px)/1.3 var(--book);
  padding:2px 5px; border:1px solid #ab8d59; border-radius:4px; background:#fff7dced; box-shadow:0 1px 2px #72553445;
}
@media(hover:hover) {
  .coop-nest:hover .coop-pick-tag { color:#853e22; background:#f7dab1; }
}
@media(orientation:portrait) {
  .coop-footprint { left:13%; bottom:64.2%; width:23.5%; }
}

#panel[data-panel="coop"] { --stamp:var(--coop-exterior, url("art/henhouse-watercolor.webp")); }
#panel #farmPlacesList [data-page="coop"] img { content:var(--coop-exterior, url("art/henhouse-watercolor.webp")); }
