/* BRAINDEP — премиальный чёрно-оранжевый интерфейс */
:root {
  --bg: #090909;
  --card: #141414;
  --bg2: #1B1B1B;
  --bg3: #232323;
  --border: #262626;
  --border2: #333;
  --orange: #FF6A00;
  --orange2: #FF8C00;
  --orange3: #FFAB52;
  --text: #FFFFFF;
  --muted: #8C8C8C;
  --muted2: #5E5E5E;
  --green: #2BD576;
  --red: #FF3D4F;
  --grad: linear-gradient(135deg, #FFAB52 0%, #FF8C00 45%, #FF6A00 100%);
  --glow: 0 0 24px rgba(255, 106, 0, .35);
  --glow-strong: 0 0 32px rgba(255, 140, 0, .55);
  --radius: 18px;
  --radius-sm: 12px;
  --safe-top: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --topbar-h: 60px;
  --tabbar-h: 66px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;

  /* редкость предметов */
  --r1: #8E9AAF;
  --r2: #4B8BFF;
  --r3: #A35CFF;
  --r4: #FF4FB0;
  --r5: #FFB020;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); }
html { background: var(--bg); }
body {
  font: 15px/1.4 var(--font);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }

/* ---------- фирменный фон: тёплые отсветы и медленно плывущий узор ---------- */
body::before, body::after { content: ''; position: fixed; pointer-events: none; z-index: -1; }
body::before {
  inset: -240px 0 0 -240px;
  background: url('/img/bg-pattern.svg') 0 0 / 240px 240px repeat;
  animation: bgDrift 60s linear infinite;
  will-change: transform;
}
body::after {
  inset: 0;
  background:
    radial-gradient(90% 55% at 50% -12%, rgba(255, 106, 0, .26), transparent 70%),
    radial-gradient(70% 45% at 110% 105%, rgba(255, 60, 0, .16), transparent 70%),
    radial-gradient(60% 40% at -10% 70%, rgba(255, 140, 0, .10), transparent 70%),
    linear-gradient(180deg, #110904 0%, #090909 45%, #0c0705 100%);
  z-index: -2;
}
@keyframes bgDrift { to { transform: translate(240px, 240px); } }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--orange3); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: .01em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.red { color: var(--red); }
.orange { color: var(--orange2); }

/* ---------- верхняя панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
  background: rgba(9, 9, 9, .82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.topbar-inner {
  height: var(--topbar-h);
  max-width: 1100px; margin: 0 auto; padding: 0 14px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
}
.balance {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 0 0 10px; height: 40px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.balance:hover { border-color: rgba(255, 106, 0, .5); box-shadow: var(--glow); }
.balance .coin { width: 20px; height: 20px; }
.balance-amount { font-weight: 800; font-size: 15px; padding: 0 10px 0 7px; color: var(--orange3); white-space: nowrap; }
.balance-plus {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--grad); color: #1a0a00; font-size: 24px; font-weight: 800; line-height: 1;
}
.balance.bump .balance-amount { animation: bump .5s ease; }
@keyframes bump { 30% { transform: scale(1.15); color: #fff; } }

.brand { display: flex; align-items: center; justify-self: center; gap: 8px; min-width: 0; color: var(--text); }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(255, 106, 0, .55)); }
.brand span {
  font-weight: 900; font-size: 17px; letter-spacing: .14em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar-right { justify-self: end; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--bg2); border: 1px solid var(--border2); font-weight: 700; color: var(--orange3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* тестовый профиль */
.test-mode .brand { position: relative; }
.test-mode .brand::after {
  content: 'ТЕСТ'; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  padding: 1px 6px; border-radius: 5px; background: var(--grad); color: #1a0a00; font-size: 9px; font-weight: 900; letter-spacing: .12em;
}
@media (max-width: 440px) {
  .brand { gap: 6px; }
  .brand img { width: 26px; height: 26px; }
  .brand span { font-size: 14px; letter-spacing: .08em; }
}
@media (max-width: 350px) { .brand span { display: none; } }

/* ---------- нижнее меню ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: var(--safe-bottom);
  background: rgba(13, 13, 13, .9);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.tabbar-inner { max-width: 620px; margin: 0 auto; height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; position: relative;
  transition: color .2s;
}
.tab svg { width: 24px; height: 24px; transition: transform .25s, filter .25s; }
.tab.active { color: var(--orange2); }
.tab.active svg { transform: translateY(-1px); filter: drop-shadow(0 0 6px rgba(255, 106, 0, .7)); }
.tab.active::before {
  content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--grad); box-shadow: var(--glow);
}

/* ---------- страница ---------- */
#view {
  max-width: 1100px; margin: 0 auto; overflow-x: clip;
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
  min-height: calc(100dvh - var(--topbar-h));
}
.page-enter { animation: pageIn .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 12px; }
.section-title h2 { font-size: 19px; font-weight: 800; }
.page-title { font-size: 24px; font-weight: 900; letter-spacing: .06em; margin: 4px 2px 14px; }
.page-title b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- базовые элементы ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px;
  background: var(--grad); color: #1a0a00; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(255, 106, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, box-shadow .2s, filter .2s, opacity .2s;
  white-space: nowrap; user-select: none;
}
.btn:hover { filter: brightness(1.07); box-shadow: 0 8px 28px rgba(255, 106, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn .coin { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 17px; border-radius: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-dark {
  background: var(--bg2); color: var(--text); border: 1px solid var(--border2); box-shadow: none;
}
.btn-dark:hover { border-color: rgba(255, 106, 0, .5); box-shadow: none; }
.btn-green { background: linear-gradient(135deg, #5CF2A0, #1FBF68); color: #002610; box-shadow: 0 6px 20px rgba(43, 213, 118, .3); }
.btn-danger { background: rgba(255, 61, 79, .12); color: var(--red); border: 1px solid rgba(255, 61, 79, .35); box-shadow: none; }
.btn.loading { pointer-events: none; }
.btn.loading::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--border2); outline: none;
  font-weight: 700; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 0, .18); }
.input-wrap { position: relative; }
.input-wrap .coin { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; }
.input-wrap .input { padding-left: 42px; }
.label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 2px 8px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--border2);
  font-weight: 700; font-size: 13px; color: var(--text); transition: all .15s;
}
.chip:hover { border-color: var(--orange); }
.chip:active { transform: scale(.95); }
.chip.active { background: rgba(255, 106, 0, .14); border-color: var(--orange); color: var(--orange3); box-shadow: var(--glow); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { height: 38px; border-radius: 10px; font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--muted); transition: all .2s; }
.seg button.active { background: var(--grad); color: #1a0a00; box-shadow: var(--glow); }

.coin { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.br { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .emoji { font-size: 40px; margin-bottom: 8px; }
.spinner { width: 28px; height: 28px; margin: 40px auto; border-radius: 50%; border: 3px solid var(--border2); border-top-color: var(--orange); animation: spin .8s linear infinite; }

/* ---------- изображение с заглушкой ---------- */
.ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 40%, #2a2a2a, #161616); color: var(--orange3);
  font-weight: 900; font-size: 22px; letter-spacing: .04em; border-radius: 12px;
}

/* ---------- кейсы ---------- */

.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .case-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 960px) { .case-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.case-card {
  position: relative; display: flex; flex-direction: column; padding: 10px; gap: 10px; min-width: 0;
  background: linear-gradient(180deg, rgba(26, 22, 20, .92), rgba(18, 18, 18, .94)); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: cardIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.case-card:hover { transform: translateY(-3px); border-color: rgba(255, 106, 0, .45); box-shadow: 0 12px 30px rgba(0, 0, 0, .5), var(--glow); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
/* картинка кейса на анимированном фоне в цвете кейса */
.case-img {
  --accent: #FF6A00;
  position: relative; aspect-ratio: 720 / 442; border-radius: 12px; overflow: hidden; isolation: isolate;
  /* жёсткая обрезка: без неё WebView во время анимации появления может показать лучи на пол-экрана */
  contain: paint; clip-path: inset(0 round 12px);
  background:
    radial-gradient(60% 75% at 50% 62%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, #0d0d0d), #0a0a0a);
}
button.case-img { display: block; width: 100%; padding: 0; }
.case-rays {
  position: absolute; left: 50%; top: 58%; width: 130%; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: repeating-conic-gradient(color-mix(in srgb, var(--accent) 34%, transparent) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 55%); mask: radial-gradient(circle, #000 8%, transparent 55%);
  animation: spin 22s linear infinite; will-change: transform;
}
.case-sparks {
  position: absolute; inset: 0; z-index: -1; opacity: .9;
  background-image:
    radial-gradient(2px 2px at 14% 78%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 30%, color-mix(in srgb, var(--accent) 60%, #fff), transparent),
    radial-gradient(2px 2px at 72% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 86% 26%, color-mix(in srgb, var(--accent) 60%, #fff), transparent),
    radial-gradient(1.5px 1.5px at 52% 88%, #fff, transparent), radial-gradient(2px 2px at 92% 58%, #fff, transparent);
  animation: sparks 5s ease-in-out infinite;
}
@keyframes sparks {
  0%, 100% { transform: translateY(6px); opacity: .25; }
  50% { transform: translateY(-8px); opacity: .95; }
}
.case-img .chest {
  width: 100%; height: 100%; object-fit: contain; padding: 4% 6%;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55)) drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 45%, transparent));
  animation: floaty 4s ease-in-out infinite; will-change: transform;
}
.case-card:nth-child(2n) .chest { animation-delay: -1.3s; }
.case-card:nth-child(3n) .chest { animation-delay: -2.4s; }
@keyframes floaty { 50% { transform: translateY(-5px) scale(1.02); } }
.case-card:hover .case-img .chest { animation-duration: 1.6s; }
.case-img .badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.case-info { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px; }
.case-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-meta { font-size: 11px; color: var(--muted); }
.case-card .btn { height: 40px; font-size: 13px; border-radius: 12px; padding: 0 8px; gap: 5px; min-width: 0; }
.case-card .btn .coin { width: 16px; height: 16px; flex: none; }
.case-card .btn .lbl-short { display: none; }
@media (max-width: 420px) {
  .case-card .btn .lbl-long { display: none; }
  .case-card .btn .lbl-short { display: inline; }
}
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px;
  background: rgba(9, 9, 9, .75); border: 1px solid rgba(255, 140, 0, .5); color: var(--orange3);
  font-size: 11px; font-weight: 800; letter-spacing: .04em; backdrop-filter: blur(6px);
}
.badge.free { background: var(--grad); color: #1a0a00; border: 0; }

/* ---------- предметы ---------- */
/* фон предмета: свет из угла в угол в цвете редкости + бегущий блик */
.item-card {
  --rc: var(--r1);
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 10px 8px 9px; gap: 6px; border-radius: 14px; overflow: hidden; isolation: isolate; contain: paint;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--rc) 30%, transparent) 0%, transparent 42%, transparent 62%, color-mix(in srgb, var(--rc) 16%, transparent) 100%),
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--rc) 14%, transparent), transparent 70%),
    var(--bg2);
  border: 1px solid color-mix(in srgb, var(--rc) 35%, var(--border));
}
.item-card::before {
  content: ''; position: absolute; inset: -60%; z-index: 1; pointer-events: none;
  background: linear-gradient(135deg, transparent 43%, rgba(255, 255, 255, .06) 47%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .06) 53%, transparent 57%);
  transform: translate(-45%, -45%);
  animation: cardShine 5.5s ease-in-out infinite;
}
@keyframes cardShine {
  0% { transform: translate(-45%, -45%); }
  38%, 100% { transform: translate(45%, 45%); }
}
.item-card:nth-child(3n + 2)::before { animation-delay: -1.8s; }
.item-card:nth-child(3n)::before { animation-delay: -3.6s; }
.roulette-strip .item-card::before { display: none; }
.item-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); box-shadow: 0 0 12px var(--rc); }
.item-card .pic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.item-card .pic img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.item-card .pic .coin { width: 62%; height: 62%; filter: drop-shadow(0 0 14px rgba(255, 140, 0, .5)); }
.item-card .name { font-size: 12px; font-weight: 700; line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .val { font-size: 13px; }
.item-card .chance { position: absolute; top: 6px; right: 7px; font-size: 10px; font-weight: 800; color: var(--muted); }
.rar-1 { --rc: var(--r1); } .rar-2 { --rc: var(--r2); } .rar-3 { --rc: var(--r3); } .rar-4 { --rc: var(--r4); } .rar-5 { --rc: var(--r5); }
.rar-coin { --rc: var(--orange2); }
.drop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .drop-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .drop-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---------- окна ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease;
}
.backdrop.closing { animation: fadeOut .2s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(100dvh - var(--safe-top) - 24px);
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-bottom: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 50px rgba(0, 0, 0, .6);
  animation: sheetIn .32s cubic-bezier(.2, .9, .25, 1);
}
.backdrop.closing .sheet { animation: sheetOut .22s ease forwards; }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@media (min-width: 700px) {
  .backdrop { align-items: center; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--border); }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; gap: 12px; }
.sheet-head h3 { font-size: 18px; font-weight: 800; }
.sheet-close { width: 34px; height: 34px; border-radius: 50%; background: var(--bg2); color: var(--muted); font-size: 20px; display: grid; place-items: center; flex: none; }
.sheet-body { padding: 4px 16px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--border); background: var(--card); }
.grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--border2); margin: 8px auto 0; }

.case-preview { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.case-preview .case-img { width: 46%; max-width: 240px; flex: none; box-shadow: var(--glow); }
.case-preview .stat { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- уведомления ---------- */
#toast-root { position: fixed; z-index: 90; left: 0; right: 0; top: calc(var(--safe-top) + 10px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto; max-width: 440px; padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  background: #1f1f1f; border: 1px solid var(--border2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: toastIn .3s cubic-bezier(.2, .9, .25, 1.2);
}
.toast.error { border-color: rgba(255, 61, 79, .5); }
.toast.success { border-color: rgba(43, 213, 118, .5); }
.toast.out { animation: fadeOut .25s forwards; }
.toast.again { animation: toastBump .3s ease; }
@keyframes toastBump { 40% { transform: scale(1.05); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } }

/* ---------- открытие кейса ---------- */
.opening {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; overflow: hidden; isolation: isolate;
  background: radial-gradient(80% 60% at 50% 45%, rgba(255, 106, 0, .16), transparent 70%), rgba(5, 5, 5, .96);
  padding: calc(var(--safe-top) + 20px) 0 calc(var(--safe-bottom) + 20px);
  animation: fadeIn .25s ease;
}
.opening::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 220vmax; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: repeating-conic-gradient(rgba(255, 140, 0, .045) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 45%); mask: radial-gradient(circle, #000 5%, transparent 45%);
  animation: spin 30s linear infinite;
}
.opening h3 { font-size: 20px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.roulette { position: relative; width: 100%; max-width: 900px; height: 196px; overflow: hidden; }
.roulette::before, .roulette::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.roulette::before { left: 0; background: linear-gradient(90deg, rgba(5, 5, 5, 1), transparent); }
.roulette::after { right: 0; background: linear-gradient(-90deg, rgba(5, 5, 5, 1), transparent); }
.roulette-strip { display: flex; gap: 8px; height: 100%; padding: 10px 0; will-change: transform; }
/* карточки ленты: фиксированная высота, картинка сжимается, цена всегда внутри */
.roulette-strip .item-card { width: 120px; height: 100%; flex: none; justify-content: space-between; padding: 8px 6px 10px; gap: 4px; }
.roulette-strip .item-card .pic { position: relative; flex: 1 1 0; min-height: 0; width: 100%; aspect-ratio: auto; }
.roulette-strip .item-card .pic > img, .roulette-strip .item-card .pic > .ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.roulette-strip .item-card .pic > .coin { inset: 8%; width: auto; height: auto; margin: auto; aspect-ratio: 1; max-width: 84%; max-height: 84%; }
.roulette-strip .item-card .name { min-height: 0; font-size: 11px; flex: none; }
.roulette-strip .item-card .val { flex: none; line-height: 1; }
.roulette-marker {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); z-index: 3;
  background: var(--grad); box-shadow: var(--glow-strong); border-radius: 2px;
}
.roulette-marker::before, .roulette-marker::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent;
}
.roulette-marker::before { top: -2px; border-top-color: var(--orange2); }
.roulette-marker::after { bottom: -2px; border-bottom-color: var(--orange2); }
.opening-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; padding: 0 16px; }
.opening-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.win-card { width: 190px; animation: winPop .55s cubic-bezier(.2, 1.4, .3, 1); }
.win-card .item-card { box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 55%, transparent); }
.win-card .item-card .name { font-size: 14px; }
.win-card .item-card .val { font-size: 17px; }
@keyframes winPop { from { opacity: 0; transform: scale(.6); } }
.win-title { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; text-align: center; }
.win-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 140, 0, .35), transparent 65%); animation: pulse 2s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .7; } }

/* пиксельное конфетти */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 8px; top: 40%; left: 50%; animation: confetti 1.4s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes confetti {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* ---------- игровые экраны ---------- */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 760px), (orientation: landscape) and (min-width: 600px) {
  .game-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.panel + .panel { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* UPGRADE */
.wheel-box { position: relative; display: grid; place-items: center; padding: 10px 0 4px; }
.wheel { width: min(280px, 72vw); height: auto; overflow: visible; }
.wheel .ring-bg { stroke: rgba(255, 61, 79, .85); }
.wheel .ring-win { stroke: var(--green); filter: drop-shadow(0 0 8px rgba(43, 213, 118, .7)); transition: stroke-dasharray .5s cubic-bezier(.2, .8, .2, 1); }
.wheel .arrow { transform-origin: 120px 120px; transform-box: view-box; }
.wheel-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.wheel-center b { display: block; font-size: 34px; font-weight: 900; letter-spacing: -.01em; }
.wheel-center span { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.wheel-result { font-size: 16px !important; letter-spacing: .08em !important; }
.slots { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.slot {
  min-height: 132px; border-radius: 16px; border: 1.5px dashed var(--border2); background: var(--bg2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.slot.filled { border-style: solid; border-color: rgba(255, 106, 0, .55); box-shadow: inset 0 0 30px rgba(255, 106, 0, .08); }
.slot .pic { width: 64px; height: 64px; display: grid; place-items: center; }
.slot .pic img { width: 100%; height: 100%; object-fit: contain; }
.slot .pic .coin { width: 48px; height: 48px; }
.slot small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.slot .name { font-size: 12px; font-weight: 700; }
.slot-arrow { color: var(--orange2); font-size: 22px; font-weight: 900; }
.mult-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; }
.mult {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--border2); transition: all .15s;
}
.mult b { font-size: 18px; font-weight: 900; }
.mult span { font-size: 11px; color: var(--muted); font-weight: 700; }
.mult.active { border-color: var(--orange); background: rgba(255, 106, 0, .12); box-shadow: var(--glow); }
.mult.active b { color: var(--orange3); }
.inv-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.inv-strip .item-card { cursor: pointer; transition: transform .15s; }
.item-card.selected { outline: 2px solid var(--orange); box-shadow: var(--glow); }
.inv-strip .item-card:active { transform: scale(.95); }

/* выбор предмета, выигрыш предметом */
.pick-note { font-size: 11px; font-weight: 800; color: var(--orange3); }
.prize-banner { display: flex; align-items: center; gap: 12px; text-align: left; }
.prize-card { width: 84px; flex: none; }
.prize-card .item-card { padding: 6px 4px; gap: 2px; }
.prize-card .item-card .name { font-size: 10px; min-height: 0; }
button.slot { width: 100%; color: inherit; font: inherit; cursor: pointer; }
.slot.target small { color: var(--orange3); }

/* DICE */
.dice-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 560px; margin: 0 auto; }
@media (min-width: 900px) { .dice-wrap { max-width: none; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.dice-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 18px 16px 16px;
  background: radial-gradient(90% 60% at 50% 0%, rgba(255, 106, 0, .14), transparent 70%), var(--card);
}
.dice-head { width: 100%; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; }
.dice-head h2 { text-align: center; font-size: 24px; font-weight: 900; letter-spacing: .06em; }
.dice-help { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--border2); font-weight: 900; color: var(--muted); }
.dice-sub { margin-top: -12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.dice-controls { display: flex; gap: 10px; width: 100%; max-width: 360px; }
.stake-btn {
  flex: 1; min-width: 0; width: 100%; height: 48px; padding: 0 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border2); font-weight: 800; font-size: 13px; letter-spacing: .06em; transition: border-color .2s;
}
.stake-btn:hover, .stake-btn.filled { border-color: rgba(255, 106, 0, .55); }
.stake-btn .thumb { width: 32px; height: 32px; flex: none; }
.stake-btn .thumb img { width: 100%; height: 100%; object-fit: contain; }
.stake-btn .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stake-btn.filled .nm { letter-spacing: 0; font-size: 13px; }
.stake-btn .chev { color: var(--muted); }
.dice-fast { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--bg2); border: 1px solid var(--border2); font-size: 18px; filter: grayscale(1); opacity: .7; transition: all .2s; }
.dice-fast.active { filter: none; opacity: 1; border-color: var(--orange); box-shadow: var(--glow); background: rgba(255, 106, 0, .12); }
.dice-row { display: flex; gap: 14px; justify-content: center; padding: 6px 0; }
.die {
  width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(160deg, #262626, #161616); border: 2.5px solid var(--orange);
  box-shadow: 0 0 16px rgba(255, 106, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .06); transition: transform .2s, box-shadow .2s, opacity .2s, border-color .2s;
}
.die .dot {
  --c: transparent; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent);
}
.die .dot.blank { background: none; border: 2px dashed var(--border2); box-shadow: none; }
.die.rolling { animation: dieShake .22s linear infinite; }
.die.landed { animation: winPop .3s ease; }
.die.hit { border-color: var(--green); box-shadow: 0 0 22px rgba(43, 213, 118, .6); transform: translateY(-4px) scale(1.06); }
.die.miss { opacity: .45; border-color: var(--border2); box-shadow: none; }
@keyframes dieShake { 25% { transform: rotate(-9deg) translateY(-3px); } 75% { transform: rotate(9deg) translateY(2px); } }
.dice-colors { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dice-color {
  --c: #888; width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)) border-box;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); transition: transform .15s, border-color .15s;
}
.dice-color:active { transform: scale(.92); }
.dice-color.active { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 75%, transparent); }
.dice-card .btn-lg { max-width: 420px; }
.dice-hint { min-height: 22px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; width: 100%; }
.dice-hint .result-banner { font-size: 14px; }
.payouts { padding: 0; overflow: hidden; }
.payouts summary { list-style: none; cursor: pointer; padding: 16px; font-size: 18px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.payouts summary::-webkit-details-marker { display: none; }
.payouts summary::after { content: '⌃'; color: var(--orange2); font-weight: 900; transition: transform .2s; }
.payouts:not([open]) summary::after { transform: rotate(180deg); }
.payout-rows { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 14px; }
.payout-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.payout-row .k { color: var(--muted); min-width: 52px; padding-right: 12px; border-right: 1px solid var(--border2); }
.payout-row .v { margin-left: auto; font-size: 13px; }
.payout-row.win { background: rgba(43, 213, 118, .06); border-color: rgba(43, 213, 118, .22); }
.payout-row.win .m { color: var(--green); }
.payout-row.lose { background: rgba(255, 61, 79, .05); border-color: rgba(255, 61, 79, .2); }
.payout-row.lose .m { color: var(--red); }
.payout-row.hit { transform: scale(1.02); box-shadow: 0 0 0 2px currentColor; }
.payout-row.hit.win { color: var(--green); background: rgba(43, 213, 118, .14); }
.payout-row.hit.lose { color: var(--red); background: rgba(255, 61, 79, .12); }

/* CRASH */
.crash-page {
  display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: -4px auto 0;
  height: calc(var(--tg-viewport-stable-height, 100dvh) - var(--safe-top) - var(--topbar-h) - var(--tabbar-h) - var(--safe-bottom) - 40px);
  min-height: 430px;
}
.crash-page .crash-box { flex: 1 1 auto; min-height: 170px; aspect-ratio: auto; }
.crash-controls { display: flex; flex-direction: column; gap: 8px; flex: none; }
.crash-inputs { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.crash-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crash-field > span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding-left: 2px; }
.crash-field .input, .crash-field .stake-btn { height: 44px; }
.crash-field .stake-btn { padding: 0 10px; font-size: 12px; }
.auto-wrap b { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--orange2); font-weight: 900; pointer-events: none; }
.auto-wrap .input { padding-left: 32px; }
.crash-controls .btn-lg { height: 52px; }
@media (orientation: landscape) and (max-height: 560px) {
  .crash-page { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); max-width: none; min-height: 250px; }
  .crash-page .crash-history { grid-column: 1; }
  .crash-page .crash-box { grid-column: 1; grid-row: 2; min-height: 0; }
  .crash-controls { grid-column: 2; grid-row: 1 / 3; justify-content: center; }
}
.crash-box { position: relative; aspect-ratio: 16 / 11; border-radius: 16px; overflow: hidden; background: radial-gradient(100% 80% at 0% 100%, rgba(255, 106, 0, .12), transparent 60%), #0d0d0d; border: 1px solid var(--border); }
.crash-box canvas { width: 100%; height: 100%; display: block; }
.crash-mult { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.crash-mult b { font-size: clamp(40px, 12vw, 64px); font-weight: 900; letter-spacing: -.02em; text-shadow: 0 0 30px rgba(255, 140, 0, .5); }
.crash-mult span { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.crash-mult.crashed b { color: var(--red); text-shadow: 0 0 30px rgba(255, 61, 79, .6); animation: shake .4s; }
.crash-mult.cashed b { color: var(--green); text-shadow: 0 0 30px rgba(43, 213, 118, .5); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.crash-history { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.crash-history span { flex: none; padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; background: var(--bg2); border: 1px solid var(--border2); color: var(--muted); }
.crash-history span.mid { color: var(--orange3); border-color: rgba(255, 140, 0, .4); }
.crash-history span.high { color: #1a0a00; background: var(--grad); border-color: transparent; }

.result-banner { text-align: center; font-weight: 800; padding: 10px; border-radius: 12px; animation: winPop .35s ease; }
.result-banner.win { background: rgba(43, 213, 118, .12); color: var(--green); border: 1px solid rgba(43, 213, 118, .35); }
.result-banner.lose { background: rgba(255, 61, 79, .1); color: var(--red); border: 1px solid rgba(255, 61, 79, .3); }

/* ---------- профиль ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 16px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 24px; border: 2px solid var(--orange); box-shadow: var(--glow); }
.profile-head h2 { font-size: 20px; font-weight: 800; }
.profile-head .muted { font-size: 13px; }
.balance-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 106, 0, .22), transparent 60%), var(--card);
  border: 1px solid rgba(255, 106, 0, .3);
}
.balance-card .big { font-size: 26px; font-weight: 900; }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .inv-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .inv-grid { grid-template-columns: repeat(6, 1fr); } }
.inv-grid .item-card { cursor: pointer; }
.inv-grid .item-card .btn { height: 28px; font-size: 11px; padding: 0 8px; border-radius: 8px; width: 100%; margin-top: 2px; }
.fullscreen-msg { min-height: 80dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.fullscreen-msg img { width: 84px; margin: 0 auto 16px; filter: drop-shadow(0 0 18px rgba(255, 106, 0, .6)); }

/* низкие экраны в горизонтальной ориентации */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topbar-h: 50px; --tabbar-h: 54px; }
  .tab span { display: none; }
  .roulette { height: 150px; }
  .roulette-strip .item-card { width: 104px; }
  .opening { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- вид: ПК / телефон / весь экран ---------- */
.view-phone #view, .view-phone .topbar-inner, .view-phone .tabbar-inner { max-width: 520px; }
.view-phone .case-grid { grid-template-columns: repeat(2, 1fr); }
.view-phone .game-layout, .view-phone .dice-wrap { grid-template-columns: minmax(0, 1fr); }
.view-phone .crash-page { max-width: 520px; }
.view-pc #view, .view-pc .topbar-inner { max-width: 1280px; }
.view-pc .case-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.view-pc .drop-grid, .view-pc .inv-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
@media (min-width: 700px) {
  .view-pc .game-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .view-pc .dice-wrap { max-width: none; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
}
.view-full #view, .view-full .topbar-inner { max-width: none; }
.view-full #view { padding-left: max(16px, 2vw); padding-right: max(16px, 2vw); }
.view-full .case-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.view-full .crash-page { max-width: none; }

/* ---------- режим стримера: баланс и личные данные размыты ---------- */
.streamer .sensitive { filter: blur(7px); transition: filter .2s; user-select: none; }
.streamer .balance-amount { filter: blur(6px); }

/* ---------- лайв-дроп ---------- */
.live { position: relative; display: flex; align-items: center; gap: 10px; height: 74px; margin: 2px 0 6px; overflow: hidden; }
.live-label {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 56px; height: 100%; border-radius: 14px; background: var(--card); border: 1px solid var(--border);
  font-size: 9px; font-weight: 900; letter-spacing: .12em; color: var(--muted); z-index: 2;
}
.live-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 1.4s infinite; }
.live-viewport { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; contain: paint;
  -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.live-track { position: absolute; left: 0; top: 0; height: 100%; display: flex; gap: 8px; will-change: transform; }
.live-item {
  --rc: var(--r1);
  flex: none; width: 168px; height: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
  border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 22%, transparent), transparent 60%), var(--card);
  border: 1px solid color-mix(in srgb, var(--rc) 35%, var(--border)); animation: winPop .4s ease;
}
.live-item .pic { width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.live-item .pic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.live-item .ph { font-size: 13px; }
.live-item .txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.live-item .who { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-item .what { font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-item .val { font-size: 12px; }
.live-item.rare {
  border-color: #FFC83D; background: linear-gradient(135deg, rgba(255, 200, 61, .32), rgba(255, 106, 0, .18) 55%, transparent), var(--card);
  box-shadow: 0 0 18px rgba(255, 190, 40, .45), inset 0 0 12px rgba(255, 200, 61, .2);
}
.live-item.rare .what { color: #FFD66B; }
.live-item.rare .who::after { content: ' · 🔥'; }

/* ---------- открытие нескольких кейсов ---------- */
.count-chips { display: flex; gap: 6px; margin-bottom: 10px; }
.count-chips .chip { flex: 1; padding: 0; }
.opening.multi { justify-content: flex-start; overflow-y: auto; gap: 12px; }
.opening.multi .roulette { height: 120px; flex: none; }
.opening.multi .roulette-strip { padding: 6px 0; }
.opening.multi .roulette-strip .item-card { width: 92px; padding: 6px 4px 7px; }
.opening.multi .roulette-strip .item-card .name { font-size: 10px; -webkit-line-clamp: 1; min-height: 0; }
.multi-wins { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; width: 100%; max-width: 640px; padding: 0 16px; }
.multi-wins .item-card { animation: winPop .45s cubic-bezier(.2, 1.4, .3, 1) both; }
.multi-total { font-size: 15px; font-weight: 800; }

/* ---------- настройки, промокод, тех. работы ---------- */
.settings-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.settings-row .seg button { font-size: 12px; letter-spacing: .02em; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--border2); margin-bottom: 10px; }
.toggle-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; border-radius: 14px; background: var(--border2); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--orange); }
.switch.on::after { transform: translateX(20px); }
.promo-row { display: flex; gap: 8px; }
.promo-row .input { text-transform: uppercase; letter-spacing: .08em; }
.maintenance { min-height: 80dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.maintenance .icon { font-size: 64px; margin-bottom: 12px; animation: floaty 3s ease-in-out infinite; }
.maintenance p { max-width: 380px; margin: 8px auto 18px; color: var(--muted); line-height: 1.5; }
