:root {
  --bg: #070810;
  --bg-soft: #0c0f19;
  --panel: rgba(17, 21, 33, .86);
  --line: rgba(255, 255, 255, .08);
  --text: #e9edf7;
  --muted: #8a93a8;
  --mint: #2ee6a8;
  --sky: #38bdf8;
  --violet: #a855f7;
  --pink: #ff2e88;
  --danger: #ff5470;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 12% -10%, #17233d 0%, transparent 60%),
    radial-gradient(900px 600px at 108% 8%, #2a1240 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
  overflow-x: hidden;
}

.bg-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
}

/* ---------- Шапка ---------- */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 17, .72);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  font-size: 24px;
  color: #04120d;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: 0 8px 26px -8px var(--mint);
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand-text h1 span {
  background: linear-gradient(90deg, var(--mint), var(--sky), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.wallet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, rgba(46, 230, 168, .14), rgba(46, 230, 168, .04));
  border: 1px solid rgba(46, 230, 168, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* Склозаводская гривна: синяя монета с золотой обводкой */
.grn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
  font-size: .82em;
  line-height: 1;
  color: #ffe6a3;
  background: radial-gradient(circle at 32% 25%, #8fd0ff, #2f74c8 52%, #123a74);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 223, 126, .9),
    0 2px 6px rgba(0, 0, 0, .35);
  vertical-align: -.12em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
}

.grn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  pointer-events: none;
}

.grn-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: lowercase;
}

.balance.bump { animation: bump .4s ease; }

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); box-shadow: 0 0 0 4px rgba(46, 230, 168, .16); }
  100% { transform: scale(1); }
}

/* ---------- Кнопки ---------- */

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, opacity .15s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  border: none;
  color: #04120d;
  background: linear-gradient(135deg, var(--mint), #7cf5d4 45%, var(--sky));
  box-shadow: 0 12px 30px -14px var(--mint);
}

.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 36px -14px var(--mint); }

.btn-ghost { background: rgba(255, 255, 255, .04); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); }

.btn-danger { color: #ffd9df; border-color: rgba(255, 84, 112, .4); background: rgba(255, 84, 112, .12); }
.btn-danger:hover { background: rgba(255, 84, 112, .22); }

.btn-big { width: 100%; padding: 15px; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: background .15s;
}

.icon-btn:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Джекпот ---------- */

.jackpotbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 17, .5);
}

.jackpotbar-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.jackpotbar-label b { color: var(--mint); }

.jackpotbar-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

.jackpotbar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sky), var(--violet), var(--pink));
  background-size: 200% 100%;
  transition: width .5s cubic-bezier(.2, .9, .2, 1);
  animation: flow 3s linear infinite;
  box-shadow: 0 0 18px rgba(168, 85, 247, .6);
}

@keyframes flow {
  to { background-position: 200% 0; }
}

/* ---------- Вкладки ---------- */

.tabs {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 18px clamp(16px, 4vw, 44px) 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.tab:hover { color: var(--text); background: rgba(255, 255, 255, .07); }

.tab.active {
  color: #04120d;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  border-color: transparent;
  box-shadow: 0 10px 26px -14px var(--mint);
}

.badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 99px;
  font-size: 11px;
  background: rgba(0, 0, 0, .22);
  font-variant-numeric: tabular-nums;
}

.tab:not(.active) .badge { background: rgba(255, 255, 255, .1); color: var(--text); }

/* ---------- Панели ---------- */

main { position: relative; z-index: 2; padding: 22px clamp(16px, 4vw, 44px) 0; }

.panel { display: none; animation: fade .3s ease; }
.panel.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section-head { margin-bottom: 20px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .02em;
}

.section-head p { margin: 0; color: var(--muted); font-size: 14px; }
.section-head p b { color: var(--text); }

.muted { color: var(--muted); }
.small { font-size: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Кейсы ---------- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(56, 189, 248, .16), transparent 60%),
    linear-gradient(180deg, #131826, #0a0d15);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.case-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .8;
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 26px 50px -28px var(--accent);
}

.case-art {
  font-size: 54px;
  line-height: 1;
  text-align: center;
  padding: 8px 0 4px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .6));
  transition: transform .25s;
}

.case-card:hover .case-art { transform: translateY(-3px) scale(1.03); }

.case-card h3 { margin: 0; font-size: 17px; text-align: center; }

.case-desc {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 30px;
}

.chance-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .04);
}

.chance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.chance-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.chance-name { flex: 1; }
.chance-val { font-variant-numeric: tabular-nums; color: var(--text); }

.case-ev {
  text-align: center;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- Подсказка с содержимым кейса ---------- */

.case-peek {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(8, 12, 19, .97);
  box-shadow:
    0 30px 70px -22px #000,
    inset 0 0 0 1px rgba(255, 255, 255, .03);
  backdrop-filter: blur(16px);
  overflow: hidden;
  pointer-events: none;
  overscroll-behavior: contain;
  animation: peekIn .16s ease;
}

/* Если содержимое всё же не влезло — панель можно прокрутить. */
.case-peek.scrollable { pointer-events: auto; }

.case-peek[hidden] { display: none; }

.case-peek::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--peek-accent, var(--mint)), transparent);
}

.peek-head {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent);
}

.peek-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.peek-title span {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.peek-rarities {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 600;
}

.peek-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 7px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* В кейсе много предметов — плитки мельче и без подписей,
   чтобы всё содержимое влезло без прокрутки. */
.case-peek.compact .peek-grid {
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}

.case-peek.compact .peek-item b { display: none; }

.peek-grid::-webkit-scrollbar { width: 6px; }
.peek-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border-radius: 99px;
}

.peek-item { min-width: 0; }

.peek-photo {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--rarity);
  overflow: hidden;
  background: #05070b;
  box-shadow: 0 0 12px -4px var(--rarity);
}

.peek-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peek-item b {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.15;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes peekIn {
  from { opacity: 0; transform: translateY(4px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.case-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.case-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.case-price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Апгрейд ---------- */

.upgrade-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}

.up-selected {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .25);
  text-align: center;
}

.up-selected .item-card { width: 150px; }

.up-inv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.up-inv::-webkit-scrollbar { width: 6px; }
.up-inv::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; }

.up-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.up-wheel {
  position: relative;
  width: 238px;
  height: 238px;
  border-radius: 50%;
  padding: 9px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, .16), transparent 58%),
    linear-gradient(180deg, #202a3c, #0b0f18);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow:
    0 26px 50px -26px rgba(0, 0, 0, .95),
    inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.up-wheel-face {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  --win-deg: 170deg;
  background:
    repeating-conic-gradient(from 0deg, rgba(0, 0, 0, .26) 0deg .9deg, transparent .9deg 15deg),
    conic-gradient(from 0deg,
      #2ee6a8 0deg var(--win-deg),
      #7a2340 var(--win-deg) 360deg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .1),
    inset 0 0 60px rgba(0, 0, 0, .55);
  will-change: transform;
}

.up-wheel-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .5), transparent 62%);
}

.up-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 106px;
  height: 106px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 2px;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, #1b2434, #0a0e16 72%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 26px -12px #000, inset 0 0 22px rgba(46, 230, 168, .12);
}

.up-wheel-hub b {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--text);
}

.up-wheel-hub span {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.up-wheel-pointer {
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 20px solid #fff;
  filter: drop-shadow(0 0 9px rgba(46, 230, 168, .95));
}

.up-wheel.spinning {
  animation: wheelGlow 1.3s ease-in-out infinite;
}

@keyframes wheelGlow {
  0%, 100% { box-shadow: 0 26px 50px -26px #000, 0 0 0 rgba(46, 230, 168, 0); }
  50% { box-shadow: 0 26px 50px -26px #000, 0 0 34px rgba(46, 230, 168, .45); }
}

.up-wheel-legend {
  display: flex;
  gap: 18px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.up-wheel-legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.win { background: #2ee6a8; box-shadow: 0 0 8px rgba(46, 230, 168, .8); }
.legend-dot.lose { background: #7a2340; }

.up-result {
  min-height: 22px;
  margin-bottom: 12px;
  font-size: 13.5px;
  text-align: center;
  color: var(--muted);
}

.up-result.win { color: var(--mint); }
.up-result.lose { color: var(--danger); }

/* ---------- Предметы ---------- */

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #141a28, #0b0f18);
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.item-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--rarity);
  opacity: .95;
}

.item-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -30px;
  width: 130px;
  height: 130px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--rarity), transparent 72%);
  opacity: .22;
  pointer-events: none;
}

.item-card:hover {
  transform: translateY(-3px);
  border-color: var(--rarity);
  box-shadow: 0 16px 34px -20px var(--rarity);
}

.item-card.clickable { cursor: pointer; }

.item-card.selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(46, 230, 168, .35), 0 16px 34px -20px var(--mint);
}

.item-icon { font-size: 34px; line-height: 1; position: relative; z-index: 1; }

.item-name {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.item-value {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.item-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rarity);
  opacity: .9;
}

.item-sell {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 6px;
  padding: 7px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.item-sell:hover { background: rgba(46, 230, 168, .16); border-color: rgba(46, 230, 168, .5); color: var(--mint); }

.item-card.compact { padding: 12px 8px 10px; }
.item-card.compact .item-icon { font-size: 26px; }
.item-card.compact .item-name { font-size: 10.5px; min-height: 26px; }
.item-card.compact .item-value { font-size: 11px; }
.item-card.compact .item-tag { display: none; }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 12px;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Статистика ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
}

.stat-label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value.good { color: var(--mint); }
.stat-value.bad { color: var(--danger); }

/* ---------- Оверлей ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 12, .78);
  backdrop-filter: blur(10px);
  animation: fade .2s ease;
}

.overlay-card {
  position: relative;
  width: min(940px, 96vw);
  padding: 26px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    radial-gradient(100% 120% at 50% -20%, rgba(56, 189, 248, .18), transparent 60%),
    linear-gradient(180deg, #121726, #080b12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .7);
  animation: pop .28s cubic-bezier(.2, 1.2, .3, 1);
}

@keyframes pop {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to { opacity: 1; transform: none; }
}

.overlay-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}

.overlay-close:hover { color: var(--text); background: rgba(255, 255, 255, .1); }

.reel-wrap { position: relative; padding: 6px 0; }

.reel-viewport {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .25));
  padding: 14px 0;
}

.reel {
  display: flex;
  gap: 10px;
  padding: 0 6px;
  will-change: transform;
}

.reel-item {
  flex: 0 0 auto;
  width: 116px;
  height: 138px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #161c2b, #0a0e17);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  position: relative;
  overflow: hidden;
}

.reel-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--rarity);
}

.reel-item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 100px;
  height: 100px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--rarity), transparent 72%);
  opacity: .2;
}

.reel-item .ri-icon { font-size: 30px; position: relative; z-index: 1; }

.reel-item .ri-name {
  position: relative;
  z-index: 1;
  font-size: 10.5px;
  text-align: center;
  line-height: 1.2;
  color: #cfd6e6;
  min-height: 26px;
  display: flex;
  align-items: center;
}

.reel-item .ri-value {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
}

.reel-item.is-win {
  border-color: var(--rarity);
  box-shadow: 0 0 0 2px var(--rarity), 0 0 34px -6px var(--rarity);
  animation: winPulse .7s ease 2;
}

@keyframes winPulse {
  50% { transform: scale(1.05); }
}

.reel-marker {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--mint) 20%, var(--mint) 80%, transparent);
  box-shadow: 0 0 18px var(--mint);
  z-index: 3;
  pointer-events: none;
}

.reel-marker::before,
.reel-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
}

.reel-marker::before { top: -2px; border-top-color: var(--mint); }
.reel-marker::after { bottom: -2px; border-bottom-color: var(--mint); }

.result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  animation: fade .3s ease;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid var(--rarity, var(--line));
  background: rgba(0, 0, 0, .3);
  box-shadow: 0 0 40px -18px var(--rarity, transparent);
}

.res-icon { font-size: 40px; line-height: 1; }

.res-name { font-size: 16px; font-weight: 700; }
.res-rarity { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--rarity); }
.res-value { font-size: 14px; font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Тосты ---------- */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 33, .95);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: slideIn .25s ease;
  max-width: 320px;
}

.toast.good { border-color: rgba(46, 230, 168, .45); color: var(--mint); }
.toast.bad { border-color: rgba(255, 84, 112, .45); color: #ffb3c0; }
.toast.gold { border-color: rgba(255, 200, 60, .5); color: #ffd75e; }

.toast.out { animation: slideOut .3s ease forwards; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .upgrade-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 14px 16px; gap: 12px; }
  .brand-text h1 { font-size: 17px; }
  .brand-text p { display: none; }
  .wallet { width: 100%; justify-content: space-between; }
  .balance { flex: 1; justify-content: center; }
  .btn { padding: 9px 12px; font-size: 13px; }
  .reel-item { width: 96px; height: 124px; }
  .overlay-card { padding: 20px 14px 16px; }
  .result { gap: 14px; }
}

/* ============================================================
   ФОТО КУЗИ, СТИЛИ КЕЙСОВ И ПРЕДМЕТОВ
   ============================================================ */

/* ---------- Панель загрузки фото ---------- */

.photo-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
}

.photo-panel-info h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-panel-info p { margin: 0; max-width: 620px; }

.photo-count {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(46, 230, 168, .12);
  color: var(--mint);
  font-size: 10.5px;
  letter-spacing: .04em;
}

.collection-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  max-height: 356px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
}

.collection-grid::-webkit-scrollbar { width: 6px; }
.collection-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; }

.photo-slot {
  position: relative;
  width: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  color: var(--muted);
  font: inherit;
  cursor: default;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.photo-slot.owned { cursor: pointer; }

.photo-slot img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  opacity: .38;
  filter: grayscale(1) contrast(.9) brightness(.82);
  transition: opacity .2s, filter .2s;
}

.photo-slot.filled img,
.photo-slot.owned img {
  opacity: 1;
  filter: none;
}

.photo-slot.locked {
  border-style: dashed;
  border-color: rgba(255, 255, 255, .09);
}

.photo-slot.locked span {
  opacity: .55;
}

.photo-slot.owned {
  border-color: rgba(46, 230, 168, .48);
  box-shadow: 0 0 0 1px rgba(46, 230, 168, .12), 0 14px 26px -24px var(--mint);
}

.photo-slot span {
  display: block;
  padding: 4px 3px;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-status {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  background: rgba(5, 12, 10, .78);
  color: var(--mint);
  box-shadow: 0 0 0 1px rgba(46, 230, 168, .45);
}

.photo-slot.locked .photo-status {
  color: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

.photo-slot.owned:hover { border-color: var(--mint); transform: translateY(-2px); }

.dropzone {
  position: absolute;
  inset: 6px;
  z-index: 6;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 2px dashed var(--mint);
  background: rgba(6, 20, 16, .92);
  color: var(--mint);
  font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- Фото предмета ---------- */

.item-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0f18;
  isolation: isolate;
}

.item-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* аниме: пастель и блики */
.item-photo[data-style="anime"] img { filter: saturate(1.3) brightness(1.1) contrast(1.05); }
.item-photo[data-style="anime"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 138, 196, .6), transparent 52%, rgba(120, 200, 255, .55));
  mix-blend-mode: soft-light;
}
.item-photo[data-style="anime"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .95) 0 1.5px, transparent 2.6px),
    radial-gradient(circle at 74% 30%, rgba(255, 255, 255, .85) 0 1px, transparent 2.2px),
    radial-gradient(circle at 40% 78%, rgba(255, 255, 255, .75) 0 1.5px, transparent 2.6px),
    radial-gradient(circle at 86% 68%, rgba(255, 255, 255, .7) 0 1px, transparent 2.2px);
  mix-blend-mode: screen;
}

/* мультяшный: жирный контур и полутон */
.item-photo[data-style="cartoon"] {
  border: 3px solid #0c0f16;
  border-radius: 10px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .55);
}
.item-photo[data-style="cartoon"] img { filter: saturate(1.85) contrast(1.28) brightness(1.04); }
.item-photo[data-style="cartoon"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, .6) 1px, transparent 1.6px);
  background-size: 5px 5px;
  opacity: .16;
  mix-blend-mode: multiply;
}

/* пиксельный: реальное увеличение пикселей */
.item-photo[data-style="pixel"] {
  border: 2px solid rgba(110, 231, 255, .35);
  border-radius: 6px;
}
.item-photo[data-style="pixel"] img {
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 25%;
  transform: scale(4);
  transform-origin: top left;
  image-rendering: pixelated;
  filter: saturate(1.35) contrast(1.15);
}
.item-photo[data-style="pixel"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .3) 0 1px, transparent 1px 3px);
  opacity: .55;
}

/* неон: дуотон и сканлайны */
.item-photo[data-style="neon"] img { filter: saturate(1.4) contrast(1.15) brightness(.92); }
.item-photo[data-style="neon"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00e5ff, #ff2ea6);
  mix-blend-mode: color;
  opacity: .5;
}
.item-photo[data-style="neon"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 4px);
  box-shadow: inset 0 0 26px rgba(0, 229, 255, .5), inset 0 0 52px rgba(255, 46, 166, .35);
}

/* реализм: без фильтров, только виньетка */
.item-photo[data-style="real"] img { filter: contrast(1.05) saturate(1.06); }
.item-photo[data-style="real"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 44px rgba(0, 0, 0, .4);
}

/* мемный: яркая рамка и лёгкий пересвет, как стикер */
.item-photo[data-style="meme"] {
  border: 3px solid #ffd23f;
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
}
.item-photo[data-style="meme"] img { filter: saturate(1.18) contrast(1.1) brightness(1.03); }
.item-photo[data-style="meme"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, .22), transparent 58%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* кринжовый: кислотная рамка со сдвигом и сканлайны */
.item-photo[data-style="cringe"] {
  border: 3px solid #b6ff3f;
  border-radius: 4px;
  box-shadow: 4px -4px 0 rgba(168, 85, 247, .5), 0 0 18px -6px rgba(182, 255, 63, .8);
}
.item-photo[data-style="cringe"] img { filter: saturate(1.5) contrast(1.16) hue-rotate(-8deg); }
.item-photo[data-style="cringe"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .24) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* породистый: студийный свет, золотая рамка, мягкая виньетка */
.item-photo[data-style="breed"] {
  border: 2px solid rgba(227, 194, 126, .7);
  border-radius: 12px;
  background: linear-gradient(160deg, #1c1a15, #0a0907);
  box-shadow: 0 0 0 1px rgba(227, 194, 126, .14), 0 16px 30px -24px rgba(227, 194, 126, .5);
}
.item-photo[data-style="breed"] img { filter: saturate(1.08) contrast(1.06) brightness(1.02); }
.item-photo[data-style="breed"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 12%, rgba(255, 245, 214, .2), transparent 56%);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, .38);
  pointer-events: none;
}

/* ---------- Кейс: фото и стили ---------- */

.case-art {
  display: flex;
  justify-content: center;
  padding: 38px 0 24px;
  font-size: 0;
  transition: transform .25s;
}

/* Кейс как переноска для кота: ручка, крышка, дверца-решётка и корпус */
.case-box {
  position: relative;
  width: 176px;
  height: 168px;
  border-radius: 18px 18px 24px 24px / 18px 18px 30px 30px;
  border: 2px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 30%),
    radial-gradient(120% 90% at 50% 0, rgba(255, 255, 255, .08), transparent 58%),
    linear-gradient(160deg, #263143, #0b1018 62%, #05070b);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, .38),
    inset 0 -20px 30px rgba(0, 0, 0, .55),
    0 22px 38px -20px var(--accent);
}

/* вентиляционные прорези по бокам корпуса */
.case-box::before,
.case-box::after {
  content: "";
  position: absolute;
  top: 56px;
  width: 14px;
  height: 50px;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg,
    rgba(0, 0, 0, .55) 0 6px,
    rgba(255, 255, 255, .08) 6px 7px,
    transparent 7px 15px);
  opacity: .75;
}

.case-box::before { left: 10px; }
.case-box::after { right: 10px; }

/* ручка переноски */
.case-handle {
  position: absolute;
  left: 50%;
  top: -34px;
  width: 84px;
  height: 36px;
  transform: translateX(-50%);
  border: 6px solid #aab6c9;
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 55%),
    linear-gradient(180deg, #232c3c, #0d1119);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .35),
    0 4px 10px rgba(0, 0, 0, .5);
}

/* решётка дверцы: прутья рисуются поверх аватарки, Кузя сидит за клеткой */
.case-bars {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 13px,
      rgba(228, 236, 250, .62) 13px 15px,
      rgba(4, 7, 12, .58) 15px 16.5px,
      transparent 16.5px 34px),
    linear-gradient(180deg,
      transparent 0 18px,
      rgba(228, 236, 250, .52) 18px 20px,
      rgba(4, 7, 12, .48) 20px 21.5px,
      transparent 21.5px 76px,
      rgba(228, 236, 250, .52) 76px 78px,
      rgba(4, 7, 12, .48) 78px 79.5px,
      transparent 79.5px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 0 18px rgba(0, 0, 0, .35);
}

/* крышка */
.case-lid {
  position: absolute;
  left: -9px;
  right: -9px;
  top: -12px;
  height: 32px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .04) 45%, rgba(0, 0, 0, .45)),
    linear-gradient(90deg, #313c50, #0b1018);
  box-shadow:
    0 8px 16px -8px #000,
    inset 0 1px 0 rgba(255, 255, 255, .32);
  z-index: 2;
}

.case-lid::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 4px;
  height: 1px;
  background: rgba(255, 255, 255, .28);
}

/* золотая площадка под ручкой */
.case-lid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 34px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe9a8, #c49a3d 55%, #7d5a1c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* дверца с аватаркой Кузи: квадратная, чтобы фото не обрезалось */
.case-window {
  position: absolute;
  left: 50%;
  top: 36px;
  width: 100px;
  height: 100px;
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 20px;
  border: 3px solid #cfd9ea;
  background: #05070b;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, .55),
    inset 0 0 0 2px rgba(0, 0, 0, .5),
    0 0 20px -2px var(--accent);
  z-index: 1;
}

/* размытая подложка, чтобы поля вокруг фото не были чёрными */
.case-window::before {
  content: "";
  position: absolute;
  inset: -6px;
  background-image: var(--case-photo);
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(.42) saturate(1.25);
  transform: scale(1.15);
  z-index: 0;
}

.case-art .case-window .item-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.case-art .case-window .item-photo img { object-fit: contain; }

/* нижняя часть корпуса переноски */
.case-hull {
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: -7px;
  height: 38px;
  border: 2px solid var(--accent);
  border-radius: 12px 12px 24px 24px / 12px 12px 30px 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(160deg, #2b3547, #0a0e15 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    0 12px 20px -12px #000;
}

.case-hull::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 7px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .9;
}

/* ровное днище переноски вместо киля */
.case-hull::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 9px;
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 40%),
    linear-gradient(180deg, #1b2432, #05080d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 3px 7px rgba(0, 0, 0, .5);
}

/* замочек на дверце */
.case-latch {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 3;
  width: 34px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 5px;
  border: 2px solid #4e3915;
  background: linear-gradient(180deg, #ffe9a8, #d5a84a 48%, #8a6220);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}

.case-latch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #241a08;
  box-shadow: 0 4px 0 -2px #241a08;
}

.case-rivet {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f4f7ff, #9aa7bd 45%, #39445a 72%, #141a24);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .45),
    0 1px 2px rgba(0, 0, 0, .6);
}

.case-rivet.tl { top: 3px; left: 9px; }
.case-rivet.tr { top: 3px; right: 9px; }
.case-rivet.bl { bottom: 9px; left: 4px; }
.case-rivet.br { bottom: 9px; right: 4px; }

.case-style {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.case-card[data-theme="anime"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 138, 196, .3), transparent 62%),
    linear-gradient(180deg, #1d1526, #0c0912);
  border-color: rgba(255, 138, 196, .35);
}

.case-card[data-theme="cartoon"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 210, 63, .32), transparent 62%),
    linear-gradient(180deg, #1e1a12, #0e0c08);
  border: 2px solid #0c0f16;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .5);
}

.case-card[data-theme="cartoon"]:hover { box-shadow: 10px 12px 0 rgba(0, 0, 0, .55); }

.case-card[data-theme="cartoon"] h3 {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .04em;
}

.case-card[data-theme="pixel"] {
  background:
    repeating-linear-gradient(0deg, rgba(110, 231, 255, .05) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #0d1822, #060b11);
  border-color: rgba(110, 231, 255, .3);
  border-radius: 8px;
}

.case-card[data-theme="pixel"] h3 {
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.case-card[data-theme="pixel"] .btn {
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
}

.case-card[data-theme="pixel"] .chance-list,
.case-card[data-theme="pixel"] .case-style { border-radius: 4px; }

.case-card[data-theme="neon"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(168, 85, 247, .38), transparent 62%),
    linear-gradient(180deg, #151022, #08060f);
  border-color: rgba(168, 85, 247, .42);
}

.case-card[data-theme="neon"] h3 { text-shadow: 0 0 20px rgba(168, 85, 247, .75); }

.case-card[data-theme="real"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(154, 166, 189, .24), transparent 62%),
    linear-gradient(180deg, #14161c, #08090c);
}

.case-card[data-theme="meme"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 204, 77, .34), transparent 62%),
    radial-gradient(90% 70% at 90% 0, rgba(255, 92, 138, .18), transparent 58%),
    linear-gradient(180deg, #241a10, #100a06);
  border-color: rgba(255, 204, 77, .42);
}

.case-card[data-theme="meme"] h3 {
  text-transform: uppercase;
  letter-spacing: .03em;
}

.case-card[data-theme="cringe"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(182, 255, 63, .3), transparent 62%),
    radial-gradient(90% 70% at 90% 0, rgba(168, 85, 247, .22), transparent 58%),
    linear-gradient(180deg, #18200e, #0a0c06);
  border-color: rgba(182, 255, 63, .42);
}

.case-card[data-theme="cringe"] h3 {
  text-transform: uppercase;
  letter-spacing: .03em;
  text-shadow: 0 0 18px rgba(182, 255, 63, .4);
}

.case-card[data-theme="breed"] {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(227, 194, 126, .32), transparent 62%),
    radial-gradient(80% 60% at 12% 0, rgba(255, 246, 214, .12), transparent 58%),
    linear-gradient(180deg, #1e1a12, #0b0906);
  border-color: rgba(227, 194, 126, .42);
}

.case-card[data-theme="breed"] h3 {
  letter-spacing: .03em;
}

/* ---------- Фото в рейле и результате ---------- */

.reel-item { height: 158px; }
.reel-item .item-photo { width: 82px; height: 82px; flex: 0 0 auto; border-radius: 10px; }
.reel-item .ri-name { min-height: 24px; }

.result-item .item-photo { width: 92px; height: 92px; flex: 0 0 auto; }

.item-card .item-photo { margin-bottom: 2px; }

@media (max-width: 640px) {
  .photo-panel { grid-template-columns: 1fr; }
  .reel-item { width: 100px; height: 146px; }
  .reel-item .item-photo { width: 70px; height: 70px; }
  .case-art .item-photo { width: 116px; height: 116px; }
  .result-item .item-photo { width: 76px; height: 76px; }
}
