/* 장비 (js/gear.js) — 그림 위주 */
.gear-slots{display:grid;gap:8px;margin-top:10px}
.gear-slots.four{grid-template-columns:repeat(4,1fr)}.gear-slots.three{grid-template-columns:repeat(3,1fr)}
.gear-slot{position:relative;aspect-ratio:1;border-radius:12px;background:#27272a;border:2px solid #3f3f46;padding:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}
.gear-slot img{width:78%;height:78%;object-fit:contain}
.gear-slot.empty img{opacity:.35}
.gear-slot span{font-size:9px;line-height:1.1;color:#d4d4d8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.gear-slot i,.gear-cell i{position:absolute;top:2px;right:4px;font-style:normal;font-size:11px;font-weight:900;color:#fde68a;text-shadow:0 1px 2px #000}
.gear-slot.sigil{border-style:dashed;border-color:#a78bfa}.gear-slot.sigil.on{border-style:solid;background:#2e1065}
.gt1{border-color:#71717a!important}.gt2{border-color:#a1a1aa!important}.gt3{border-color:#22c55e!important}.gt4{border-color:#3b82f6!important}
.gt5{border-color:#a855f7!important}.gt6{border-color:#f59e0b!important}.gt7{border-color:#e11d48!important}
.gear-name.gt1 small{color:#a1a1aa}.gear-name.gt3 small{color:#4ade80}.gear-name.gt4 small{color:#60a5fa}.gear-name.gt5 small{color:#c084fc}.gear-name.gt6 small{color:#fbbf24}.gear-name.gt7 small{color:#fb7185}
.gear-pop-bg{position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:140;padding:16px}
.gear-pop{background:#18181b;border:1px solid rgba(255,255,255,.15);border-radius:20px;padding:16px;width:100%;max-width:380px;color:#fafafa;text-align:center;max-height:calc(100dvh - 2rem);overflow-y:auto}
.gear-pop.bag{max-width:420px}
.gear-big{width:120px;height:120px;margin:0 auto 8px;border:3px solid #3f3f46;border-radius:18px;background:#27272a;display:flex;align-items:center;justify-content:center}
.gear-big img{width:88%;height:88%;object-fit:contain}.gear-big img.dim{opacity:.35;filter:grayscale(1)}
.gear-name{font-weight:900;font-size:17px}.gear-name small{font-size:12px;margin-right:2px}
.gear-plus{color:#fde68a;font-weight:900}
.gear-main{margin-top:6px;font-weight:800;color:#fdba74}
.gear-opt{font-size:13px;color:#93c5fd}
.gear-sig{margin-top:8px;font-size:12px;color:#ddd6fe;background:#2e1065;border-radius:10px;padding:8px}.gear-sig.next{background:#1e1b4b;color:#c4b5fd}.gear-sig small{display:block;color:#a78bfa}
.gear-dim{font-size:12px;color:#a1a1aa;margin-top:8px}
.gear-acts{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:12px}
.gear-btn{padding:8px 12px;border-radius:12px;background:rgba(255,255,255,.1);font-weight:800;font-size:13px}.gear-btn.main{background:#f59e0b;color:#000}
.gear-btn:disabled{opacity:.45}
.gear-bag-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.gear-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
.gear-tabs button{flex:1;display:flex;align-items:center;justify-content:center;gap:2px;padding:4px;border-radius:10px;background:#27272a;font-size:12px;font-weight:800}
.gear-tabs button.on{background:#f59e0b;color:#000}.gear-tabs img{width:18px;height:18px}
.gear-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.gear-grid .gear-dim{grid-column:1/-1}
.gear-cell{position:relative;aspect-ratio:1;border-radius:10px;background:#27272a;border:2px solid #3f3f46;padding:3px}
.gear-cell img{width:100%;height:100%;object-fit:contain}
.gear-eq{position:absolute;left:3px;top:2px;font-size:10px;background:#f59e0b;color:#000;border-radius:5px;padding:0 3px}
.gear-lk{position:absolute;left:2px;bottom:1px;font-size:10px}

/* 장비 PR4: 획득 팝업 · 우편함 */
.gear-badge{background:#ef4444;color:#fff;border-radius:999px;padding:0 6px;font-style:normal;font-size:.75rem;margin-left:2px}
.gear-drops-h{font-weight:800;font-size:1.1rem;margin-bottom:10px}
.gear-drops{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:10px}
.gear-drop{position:relative;width:88px;display:flex;flex-direction:column;align-items:center;gap:4px;border-radius:14px;padding:6px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);animation:gearIn .35s ease both}
.gear-drop img{width:72px;height:72px;object-fit:contain}
.gear-drop span{font-size:.72rem;line-height:1.15}
.gear-drop>b{position:absolute;top:2px;right:4px;font-size:1rem}
.gear-drop.box>b{top:24px;right:auto;font-size:1.8rem}
@keyframes gearIn{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
.gear-box{font-size:2.6rem;line-height:72px;height:72px;display:block}.gear-cell .gear-box{font-size:1.8rem;line-height:1.4}.gear-box.big{font-size:3rem;line-height:1.6;height:auto}
.gear-drop span.gear-box{font-size:2.6rem;line-height:72px}
/* 장비 PR5: 강화·재설정·분해·매각 */
.gear-btn small{display:block;font-size:10px;font-weight:600;opacity:.8}
.gear-btn.danger{background:#ef4444;color:#fff}.gear-btn:disabled{opacity:.4}
.gear-warn{color:#fca5a5;font-weight:800;margin:6px 0}
.gear-sel{display:flex;flex-wrap:wrap;gap:4px;align-items:center;justify-content:space-between;margin-bottom:8px}
.gear-sel>button:not(.gear-btn){padding:4px 8px;border-radius:999px;background:#27272a;font-size:12px;font-weight:800;border:1px solid currentColor}
.gear-cell.pick{outline:3px solid #f59e0b;outline-offset:-1px}.gear-cell.pick::after{content:'✓';position:absolute;top:2px;left:4px;color:#f59e0b;font-weight:900}
.gear-cell.nopick{opacity:.35}
.gear-bulk{position:sticky;bottom:-16px;z-index:20;background:#18181b;padding:8px 0;align-items:center}
.sig-bar{position:relative;height:20px;border-radius:999px;background:#27272a;margin:10px 0;overflow:hidden}.sig-bar i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#a855f7,#f59e0b)}.sig-bar span{position:relative;font-size:12px;font-weight:800;line-height:20px}
button.gear-drop{cursor:pointer}
.shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:8px 0}
.shop-it{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 4px;border-radius:14px;background:#27272a;border:1px solid rgba(255,255,255,.12)}
.shop-it.done{opacity:.4}.shop-ic img{width:56px;height:56px;object-fit:contain}.shop-ic .gear-box{font-size:2.4rem;line-height:56px;height:56px}
.shop-nm{font-size:11px;font-weight:700;line-height:1.2}.shop-p{font-size:12px;font-weight:800;color:#fbbf24}.shop-it small{font-size:10px;opacity:.7}
.gear-big .gear-box{font-size:4rem;line-height:1.5;height:auto}
/* 메시지 우편 (mail_v2) */
.gear-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 210, 120, .45); background: rgba(255, 200, 90, .08); color: inherit; text-align: left; cursor: pointer; }
.gear-msg.read { opacity: .65; border-color: rgba(255, 255, 255, .15); }
.gear-msg b { font-size: 14px; } .gear-msg span { font-size: 12px; opacity: .85; } .gear-msg small { font-size: 11px; opacity: .6; }
.gear-msg .gear-badge { position: static; display: inline-block; }
.gear-msg-t { display: block; font-size: 16px; margin-bottom: 6px; }
.gear-msg-b { white-space: normal; font-size: 13px; line-height: 1.5; max-height: 40vh; overflow: auto; text-align: left; margin-bottom: 8px; }
.gear-msg-a { font-size: 13px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); margin-bottom: 6px; }
.story-mini .gear-badge { position: static; display: inline-block; margin-left: 3px; }

/* 장비 상세: 장착한 인재 썸네일 (아이콘 오른쪽 아래, 테두리 = 등급 색 --rc) */
.gear-big{position:relative}
.gear-who{position:absolute;right:-12px;bottom:-10px;width:44px;height:58px;border-radius:9px;overflow:hidden;border:2px solid var(--rc,#71717a);background:#18181b;box-shadow:0 2px 6px rgba(0,0,0,.6)}
.gear-who img{width:100%!important;height:100%!important;object-fit:cover;object-position:top;display:block}
