/* Сундуки (A09) */
.cst-wrap { padding: 4px 0 12px; }
.cst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.cst-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 8px 6px; text-align: center; min-width: 0; }
.cst-card.empty { opacity: 0.55; }
.cst-card.cst-rare { border-color: rgba(74, 168, 255, 0.5); }
.cst-card.cst-legendary { border-color: rgba(255, 210, 63, 0.6); box-shadow: 0 0 14px rgba(255, 210, 63, 0.18); }
.cst-card .cst-svg { width: 64px; height: 54px; }
.cst-nm { font-size: 11px; line-height: 1.2; min-height: 26px; margin: 2px 0; }
.cst-n { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.cst-card .bigbtn { width: 100%; padding: 6px 2px; font-size: 13px; }
.cst-hint { font-size: 12px; opacity: 0.65; margin-top: 8px; text-align: center; }
.cst-pill { display: inline-block; margin: 4px auto; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 210, 63, 0.6); background: rgba(255, 210, 63, 0.12); color: var(--gold, #ffd23f); font-size: 12px; font-weight: 700; animation: cst-pulse 2s ease-in-out infinite; }
.cst-pill.hidden { display: none; }
.cst-badge { background: var(--gold, #ffd23f); color: #120; }
.seg button[data-sub="chests"][data-n]:not([data-n=""])::after { content: attr(data-n); margin-left: 4px; background: var(--gold, #ffd23f); color: #120; border-radius: 8px; padding: 0 5px; font-size: 10px; }

/* Оверлей открытия */
.cst-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, 0.82); display: flex; align-items: center; justify-content: center; animation: cst-fade 0.2s; }
.cst-stage { position: relative; width: min(92vw, 360px); text-align: center; }
.cst-chest .cst-svg { width: 160px; height: 134px; position: relative; z-index: 2; }
.cst-chest.shake .cst-svg { animation: cst-shake 0.18s infinite; }
.cst-light { position: absolute; left: 50%; top: 30px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; opacity: 0; background: radial-gradient(circle, var(--cst-glow, #fff) 0%, transparent 65%); }
.cst-ov-common { --cst-glow: #cfe9dc; }
.cst-ov-rare { --cst-glow: #6fbaff; }
.cst-ov-legendary { --cst-glow: #ffd23f; }
.cst-ov.opened .cst-light { animation: cst-flash 0.9s ease-out forwards; }
.cst-ov.opened .cst-lid { transition: transform 0.3s; }
.cst-loot { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; }
.cst-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #101613; border: 2px solid #9fb4a8; max-width: 100%; opacity: 0; animation: cst-pop 0.45s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.cst-item i { font-style: normal; font-size: 28px; }
.cst-item b { font-size: 15px; text-align: left; }
.cst-item.r-rare { border-color: #4aa8ff; box-shadow: 0 0 14px rgba(74, 168, 255, 0.5); }
.cst-item.r-legendary { border-color: #ffd23f; box-shadow: 0 0 22px rgba(255, 210, 63, 0.7); }
.cst-ok { margin-top: 6px; min-width: 160px; }
.cst-ov.lite *, .cst-ov.lite { animation: none !important; }
.cst-ov.lite .cst-item { opacity: 1; }

@keyframes cst-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cst-shake { 0% { transform: translate(-3px, 0) rotate(-3deg); } 50% { transform: translate(3px, 0) rotate(3deg); } 100% { transform: translate(-3px, 0) rotate(-3deg); } }
@keyframes cst-flash { 0% { opacity: 0; transform: scale(0.3); } 30% { opacity: 1; } 100% { opacity: 0.25; transform: scale(1.3); } }
@keyframes cst-pop { from { opacity: 0; transform: translateY(24px) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes cst-pulse { 50% { box-shadow: 0 0 12px rgba(255, 210, 63, 0.5); } }
@media (prefers-reduced-motion: reduce) { .cst-chest.shake .cst-svg, .cst-pill { animation: none; } }
