/* N1.5: pie anclado exactamente a la celda, proporciones respecto al gato.
 * Ningún fondo de sprite ni máscara negra. Geometría y mundo autoritativo intactos.
 */
.caelytte-monster-groups-layer{position:fixed;inset:0;pointer-events:none;z-index:16;contain:layout style}
.caelytte-monster-groups-layer[hidden]{display:none!important}
.caelytte-monster-group{position:absolute;transform:translate(-50%,-100%) scale(var(--world-zoom,1));transform-origin:50% 100%;pointer-events:none;display:block;width:136px;height:110px;min-width:0;min-height:0;background:transparent!important;border:0!important;outline:0;box-shadow:none!important;padding:0;margin:0;cursor:pointer;isolation:isolate;-webkit-tap-highlight-color:transparent}
.caelytte-monster-group img{position:absolute;bottom:0;display:block;max-width:none;max-height:none;object-fit:contain;object-position:center bottom;background:transparent!important;border:0!important;box-shadow:none!important;transform:translateX(-50%);pointer-events:auto;cursor:pointer;user-select:none;-webkit-user-drag:none}
.caelytte-monster-group:hover img,.caelytte-monster-group:focus-visible img{filter:brightness(1.12)}
.caelytte-monster-group:focus-visible:after{content:'';position:absolute;inset:-2px;border:2px solid #f6d68e;border-radius:16px;pointer-events:none}
.caelytte-monster-groups-tooltip{position:fixed;z-index:10001;width:290px;max-height:60vh;overflow:auto;pointer-events:none;color:#f6ead2;background:#111e20f4;border:1px solid #bb9d65;border-radius:10px;padding:9px 11px;box-shadow:0 8px 25px #000b;font:13px/1.4 system-ui,sans-serif}
.caelytte-monster-groups-tooltip[hidden]{display:none!important}
.caelytte-monster-groups-tooltip strong{display:block;font-size:15px;margin-bottom:6px}
.caelytte-monster-info-member{display:flex;gap:8px;align-items:center;padding:3px 0;border-bottom:1px solid #ffffff20}
.caelytte-monster-info-member img{width:36px;height:35px;object-fit:contain;background:transparent;border:0}
.caelytte-monster-groups-tooltip small{display:block;margin-top:8px;color:#f0c992}

.caelytte-monster-group img[hidden]{display:none!important}

/* N3.7 creature drawings remain below modal layers and never intercept blocked UI. */
.caelytte-monster-group{width:100px;height:76px}
body.n37-combat-active .caelytte-monster-groups-layer,body.n37-combat-active .caelytte-monster-groups-tooltip{display:none!important}

/* N3747 Phaser native monster depth painter. HTML remains for tooltip + click. */
body.n3747-native-monsters .caelytte-monster-group img{opacity:0!important}

/* LAB06 five server-approved diamond-age marks; overlay does not alter world geometry. */
.caelytte-monster-group .caelytte-age-diamonds{position:absolute;bottom:calc(100% + 4px);left:50%;transform:translateX(-50%);white-space:nowrap;z-index:500;pointer-events:none;font:900 15px/1 system-ui,sans-serif;letter-spacing:1px;color:#ffdf5c;text-shadow:0 1px 2px #171106,0 0 6px #000,0 0 2px #000;}
.caelytte-monster-groups-tooltip .caelytte-age-diamonds{display:block;margin:6px 0;text-align:center;color:#ffd856;font:900 22px/1.2 system-ui,sans-serif;letter-spacing:3px;text-shadow:0 1px 3px #000;}

.caelytte-age-diamonds .hollow{color:#d6d4cc;opacity:.85;text-shadow:0 1px 2px #000;}
.caelytte-age-diamonds .active{color:#ffe04b;text-shadow:0 1px 2px #000,0 0 7px #cf9d08;}

/* LAB06 age overhaul: yellow (0-50min), orange replacement (60-100min); never float above UI. */
.caelytte-monster-groups-layer{z-index:8!important}
.caelytte-monster-groups-tooltip{z-index:8!important}
.caelytte-age-diamonds .yellow{color:#ffe04b;text-shadow:0 1px 2px #000,0 0 7px #cf9d08}
.caelytte-age-diamonds .orange{color:#ff8a1c;text-shadow:0 1px 2px #000,0 0 8px #ed6300}
body:has(#hud-root .hud-overlay:not([hidden])) .caelytte-monster-groups-layer,
body:has(#hud-root .hud-overlay:not([hidden])) .caelytte-monster-groups-tooltip{display:none!important}

/* QA2: prevent diamond/tooltip from overlapping actual nonmodal Mochila/Estadisticas workspace. */
body:has(.caelytte-workspace-panel) .caelytte-monster-groups-layer,
body:has(.caelytte-workspace-panel) .caelytte-monster-groups-tooltip,
body:has(#n28-trade-panel:not([hidden])) .caelytte-monster-groups-layer,
body:has(#n28-trade-panel:not([hidden])) .caelytte-monster-groups-tooltip {display:none!important}
.caelytte-monster-groups-tooltip .caelytte-exp-preview{white-space:normal;overflow-wrap:break-word;color:#ffdf8c}
.caelytte-monster-groups-tooltip .caelytte-qa-build{font-size:10px;color:#bcaf88}

/* P23 FIX4 — persistent, touch-accessible monster inspection and explicit confirmation. */
.caelytte-monster-groups-tooltip:not([hidden]){pointer-events:auto;z-index:38!important;max-width:calc(100vw - 16px);touch-action:pan-y;}
.caelytte-monster-groups-layer{z-index:18!important}
.p24-monster-actions{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-top:10px;}
.p24-monster-actions button{touch-action:manipulation;min-height:43px;min-width:90px;border:1px solid #b8a47b;border-radius:7px;padding:8px 15px;background:#1a2b35;color:#fff;font-size:14px;font-weight:800;cursor:pointer;}
.p24-monster-actions .p24-monster-attack{background:#70402b;border-color:#e0a571;color:#fff5d7;flex:1;}
@media (max-width:600px){.caelytte-monster-groups-tooltip:not([hidden]){width:min(320px,calc(100vw - 16px));font-size:14px;}}

/* Ensure touch hit area works even while monster PNG has not loaded. */
.caelytte-monster-groups-layer .caelytte-monster-group{pointer-events:auto!important;}
