/* Eldrius V158 — adaptação do Perfil Compacto 2 enviado pelo jogador.
   Integrado ao painel já existente (#characterProfile); sem modal duplicado. */
#hud>#characterProfile{box-sizing:border-box;min-width:0;max-height:min(87dvh,800px);border:2px solid #b98b43;border-radius:12px;background:linear-gradient(160deg,#201724,#130f1a);color:#f1dfb3;padding:0!important;scrollbar-color:#b98b43 #201625}
#hud>#characterProfile.eld87-window{width:min(800px,96vw)!important;max-height:min(86dvh,800px)!important;padding:0!important;overflow:auto!important}
#characterProfile .ep-head{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #a37b3c;background:#1c1520;padding:11px 13px;position:sticky;top:0;z-index:4}
#characterProfile .ep-head .ep-heading{font:bold clamp(15px,2vw,21px) Georgia,serif;color:#f4d58a;white-space:nowrap}
#characterProfile .ep-head button{background:#2b2219;border:1px solid #997137;border-radius:6px;color:#ffe6a0;padding:4px 12px;cursor:pointer;min-width:32px;min-height:32px}
#characterProfile .ep-main{display:grid;grid-template-columns:minmax(92px,112px) minmax(200px,1fr) minmax(152px,180px);gap:10px;padding:11px;align-items:start;min-width:0}
#characterProfile .ep-menu{display:flex;flex-direction:column;gap:5px;min-width:0}
#characterProfile .ep-tab{font:12px/1.2 Georgia,serif;min-height:41px;text-align:left;background:#241b28;border:1px solid #5c4632;color:#f2dfb5;border-radius:6px;padding:8px 7px;cursor:pointer}
#characterProfile .ep-tab[aria-selected="true"]{background:#704619;color:#fff0b8;border-color:#e9b65b;box-shadow:inset 0 0 8px #fdbb4228}
#characterProfile .ep-center{min-width:0}
#characterProfile .ep-name{text-align:center;color:#ffe6ae;font-weight:bold;font-size:14px}
#characterProfile .ep-class{text-align:center;color:#d9b376;font-size:11px;margin:3px 0 8px}
#characterProfile .ep-equip{display:grid;grid-template-columns:minmax(42px,62px) minmax(90px,1fr) minmax(42px,62px);gap:5px;align-items:center;justify-content:center;min-width:0}
#characterProfile .ep-slots{display:flex;flex-direction:column;gap:6px}
#characterProfile .ep-slot.profile-slot{display:flex!important;flex-direction:column;justify-content:center!important;align-items:center!important;gap:2px;box-sizing:border-box;min-height:50px!important;width:100%;height:50px!important;padding:3px!important;position:relative;border:1px solid #87653a;border-radius:6px;background:#101019!important;color:#e8d6b6;cursor:pointer;overflow:hidden}
#characterProfile .ep-slot.profile-slot.eld-empty-slot{border:1px solid #4b3d47!important;background:#09090d!important;box-shadow:inset 0 0 6px #000b!important}
#characterProfile .ep-slot.profile-slot.selected{outline:2px solid #e8b955;outline-offset:0}
#characterProfile .ep-slot .ep-item-art{display:flex;justify-content:center;align-items:center;width:100%;height:100%;min-height:0;overflow:hidden}
#characterProfile .ep-slot .ep-item-art canvas{width:44px!important;height:44px!important;max-width:95%!important;max-height:95%!important;object-fit:contain;transform:none!important}
#characterProfile .ep-slot.eld-real-equipped .ep-item-art canvas{image-rendering:auto!important}
#characterProfile .ep-slot.eld-demon-item .ep-item-art canvas{width:46px!important;height:46px!important}
#characterProfile .ep-slot .ep-slot-name{display:none}
#characterProfile .ep-hero{position:relative;display:flex;flex-direction:column;min-width:0;align-items:center;justify-content:center;padding:4px;min-height:275px;background:radial-gradient(ellipse at center,#2e2c43 0%,#171522 67%,#101017);border:1px solid #8e6d37;border-radius:7px;overflow:hidden}
#characterProfile .ep-hero canvas{display:block;width:100%;height:auto;max-width:205px;max-height:266px;object-fit:contain;image-rendering:pixelated}
#characterProfile .ep-below{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:7px 0}
#characterProfile .ep-below .ep-slot{width:50px;height:50px!important}
#characterProfile .ep-power{margin-top:8px;text-align:center;border:1px solid #b7893b;border-radius:7px;background:linear-gradient(125deg,#34241d,#1b1828);padding:9px 4px;font-size:11px;color:#eac681}
#characterProfile .ep-power strong{display:block;font:bold 23px Georgia,serif;color:#ffe3a2}
#characterProfile .ep-side{min-width:0;border-left:1px solid #665032;padding-left:9px}
#characterProfile .ep-section-title{color:#f6ca75;font:bold 15px Georgia,serif;padding:5px 0;border-bottom:1px solid #75552c;margin-bottom:5px}
#characterProfile .ep-stat{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #453842;padding:6px 0;font-size:12px}
#characterProfile .ep-stat strong{color:#ffe6b5;text-align:right}
#characterProfile .ep-bonus{font-size:11px;line-height:1.4;white-space:pre-line;margin:7px 0}
#characterProfile .ep-bonus p{margin:5px 0}
#characterProfile .ep-page{display:flex;flex-direction:column;gap:7px;padding:9px;border:1px solid #493b41;border-radius:7px;background:#1b1722;font-size:12px;min-height:180px}
#characterProfile .ep-page h3{color:#f3c674;margin:0 0 5px;font-size:14px}
#characterProfile .ep-page button,#characterProfile .ep-selection button,#characterProfile .ep-side button{font:12px Georgia,serif;padding:7px 8px;margin:3px 0;border-radius:6px;border:1px solid #96723a;background:#34251c;color:#f8dfab;cursor:pointer;width:100%;text-align:left;overflow-wrap:anywhere}
#characterProfile .ep-selection{font-size:11px;padding-top:8px;border-top:1px solid #715335;margin-top:8px}
#characterProfile .ep-selection strong{display:block;color:#f5d58a;font-size:12px;margin-bottom:5px}
#characterProfile .ep-selected-desc{color:#d9c5a1;overflow-wrap:anywhere}
#characterProfile .ep-hint{color:#cbb78f;font-size:11px;line-height:1.3;margin-top:8px}
@media(max-width:800px){#hud>#characterProfile.eld87-window{width:min(96vw,700px)!important}#characterProfile .ep-main{grid-template-columns:90px minmax(150px,1fr) 145px;gap:6px;padding:6px}#characterProfile .ep-hero{min-height:215px}#characterProfile .ep-hero canvas{max-height:205px}#characterProfile .ep-slot.profile-slot{height:43px!important;min-height:43px!important}#characterProfile .ep-slot .ep-item-art canvas{width:38px!important;height:38px!important}}
@media(max-width:570px){#characterProfile .ep-main{grid-template-columns:72px minmax(0,1fr);gap:5px;padding:6px}#characterProfile .ep-tab{font-size:10px;padding:6px 3px;min-height:34px}#characterProfile .ep-side{grid-column:2;grid-row:auto;border-left:none;border-top:1px solid #75552c;padding:7px 0 0}#characterProfile .ep-equip{grid-template-columns:minmax(33px,45px) minmax(66px,1fr) minmax(33px,45px);gap:3px}#characterProfile .ep-slot.profile-slot{height:38px!important;min-height:38px!important;padding:1px!important}#characterProfile .ep-slot .ep-item-art canvas{width:34px!important;height:34px!important}#characterProfile .ep-hero{min-height:172px;padding:2px}#characterProfile .ep-hero canvas{max-height:166px}#characterProfile .ep-name{font-size:12px}#characterProfile .ep-power strong{font-size:20px}}
/* Preserva a abertura conjunta da Mochila e Perfil em landscape e retrato. */
@media(min-width:901px){#hud.eld-bag-profile>#characterProfile{max-width:min(595px,53vw)!important}}
@media(max-width:900px) and (orientation:landscape){#hud.eld-bag-profile>#characterProfile{max-width:49vw!important}}

/* V196 — opções de equipamento por toque, sobre o Perfil e a Mochila no celular. */
#eldrius-profile-item-actions-v196.eld-profile-actions-overlay{
 position:fixed!important;inset:0!important;z-index:2147483000!important;
 background:rgba(8,6,13,.73)!important;display:flex!important;justify-content:center!important;
 align-items:center!important;padding:16px!important;box-sizing:border-box!important;
 font:13px/1.35 Arial,sans-serif!important;color:#fbe9c6!important;
 touch-action:manipulation;
}
#eldrius-profile-item-actions-v196 .eld-profile-actions-dialog{
 box-sizing:border-box;width:min(345px,calc(100vw - 32px));max-height:min(78dvh,530px);overflow:auto;
 overscroll-behavior:contain;background:linear-gradient(150deg,#312331,#171421);
 border:2px solid #caa45a;border-radius:12px;box-shadow:0 12px 50px #000e;
 padding:15px;display:flex;flex-direction:column;align-items:stretch;gap:9px;
}
#eldrius-profile-item-actions-v196 .eld-profile-actions-title{
 display:flex;flex-direction:column;gap:2px;border-bottom:1px solid #806034;padding-bottom:9px;
}
#eldrius-profile-item-actions-v196 .eld-profile-actions-title strong{font: bold 17px Georgia,serif;color:#ffe0a2}
#eldrius-profile-item-actions-v196 .eld-profile-actions-title small{font-size:12px;color:#e4c68f;overflow-wrap:anywhere}
#eldrius-profile-item-actions-v196 .eld-profile-actions-description{margin:0;color:#e9d4b0;font-size:12px;overflow-wrap:anywhere}
#eldrius-profile-item-actions-v196 .eld-profile-actions-warning{color:#ffb9ac}
#eldrius-profile-item-actions-v196 .eld-profile-actions-pet-icon{width:66px;height:66px;align-self:center;object-fit:contain;image-rendering:auto}
#eldrius-profile-item-actions-v196 .eld-profile-actions-subtitle{font-size:12px;color:#f4d38e;margin-top:3px}
#eldrius-profile-item-actions-v196 button{
 cursor:pointer;min-height:40px;text-align:center;font:600 13px Arial,sans-serif;
 border:1px solid #b69154;border-radius:8px;padding:10px 12px;
 color:#ffe5b7;background:#4a3426;touch-action:manipulation;
}
#eldrius-profile-item-actions-v196 button.eld-profile-action-remove{background:#713433;border-color:#f19e86;color:#fff4e6}
#eldrius-profile-item-actions-v196 button.eld-profile-action-cancel{background:#29232c;border-color:#7b6973}
#eldrius-profile-item-actions-v196 button:focus-visible{outline:2px solid #ffe6a9;outline-offset:2px}
/* V209: escolha de aparência com o mesmo retrato animado do mundo. */

/* V304: hard containment for native-size Poseidon image items in ACTIVE compact profile */
#characterProfile.eld-profile-compact-v158 .ep-slot.profile-slot{overflow:hidden!important;contain:paint!important}
#characterProfile.eld-profile-compact-v158 .ep-slot .ep-item-art{overflow:hidden!important;contain:paint!important;max-width:100%!important;max-height:100%!important}
#characterProfile.eld-profile-compact-v158 .ep-slot .ep-item-art img{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;transform:none!important}
