.MapChars{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 10;
	will-change: transform;
}
.MapMover {
    position: absolute;
    inset: 0;                 /* ocupa TODO o MapContainer */
    width: 100%;
    height: 100%;

    transform: translate3d(0, 0, 0);
    will-change: transform;
	
	z-index: 10;
}
.MapTable {
	table-layout: fixed;
    position: absolute; /* ou relative, mas seja explícito */
    left: 0;
    top: 0;
	width: 100%;
    height: 100%;
    white-space: nowrap;
	border-collapse: collapse;
	will-change: transform;
}
.MapTable td {
	background-size: 100% 100%;
	background-repeat: no-repeat;
	background-position: center;
	/*background: round;*/
    /*background-repeat: round;*/
}
.cellLayer {
	pointer-events: none;
	background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transition: filter 1.5s ease;
}
.cellLayer::after {
	content: "";
	position: absolute;
	inset: 0;

	background: inherit;
	background-size: inherit;
	background-repeat: inherit;
	background-position: inherit;

	pointer-events: none;
	z-index: -1;
	transition: filter 1.5s ease;
}
.cellLayerContainer {
	pointer-events: none;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
	transition: filter 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.cellLayerContainer.blur {
	filter: blur(1px) brightness(75%);
	transform: scale(1.1);
}
/* DEV-only visual debugger: the class is toggled only while LOR_DEV_MODE is active. */
.MapContainer.visualDebugForceBlur .cellLayerContainer {
	filter: blur(1px) brightness(75%);
	transform: scale(1.1);
}
.cellLayerContainer.no-weather {
  outline: 2px solid red;
}
.charProfileResumeAttributeIcon {
	width: 20px;
    height: 20px;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 5px;
	flex-shrink: 0;
	filter: drop-shadow(1px 0 0 gray) drop-shadow(-1px 0 0 gray) drop-shadow(0 1px 0 gray) drop-shadow(0 -1px 0 gray);
	/*background-color: #734f00;
    box-shadow: inset 4px 3px 4px rgb(0 0 0 / 50%);*/
}
.charProfileResumeCombatAttrText {
	display: flex;
	/*height: 20px;*/
    flex-wrap: nowrap;
    align-items: center;
}
.fxLayerEffect {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: filter 0.5s ease;
}
.fxLayerEffect.blur {
	filter: blur(2px);
}
.icon-bag { background-image: url("../assets/img/icons/backpack.webp"); }
.icon-gold { background-image: url("../assets/img/icons/gold.webp"); }
.item-icon-retrieve { background-image: url("../assets/img/icons/retrieve_to_backpack.webp"); }
.lootBoxCharBagBarContainer{
	min-width: 100px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}
.lootBoxCharBagProgressBarContainer {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    padding-left: 5px;
    padding-right: 5px;
    min-width: 100px;
}
.lootBoxCharGoldText {
	color: wheat;
    font-weight: bolder;
}
.lootPickAllButton {
	pointer-events: none;
}
.storageBoxMapLootBagContainer {
	display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    min-height: 100px;
	width: 100%;
    border-radius: 5px;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-image: url(../assets/img/background/mapDroppedItem/lootBoxBottomContainer.webp);
}
.storageBoxMapLootBagContainerBar {
	display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    height: 30px;
	width: 100%;
    text-shadow: 1px 1px 2px #000000;
    font-size: medium;
    /*margin-top: 10px;
    margin-left: 25px;
    margin-right: 25px;*/
    border-radius: 5px;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.storageBoxMapLootBottomBar {
	display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    /* height: 50px; */
    margin-bottom: 15px;
    /* margin-top: 15px;*/
}
.storageBoxMapLootCharBagInfoContainer {
	display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    min-height: 100px;
    /* flex: 1; */
    width: 100%;
}
.storageBoxMapLootContainer{
    width: 100%;
    height: 100%;
}
.storageBoxMapLootContainerContent{
    width: 100%;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    /* flex-direction: column; */
    flex-wrap: wrap;
}
.storageBoxMapLootContentItems {
	display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
	align-items: center;
    min-height: 100px;
    border-radius: 5px;
    overflow: scroll;
    scrollbar-width: none;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-image: url(../assets/img/background/mapDroppedItem/lootBoxItemContainer.webp);
}
.storageBoxMapLootItemBox{
    width: 50px;
    height: 50px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
	margin: 5px;
}
.storageBoxMapLootTopBar {
	height: 40px;
    width: 100%;
    display: flex;
    font-size: large;
    align-content: center;
    justify-content: center;
    flex-wrap: nowrap;
}
.storageBoxMapLootTopText {
	height: 30px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    text-shadow: 1px 1px 2px #000000;
    font-size: medium;
}
.storageChestBottomBar {
	width: 100%;
    height: 50px;
    background-image: url(../assets/img/background/mapStorage/ChestBottomBar.webp);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
	padding-top: 5px;
    padding-bottom: 5px;
}
.storageChestContainer {
	display: flex;
    justify-content: center;
    flex-wrap: wrap;
    flex-grow: 1;
	min-height: 1px;
	background-image: url(../assets/img/background/mapStorage/ChestContent.webp);
    background-size: 100% 100%;
    background-repeat: no-repeat;
	align-content: center;
    padding-left: 5px;
    padding-right: 5px;
}
.storageChestTopBar {
	width: 100%;
    height: 50px;
    font-weight: bold;
    font-size: large;
    background-image: url(../assets/img/background/mapStorage/ChestTopBar.webp);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
}
.storageContainer{
    display: flex;
    height: stretch;
    width: min-content;
    flex-wrap: nowrap;
    flex-direction: column;
}
.storageItem {
	width: 100%;
	height: 100%;
	background-size: 70% 70%; 
	background-repeat: no-repeat;
	background-position: center;
}
.storageItemBox {
    float: left;
    height: 50px;
    width: 50px;
    margin: 5px;
	/*padding: 10px;*/
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
	background-size: 100% 100%; background-repeat: no-repeat;
}
.storageItemContainer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
	align-content: space-between;
	flex-direction: column;
	width: 100%;
	max-width: min(400px, 100%);
	height: 100%;
}
.storageLootContainer {
    display: flex;
    justify-content: center;
    flex-direction: column;
	width: 100%;
	max-width: min(400px, 100vw);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    flex-wrap: nowrap;
    padding: 5px;
}

/* NPCs are selectable above the map; only configured NPCs capture clicks. */
.MapChars .MapChar[data-npc-actions]{pointer-events:auto;cursor:pointer}
.MapChars .MapChar[data-npc-actions]:hover,.MapChars .MapChar[data-npc-actions]:focus-visible{filter:drop-shadow(0 0 5px #ffd783) drop-shadow(0 0 8px #d6a34a);outline:0}
.lorNpcMapContext{position:fixed;z-index:999911;min-width:215px;max-width:min(300px,92vw);display:grid;gap:5px;padding:10px;color:#f5dba9;border:1px solid #947047;border-radius:6px;background:rgba(20,13,10,.96) url('../../assets/img/background/interface/menuBG.webp') center/100% 100%;box-shadow:0 12px 30px #000a}
.lorNpcMapContext>strong{display:block;text-align:center;font:700 16px Georgia,serif;padding:4px 7px 9px;border-bottom:1px solid #7a5437}
.lorNpcMapContext .lorNpcMenuOption{display:flex;align-items:center;gap:11px;min-height:40px;width:100%;padding:6px 12px;color:#f5dba9;font:700 13px Georgia,serif;text-align:left;background:rgba(60,37,23,.7) url('../../assets/img/background/interface/menuItemList.webp') center/100% 100%;border:0;cursor:pointer}
.lorNpcMapContext .lorNpcMenuOption:hover,.lorNpcMapContext .lorNpcMenuOption:focus-visible{filter:brightness(1.18);outline:1px solid #b98b4b}
.lorNpcMapContext .lorNpcMenuOption img{width:23px;height:23px;object-fit:contain;image-rendering:pixelated}

/* LOR 2.6.2: the self sprite is clickable without blocking other map cells. */
.MapChars .MapChar[self="yes"]{pointer-events:auto;cursor:pointer}
/* Self context menu uses the shared leather/wood textures. */
.lorSelfMapContext{position:fixed;z-index:999902;width:235px;max-width:92vw;padding:9px;background:#1f140e url('../assets/img/background/interface/menuBG.webp') center/100% 100% no-repeat;border:1px solid #95612e;border-radius:5px;box-shadow:0 8px 30px #000b;color:#e7bd74;font:700 14px Georgia,serif}
.lorSelfMapContext>strong{display:block;text-align:center;padding:7px 4px 12px;color:#f5d899;border-bottom:1px solid #7c5128}
.lorSelfMapOption{display:flex;align-items:center;gap:10px;border:0;width:100%;min-height:44px;text-align:left;padding:6px 12px;background:transparent url('../assets/img/background/interface/menuItemList.webp') center/100% 100% no-repeat;color:inherit;font:inherit;cursor:pointer}
.lorSelfMapOption img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated}
.lorSelfMapOption:hover,.lorSelfMapOption:focus-visible{filter:brightness(1.25);outline:1px solid #d7a15f}

/* Self menu heading: live character name and level. */
.lorSelfMapContext>strong .lorSelfMapLevel{display:block;margin-top:3px;font:600 12px Georgia,serif;color:#d6b47b;line-height:1.35}

/* Map regeneration feedback: local character only. */
.MapChar[self="yes"] > .lorMapRegenHeal {
    position:absolute;left:50%;bottom:90%;transform:translate(-50%,0);
    pointer-events:none;white-space:nowrap;z-index:30;color:#80ff82;
    font-family:inherit;font-size:clamp(13px,1.2vw,18px);font-weight:900;line-height:1;
    text-shadow:-1px -1px #123019,1px 1px #123019,0 0 7px #0d440e;
    animation:lorMapRegenRise 1.35s ease-out both;
}
@keyframes lorMapRegenRise{0%{opacity:0;transform:translate(-50%,4px) scale(.85)}15%{opacity:1;transform:translate(-50%,-5px) scale(1)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-37px) scale(1.07)}}
@media(prefers-reduced-motion:reduce){.MapChar[self="yes"] > .lorMapRegenHeal{animation-duration:.25s}}

/* Storage <-> bag unit drag: visual-only icon ghost (no quantity or badges). */
.lorStorageTransferGhost {
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,.65));
    will-change: left, top;
}
.lorStorageTransferGhost.lorStorageTransferValid {
    filter: drop-shadow(0 0 7px rgba(190,245,165,.95));
}
.storageContainer #storageBoxContainer [origin="storageItem"],
.storageContainer #storageBoxCharBag [origin="charBagItemBox"] {
    touch-action: none;
    cursor: grab;
}

.lorSelfMapContext .lorContextHeading .lorSelfMapLevel{display:block;font:600 11px Georgia,serif;color:#d2a770}
.lorNpcMapContext .lorContextPortrait,.lorSelfMapContext .lorContextPortrait{background-size:cover}

/* Context portrait artwork matches character sheet rather than map walking sprites. */
#lorNpcMapContext .lorContextHeading,#lorSelfMapContext .lorContextHeading{justify-content:flex-start;text-align:left}
#lorSelfMapContext .lorSelfPortrait{background-size:contain;background-position:center}
