/* ---------- Типы сундуков и карты оружия ---------- */
.chest-ico { --cc: #b07a45; --ct: #d9a066; flex: none; width: 64px; height: 64px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 3px solid var(--cc); background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 60%, #0b1830), color-mix(in srgb, var(--cc) 25%, #0b1830)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 3px 0 rgba(5, 14, 32, .7); }
.chest-ico span { font-size: 28px; line-height: 1; }
.chest-ico em { font-style: normal; font-size: 9px; font-weight: 900; color: #1a1205; background: var(--ct); border-radius: 6px; padding: 1px 6px; }
.chest-ico.ct-royal { border-color: #ffcf3a; box-shadow: inset 0 0 0 3px #8a3ffc, 0 3px 0 rgba(5, 14, 32, .7), 0 0 18px rgba(138, 63, 252, .55); }
.chest-modal { border-color: var(--cc); box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 0 1px var(--cc) inset; }
.cp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cp-name { margin: 0; color: var(--cc); font-size: 22px; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.cp-tour { font-size: 13px; font-weight: 900; letter-spacing: .12em; color: var(--ct); }
.cp-tour.center { text-align: center; margin: -2px 0 10px; }
.cp-min { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--muted); margin: 4px 0 8px; }
.cp-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cp-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.cp-row .cp-i { font-size: 20px; width: 26px; text-align: center; } .cp-row b { font-size: 16px; color: #ffe08a; }
.cp-row[class*="r-"] { border-left: 4px solid var(--rc); } .cp-row[class*="r-"] b { color: var(--rc); }
.cp-row.soft { opacity: .8; } .cp-row.soft b { font-size: 14px; color: var(--text); }
.cr-list { display: flex; flex-direction: column; gap: 7px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px; padding-right: 2px; -webkit-overflow-scrolling: touch; }
.cr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-left: 4px solid var(--rc); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.cr-item .gun-ico { width: 56px; height: 26px; } .cr-item .gun-ico svg { width: 56px; height: 26px; }
.cr-t { flex: 1; min-width: 0; }
.cr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cr-name { color: var(--rc); font-size: 15px; } .cr-n { font-weight: 900; color: #ffe08a; font-size: 15px; white-space: nowrap; }
.cr-t small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.cr-bar { height: 6px; margin-top: 4px; } .cr-bar.ready i { background: linear-gradient(90deg, var(--accent), #b6f05a); }
.cr-line { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.cr-line span { font-size: 22px; width: 28px; text-align: center; } .cr-line b { color: #ffe08a; font-size: 16px; }
.cardbar { margin-top: 10px; }
.cardbar .cb-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.cardbar .cb-top span:first-child { color: var(--text); }
.cardbar.ready .cb-top span:first-child { color: #9be04a; } .cardbar.ready .bar i { background: linear-gradient(90deg, var(--accent), #b6f05a); }
.chest-shop { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; border-color: #8a3ffc; background: linear-gradient(180deg, rgba(138, 63, 252, .2), transparent 70%), var(--panel); }
.chest-shop .cs-t { flex: 1; min-width: 0; } .chest-shop .cs-t b { display: block; font-size: 16px; color: #ffcf3a; }
.chest-shop .cs-t > span { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.chest-shop .cs-btns { gap: 6px; } .chest-shop .cs-btns .btn { padding: 0 8px; font-size: 13px; }
.chest-note .cn-name { display: block; font-size: 15px; } .chest-note .cn-sub { display: block; font-size: 12px; font-weight: 700; opacity: .85; }
.chest-note > div { text-align: left; }
@media (max-height: 700px) { .cr-list { max-height: 44vh; } }

/* ---------- Кристаллы, слоты сундуков, окно сундука ---------- */
.gb-gems { display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 10px; border-radius: 20px; background: rgba(0, 0, 0, .42); border: 1px solid rgba(120, 200, 255, .55); font-weight: 800; font-size: 15px; color: #9fdcff; white-space: nowrap; flex: none; cursor: pointer; font-family: inherit; }
.gb-gems:active { transform: scale(.94); }
.chip.gem { color: #9fdcff; }
.chest.full .ch-ico { font-size: 22px; }
.chest.full small { font-size: 9px; line-height: 1.05; }
.chest.full .ch-tour { font-size: 8.5px; letter-spacing: .1em; color: var(--ct); }
.chest.full em.ch-tag { font-size: 9px; padding: 1px 4px; min-width: 0; max-width: 100%; white-space: nowrap; background: rgba(0, 0, 0, .55); color: #fff; letter-spacing: .02em; }
.chest.full.st-unlocking em.ch-tag { background: rgba(255, 176, 46, .9); color: #2a1a00; }
.chest.full.st-ready em.ch-tag { background: linear-gradient(180deg, #8ee02a, #4aa516); color: #0f2a05; }
.chest.full.st-ready { box-shadow: 0 0 14px color-mix(in srgb, var(--cc) 80%, transparent), inset 0 2px 0 rgba(255, 255, 255, .3), 0 3px 0 rgba(5, 14, 32, .8); }
.chest.full.st-closed .ch-ico { animation: none; filter: grayscale(.4); }
.cm-status { font-weight: 900; font-size: 15px; padding: 8px 12px; border-radius: 12px; margin-bottom: 10px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); text-align: center; }
.cm-status.going { color: #ffcf6a; border-color: rgba(255, 176, 46, .6); } .cm-status.ready { color: #9be04a; border-color: rgba(126, 211, 33, .6); }
.cm-btns { display: flex; flex-direction: column; gap: 8px; }
.btn.dim { opacity: .6; }
.gem-pack b { color: #9fdcff; } .chest-shops { display: flex; flex-direction: column; margin-bottom: 4px; }
.chest-shop > .cs-t b { color: var(--cc); }
.modal-check { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; color: var(--muted); font-size: 14px; cursor: pointer; } .modal-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.btn.need { font-size: 13px; padding: 0 6px; line-height: 1.15; }

/* Картинки сундуков (кейсы снаряжения) вместо эмодзи */
.chest-img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); pointer-events: none; user-select: none; }
.chest .ch-ico { width: 78%; max-width: 92px; font-size: 0; }
.chest-ico .chest-img { width: 54px; }
.chest-note span { width: 52px; font-size: 0; flex: none; }

/* ===== Анимация открытия кейса ===== */
.chest-open-ov { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--cc) 35%, #0b1220) 0%, #05080f 70%); opacity: 0; transition: opacity .2s; touch-action: none; }
.chest-open-ov.go { opacity: 1; } .chest-open-ov.out { opacity: 0; }
.co-stage { position: relative; width: min(86vw, 420px); aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; }
.co-img { position: absolute; width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); }
.co-closed { transform: translateY(-60vh) scale(.6); }
.go .co-closed { animation: coDrop .45s cubic-bezier(.3,1.4,.6,1) forwards, coShake .9s .45s ease-in-out forwards; }
.burst .co-closed { animation: coPop .35s ease-out forwards; }
.co-open { opacity: 0; transform: scale(.9); }
.burst .co-open { animation: coOpen .5s .1s ease-out forwards; }
.co-glow { position: absolute; width: 70%; height: 70%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ct) 80%, #fff) 0%, transparent 70%); opacity: 0; filter: blur(8px); }
.go .co-glow { animation: coGlow 1.35s ease-in forwards; }
.burst .co-glow { animation: coGlowBurst 1.2s ease-out forwards; }
.co-rays { position: absolute; width: 160%; aspect-ratio: 1; opacity: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ct) 55%, transparent) 0deg 8deg, transparent 8deg 22deg);
  mask: radial-gradient(circle, #000 15%, transparent 65%); -webkit-mask: radial-gradient(circle, #000 15%, transparent 65%); }
.burst .co-rays { animation: coRays 1.4s ease-out forwards; }
.co-flash { position: absolute; inset: -30%; background: radial-gradient(circle, #fff 0%, rgba(255,255,255,.8) 20%, transparent 60%); opacity: 0; pointer-events: none; }
.burst .co-flash { animation: coFlash .5s ease-out forwards; }
.co-spark { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: color-mix(in srgb, var(--ct) 60%, #fff); box-shadow: 0 0 10px var(--ct); opacity: 0; }
.burst .co-spark { animation: coSpark .9s var(--dl) ease-out forwards; }
.co-count { position: absolute; bottom: -18%; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 18px var(--ct); opacity: 0; transform: scale(.5); }
.burst .co-count { animation: coCount .5s .25s cubic-bezier(.3,1.6,.6,1) forwards; }
.co-skip { position: absolute; bottom: 8%; font-size: 12px; opacity: .55; color: #fff; }
.cr-in { opacity: 0; animation: crIn .35s ease-out forwards; }
@keyframes coDrop { to { transform: translateY(0) scale(1); } }
@keyframes coShake { 0%,100% { transform: rotate(0) } 15% { transform: rotate(-3deg) scale(1.02) } 30% { transform: rotate(3deg) } 45% { transform: rotate(-5deg) scale(1.04) }
  60% { transform: rotate(5deg) } 75% { transform: rotate(-7deg) scale(1.07) } 90% { transform: rotate(7deg) scale(1.08) } }
@keyframes coPop { 0% { transform: scale(1.08) } 50% { transform: scale(1.18); filter: brightness(2.2) drop-shadow(0 0 30px var(--ct)); opacity: 1 } 100% { transform: scale(1.12); filter: brightness(1.4) drop-shadow(0 0 24px var(--ct)); opacity: 0 } }
@keyframes coOpen { to { opacity: 1; transform: scale(1.06); } }
@keyframes coGlow { 0% { opacity: 0; transform: scale(.6) } 100% { opacity: .9; transform: scale(1.1) } }
@keyframes coGlowBurst { 0% { opacity: 1; transform: scale(1.1) } 100% { opacity: .5; transform: scale(1.6) } }
@keyframes coRays { 0% { opacity: 0; transform: rotate(0) scale(.5) } 30% { opacity: 1 } 100% { opacity: .55; transform: rotate(60deg) scale(1) } }
@keyframes coFlash { 0% { opacity: 0 } 25% { opacity: 1 } 100% { opacity: 0 } }
@keyframes coSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) } }
@keyframes coCount { to { opacity: 1; transform: scale(1); } }
@keyframes crIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

/* открытый кейс: картинка с тёмным фоном — края растворяем в фоне оверлея */
.co-open { width: 118%; max-width: none; filter: none;
  -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }

