/* =========================================================
   Профиль v2: инвентарь (модели, оружие) и достижения.
   ========================================================= */

/* ---------- Модели: фото больше не вылезает за карточку ---------- */
.model-pick { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 18px; align-items: stretch; }
.mp-item { overflow: hidden; gap: 6px; padding: 0 0 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); }
.mp-item > b, .mp-item > small { padding: 0 12px; max-width: 100%; overflow-wrap: anywhere; }
.mp-item > b { margin-top: 2px; line-height: 1.2; }
.mp-img { position: relative; display: block; width: 100%; height: 210px; flex: none; overflow: hidden; border-radius: 0; background: radial-gradient(60% 55% at 50% 42%, rgba(190, 140, 255, .2), transparent 72%), radial-gradient(85% 45% at 50% 106%, rgba(139, 61, 255, .42), transparent 72%), linear-gradient(180deg, #151d2e, #0d121c); }
.mp-img::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 8px; height: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); pointer-events: none; }
.mp-img img { position: absolute; inset: 10px 8px 16px; width: calc(100% - 16px); height: calc(100% - 26px); object-fit: contain; object-position: center bottom; z-index: 1; transition: transform .35s ease; }
.mp-item:hover .mp-img img { transform: scale(1.05); }
.mp-img i { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; color: var(--dim); }
.mp-state { margin-top: auto; align-self: center; }
.mp-item.active .mp-img { box-shadow: inset 0 -40px 60px -30px rgba(139, 61, 255, .45); }
.inv-knives .mp-img, .inv-zm .mp-img { height: 160px; }
.inv-knives .mp-img img, .inv-zm .mp-img img { object-position: center; inset: 14px 10px; width: calc(100% - 20px); height: calc(100% - 28px); }
.inv-note { padding-top: 0; }

/* ---------- Оружие ---------- */
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 18px; }
.wp-card { position: relative; display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); overflow: hidden; transition: .2s; }
.wp-card:hover { transform: translateY(-2px); border-color: var(--line-violet); }
.wp-card.owned { border-color: rgba(94, 240, 168, .35); box-shadow: 0 10px 30px rgba(94, 240, 168, .07); }
.wp-stage { position: relative; display: block; height: 180px; overflow: hidden; flex: none; background: radial-gradient(70% 80% at 50% 108%, rgba(255, 86, 86, .28), transparent 70%), linear-gradient(180deg, #1a1822, #0b1019); }
.wp-card.locked .wp-stage img { filter: grayscale(.7) brightness(.8) drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.wp-stage img { position: absolute; inset: 22px 14px 12px; width: calc(100% - 28px); height: calc(100% - 34px); object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); transition: transform .35s ease; }
.wp-card:hover .wp-stage img { transform: scale(1.05); }
.wp-stage > i { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; color: var(--dim); }
.wp-badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: rgba(8, 11, 18, .78); border: 1px solid var(--line-2); color: var(--muted); font-size: 11px; font-weight: 800; backdrop-filter: blur(4px); }
.wp-badge.ok { color: var(--green); border-color: rgba(94, 240, 168, .4); }
.wp-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 6px; }
.wp-body b { font-size: 16px; font-weight: 900; }
.wp-body small { color: var(--dim); font-size: 11px; }
.wp-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.wp-facts li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.wp-facts i { width: 14px; text-align: center; color: var(--lilac); }
.wp-state, .wp-buy { margin: 10px 16px 16px; justify-content: center; text-align: center; }
.wp-state { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; background: rgba(94, 240, 168, .1); border: 1px solid rgba(94, 240, 168, .28); color: var(--green); font-size: 12px; font-weight: 800; }
.wp-card .wp-buy { margin-top: auto; }

/* ---------- Достижения ---------- */
.ach-summary { display: flex; align-items: center; gap: 18px; margin: 18px 20px 4px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(139, 61, 255, .12), rgba(255, 201, 74, .05)); }
.ach-sum-ring { --p: 0; flex: none; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(closest-side, #0e1420 78%, transparent 80%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.ach-sum-ring b { font-size: 17px; font-weight: 900; }
.ach-sum-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ach-sum-txt b { font-size: 15px; font-weight: 900; }
.ach-sum-txt > span { color: var(--muted); font-size: 12px; }
.ach-sum-txt .ach-bar { color: var(--gold); margin-top: 8px; }
.ach-group { display: flex; align-items: center; gap: 10px; margin: 20px 20px 0; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ach-group i { color: var(--lilac); }
.ach-group em { margin-left: auto; padding: 1px 9px; border-radius: 7px; background: rgba(255, 255, 255, .06); color: var(--dim); font-style: normal; font-size: 11px; letter-spacing: 0; }
.ach-grid-2 { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); padding-top: 12px; padding-bottom: 6px; }
.ach { display: flex; flex-direction: column; padding: 16px 14px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); text-align: left; transition: .2s; }
.ach:hover { transform: translateY(-2px); }
.ach .ach-ico { color: inherit; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; border-radius: 13px; background: rgba(255, 255, 255, .05); }
.ach .ach-ico i { font-size: 20px; }
.ach.done .ach-ico { background: currentColor; box-shadow: 0 0 22px -4px currentColor; }
.ach.done .ach-ico i { color: #0b1019; filter: none; }
.ach b { display: block; margin-top: 12px; font-size: 14px; font-weight: 900; }
.ach .ach-desc { display: block; margin-top: 3px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.ach .ach-bar { margin-top: auto; }
.ach .ach-desc + .ach-bar { margin-top: 12px; }
.ach small { display: flex; align-items: center; gap: 5px; }
.ach.done small { color: var(--green); }
.ach.locked { opacity: .62; filter: grayscale(.7); }
.ach.locked:hover { opacity: .85; }
.ach.is-new { box-shadow: 0 0 0 1px currentColor, 0 0 28px -6px currentColor; animation: achPop .6s ease; }
.ach .ach-new { margin: 0; position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 7px; background: var(--grad-violet, linear-gradient(135deg, #a64dff, #6b2fe0)); color: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; }
@keyframes achPop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ach.is-new { animation: none; } }

@media (max-width: 720px) {
  .model-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .mp-img { height: 170px; }
  .inv-knives .mp-img, .inv-zm .mp-img { height: 130px; }
  .wp-grid { grid-template-columns: 1fr; padding: 12px; }
  .ach-summary { margin: 14px 12px 0; flex-direction: row; }
  .ach-group { margin: 16px 14px 0; }
  .ach-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; padding-left: 12px; padding-right: 12px; }
}
