:root {
  --navy: #1b2438;
  --pink: #f72585;
  --blur: 4px; /* лёгкое размытие фона */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--navy);
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff;
}

#bg {
  position: fixed;
  /* небольшой запас, чтобы размытие не светило краями */
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  filter: blur(var(--blur));
  z-index: 0;
}

/* ---------- Liquid glass dock ---------- */
.dock {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  /* затемнение сразу под панелью */
  background: linear-gradient(180deg, rgba(12,16,30,0), rgba(12,16,30,.45));
  justify-content: center;
  padding: 24px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.dock__glass {
  pointer-events: auto;
  position: relative;
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 420px;
  padding: 6px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(27,36,56,.45) 0%, rgba(27,36,56,.25) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.28),
    inset 0 -1px 1px rgba(247,37,133,.18),
    0 8px 24px rgba(10,14,28,.28);
  overflow: hidden;
}

/* блик-«зеркало» сверху */
.dock__glass::before {
  content: "";
  position: absolute;
  inset: 0 0 55% 0;
  border-radius: 32px 32px 50% 50% / 32px 32px 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  pointer-events: none;
}

.dock__btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 8px;
  border: 0;
  border-radius: 26px;
  background: transparent;
  color: rgba(255,255,255,.72);
  font: 600 10px/1 inherit;
  font-family: inherit;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .25s, background .25s, box-shadow .25s, transform .15s;
}

.dock__btn svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock__btn svg circle { fill: currentColor; stroke: none; }
.dock__btn svg circle[r="3.5"] { fill: none; stroke: currentColor; }
.dock__btn svg circle[r="1"] { fill: currentColor; }

.dock__btn:active { transform: scale(.94); }

.dock__btn.is-active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(247,37,133,.42), rgba(247,37,133,.16));
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.45),
    inset 0 -6px 14px rgba(247,37,133,.25),
    0 4px 14px rgba(247,37,133,.28);
}

/* ---------- Баланс сверху справа ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 0;
  pointer-events: none;
}

.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(27,36,56,.45) 0%, rgba(27,36,56,.25) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.28),
    inset 0 -1px 1px rgba(247,37,133,.18),
    0 8px 24px rgba(10,14,28,.28);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0 0 55% 0;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  pointer-events: none;
}

.balance {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 6px 0 16px;
  border-radius: 20px;
}
.balance__value {
  position: relative;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.balance__ton {
  position: relative;
  width: 28px; height: 28px;
  flex: none;
}

/* ---------- Скрытая зона входа в админку ---------- */
.admin-hotspot {
  position: fixed;
  top: 0; left: 0;
  width: 72px; height: calc(64px + env(safe-area-inset-top, 0px));
  z-index: 20;
  background: transparent;
  border: 0; outline: 0;
  opacity: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Окно ввода пароля ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8,10,20,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal.is-open { opacity: 1; pointer-events: auto; }

.modal__card {
  width: 100%; max-width: 340px;
  padding: 20px;
  border-radius: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transform: scale(.96);
  transition: transform .2s;
}
.modal.is-open .modal__card { transform: none; }
.modal__card > * { position: relative; }
.modal__card h2 { font-size: 18px; font-weight: 700; }

.modal__card input {
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(8,10,20,.35);
  color: #fff;
  font-size: 16px;
  outline: none;
}
.modal__card input:focus { border-color: rgba(247,37,133,.7); }

.modal__error { min-height: 16px; font-size: 13px; color: #ff6b9d; }

.modal__row { display: flex; gap: 8px; }
.modal__btn {
  flex: 1; height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff; font: 600 15px inherit; font-family: inherit;
  cursor: pointer;
}
.modal__btn--primary {
  background: linear-gradient(180deg, rgba(247,37,133,.6), rgba(247,37,133,.3));
  border-color: rgba(247,37,133,.5);
}

.dim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12,16,30,0) 72%, rgba(12,16,30,.5) 90%, rgba(12,16,30,.75) 100%),
    rgba(12,16,30,.4);
}

#app {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: calc(128px + env(safe-area-inset-top, 0px)) 0 calc(130px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}
#app::-webkit-scrollbar { display: none; }

/* плавная смена экрана: новый экран выезжает со стороны, куда мы идём (--vx задаёт home.js), и проявляется */
#app.is-enter:not(.no-enter) > * { animation: viewIn .34s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateX(var(--vx, 24px)); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { #app.is-enter > * { animation: none; } }

/* ---------- Сетка кнопок главного экрана ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 22px;
}

.tile {
  position: relative;
  display: block;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  overflow: hidden;
  padding: 0;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(135deg, rgba(27,36,56,.5) 0%, rgba(27,36,56,.22) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.3),
    inset 0 -1px 1px rgba(247,37,133,.18),
    0 8px 22px rgba(10,14,28,.3);
  transition: transform .15s;
}
/* баннер: слот 128 + 132 = кнопки начинаются с 260px, как раньше */
.banner-slot { height: 132px; margin: 0 30px; }
.banner { width: 100%; aspect-ratio: 4.8 / 1; border-radius: 24px; touch-action: pan-y; user-select: none; }
.banner__track { position: absolute; inset: 0; display: flex; will-change: transform; }
.banner__slide { position: relative; flex: 0 0 100%; height: 100%; }
.banner__dots {
  position: absolute; left: 0; right: 0; bottom: 7px; z-index: 3;
  display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.banner__dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: width .3s, background .3s;
}
.banner__dots i.is-active { width: 16px; border-radius: 3px; background: #fff; }
.banner__manage {
  display: flex; gap: 8px; margin-top: 8px; height: 40px;
  overflow-x: auto; scrollbar-width: none;
}
.banner__manage::-webkit-scrollbar { display: none; }
.mthumb {
  position: relative; flex: none;
  width: 64px; height: 40px;
  border-radius: 12px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.2);
  cursor: pointer;
}
.mthumb.is-active { border-color: #f72585; }
.mthumb .tile__media { pointer-events: none; }
.mthumb .mthumb__del {
  position: absolute; top: 2px; right: 2px; z-index: 3;
  width: 18px; height: 18px;
  border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(247,37,133,.9); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.mthumb .mthumb__link {
  position: absolute; bottom: 2px; left: 2px; z-index: 3;
  width: 18px; height: 18px;
  border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,16,30,.75); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.mthumb .mthumb__link.is-set { background: #22c55e; }
.mthumb .mthumb__link svg { width: 11px; height: 11px; stroke-width: 2.4; }
.mthumb .mthumb__del svg { width: 11px; height: 11px; stroke-width: 2.6; }
.tile__ctl--chip { width: auto; padding: 0 10px; font: 700 12px inherit; font-family: inherit; }
.tile__hint--center { align-items: center; padding-bottom: 0; }
.tile--half { aspect-ratio: 1.9 / 1; }
.tile--wide { grid-column: 1 / -1; aspect-ratio: 4.8 / 1; }
.tile:not(.is-edit):active { transform: scale(.97); }

/* стеклянный блик поверх медиа */
.tile::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 45%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.tile__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Редактирование ---------- */
.tile__hint {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 0 10px 10px 0;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.55);
}
.tile__hint svg, .tile--add svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.tile__ctls {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px;
  max-width: calc(100% - 12px);
}
.tile__badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  padding: 3px 9px; border-radius: 10px;
  background: rgba(12,16,30,.55); color: rgba(255,255,255,.6);
  font-size: 11px; font-weight: 600;
  pointer-events: none;
}
.tile__badge.is-set { background: rgba(247,37,133,.7); color: #fff; }
.modal__list { display: flex; flex-direction: column; gap: 8px; }
.screen { margin-top: -56px; padding: 0 22px; display: flex; flex-direction: column; gap: 14px; }
.screen__back {
  align-self: flex-start; height: 38px; padding: 0 16px;
  border-radius: 19px; color: #fff; font: 600 14px inherit; font-family: inherit; cursor: pointer;
}
.screen__head { display: flex; align-items: center; gap: 14px; }
.screen h1 { font-size: 22px; }
.screen__round { font: 500 14px 'Unbounded', system-ui, sans-serif; color: rgba(255,255,255,.55); margin-left: -4px; }

/* ---------- PVP Arena ---------- */
.arena { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 6px; }
.arena__wheel { position: relative; width: min(100%, 290px); aspect-ratio: 1; }
.arena:not(.upg) .arena__wheel { margin-top: 12px; }
.arena__svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 24px rgba(10,14,28,.45)); }
#arRot { will-change: transform; }
#arRot text { font-family: 'Unbounded', system-ui, sans-serif; }
#arRot .is-me { stroke: #fff; stroke-width: 3; }
.arena__pointer {
  position: absolute; top: -16px; left: 50%; width: 32px; height: 32px; margin-left: -16px; z-index: 2;
  fill: #fff; stroke: #f72585; stroke-width: 1.6; stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(247,37,133,.85)) drop-shadow(0 3px 4px rgba(10,14,28,.55));
}
/* лампочки по ободу колеса: мигают по очереди, во время круток — быстрее */
.arena__bulb { fill: #fff; opacity: .35; animation: arBulb 1.8s ease-in-out infinite; filter: drop-shadow(0 0 2.5px #fff); }
.arena__bulb:nth-child(even) { animation-delay: .9s; }
.arena__wheel.is-spin .arena__bulb { animation-duration: .4s; }
.arena__wheel.is-spin .arena__bulb:nth-child(even) { animation-delay: .2s; }
@keyframes arBulb { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
/* подпись «@ник +N TON», которая всплывает над колесом при ставке */
.arena__pop {
  position: absolute; left: 50%; top: 20%; z-index: 3; white-space: nowrap; pointer-events: none;
  padding: 7px 14px; border-radius: 16px; font: 700 13px 'Unbounded', system-ui, sans-serif; color: #fff;
  background: rgba(10,14,28,.78); border: 1.5px solid var(--c, #f72585);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c, #f72585) 60%, transparent), 0 6px 16px rgba(0,0,0,.35);
  animation: arPop 1.5s cubic-bezier(.22,.8,.3,1) forwards;
}
@keyframes arPop {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(.85); }
  16% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
  70% { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(.96); }
}
/* центр колеса «подпрыгивает», когда банк вырос */
.arena__hub.is-pulse { animation: arHub .5s cubic-bezier(.22,.8,.3,1); }
@keyframes arHub { 0% { transform: translate(-50%, -50%) scale(1); } 35% { transform: translate(-50%, -50%) scale(1.09); } 100% { transform: translate(-50%, -50%) scale(1); } }
/* строки списка участников: новый игрок выезжает, при добавке ставки строка вспыхивает */
.plist__row.is-new { animation: plRowIn .5s cubic-bezier(.22,.8,.3,1) both; }
.plist__row.is-bump { animation: plBump .9s ease-out; }
@keyframes plRowIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes plBump { 0% { background: rgba(247,37,133,.38); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .arena__pop, .arena__hub.is-pulse, .plist__row.is-new, .plist__row.is-bump { animation: none; } }
/* пустое колесо: медленно вращающийся пунктир */
.arena__empty { transform-origin: 0 0; animation: arEmpty 40s linear infinite; }
@keyframes arEmpty { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .arena__bulb, .arena__empty { animation: none; opacity: .8; } }
.arena__hub {
  position: absolute; top: 50%; left: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 0 0 5px rgba(10,14,28,.35), 0 0 0 6px rgba(255,255,255,.2), 0 0 30px rgba(247,37,133,.45), inset 0 1px 1px rgba(255,255,255,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center; overflow: hidden;
}
.arena__hub::before { display: none; }
.arena__hub > * { position: relative; }
.arena__hub small { font-size: 10px; color: rgba(255,255,255,.65); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.arena__hub b { font-size: 15px; line-height: 1.1; }
.arena__hub span { font-size: 12px; color: rgba(255,255,255,.8); font-weight: 600; }

/* окно победителя: выезжает снизу над нижней панелью */
.win {
  position: fixed; left: 16px; right: 16px; z-index: 8;
  bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  max-width: 420px; margin: 0 auto;
  padding: 14px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(27,36,56,.78), rgba(27,36,56,.55));
  transform: translateY(140%); opacity: 0;
  transition: transform .55s cubic-bezier(.2,.9,.25,1), opacity .35s;
}
.win.is-open { transform: none; opacity: 1; }
.win > * { position: relative; }
.win__top { display: flex; align-items: center; gap: 10px; }
.win__ava { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.8); }
.win__ava img, .win__ava span { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; font: 700 18px 'Unbounded', sans-serif; color: #fff; }
.win__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.win__chance { font-size: 11px; font-weight: 300; color: rgba(255,255,255,.6); white-space: nowrap; }
.win__chance b { color: #c9cedb; font-weight: 300; font-family: 'Unbounded', system-ui, sans-serif; font-size: 10.5px; }
.win__name { min-width: 0; font: 700 15px 'Unbounded', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__x {
  flex: none; padding: 6px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #2fd66b, #17a34a);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.45), 0 4px 14px rgba(34,197,94,.4);
  font: 700 16px 'Unbounded', system-ui, sans-serif; color: #fff;
}
.win__label { margin: 12px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.6); }
.win__squares { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.win__squares::-webkit-scrollbar { display: none; }
.win__sq {
  flex: none; width: 74px; height: 74px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.3);
}
.win__sq b { font: 700 13px 'Unbounded', system-ui, sans-serif; }
.win__sq small { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 600; }
.win__ton svg { width: 26px; height: 26px; display: block; }
.win__gift { font-style: normal; font-size: 30px; line-height: 1; }

.arena__bet {
  width: 100%; height: 56px;
  border-radius: 28px;
  border: 1px solid rgba(247,37,133,.6);
  background: linear-gradient(180deg, rgba(247,37,133,.75), rgba(247,37,133,.45));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 8px 22px rgba(247,37,133,.3);
  color: #fff; font: 700 17px inherit; font-family: inherit; cursor: pointer;
  transition: transform .15s, opacity .2s;
}
.arena__bet:active { transform: scale(.98); }
.arena__bet:disabled { opacity: .5; cursor: default; }

.arena__gift {
  position: relative; width: 100%; height: 50px;
  border-radius: 25px; border: 0;
  background: #fff; color: #000;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font: 700 16px inherit; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.arena__gift:active { transform: scale(.98); }
.arena__gift i {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 400 24px/1 system-ui, sans-serif; font-style: normal; padding-bottom: 2px;
}
.plist {
  width: 100%; display: flex; flex-direction: column; padding: 6px 0;
  border-radius: 24px; border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(27,36,56,.55), rgba(27,36,56,.3));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.2);
}
.plist__head { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.6); padding: 8px 16px 6px; }
.plist__row {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.plist__row.is-me { background: rgba(255,255,255,.1); }
.plist__ava { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.8); }
.plist__ava img, .plist__ava span { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; font: 700 15px 'Unbounded', sans-serif; color: #fff; }
.plist__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.plist__who b { font: 500 13px 'Unbounded', system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist__who em { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.18); }
.plist__bet { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.plist__bet b { font: 700 13px 'Unbounded', system-ui, sans-serif; }
.plist__bet small { font-size: 11px; font-weight: 300; color: rgba(255,255,255,.65); }
.plist__empty { text-align: center; padding: 10px 0; }
.arena__history {
  width: 100%; height: 46px; border-radius: 23px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(27,36,56,.5), rgba(27,36,56,.25));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.22);
  color: #fff; font: 600 15px inherit; font-family: inherit; cursor: pointer;
}
.arena__history:active { transform: scale(.98); }
.hist { padding: 10px 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 4px; }
.hist__top, .hist__mid { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hist__top b { font: 500 13px 'Unbounded', system-ui, sans-serif; color: rgba(255,255,255,.7); }
.hist__top span { font-size: 11px; color: rgba(255,255,255,.55); }
.hist__mid b { font: 500 13px 'Unbounded', system-ui, sans-serif; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist__win { font: 700 13px 'Unbounded', system-ui, sans-serif; color: #4ade80; white-space: nowrap; }
.hist small { font-size: 11px; color: rgba(255,255,255,.6); }
.nft__list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; scrollbar-width: none; }
.nft__list::-webkit-scrollbar { display: none; }
.nft {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07); color: #fff; font-family: inherit; text-align: left; cursor: pointer;
}
.nft.is-picked { border-color: #fff; background: rgba(255,255,255,.2); }
.nft.is-used { opacity: .45; cursor: default; }
.nft__pic { width: 44px; height: 44px; flex: none; border-radius: 14px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 26px; font-style: normal; }
.nft__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nft__info b { font-size: 14px; }
.nft__info small { font-size: 12px; color: rgba(255,255,255,.6); }
.nft__val { font: 700 13px 'Unbounded', system-ui, sans-serif; white-space: nowrap; }
.nft__empty { text-align: center; padding: 18px 0; }
.modal__btn:disabled { opacity: .45; }
.arena__admin {
  width: 100%; min-height: 40px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(12,16,30,.45); color: #fff;
  font: 600 13px inherit; font-family: inherit; cursor: pointer;
}
.arena__admin.is-closed { background: rgba(220,38,38,.55); border-color: rgba(248,113,113,.7); }
.arena__closed { width: 100%; margin-top: 30px; padding: 36px 24px; border-radius: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.arena__closed > * { position: relative; }
.arena__closed i { font-style: normal; font-size: 48px; line-height: 1; }
.arena__closed h2 { font-size: 20px; }
.arena__rowhead { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -8px; }
.arena__cur { display: flex; padding: 3px; gap: 2px; border-radius: 16px; border: 1px solid rgba(255,255,255,.16); background: rgba(12,16,30,.4); }
.arena__cur button { height: 26px; padding: 0 12px; border: 0; border-radius: 13px; background: transparent; color: rgba(255,255,255,.65); font: 600 12px inherit; font-family: inherit; cursor: pointer; }
.arena__cur button.is-on { background: #fff; color: #000; }
.upg > .arena__hint { align-self: flex-start; margin-bottom: -8px; }
.upg__ring { width: min(100%, 270px); }
/* «Мои подарки»: раскрывающийся список подарков из инвентаря */
.upg__gifts { width: 100%; display: none; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upg__g {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px;
  border-radius: 18px; cursor: pointer; color: #fff; font-family: inherit;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: transform .15s, background .2s;
}
.upg__g:active { transform: scale(.96); }
.upg__g i { font-style: normal; font-size: 30px; line-height: 1.1; }
.upg__g b { font-size: 11px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upg__g small { font-size: 10px; color: rgba(255,255,255,.65); }
.upg__g.is-picked { border-color: #fff; background: rgba(255,255,255,.22); }
.upg__g:disabled { opacity: .5; cursor: default; }
.upg__none { grid-column: 1 / -1; text-align: center; padding: 14px 0; font-size: 13px; }
.upg__total { width: 100%; display: none; text-align: center; font-size: 13px; color: rgba(255,255,255,.75); }
.upg__total b { color: #fff; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 500; }
.upg__hub { gap: 0; width: 46%; }
.upg__emoji { font-style: normal; font-size: 30px; line-height: 1; }
.upg__hub b { font: 700 15px 'Unbounded', system-ui, sans-serif; }
.upg__hub span { font: 500 11px 'Unbounded', system-ui, sans-serif; color: rgba(255,255,255,.7); }
.upg__info { text-align: center; font-size: 13px; color: rgba(255,255,255,.75); margin-top: -4px; }
.upg__info b { color: #fff; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 500; }
.upg__items { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.upg__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 8px;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.16); color: #fff; font-family: inherit; cursor: pointer;
  background: linear-gradient(135deg, rgba(27,36,56,.5), rgba(27,36,56,.25));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.22);
}
.upg__item i { font-style: normal; font-size: 26px; line-height: 1.1; }
.upg__item b { font-size: 11px; font-weight: 600; }
.upg__item small { font-size: 10px; color: rgba(255,255,255,.65); }
.upg__item em { font: 500 10px 'Unbounded', system-ui, sans-serif; font-style: normal; color: #4ade80; margin-top: 2px; }
.upg__item.is-picked { border-color: #fff; background: rgba(255,255,255,.22); }
.upg__item:disabled { opacity: .35; cursor: default; }
.upg__mults { width: 100%; display: flex; gap: 6px; }
.upg__mults .arena__step { flex: 1; width: auto; height: 36px; font-size: 13px; }
.arena__hint { margin: 2px 4px; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.6); }
.arena__stake { width: 100%; display: flex; align-items: center; gap: 6px; }
.arena__side { display: flex; gap: 4px; }
.arena__step {
  width: 36px; height: 32px; padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(27,36,56,.5), rgba(27,36,56,.25));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.22);
  color: #fff; font: 600 11px inherit; font-family: inherit; cursor: pointer;
}
.arena__step:active { transform: scale(.94); }
.arena__input {
  flex: 1; min-width: 0; height: 44px;
  border-radius: 16px; text-align: center;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(8,10,20,.4);
  color: #fff; font: 700 17px inherit; font-family: inherit; outline: none;
}
.arena__input:focus { border-color: rgba(247,37,133,.7); }
.screen p { color: rgba(255,255,255,.6); }
.tile__ctl {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(12,16,30,.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; cursor: pointer; padding: 0;
}
.tile__ctl svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile__ctl--danger { background: rgba(247,37,133,.6); border-color: rgba(247,37,133,.7); }

.tile--add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-style: dashed;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.75);
  aspect-ratio: auto; height: 56px;
}

.editbar {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px)); left: 16px;
  z-index: 25;
  display: none; align-items: center; gap: 10px;
  height: 40px; padding: 0 6px 0 14px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
}
.editbar.is-open { display: flex; }
.editbar > * { position: relative; }
.editbar button {
  height: 28px; padding: 0 12px;
  border-radius: 14px; border: 1px solid rgba(247,37,133,.5);
  background: linear-gradient(180deg, rgba(247,37,133,.6), rgba(247,37,133,.3));
  color: #fff; font: 600 13px inherit; font-family: inherit; cursor: pointer;
}

.soon {
  display: flex; align-items: center; justify-content: center;
  height: 50vh;
  color: rgba(255,255,255,.6);
  font-weight: 600;
}
