.livestockPanel{margin:20px 0;padding-top:18px;border-top:1px solid #66523b;min-width:0}.livestockPanel h3{margin:0}
.livestockFeedBar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:10px 0}.livestockFeedSlot{display:grid;grid-template-rows:32px auto auto;place-items:center;min-width:0;padding:7px 3px;border:3px ridge #7e6547;background:#211b17;color:#dfd2b3;line-height:1.3}.livestockFeedSlot img{width:32px;height:32px;object-fit:contain}.livestockFeedSlot span{font-size:11px}.livestockFeedSlot strong{font-size:12px;font-weight:400}.livestockEmpty{border-color:#8b4540!important;box-shadow:inset 0 0 10px #7b282644}
.livestockPen{position:relative;width:min(100%,560px);aspect-ratio:1;margin:12px auto 16px;overflow:hidden;background:#45583a var(--pen-grass) repeat;background-size:64px 64px;isolation:isolate;border:2px solid #35251f}.livestockFence{position:absolute;pointer-events:none;z-index:100;background-image:var(--pen-fence);background-repeat:repeat-x;background-size:64px 64px;height:64px;left:0;right:0}.livestockFenceTop{top:-19px;z-index:1}.livestockFenceBottom{bottom:-10px}.livestockFenceLeft,.livestockFenceRight{top:0;bottom:0;height:auto;width:34px;background-repeat:repeat-y;background-size:48px 48px}.livestockFenceLeft{left:-16px;right:auto}.livestockFenceRight{left:auto;right:-16px}
.livestockTrough{position:absolute;top:13%;width:64px;height:64px;transform:translateX(-50%);background:none;border:0;padding:0;z-index:5}.livestockTrough img{width:100%;height:100%;object-fit:contain}.livestockFoodTrough{left:27%}.livestockWaterTrough{left:73%;cursor:pointer}.livestockAnimal{position:absolute;transform:translate(-50%,-50%);width:64px;height:64px;border:0;background:none;padding:0;cursor:pointer;overflow:visible}.livestockAnimalArt{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none}.livestockAnimal:focus-visible{outline:2px solid #eee0b6;outline-offset:2px}.livestockAnimal:hover{filter:brightness(1.12)}.livestockSleepArt{display:none;position:absolute;top:-23px;left:20px;width:32px;height:32px;image-rendering:pixelated;pointer-events:none}.livestockSleeping .livestockSleepArt{display:block}.livestockItemArt,.livestockVendorAnimal{image-rendering:pixelated;object-fit:contain}.livestockGroundProduct{position:absolute;z-index:99;transform:translate(-50%,-50%);display:grid;place-items:center;width:44px;height:44px;padding:3px;border:1px solid transparent;background:none}.livestockGroundProduct img{width:32px;height:32px;image-rendering:pixelated;object-fit:contain}.livestockGroundProduct span{position:absolute;bottom:0;right:0;font-size:10px;line-height:1.2;color:#fff0cb;text-shadow:1px 1px #211b1d}.livestockGroundProduct:hover,.livestockGroundProduct:focus-visible{border-color:#dbb97d;background:#35251f44}.livestockPenEmpty{position:absolute;left:15%;right:15%;top:50%;text-align:center;color:#eee0b6;text-shadow:1px 1px #211b1d;font-size:13px}.livestockDropTarget{outline:2px solid #cbd39c;outline-offset:3px}
.livestockTools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:12px 0}.livestockTools>span{display:flex;align-items:center;font-size:12px}.livestockTools img{width:32px;height:32px}.livestockTools button{font-size:12px;padding:6px 8px}.livestockProducts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.livestockProductRow{display:flex;align-items:center;gap:6px;min-width:0;padding:6px;background:#211b17;border:1px solid #5b3b29;font-size:12px}.livestockProductRow img{width:32px;height:32px}.livestockProductRow span{flex:1;min-width:0}.livestockProductRow button{font-size:11px;min-height:36px;padding:4px 6px}.livestockShopHeading{margin:18px 0 8px}.livestockVendorAnimal{width:64px;height:64px!important}.livestockDetailPortrait{display:flex;align-items:center;gap:12px;margin:8px 0 12px}.livestockDetailPortrait img{width:96px;height:96px}.livestockDetailPortrait>div{font-size:13px}.livestockNeed{margin:7px 0}.livestockNeed>div:first-child{display:flex;justify-content:space-between;font-size:12px}.livestockNeedBar{height:9px;background:#211b1d;border:1px solid #7e6547}.livestockNeedBar>span{display:block;height:100%;background:#9bab71}.livestockAttributes{border-top:1px solid #5b3b29;margin-top:10px;padding-top:8px;font-size:12px;color:#dbb97d}.livestockAttributes>div{margin:4px 0}
@media(max-width:480px){.livestockFeedBar{gap:4px}.livestockFeedSlot{grid-template-rows:32px auto auto;padding:5px 2px}.livestockFeedSlot img{width:32px;height:32px}.livestockFeedSlot span{font-size:10px}.livestockFeedSlot strong{font-size:10px}.livestockProducts{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.livestockAnimal{transition:none}}
/* Press feedback must retain the absolute-position anchors. */
.livestockPen button:is(.livestockAnimal,.livestockGroundProduct):is(:active,.isPressed){transform:translate(-50%,-50%);filter:brightness(.8);box-shadow:none;transition:none}
.livestockPen button.livestockTrough:is(:active,.isPressed){transform:translateX(-50%);filter:brightness(.8);box-shadow:none;transition:none}
