/* char-equip-view.css — "ดูของสวมใส่" (member) · พอร์ต paperdoll จาก admin/css/account-info.css เป๊ะ ๆ
 * โทเคนใช้ชุด admin.css (โหลดอยู่แล้วในหน้า) · การ์ดรายละเอียดใช้ css/item-card.css (โหลดคู่กัน)
 * หมายเหตุ: ตัดคลาสโหมดแก้ไข (.eq-cell.empty.can / .eq-add) ออก เพราะฝั่ง member อ่านอย่างเดียว */

/* token ที่การ์ดร่วม (item-card) ใช้ แต่ไม่มีใน admin.css — นิยามให้ครบ (Chaos = ม่วง ตามในเกม) */
:root { --ix-chaos: #7C3AED; --t-chaos: rgba(124,58,237,.12); }
html[data-theme="dark"] { --ix-chaos: #C4B5FD; --t-chaos: rgba(167,139,250,.16); }

/* กล่อง popup "ดูของสวมใส่" — ก๊อปค่าตรงจาก admin/css/account-info.css บรรทัด 4 (ห้ามปรับเอง)
   ความสูงคงที่ทุกหน้า ไม่กระโดดตามเนื้อหา · เนื้อหา scroll ในตัว (.modal-body) → เท่ากันทั้ง Equipment/Presetzone
   (ความกว้าง min(720px,100%) ตั้ง inline จาก JS ตรงกับ cvOpen ของแอดมิน · radius/bg/shadow/padding มาจาก .modal* ใน admin.css) */
#cv-box { height: min(880px, calc(100svh - 40px)); }

/* ── ของสวมใส่: paperdoll แบบ EP39 ── */
.eq-doll { display: grid; grid-template-columns: auto 230px auto; gap: 22px; align-items: stretch; justify-content: center; padding: 8px 4px; }
@media (max-width: 640px) { .eq-doll { grid-template-columns: 1fr 1fr; gap: 12px; } .eq-center { order: -1; grid-column: 1/-1; } }
.eq-side { display: grid; gap: 8px; justify-content: center; align-content: start; }
.eq-cell { width: 52px; height: 52px; border-radius: 9px; position: relative; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--field); }
.eq-cell.empty { border-style: dashed; background: transparent; }
/* พื้นช่องที่มีของเป็นดำเหมือนกรอบไอเทมในเกม */
.eq-cell.on { background: #000; border-color: var(--sky); cursor: pointer; transition: border-color .12s; }
.eq-cell.on:hover { border-color: var(--blue); }
html[data-theme="dark"] .eq-cell.on { border-color: #0A0F1A; }
html[data-theme="dark"] .eq-cell.on:hover { border-color: var(--blue); }
.eq-img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; display: block; }
.eq-abbr { width: 100%; height: 100%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #7BA9FF; font-family: var(--font-mono); }
/* ป้าย: ล่างซ้าย = อัพเกรด/Chaos · ล่างขวา = Divine · บนซ้าย = ผูกมัด/เลขช่อง */
.eq-up { position: absolute; z-index: 2; bottom: -5px; left: -4px; background: var(--green); color: #fff; font-size: .6rem; font-weight: 800; padding: 0 4px; border-radius: 6px; line-height: 1.5; box-shadow: 0 1px 3px var(--shadow); }
.eq-up.ch { background: #8B5CF6; }
.eq-cr.dv { position: absolute; z-index: 2; bottom: -4px; right: -4px; background: var(--gold); color: #3a2c05; font-size: .56rem; font-weight: 800; padding: 0 4px; border-radius: 6px; line-height: 1.6; }
.eq-lk { position: absolute; z-index: 4; top: -6px; left: -6px; line-height: 0; --bind-sz: 21px; }
.eq-lk i { display: block; width: var(--bind-sz); height: var(--bind-sz); filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='%23E8453C' stroke='%23590F0F' stroke-width='1' stroke-linejoin='round'%3E%3Cpath d='M2 5.6 6 2.8v1.4h6.5v2.8H6v1.4z'/%3E%3Cpath d='M14 10.7 10 7.9V9.3H3.5v2.8H10v1.4z'/%3E%3C/g%3E%3C/svg%3E"); }
.eq-no { position: absolute; z-index: 3; top: -5px; left: -4px; background: #0F1A30; color: #9FC0FF; border: 1px solid #2A3B5C; font-size: .58rem; font-weight: 800; padding: 0 4px; border-radius: 6px; line-height: 1.55; font-family: var(--font-mono); letter-spacing: -.2px; }
.eq-cell.empty .eq-no { background: transparent; color: var(--ink-3); border-color: transparent; }
/* ซ่อนเลขช่อง (ยังเห็นใน tooltip เมื่อชี้) — เหมือนแอดมิน */
.eq-no { display: none; }

/* ── ระบบพรีเซ็ตชุดสวมใส่ ── */
.eq-pbar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.eq-psel { display: flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
/* <select> ถูกแปลงเป็น dropdown คัสตอมของโปรเจกต์ (.ixsel · admin-ui.js) — คุมความกว้างที่ปุ่ม ไม่ใช่ select ดิบ
   (ห้ามใส่สไตล์ให้ `.eq-psel select` เพราะจะทับกฎ `.ixsel > select{opacity:0}` ทำให้ select ดิบโผล่ = ลูกศรซ้อน) */
.eq-psel .ixsel { min-width: 180px; }
.eq-psel .ixsel-btn { width: 100%; }
.eq-zbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--gold); border-radius: 8px; background: var(--field); color: var(--ink); font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s; }
.eq-zbtn svg { width: 15px; height: 15px; }
.eq-zbtn:hover { background: var(--t-gold, rgba(230,180,60,.12)); }
.eq-zbtn.on { background: var(--gold); color: #3a2c05; border-color: var(--gold); }
/* ของจากตู้พรีเซ็ต — กรอบทอง */
.eq-cell.on.preset,
html[data-theme="dark"] .eq-cell.on.preset { border-color: var(--gold); box-shadow: 0 0 0 1.5px var(--gold) inset, 0 0 7px rgba(230,180,60,.5); }

/* ── กริดตู้พรีเซ็ต (Presetzone) ── */
.eq-zone { padding: 6px 4px; }
.eq-zhd { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-2); margin-bottom: 10px; text-align: center; }
.eq-zback { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font-size: .78rem; font-weight: 700; cursor: pointer; transition: border-color .12s, background .12s; }
.eq-zback:hover { border-color: var(--blue); background: var(--sky); }
.eq-zar { display: inline-flex; line-height: 0; }
.eq-zar svg { width: 14px; height: 14px; display: block; }
.eq-zgrid { display: grid; gap: 8px; justify-content: center; }
.eq-cell.on.zone { border-color: var(--gold); }
html[data-theme="dark"] .eq-cell.on.zone { border-color: var(--gold); }

/* ── การ์ดตัวละครกลาง ── */
.eq-center { display: flex; justify-content: center; }
.eq-char { width: 100%; height: 100%; min-height: 340px; border-radius: 14px; border: 1.5px solid var(--line); background: radial-gradient(120% 80% at 50% 25%, #1a2740, #080d18); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; position: relative; box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.eq-fig { color: #5b6b8c; margin: auto; }
.eq-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.eq-cnm { position: relative; z-index: 1; font-weight: 700; color: #fff; font-size: 1rem; padding: 34px 10px 13px; width: 100%; text-align: center; background: linear-gradient(0deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.78) 38%, rgba(0,0,0,.35) 70%, transparent 100%); text-shadow: 0 1px 4px rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; gap: 8px; }
.eq-sex { font-size: .7rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; }
.eq-sex.m { background: #1D4ED8; color: #fff; }
.eq-sex.f { background: #DB2777; color: #fff; }

/* ── แท็บ Equipment / Link Weapon ── */
.cv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.cv-tab { padding: 6px 13px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink-2); font-family: inherit; font-size: .79rem; font-weight: 600; cursor: pointer; }
.cv-tab.on { border-color: var(--blue); background: var(--sky); color: var(--blue); }
.cv-tab.eqpg { min-width: 158px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.cv-tab.eqpg svg { width: 15px; height: 15px; flex: none; }
.cv-none { padding: 40px 20px; text-align: center; color: var(--ink-2); font-size: .87rem; }
/* โฟกัสคีย์บอร์ดบนช่องไอเทม (กดดูรายละเอียดด้วย Enter/Space ได้) */
.eq-cell[role="button"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
