/* QA52 classic JRPG inventory/status UI, landscape/mobile first */
#modal .panel.qa52-panel{display:flex;flex-direction:column;box-sizing:border-box;width:min(890px,96%);height:min(465px,94%);max-height:94%;min-height:0;overflow:hidden;padding:12px 14px;background:linear-gradient(145deg,#192d48,#0c172b);}
.qa52-panel .menutabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));flex:0 0 auto;gap:5px;}
.qa52-panel .menutabs button{min-width:0;padding:8px 2px;font-size:13px;white-space:nowrap;border-radius:7px}
.qa52-panel .menutabs button.active{background:#705e48;border-color:#e9d29c;color:#fff6db;}
.qa52-panel .menucontent{flex:1;height:auto;min-height:0;overflow:auto;padding:8px 0 4px;}
.qa52-panel .actions{flex:0 0 auto;padding-top:5px;gap:8px;}
.qa52-panel .actions button{font-size:12px;padding:5px 12px;}
.qa52-panel button:focus-visible{outline:2px solid #ffe3a3;outline-offset:2px;}
.qa52-status-layout{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,39%) minmax(0,1fr);gap:10px;}
.qa52-party{height:100%;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:6px;}
.qa52-party-card,.qa52-party-locked{min-width:0;min-height:0;display:flex;align-items:center;gap:7px;overflow:hidden;padding:3px 5px;background:#16283e;border:1px solid #50647a;border-radius:9px;color:#f4e8d5;}
.qa52-party-card{cursor:pointer;text-align:left;}
.qa52-party-card.chosen{background:#304158;border-color:#e8c57a;box-shadow:inset 0 0 0 1px #e8c57a5f;}
.qa52-party-card img{flex:0 0 auto;max-width:52%;width:78px;height:100%;min-height:0;object-fit:contain;object-position:center bottom;image-rendering:auto;}
.qa52-party-label{min-width:0;display:flex;flex-direction:column;gap:1px;}
.qa52-party-label b{font-size:13px;white-space:nowrap;}
.qa52-party-label small{font-size:11px;color:#bdcede;white-space:nowrap;}
.qa52-party-locked{justify-content:center;color:#ffffff22;border-style:dashed;}
.qa52-party-locked span{font-size:20px;}
.qa52-sheet{min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;gap:8px;}
.qa52-selected{display:flex;gap:12px;align-items:stretch;min-height:0;height:55%;max-height:175px;}
.qa52-bigface{width:35%;max-width:160px;min-width:76px;min-height:0;flex:0 0 auto;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at 55% 90%,#3d4a5e,#122337 72%);border:1px solid #57708b;border-radius:10px;}
.qa52-bigface img{width:100%;height:100%;object-fit:contain;object-position:center bottom;image-rendering:auto;}
.qa52-hero-info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:9px;}
.qa52-hero-title{display:flex;justify-content:space-between;align-items:center;gap:5px;}
.qa52-hero-title b{font-size:clamp(15px,2vw,23px);color:#ffe3ac;white-space:nowrap;}
.qa52-hero-title span{font-size:13px;color:#e9e1ce;white-space:nowrap;}
.qa52-meter{display:flex;flex-direction:column;gap:4px;min-width:0;}
.qa52-meter-values{display:flex;justify-content:space-between;font-size:12px;line-height:1.2;gap:3px;}
.qa52-meter-values b{color:#eae2d4;}
.qa52-meter-values span{font-variant-numeric:tabular-nums;white-space:nowrap;}
.qa52-meter-track{height:9px;overflow:hidden;border:1px solid #62758b;background:#0a1725;border-radius:10px;}
.qa52-meter-fill{height:100%;border-radius:10px;transition:width .15s;}
.qa52-meter-fill.hp{background:linear-gradient(90deg,#3a9769,#66c58d);}
.qa52-meter-fill.mp{background:linear-gradient(90deg,#2e70b8,#69a3e6);}
.qa52-figures{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.qa52-figures>div{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;border-radius:6px;background:#ffffff0c;padding:7px 8px;}
.qa52-figures small{font-size:11px;color:#bfcede;white-space:nowrap;}
.qa52-figures b{font-size:13px;color:#fff0c9;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.qa52-gear{display:flex;flex-wrap:wrap;gap:6px;overflow:auto;min-height:0;align-content:flex-start;padding-bottom:2px;}
.qa52-gear button{flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:6px;padding:6px 8px;font-size:12px;border-radius:7px;}
.qa52-gear .qa52-gear-symbol{color:#edcc85;}
.qa52-gear small{font-size:10px;opacity:.78;}
.qa52-gear b{font-size:10px;color:#ffdf93;}
.qa52-gear button.equipped{border-color:#d6b56c;background:#36465b;}
.qa52-items-layout{display:grid;grid-template-columns:minmax(0,54%) minmax(0,1fr);gap:10px;height:100%;min-height:0;}
.qa52-items-left,.qa52-items-right{min-width:0;min-height:0;}
.qa52-items-left{display:flex;flex-direction:column;}
.qa52-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding-bottom:6px;}
.qa52-categories button{min-width:0;padding:7px 1px;font-size:12px;white-space:nowrap;}
.qa52-categories button.chosen{background:#706044;border-color:#e9d29c;color:#fff6dd;}
.qa52-item-list{overflow-y:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:5px;}
.qa52-item-row{min-height:49px;display:flex;gap:10px;align-items:center;text-align:left;padding:4px 8px;border:1px solid #55687d;background:#142439;border-radius:7px;}
.qa52-item-row.chosen{border-color:#e6c784;background:#36445b;}
.qa52-item-row img,.qa52-item-symbol{flex:0 0 auto;width:36px;height:36px;object-fit:contain;font-size:26px;line-height:36px;text-align:center;}
.qa52-item-row b{flex:1;font-size:14px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.qa52-count{font-size:13px;color:#e6d9bb;white-space:nowrap;font-variant-numeric:tabular-nums;}
.qa52-items-right{background:#112136;border:1px solid #485f77;border-radius:9px;padding:10px;overflow:auto;}
.qa52-items-right h3{font-size:15px;color:#ffe3ad;margin:0 0 9px;display:flex;justify-content:space-between;gap:5px;}
.qa52-items-right h3 span{color:#d2dcdd;}
.qa52-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;}
.qa52-target{min-width:0;display:flex;align-items:center;gap:5px;text-align:left;padding:4px 5px;border-radius:7px;min-height:57px;}
.qa52-target img{width:38px;height:44px;object-fit:contain;flex:0 0 auto;}
.qa52-target span{display:flex;flex-direction:column;gap:1px;min-width:0;}
.qa52-target b{font-size:12px;white-space:nowrap;}
.qa52-target small{font-size:10px;color:#cbd5de;white-space:nowrap;}
.qa52-target:disabled{opacity:.43;}
.qa52-brief-item{display:flex;align-items:center;gap:7px;font-size:13px;margin-bottom:8px;}
.qa52-brief-item small{margin-left:auto;color:#d4c5a6;}
.qa52-go-equip{padding:9px 12px;font-size:12px;margin-top:8px;}
.qa52-item-preview{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;}
.qa52-item-preview img{width:105px;height:98px;object-fit:contain;}
.qa52-item-preview b{font-size:15px;}
.qa52-item-preview span{font-size:12px;color:#dbceaf;}
.qa52-item-placeholder{display:flex;align-items:center;justify-content:center;height:100%;font-size:65px;color:#ffffff0f;}
.qa52-empty{font-size:13px;color:#b7c2cc;text-align:center;padding:25px;}
@media(max-width:700px),(max-height:440px){
 #modal .panel.qa52-panel{width:97%;height:96%;max-height:96%;padding:6px 9px;}
 .qa52-panel .menutabs{gap:3px;}.qa52-panel .menutabs button{font-size:10px;padding:5px 1px;}
 .qa52-panel .menucontent{padding:4px 0 2px;}
 .qa52-panel .actions{padding-top:2px;}.qa52-panel .actions button{font-size:10px;padding:4px 8px;}
 .qa52-status-layout{grid-template-columns:minmax(0,39%) minmax(0,1fr);gap:6px;}
 .qa52-party{gap:4px;}.qa52-party-card{padding:2px;gap:3px;}
 .qa52-party-card img{width:58px;height:100%;max-width:52%;}
 .qa52-party-label b{font-size:10px;}.qa52-party-label small{font-size:9px;}
 .qa52-sheet{gap:4px;}.qa52-selected{height:53%;max-height:132px;gap:7px;}
 .qa52-bigface{min-width:74px;}.qa52-hero-info{gap:5px;}
 .qa52-hero-title b{font-size:15px;}.qa52-hero-title span{font-size:11px;}
 .qa52-meter{gap:3px;}.qa52-meter-values{font-size:10px;}.qa52-meter-track{height:7px;}
 .qa52-figures{gap:4px;}.qa52-figures>div{padding:4px 5px;}
 .qa52-figures small{font-size:9px;}.qa52-figures b{font-size:10px;}
 .qa52-gear{gap:4px;}.qa52-gear button{font-size:10px;padding:3px 5px;gap:3px;}.qa52-gear small,.qa52-gear b{font-size:9px;}
 .qa52-items-layout{gap:6px;grid-template-columns:minmax(0,54%) minmax(0,1fr);}
 .qa52-categories{gap:2px;padding-bottom:3px;}.qa52-categories button{font-size:10px;padding:4px 1px;}
 .qa52-item-row{min-height:35px;gap:6px;padding:2px 5px;}.qa52-item-row img,.qa52-item-symbol{width:27px;height:27px;font-size:21px;line-height:27px;}
 .qa52-item-row b{font-size:11px;}.qa52-count{font-size:10px;}
 .qa52-items-right{padding:5px;}.qa52-items-right h3{font-size:12px;margin-bottom:5px;}
 .qa52-targets{gap:3px;}.qa52-target{min-height:43px;padding:1px 2px;gap:2px;}
 .qa52-target img{width:30px;height:37px;}.qa52-target b{font-size:10px;}.qa52-target small{font-size:8px;}
 .qa52-item-preview img{width:70px;height:65px;}.qa52-item-preview b{font-size:12px;}
}
@media(max-width:540px){.qa52-party-label b{font-size:9px}.qa52-party-card img{width:37px}.qa52-status-layout{grid-template-columns:42% 58%}}

.qa52-status-layout.without-gear .qa52-selected{height:66%;max-height:230px}
@media(max-width:700px),(max-height:440px){.qa52-status-layout.without-gear .qa52-selected{height:66%;max-height:185px}}
