/* PROFILE-ROOT140. One geometry owner: source profile/layout poses and central
 * characterProfilePresentation CSS bridge. General remains explicitly legacy;
 * no viewport media rule selects a native family or manufactures measurements. */
dialog#profilePanel.character-panel{box-sizing:border-box;width:var(--profile-width);max-width:var(--profile-width);height:var(--profile-height);max-height:var(--profile-height);padding:0;overflow:auto;overscroll-behavior:contain;border:0;border-radius:0}
#profilePanel .profile-layout{display:contents}
#profilePanel .panel-heading{position:relative;display:flex;align-items:center;isolation:isolate;height:var(--profile-title-height);min-height:var(--profile-title-height);padding:0 var(--web-profile-padding);margin:0;border:0;gap:var(--web-profile-gap)}
#profilePanel .panel-heading::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:0 0 auto;height:var(--profile-title-art-height);background:url('assets/native-craft-header/title-background.webp') left top / var(--profile-title-art-width) var(--profile-title-art-height) repeat-x}
#profilePanel .panel-heading h2{margin:0;padding:0;font-size:var(--profile-title-font);line-height:1;font-weight:400;color:#dadada}
#profilePanel .panel-heading>div:first-child{flex:1;min-width:0}
#profilePanel .native-window-close{display:grid;place-items:center;flex:0 0 var(--profile-control-min);width:var(--profile-control-min);height:var(--profile-control-min);min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#profilePanel .native-window-close img{width:var(--profile-close-art);height:var(--profile-close-art);object-fit:contain}
#profilePanel .native-character-header{position:relative;margin:0;padding:var(--web-profile-header-padding) 0;color:#f5f1eb}
#profilePanel .native-character-header::before{content:'';position:absolute;inset:0 0 auto;height:var(--profile-rule-height);background:url('assets/native-header/dot_line_01_pc.webp') center/100% 100%;filter:brightness(.09411765);opacity:.78431374;pointer-events:none}
#profilePanel .profile-name-line{display:flex;align-items:baseline;gap:var(--web-profile-name-gap);min-width:0;margin-bottom:var(--web-profile-name-gap);font-size:var(--profile-name-font)}
#profileName{font-weight:400;overflow-wrap:anywhere}#profileFrequency{font-size:var(--profile-frequency-font);color:#adaba6;white-space:nowrap;letter-spacing:0}
#profilePanel .profile-exp-line{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--profile-exp-gap);min-width:0}
#profilePanel .profile-level{font-size:var(--profile-level-font);color:#ffd85b;white-space:nowrap}#profilePanel .profile-level b{font-weight:400;font-size:var(--profile-level-value-font);margin-left:var(--web-profile-name-gap)}
#profileExperience{font-size:var(--profile-experience-font);color:#fff;white-space:nowrap;font-variant-numeric:tabular-nums}
#profileExpBar{position:relative;overflow:hidden;height:var(--profile-gauge-height);background:rgba(9,9,9,.50980395)}
#profileExpFill{display:block;position:absolute;inset:var(--web-profile-legacy-gauge-inset) auto var(--web-profile-legacy-gauge-inset) var(--web-profile-legacy-gauge-inset);width:0;background:#245e24}
#profileExpBar::after{content:'';position:absolute;inset:0;background:url('assets/native-header/bg_grunge_middlesize_30.webp') center/100% 100%;filter:brightness(0);pointer-events:none}
#profilePanel .equipped-card{position:relative;min-width:0;padding:0;border:0;border-radius:0}
#profilePanel .native-equipment-tabs{display:flex;justify-content:center;gap:var(--web-profile-tab-gap);min-height:var(--profile-tab-height);margin:0}
#profilePanel .native-equipment-tabs button{width:var(--profile-tab-width);height:var(--profile-tab-height);min-height:0;margin:0;padding:0;border-radius:0;font-size:var(--web-profile-control-font)}
#profilePanel #profileAvatarHint{font-size:var(--web-profile-hint-font);line-height:var(--web-profile-hint-line);margin:0;text-align:center}
#profilePanel .profile-abilities{display:flex;flex-direction:column;align-items:stretch;gap:var(--web-profile-gap);padding:var(--web-profile-padding);margin:0;border:0;min-width:0;min-height:0;overflow:auto}
#profilePanel #profileAbilities{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--web-profile-gap);margin:0;flex:0 0 auto}
#profilePanel #profileStatus{width:100%;margin:0;padding:var(--web-profile-footer-padding);min-height:var(--profile-control-min);font-size:var(--web-profile-control-font);flex:0 0 auto}
#profilePanel .equipment-section{display:flex;flex-direction:column;gap:var(--web-profile-candidate-gap);padding:0;margin:0;min-width:0;min-height:0;overflow:hidden}
#profilePanel .equipment-section h3{flex:0 0 var(--web-profile-candidate-label-height);height:var(--web-profile-candidate-label-height);font-size:var(--web-profile-candidate-font);line-height:var(--web-profile-candidate-label-height);margin:0;padding:0}
#profilePanel #equipmentList{display:grid;flex:1;min-height:0;min-width:0;max-height:none;gap:0;overflow:auto}
#profilePanel .equipment-card{position:relative;display:grid;place-items:center;min-width:0;padding:0;border:0;border-radius:0;background:transparent}
#profilePanel .equipment-card>span:not(.equipment-art-placeholder){display:none}
#profilePanel .equipment-card.selected{background:#ffd85b14}
#profilePanel .equipment-card.selected::after{content:'';position:absolute;inset:0;border:15px solid transparent;border-image:url('assets/inventory-ui/target_crosshair_selected.webp') 15 / 15px / 0 stretch;pointer-events:none}
#profilePanel .equipment-card.equipped::before{content:'';position:absolute;background:url('assets/inventory-ui/icon_inventory_equip.webp') center/contain no-repeat;pointer-events:none}
#profilePanel #equipmentEmpty{font-size:var(--web-profile-control-font);padding:var(--web-profile-empty-padding) 0;text-align:center;margin:0}
#profilePanel #toolsPagination{flex:0 0 auto;min-height:var(--profile-control-min);margin:0}
#profilePanel #toolsPagination button{min-height:var(--profile-control-min);font-size:var(--web-profile-control-font)}
#profilePanel #profileBag{flex:0 0 auto;align-self:flex-end;width:auto;min-height:max(var(--web-profile-footer-height),var(--profile-control-min));font-size:var(--web-profile-control-font);padding:var(--web-profile-footer-padding);border-radius:0;margin:0}
#profilePanel .profile-item-detail{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto;padding:0;border:0;background:transparent}
#profileItemInfoRoot{min-width:0;min-height:0;max-height:none;flex:1}
#profilePanel #profileEquipSelected{flex:0 0 auto;margin:0;min-height:var(--profile-control-min);padding:var(--web-profile-footer-padding);font-size:var(--web-profile-control-font);border-radius:0}
/* Existing general WEB composition. Its geometry is selected by policy data,
   while the unmeasured source general header/portrait remains gated. */
#profilePanel[data-profile-root="legacy"][open]{display:grid;grid-template-columns:minmax(0,var(--profile-ability-weight)) minmax(0,var(--profile-equip-weight));grid-template-rows:auto auto auto minmax(var(--profile-cell),1fr);gap:var(--web-profile-gap) var(--web-profile-column-gap);padding:0 var(--web-profile-padding) var(--web-profile-padding)}
#profilePanel[data-profile-root="legacy"]>.panel-heading,#profilePanel[data-profile-root="legacy"] .native-character-header{grid-column:1/-1}
#profilePanel[data-profile-root="legacy"] .native-character-header{grid-row:2}
#profilePanel[data-profile-root="legacy"] .profile-abilities{grid-column:1;grid-row:3}
#profilePanel[data-profile-root="legacy"] .equipped-card{grid-column:2;grid-row:3}
#profilePanel[data-profile-root="legacy"] .equipment-section{grid-column:1/-1;grid-row:4}
#profilePanel[data-profile-root="legacy"] .profile-item-detail{grid-column:1;grid-row:2/5}
#profilePanel[data-profile-root="legacy"].frontend-has-detail{grid-template-columns:minmax(0,var(--profile-detail-weight)) minmax(0,var(--profile-ability-weight)) minmax(0,var(--profile-equip-weight));column-gap:var(--web-profile-detail-gap)}
#profilePanel[data-profile-root="legacy"].frontend-has-detail>.panel-heading,#profilePanel[data-profile-root="legacy"].frontend-has-detail .native-character-header,#profilePanel[data-profile-root="legacy"].frontend-has-detail .equipment-section{grid-column:2/4}
#profilePanel[data-profile-root="legacy"].frontend-has-detail .profile-abilities{grid-column:2}
#profilePanel[data-profile-root="legacy"].frontend-has-detail .equipped-card{grid-column:3}
#profilePanel[data-profile-root="legacy"] #profileItemInfoRoot{flex:0 0 var(--profile-info-height);height:var(--profile-info-height)}
#profilePanel[data-profile-root="legacy"][data-profile-compact="true"][open]{display:flex;flex-direction:column;gap:var(--web-profile-compact-gap)}
#profilePanel[data-profile-root="legacy"][data-profile-compact="true"]>.panel-heading,#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] .native-character-header,#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] .equipped-card,#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] .equipment-section,#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] .profile-item-detail{flex-shrink:0}
#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] .profile-abilities{flex-shrink:0;flex-direction:row;align-items:center;padding:0;gap:var(--web-profile-compact-gap)}
#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] #profileAbilities{flex:1}
#profilePanel[data-profile-root="legacy"][data-profile-compact="true"] #profileStatus{width:auto}
/* PC source rects: the dialog encloses visible left detail separately from the
   right600 group. Overflow is WEB scroll; there is no whole-dialog zoom. */
dialog#profilePanel[data-profile-root="projected"]{position:fixed;inset:auto;left:var(--profile-x);top:var(--profile-y);margin:0;padding:0}
#profilePanel[data-profile-root="projected"][open]{display:block}
#profilePanel[data-profile-root="projected"]::after{content:'';display:block;width:var(--profile-content-width);height:var(--profile-content-height);pointer-events:none}
#profilePanel[data-profile-root="projected"]>.panel-heading{position:absolute;left:var(--profile-group-x);top:0;width:var(--profile-group-width)}
#profilePanel[data-profile-root="projected"] .native-character-header{position:absolute;left:var(--profile-header-x);top:var(--profile-header-y);width:var(--profile-header-width);height:var(--profile-header-height);padding:0}
#profilePanel[data-profile-root="projected"] .profile-name-line{position:absolute;display:block;left:var(--profile-name-x);top:var(--profile-name-y);width:var(--profile-name-width);height:var(--profile-name-height);line-height:var(--profile-name-height);margin:0;white-space:nowrap;overflow:hidden}
#profilePanel[data-profile-root="projected"] #profileName{overflow-wrap:normal;white-space:pre}
#profilePanel[data-profile-root="projected"] .profile-exp-line{position:absolute;display:block;left:var(--profile-exp-x);top:var(--profile-exp-y);width:var(--profile-exp-width);height:var(--profile-exp-height)}
#profilePanel[data-profile-root="projected"] .profile-level{position:absolute;left:0;top:calc((var(--profile-exp-height) - var(--profile-source-levelHeight))/2);width:var(--profile-source-levelWidth);height:var(--profile-source-levelHeight);line-height:var(--profile-source-levelHeight)}
#profilePanel[data-profile-root="projected"] .profile-level b{position:absolute;left:var(--profile-source-levelValueX);top:0;width:var(--profile-source-levelValueWidth);margin:0}
#profilePanel[data-profile-root="projected"] #profileExpBar{position:absolute;left:var(--profile-source-gaugeLeft);right:0;top:var(--profile-source-gaugeTop)}
#profilePanel[data-profile-root="projected"] #profileExpFill{inset:var(--profile-source-gaugeInset) auto var(--profile-source-gaugeInset) var(--profile-source-gaugeInset)}
#profilePanel[data-profile-root="projected"] #profileExperience{position:absolute;right:var(--profile-source-experienceRight);top:var(--profile-source-experienceTop);height:var(--profile-source-experienceHeight);line-height:var(--profile-source-experienceHeight)}
#profilePanel[data-profile-root="projected"] .equipped-card{position:absolute;left:var(--profile-equip-x);top:var(--profile-equip-y);width:var(--profile-equip-width);height:var(--profile-equip-height)}
#profilePanel[data-profile-root="projected"] .native-equipment-tabs{position:absolute;left:var(--profile-tab-x);top:var(--profile-tab-y);width:var(--profile-tabs-width);height:var(--profile-tab-height);justify-content:flex-start}
#profilePanel[data-profile-root="projected"] .native-equipment-slots{position:absolute;left:var(--profile-slots-x);top:var(--profile-slots-y);margin:0;grid-template-columns:repeat(3,var(--profile-slot-cell-width));grid-template-rows:repeat(3,var(--profile-slot-cell-height))}
#profilePanel[data-profile-root="projected"] #profileAvatarHint{position:absolute;bottom:0;left:0;right:0}
#profilePanel[data-profile-root="projected"] .profile-abilities{position:absolute;left:var(--profile-ability-x);top:var(--profile-ability-y);width:var(--profile-ability-width);height:var(--profile-ability-height);padding:0}
#profilePanel[data-profile-root="projected"] .equipment-section{position:absolute;left:var(--profile-candidates-x);top:var(--profile-candidates-y);width:var(--profile-candidates-width);height:var(--profile-candidates-height)}
#profilePanel[data-profile-root="projected"] .profile-item-detail{position:absolute;left:var(--profile-detail-x);top:var(--profile-detail-y);width:var(--profile-detail-width);height:var(--profile-detail-height);overflow:hidden}
