/* หน้าสวมใส่ (equip-window.js) — ไอคอนใหญ่ · แท็บอุปกรณ์/แฟชั่น · แผงค่าสถานะ · กระดาษครีม ขอบทอง ชุดเดียวกับการ์ดไอเทม
   ⚠️ ทับกฎ .eqslot/.eqw เก่า (style.css · ui-astra.css · ui-mobile.css) ด้วยความเฉพาะเจาะจงสูงกว่าเฉพาะใน .eq2 */
html body #windows .win.gear-equip.gear-equip:is([data-win="gear"], [data-win="equip"]) { width: min(96vw, 800px) !important; }
.eq2 { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eq2-tabs { display: flex; gap: 8px; }
.eq2-tabs button { flex: 1; min-height: 40px; border-radius: 12px; border: 1.5px solid #d8c49a; background: #fffaf0; font: inherit; font-weight: 700; color: #4a3520; cursor: pointer; }
.eq2-tabs button.on { background: linear-gradient(#3b8186, #2f6f73); border-color: #e8b64a; color: #fff; }
.eq2-main { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 10px; align-items: start; }
.eq2-stage { display: grid; grid-template-columns: 86px minmax(150px, 1fr) 86px; gap: 8px; align-items: stretch; min-width: 0; }
html body #windows .win .eq2 .eqcol { display: grid; gap: 6px; align-content: start; min-width: 0; }
html body #windows .win .eq2 .preview { min-height: 300px; height: auto; border-radius: 14px; }
html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 60px; padding: 3px 2px 2px; border-radius: 12px; border: 1.5px solid #d8c49a; background: radial-gradient(circle at 50% 35%, #fffdf6, #f2e6c8); text-align: center !important; direction: ltr; grid-template-columns: none; cursor: pointer; box-shadow: inset 0 -2px 0 #0000000d; }
html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic { order: 0; width: 38px !important; height: 38px !important; display: grid; place-items: center; font-size: 26px !important; }
html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic img { width: 38px !important; height: 38px !important; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(60, 40, 10, .25)); }
.eq2 .eq2-lab { font-size: 11.5px; color: #6b5a38; line-height: 1.1; }
html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s.empty { border: 1.5px dashed #cdbc98; background: #f7f0e1; box-shadow: none; cursor: default; }
html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s.empty .ic { opacity: .35; filter: grayscale(.6); background-image: none !important; }
.eq2 .eqslot.eq2s.empty .eq-vacant { font-size: 10.5px; color: #8a7a58; }
.eq2 .eqslot.eq2s:not(.empty):hover { border-color: #2f6f73; }
.eq2 .eqslot.eq2s.sel { border: 2px solid #2f6f73 !important; background: radial-gradient(circle at 50% 35%, #f3fbf9, #cfe8e4) !important; box-shadow: 0 0 0 3px #2f6f7340; }
.eq2-ref { position: absolute; top: 2px; right: 3px; min-width: 22px; padding: 0 5px; border-radius: 999px; background: #e8b64a; color: #3b2a08; font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 1px 2px #0003; }
.eq2-chk { position: absolute; top: 2px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #2f8a3a; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.eq2 .eqslot.eq2s .sg-pips { font-size: 12px; }
.eq2 .eqslot.eq2s .sg-pips b { font-size: 10.5px; }
.eq2 .eqslot.classhat button { min-height: 26px; padding: 0 8px; font-size: 12px; margin-top: 2px; }
/* แผงค่าสถานะ */
.eq2-stats { padding: 8px 10px; border-radius: 14px; background: #fbf4e2; border: 1.5px solid #e6d3a6; font-size: 13.5px; color: #3b2a14; }
.eq2-st-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.eq2-st-head b { font-size: 15px; }
.eq2-st-head small { flex: 1; color: #8a7a58; font-size: 11.5px; }
.eq2-st-head button { min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid #d8c49a; background: #fff; font: inherit; font-size: 12.5px; color: #2f6f73; font-weight: 700; cursor: pointer; }
.eq2-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 6px; align-items: baseline; padding: 3px 0; border-bottom: 1px dashed #ecdfba; }
.eq2-row i { font-style: normal; color: #6b5a38; font-size: 12.5px; }
.eq2-row b { text-align: right; font-weight: 700; }
.eq2-row em { font-style: normal; min-width: 38px; text-align: right; font-weight: 700; }
.eq2-row em.up { color: #2f8a3a; }
.eq2-sec h6 { margin: 8px 0 2px; font-size: 12.5px; color: #8a5a12; }
/* แฟชั่น */
.eq2.fashion { display: grid; grid-template-columns: 1fr 200px; grid-template-rows: auto 1fr; gap: 8px 12px; }
.eq2.fashion .eq2-tabs { grid-column: 1 / -1; }
.eq2-fashion { min-width: 0; }
.eq2-fhead { display: grid; margin-bottom: 8px; }
.eq2-fhead b { font-size: 15px; } .eq2-fhead small { color: #8a7a58; }
.eq2-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
/* ท้ายหน้าต่าง */
.eq2-acts { display: flex; gap: 8px; }
.eq2-acts .rbtn { min-height: 40px; padding: 0 14px; }
.eq2-acts .rbtn[disabled] { opacity: .45; }
.eq2-hint { flex: 1; }
.eq2-sheet .eq2-all { max-height: 60vh; overflow-y: auto; }
/* จอแคบ/มือถือ: ช่องเล็กลง ซ่อนป้ายชื่อ (ไอคอนเป็นหลัก) · สรุปค่า 6 แถว */
@media (max-width: 899px), (max-height: 520px) {
  .eq2-main { grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
  .eq2-stage { grid-template-columns: 58px minmax(100px, 1fr) 58px; gap: 6px; }
  html body #windows .win .eq2 .preview { min-height: 0; }
  html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s { min-height: 52px; padding: 2px; }
  html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic, html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic img { width: 34px !important; height: 34px !important; }
  .eq2 .eq2-lab, .eq2 .eqslot.eq2s .eq-vacant { display: none; }
  .eq2 .eqslot.eq2s .sg-pips b { display: none; }
  .eq2-row { grid-template-columns: 44px 1fr auto; }
  .eq2-hint { display: none; }
  .eq2-tabs button { min-height: 36px; }
}
@media (max-width: 899px) { html body #windows .win.gear-equip.gear-equip:is([data-win="gear"], [data-win="equip"]) { width: auto !important; } }
/* มือถือแนวนอน (สูง ≤ 520px): บีบแถบแท็บ/ช่อง ให้ตัวละครกับ 5 ช่องต่อฝั่งอยู่ในจอเดียว */
@media (max-height: 520px) {
  html body #windows .win.gear-equip:is([data-win="gear"], [data-win="equip"]) .gear-tabs button { min-height: 34px !important; padding: 2px 4px; }
  html body #windows .win.gear-equip .gear-body { padding-top: 4px; }
  .eq2 { gap: 4px; }
  .eq2-tabs button { min-height: 30px; font-size: 13px; }
  .eq2-stage { gap: 5px; grid-template-columns: 52px minmax(90px, 1fr) 52px; }
  html body #windows .win .eq2 .eqcol { gap: 3px; }
  html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s { min-height: 36px; padding: 1px; border-radius: 10px; }
  html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic, html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s .ic img { width: 30px !important; height: 30px !important; font-size: 20px !important; }
  .eq2 .eqslot.eq2s .sg-pips { position: absolute; left: 3px; bottom: 0; font-size: 9px; }
  .eq2 .eqslot.classhat button { display: none; }
  .eq2-ref { font-size: 10.5px; line-height: 14px; min-width: 18px; padding: 0 3px; top: 0; right: 1px; }
  .eq2-stats { padding: 4px 8px; font-size: 12px; }
  .eq2-st-head small { display: none; }
  .eq2-st-head { margin-bottom: 0; }
  .eq2-st-head button { white-space: nowrap; min-height: 24px; padding: 0 8px; font-size: 11.5px; }
  .eq2-row { padding: 1px 0; grid-template-columns: 38px 1fr auto; }
  .eq2-row i { font-size: 11px; } .eq2-row em { min-width: 28px; }
  .eq2-acts .rbtn { min-height: 32px; padding: 0 10px; font-size: 13px; }
}

.eq2-tabs.in-foot, .foot > .eq2-tabs { flex: 1; max-width: 260px; }
html body #windows .win .eq2 .eqslot.eq2s .eq-vacant { display: block; }
@media (max-width: 899px), (max-height: 520px) { html body #windows .win:is([data-win="gear"], [data-win="equip"]) .eq2 .eqslot.eq2s :is(.eq-vacant, .eq2-lab) { display: none !important; } }
@media (max-height: 520px) { html body #windows .win.gear-equip > .foot { padding: 4px 10px; gap: 8px; display: flex; align-items: center; } .foot > .eq2-tabs button { min-height: 34px; } }
html.touch-ui .eq2-sheet { justify-content: flex-start; } html.touch-ui .eq2-sheet .eq2-all { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
/* ตัวละครอยู่กลางกรอบ (เดิมชิดบน — ui-astra ตั้ง align-items: flex-start) */
html body #windows .win .eq2 .preview { align-items: center !important; justify-content: center !important; }
