/* ============ Общее ============ */
.sp { flex: 1; }
a.btn { text-decoration: none; color: inherit; }
a.btn--primary { color: #fff; }
.muted { color: var(--muted); font-size: 14px; }
.bad { color: #e5484d; }
.tag {
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.icon-btn {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn svg, .muted-link svg, .pbox__tabs svg, .search svg, .pbal__head svg, .pbest__head svg, .pstats__i svg, .pava i svg, .tab__i svg, .icon-pick svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn--sm svg { width: 14px; height: 14px; }
.btn--outline { background: transparent; border: 1px solid color-mix(in srgb, var(--green) 50%, var(--border)); }
.check { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text); }
.m .check--sm, .check--sm { font-size: 14px; }
.check--sm i { width: 20px !important; height: 20px !important; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.kv b { color: var(--text); text-align: right; word-break: break-all; }

/* Редкость: серый → зелёный → оранжевый → золотой */
.rar--common { --r: #8b95a7; }
.rar--rare { --r: #7ed90b; }
.rar--epic { --r: #ff7a00; }
.rar--legendary { --r: #ffc400; }
.drop--common { --c: #8b95a7; }
.drop--rare { --c: #7ed90b; }
.drop--epic { --c: #ff7a00; }
.drop--legendary { --c: #ffc400; }
.drop { cursor: pointer; }
.rar-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--r, var(--muted)); }
.feed__empty { color: var(--muted); padding: 34px 10px; }

/* Вкладки с иконками */
.tab__i { display: grid; place-items: center; }
.tab__x--link { font-size: 12px; }
.icon-pick button {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid; place-items: center;
  color: var(--muted);
}
.icon-pick button.is-active { border-color: var(--accent); color: var(--accent); }

@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ============ Сетка кейсов ============ */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head .section-title { margin: 0; }
.cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
/* Кейс — без карточки: картинка, название, цена */
.case {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.case__img { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.case__img img {
  width: 94%; height: 94%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s;
}
.case:hover .case__img img {
  transform: translateY(-6px) scale(1.05);
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, .5)) drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 35%, transparent));
}
.case__badge {
  position: absolute;
  top: 4%; left: 4%;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 8px;
  background: #ff7a00;
  color: #fff;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  box-shadow: 0 4px 14px rgba(255, 122, 0, .45);
}
.case__badge--static { position: static; display: inline-block; }
.case__name { font-weight: 800; font-size: 18px; text-align: center; line-height: 1.2; }

/* Цена: монета + сумма */
.price {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.price .coin { width: 24px; height: 24px; font-size: 12px; }
.price small { font-size: 11px; font-weight: 700; color: var(--muted); }
.case:hover .price { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.price--sm { font-size: 14px; padding: 3px 10px 3px 3px; }
.price--sm .coin { width: 20px; height: 20px; font-size: 10px; }
.price--lg { font-size: 26px; padding: 6px 20px 6px 6px; }
.price--lg .coin { width: 34px; height: 34px; font-size: 16px; }

/* ============ Страница кейса ============ */
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--text); }
.cpage {
  padding: 26px;
  margin-bottom: 30px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 90% at 20% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 80% at 100% 0%, color-mix(in srgb, var(--green) 12%, transparent), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.cpage__hero { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 30px; align-items: center; }
.cpage__img img { width: 100%; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .5)); animation: float 4.5s ease-in-out infinite; }
.cpage__info h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 14px; line-height: 1.05; }
.cpage__info .hint { margin: -4px 0 12px; }
.btn--open {
  height: 58px;
  padding: 0 38px;
  margin: 20px 0 14px;
  border: 0;
  border-radius: 16px;
  font-size: 18px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--green)));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 55%, #000);
}
.btn--open:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 55%, #000); }

.roulette {
  position: relative;
  margin-top: 26px;
  padding: 14px 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.roulette__marker {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  z-index: 2;
  width: 3px; margin-left: -1.5px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.roulette__marker::before, .roulette__marker::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 9px solid transparent;
  transform: translateX(-50%);
}
.roulette__marker::before { top: 0; border-top-color: var(--accent); }
.roulette__marker::after { bottom: 0; border-bottom-color: var(--accent); }
.roulette__strip { display: flex; gap: 10px; will-change: transform; }
.rcard {
  position: relative;
  flex: 0 0 150px;
  height: 172px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 70% at 50% 25%, color-mix(in srgb, var(--r) 30%, transparent), transparent 70%),
    var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  font-size: 13px; font-weight: 700;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.rcard img { width: 90px; height: 90px; object-fit: contain; }
.rcard__bar, .item__bar {
  position: absolute;
  left: 18%; right: 18%; bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--r);
  box-shadow: 0 0 14px var(--r);
}
.rcard.is-win {
  border-color: var(--r);
  box-shadow: 0 0 0 2px var(--r), 0 0 34px color-mix(in srgb, var(--r) 55%, transparent);
  transform: scale(1.05);
}

.contents h2 { font-size: 24px; font-weight: 800; margin: 0 0 16px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.item {
  position: relative;
  padding: 16px 10px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 60% at 50% 20%, color-mix(in srgb, var(--r) 24%, transparent), transparent 70%),
    var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  overflow: hidden;
}
.item img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.item__chance { position: absolute; top: 9px; right: 11px; font-size: 12px; font-weight: 700; color: var(--muted); }
.item__name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.item__val { display: flex; align-items: center; gap: 5px; font-weight: 800; color: var(--r); }

/* Окно выигрыша */
.modal--win { width: min(420px, calc(100vw - 24px)); }
.win { position: relative; align-items: center; text-align: center; overflow: hidden; padding-top: 28px; }
.win > * { position: relative; }
.win .win__glow {
  position: absolute;
  left: -20%; right: -20%; top: -30%;
  height: 80%;
  background: radial-gradient(circle, color-mix(in srgb, var(--r) 45%, transparent), transparent 65%);
  pointer-events: none;
}
.win h3 { margin: 0; font-size: 26px; font-weight: 800; }
.win__img { width: 180px; height: 180px; object-fit: contain; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .45)); }
.win__name { font-size: 21px; font-weight: 800; }
.win__val { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--r); }
.win__btns { width: 100%; display: grid; gap: 10px; margin-top: 6px; }

/* Инфо о дропе из ленты */
.dropinfo__item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: radial-gradient(60% 100% at 15% 50%, color-mix(in srgb, var(--r) 22%, transparent), transparent 70%), var(--bg);
}
.dropinfo__item img { width: 96px; height: 96px; object-fit: contain; flex: none; }
.dropinfo__name { font-size: 20px; font-weight: 800; line-height: 1.2; margin: 2px 0 4px; }
.dropinfo__val { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--r); margin-bottom: 4px; }
.dropinfo__case {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  text-decoration: none;
}
.dropinfo__case:hover { border-color: var(--accent); }
.dropinfo__case img { width: 76px; height: 76px; object-fit: contain; flex: none; }
.dropinfo__case div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.dropinfo__go { margin-left: auto; color: var(--accent); font-weight: 800; white-space: nowrap; }

/* ============ Профиль ============ */
.ptop { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.pcard2, .pbal, .pbest {
  position: relative;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.pcard2 { background: linear-gradient(135deg, var(--surface-2), var(--surface)); display: flex; flex-direction: column; gap: 18px; justify-content: space-between; }
.pcard2__row { display: flex; gap: 16px; align-items: center; min-width: 0; }
.pcard2__who { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pava {
  position: relative;
  flex: none;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #fff;
  font-size: 30px; font-weight: 800;
  display: grid; place-items: center;
}
.pava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pava i {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  border: 3px solid var(--surface);
  color: #fff;
}
.pava i svg { width: 14px; height: 14px; }
.pname2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pname2 h1 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname2__form { display: flex; gap: 6px; }
.pname2__form input {
  width: 180px; min-width: 0;
  height: 36px; padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--bg);
  font-weight: 700; font-size: 16px;
  outline: none;
}
.muted-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.muted-link:hover { color: var(--text); }
.muted-link svg { width: 16px; height: 16px; }
.pstats { display: flex; align-items: center; gap: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.pstats > div { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; justify-content: start; }
.pstats__i { color: var(--muted); display: grid; }
.pstats__i svg { width: 16px; height: 16px; }
.pstats b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.pstats > div > span:last-child { grid-column: 2; color: var(--muted); font-size: 13px; }

.pbal {
  display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--green) 26%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--green) 12%, var(--surface)), var(--surface));
}
.pbal__head { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; }
.pbal__sum { display: flex; align-items: center; gap: 10px; }
.pbal__sum b { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pbal__sum span:last-child { color: var(--muted); font-weight: 700; }
.coupon {
  display: flex; align-items: center; gap: 8px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.coupon__i {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--green);
  font-weight: 800;
}
.coupon input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; font-weight: 600; color: var(--text); }
.pbal__btn {
  width: 100%; height: 50px;
  justify-content: flex-start;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 55%, var(--accent)));
  color: #0a0a0c;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--green) 50%, #000);
}
.pbal__btn span:first-child { font-size: 20px; }

:where(.pbest) { --r: #8b5cf6; }
.pbest {
  min-height: 210px;
  background:
    radial-gradient(60% 80% at 80% 65%, color-mix(in srgb, var(--r) 28%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
}
.pbest__head { display: flex; align-items: center; gap: 6px; color: #ffc400; font-weight: 700; }
.pbest__name { font-size: 20px; font-weight: 800; font-style: italic; margin-top: 14px; max-width: 55%; line-height: 1.2; }
.pbest .rar-label { margin-top: 4px; font-size: 11px; }
.pbest__val { position: absolute; left: 22px; bottom: 20px; display: flex; align-items: center; gap: 6px; }
.pbest__val b { font-size: 26px; font-weight: 800; color: #ffc46b; }
.pbest__val span { color: var(--muted); font-weight: 600; }
.pbest__pic { position: absolute; right: 18px; bottom: 14px; width: 42%; max-width: 160px; display: flex; flex-direction: column; align-items: center; }
.pbest__pic img { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; object-fit: contain; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .5)); }
.pbest__stand {
  width: 90%; height: 24px;
  margin-top: -16px;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--r) 55%, #1a1a22), #0c0c10 72%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--r) 45%, transparent);
}
.pbest__empty { color: var(--muted); margin: 14px 0 14px; max-width: 80%; }

.pbox { border-radius: 22px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.pbox__tabs { display: flex; align-items: center; gap: 6px; padding: 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.pbox__tabs [data-ptab] {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.pbox__tabs [data-ptab]:hover { color: var(--text); }
.pbox__tabs [data-ptab].is-active { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #8b5cf6)); color: #fff; }
.count {
  min-width: 24px; height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-size: 12px;
}
.is-active .count { background: rgba(255, 255, 255, .22); }
.ptools { display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
.search {
  flex: 0 1 260px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}
.search input { width: 100%; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; }
.select-sm, .inp {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  outline: none;
}
.inp:focus { border-color: var(--accent); }
.pbox__empty { padding: 54px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pbox__empty h3 { margin: 0; font-size: 22px; font-weight: 800; }

.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.invi {
  position: relative;
  padding: 16px 10px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: radial-gradient(90% 60% at 50% 20%, color-mix(in srgb, var(--r) 22%, transparent), transparent 70%), var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: border-color .15s;
}
.invi:hover { border-color: color-mix(in srgb, var(--r) 50%, var(--border)); }
.invi.is-sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.invi__check {
  position: absolute; top: 9px; left: 9px;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
}
.is-sel .invi__check { background: var(--accent); border-color: var(--accent); }
.is-sel .invi__check::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.invi img { width: 80px; height: 80px; object-fit: contain; margin-bottom: 4px; }
.invi__name { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.invi__case { font-size: 11.5px; color: var(--muted); }
.invi__val { display: flex; align-items: center; gap: 5px; font-weight: 800; color: var(--r); }
.invi__act { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.invi__act .chip, .tbl .chip { height: 28px; padding: 0 10px; font-size: 12px; }
.pfoot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 45%, var(--surface));
}
.pfoot__sum { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pfoot__sum b { font-size: 20px; }
.pfoot__sum span { color: var(--muted); font-weight: 600; font-size: 13px; }

.rows { padding: 4px 16px 12px; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.rowi:first-child { border-top: 0; }
.rowi > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rowi > div span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.rowi__img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.rowi__sum { flex: none !important; font-weight: 800; white-space: nowrap; }
.rowi__sum.is-plus { color: var(--green); }
.status { flex: none; padding: 5px 10px; border-radius: 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status--wait { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.status--ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.status--bad { background: color-mix(in srgb, #e5484d 16%, transparent); color: #ff6b6f; }

/* ============ Админка ============ */
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 16px; }
.atabs { display: flex; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.atabs button { padding: 0 16px; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 12px; }
.kpi { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { font-size: 24px; font-weight: 800; }
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
#aBody > .ptools { padding-left: 0; padding-right: 0; }
#aBody > .hint { margin: 0 0 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl__act { text-align: right !important; }
.tbl__act .chip { margin-left: 4px; }
.tbl--ed td { padding: 6px 8px; }
.tbl--ed input, .tbl--ed select {
  width: 100%; min-width: 80px;
  height: 36px; padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.tbl--ed input[data-i="name"] { min-width: 160px; }
.tbl--ed input:focus, .tbl--ed select:focus { border-color: var(--accent); }
.iimg {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1.5px dashed var(--border);
  display: grid; place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 20px;
}
.iimg img { width: 100%; height: 100%; object-fit: contain; }
.acases { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.acase {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.acase:hover { border-color: var(--accent); }
.acase.is-off { opacity: .55; }
.acase img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.acase div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acase span { color: var(--muted); font-size: 13px; }
.modal--wide { width: min(880px, calc(100vw - 24px)); }
.cased { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.cased__img { max-width: none; }
.cased__f { display: flex; flex-direction: column; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ============ Адаптив ============ */
@media (max-width: 1100px) {
  .ptop { grid-template-columns: 1fr 1fr; }
  .pcard2 { grid-column: span 2; }
}
@media (max-width: 760px) {
  .cases { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .case { gap: 6px; }
  .case__name { font-size: 14.5px; }
  .price { font-size: 15px; }
  .case__badge { font-size: 10px; padding: 3px 7px; }
  .cpage { padding: 16px; }
  .cpage__hero { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .cpage__img { max-width: 230px; margin: 0 auto; }
  .btn--open { width: 100%; }
  .rcard { flex-basis: 112px; height: 140px; font-size: 12px; }
  .rcard img { width: 64px; height: 64px; }
  .items { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .item img { width: 76px; height: 76px; }
  .ptop { grid-template-columns: 1fr; }
  .pcard2 { grid-column: auto; }
  .pbest { min-height: 190px; }
  .inv { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px 12px; }
  .pbox__tabs [data-ptab] { padding: 0 12px; height: 42px; }
  .pfoot { flex-direction: column; align-items: stretch; }
  .search { flex: 1 1 100%; }
  .cased { grid-template-columns: 1fr; }
  .cased__img { max-width: 200px; }
  .page-title { font-size: 24px; }
}

/* ============ Несколько кейсов за раз ============ */
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.counts button {
  min-width: 52px; height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 800;
  color: var(--muted);
}
.counts button:hover { color: var(--text); }
.counts button.is-active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.counts.is-locked { pointer-events: none; opacity: .6; }
.cpage__info .counts + #caseAction .btn--open { margin-top: 14px; }
.rolls { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.rolls .roulette { margin-top: 0; }
.rolls--sm .roulette { padding: 8px 0; border-radius: 14px; }
.rolls--sm .rcard { flex-basis: 104px; height: 108px; padding: 6px; gap: 4px; font-size: 11px; }
.rolls--sm .rcard img { width: 58px; height: 58px; }
.rolls--sm .roulette__strip { gap: 8px; }
.win__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  width: 100%;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}
.win__cell {
  position: relative;
  padding: 10px 6px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--r) 45%, var(--border));
  background: radial-gradient(90% 60% at 50% 20%, color-mix(in srgb, var(--r) 26%, transparent), transparent 70%), var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; text-align: center;
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.win__cell:nth-child(2) { animation-delay: .04s; } .win__cell:nth-child(3) { animation-delay: .08s; }
.win__cell:nth-child(4) { animation-delay: .12s; } .win__cell:nth-child(5) { animation-delay: .16s; }
.win__cell:nth-child(n+6) { animation-delay: .2s; }
.win__cell img { width: 64px; height: 64px; object-fit: contain; }
.win__cell b { display: flex; align-items: center; gap: 4px; color: var(--r); }
@media (max-width: 760px) {
  .rolls--sm .rcard { flex-basis: 84px; height: 92px; }
  .rolls--sm .rcard img { width: 46px; height: 46px; }
  .win__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ Статистика в админке ============ */
.stat-period { display: flex; width: max-content; max-width: 100%; overflow-x: auto; }
.stat-period button { padding: 0 16px; white-space: nowrap; }
.stat-h { margin: 22px 0 10px; font-size: 18px; font-weight: 800; }
.kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pos { color: var(--green); font-weight: 800; }
.neg { color: #ff6b6f; font-weight: 800; }
.tbl td.bars { width: 180px; min-width: 120px; }
.bar { display: block; height: 6px; border-radius: 4px; margin: 2px 0; min-width: 2px; }
.bar--top { background: var(--accent); }
.bar--pos { background: var(--green); }
.bar--neg { background: #e5484d; }

/* Удача игрока */
.luck {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 12px;
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 13px; font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}
.luck__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.luck--newbie { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.luck--streak { background: color-mix(in srgb, #ffc400 16%, transparent); color: #ffc400; }

/* Настройки шансов */
.odds { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.odds__group { display: flex; flex-direction: column; gap: 8px; }
.odds__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; }
.odds__in { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.odds__in .inp { width: 100px; }
.odds__in em { font-style: normal; color: var(--muted); font-weight: 700; }
.odds__save { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 760px) { .odds { grid-template-columns: 1fr; } }

/* Дорогие карточки в ленте светятся */
.rcard.rar--epic { border-color: color-mix(in srgb, var(--r) 45%, var(--border)); box-shadow: inset 0 0 18px color-mix(in srgb, var(--r) 22%, transparent); }
.rcard.rar--legendary { border-color: color-mix(in srgb, var(--r) 70%, var(--border)); box-shadow: inset 0 0 26px color-mix(in srgb, var(--r) 35%, transparent), 0 0 14px color-mix(in srgb, var(--r) 35%, transparent); }
.rcard.rar--legendary img { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--r) 70%, transparent)); }
