:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #121620;
  --panel-2: #171d2a;
  --input-bg: #070911;
  --line: transparent;
  --text: #f6f7fb;
  --muted: #9aa4b2;
  --accent: #ff4fc3;
  --accent-2: #8f5cff;
  --accent-3: #ff7aa8;
  --success: #21d667;
  --success-2: #8cff72;
  --success-text: #04140a;
  --danger: #ff3b4f;
  --danger-2: #ff7582;
  --gold: #ffd166;
  --radius: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --app-visible-height: 100dvh;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 38%, rgba(68, 139, 255, 0.19) 0%, rgba(68, 139, 255, 0.1) 16%, rgba(68, 139, 255, 0.035) 31%, transparent 48%),
    radial-gradient(circle at 85% 14%, rgba(68, 139, 255, 0.1) 0%, rgba(68, 139, 255, 0.04) 24%, transparent 46%),
    radial-gradient(circle at 18% 58%, rgba(255, 79, 195, 0.08) 0%, rgba(255, 79, 195, 0.035) 22%, transparent 44%),
    radial-gradient(circle at 75% 76%, rgba(143, 92, 255, 0.085) 0%, rgba(143, 92, 255, 0.035) 24%, transparent 48%),
    radial-gradient(circle at 10% 16%, rgba(255, 79, 195, 0.05) 0%, transparent 36%),
    linear-gradient(180deg, #08030b 0%, #04060a 48%, #07030b 100%);
  background-attachment: fixed;
  color: var(--text);
}

body.overlay-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 79, 195, 0.18), rgba(143, 92, 255, 0.2));
  color: var(--accent);
  font-weight: 900;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--panel-2);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.screen {
  animation: appear 220ms ease both;
}

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

.panel {
  border: 0;
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    var(--shadow);
}

.panel-inner {
  padding: 18px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.club-card {
  min-height: 72px;
  border: 0;
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.club-card.is-active {
  background: rgba(255, 79, 195, 0.16);
  box-shadow: inset 0 0 0 2px rgba(255, 79, 195, 0.48);
}

.club-card:active {
  transform: scale(0.985);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input,
.select {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.input:focus,
.select:focus {
  box-shadow: 0 0 0 2px rgba(255, 79, 195, 0.34);
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    background 140ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text);
  font-weight: 800;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
}

.compact-button {
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 93, 143, 0.18);
  color: var(--danger);
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8) brightness(0.7);
  opacity: 0.64;
}

.home-grid {
  display: grid;
  gap: 16px;
}

.case-inventory-rail {
  display: flex;
  gap: 14px;
  margin-inline: -2px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.case-inventory-rail::-webkit-scrollbar {
  display: none;
}

.inventory-case-tile {
  position: relative;
  flex: 0 0 clamp(188px, 52vw, 227px);
  min-height: 154px;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 78% 46%, color-mix(in srgb, var(--case-color) 72%, white 12%), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--case-color) 82%, #050611 18%), color-mix(in srgb, var(--case-color) 52%, #050611 48%));
  color: #fff;
  cursor: pointer;
  padding: 22px;
  scroll-snap-align: start;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 20px 55px rgba(0, 0, 0, 0.32);
}

.inventory-case-tile:focus,
.inventory-case-tile:focus-visible {
  outline: none;
}

.inventory-case-tile.is-empty {
  opacity: 0.72;
}

.inventory-case-title {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 28px;
  padding-right: 0;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-case-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 22px;
  font-size: 52px;
  line-height: 0.9;
}

.inventory-case-tile span:last-of-type {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.inventory-case-tile img {
  position: absolute;
  right: -28px;
  bottom: -16px;
  width: 58%;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.shop-panel .panel-inner {
  display: grid;
  gap: 16px;
}

.shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-head .section-title {
  margin: 0;
  font-size: 24px;
}

.currency-chip,
.currency-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  padding: 8px 12px;
}

.currency-chip strong {
  font-size: 22px;
  line-height: 1;
}

.currency-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.currency-icon-fallback {
  display: inline-block;
  border-radius: 6px;
  background: linear-gradient(135deg, #7ff7ff, #24c8ee 48%, #1095ce);
  transform: rotate(45deg) scale(0.82);
  box-shadow: 0 0 16px rgba(86, 222, 255, 0.36);
}

.shop-copy {
  margin: 0;
  color: rgba(246, 247, 251, 0.68);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.38;
}

.shop-copy b {
  color: #fff;
}

.shop-copy-highlight {
  color: #fff;
  font-weight: 500;
}

.shop-copy-muted {
  font-size: 16px;
  font-weight: 400;
}

.check-balance-button {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(5, 7, 13, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 79, 195, 0.04);
  font-size: 19px;
  font-weight: 600;
}

.check-balance-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.016)),
    rgba(5, 7, 13, 0.52);
}

.case-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shop-case-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(5, 7, 13, 0.52);
  color: #fff;
  cursor: pointer;
  padding: 0;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 36px rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.shop-case-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.016)),
    rgba(5, 7, 13, 0.58);
}

.shop-case-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1.12;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--case-color) 34%, transparent), transparent 52%),
    linear-gradient(135deg, color-mix(in srgb, var(--case-color) 20%, #050711 80%), rgba(255, 255, 255, 0.035));
}

.shop-case-art img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.32));
}

.shop-case-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shop-case-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.18;
}

.currency-price {
  padding: 5px 10px;
  font-size: 16px;
  font-weight: 900;
}

.currency-price .currency-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.case-detail-modal {
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--case-color) 38%, transparent), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.78);
  backdrop-filter: blur(36px) saturate(1.35);
  -webkit-backdrop-filter: blur(36px) saturate(1.35);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 28px 80px rgba(0, 0, 0, 0.55);
}

.case-detail-modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 18px 18px 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.78);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045);
}

.case-detail-modal .modal-head h2 {
  font-size: 22px;
  line-height: 1.12;
}

.case-detail-modal .modal-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding: 14px 18px 20px;
}

.case-detail-hero {
  display: grid;
  place-items: center;
  min-height: 210px;
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--case-color) 46%, white 8%), transparent 48%),
    linear-gradient(135deg, color-mix(in srgb, var(--case-color) 38%, #090b10 62%), rgba(255, 255, 255, 0.04));
}

.case-detail-hero img {
  width: min(84%, 330px);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.34));
}

.case-purchase-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-purchase-summary > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(5, 7, 13, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  padding: 13px 14px;
}

.case-purchase-summary span,
.case-detail-copy {
  color: rgba(246, 247, 251, 0.66);
  font-size: 14px;
  line-height: 1.35;
}

.case-purchase-summary strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  font-size: 19px;
  line-height: 1;
}

.case-detail-copy {
  margin: -2px 0 0;
}

.case-buy-button {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  justify-content: center;
  padding-inline: 22px;
  font-size: 18px;
}

.case-detail-subtitle {
  margin: 4px 0 0;
  font-size: 18px;
}

.catalog-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.case-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.case-count strong {
  font-size: 54px;
  line-height: 0.95;
}

.case-count span {
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.operation-report {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.operation-report-success {
  border-color: rgba(255, 79, 195, 0.36);
  background: linear-gradient(135deg, rgba(255, 79, 195, 0.12), rgba(143, 92, 255, 0.1));
}

.operation-report-error {
  border-color: rgba(255, 93, 143, 0.48);
  background: rgba(255, 93, 143, 0.1);
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-card .profile-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.profile-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(135deg, #ff4fc3 0%, #b25cff 52%, #6b45ff 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 28px rgba(173, 72, 255, 0.22);
}

.profile-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.profile-item-phone {
  grid-column: 1 / -1;
}

.profile-item-phone .profile-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-label {
  color: var(--muted);
}

.profile-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.profile-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-value {
  min-width: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  margin-left: 7px;
  border-radius: 99px;
  background: var(--danger);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.topbar .btn[data-action="prizes"] {
  width: max-content;
  flex-shrink: 0;
}

.open-area {
  display: grid;
  place-items: center;
  min-height: 174px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
  padding: 48px 0 50px;
}

.case-slider {
  --slide-x: 0px;
  --slide-progress: 0;
  --label-opacity: 1;
  --track-width: 456px;
  --track-glow: 0.2;
  --track-wide-glow: 0.1;
  --fill-glow: 0.26;
  position: relative;
  overflow: hidden;
  display: block;
  width: min(100%, 470px);
  height: 80px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(13, 7, 20, 0.96), rgba(2, 2, 8, 0.98));
  box-shadow:
    0 0 46px rgba(255, 79, 195, var(--track-glow)),
    0 0 120px rgba(143, 92, 255, var(--track-wide-glow)),
    0 22px 58px rgba(0, 0, 0, 0.5);
  color: var(--text);
  cursor: grab;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.case-slider::before {
  content: "";
  position: absolute;
  inset: 7px;
  right: auto;
  width: calc(var(--slide-x) + 92px);
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) 0%, #c45cff 52%, var(--accent-2) 100%);
  background-size: var(--track-width) 100%;
  background-position: 0 0;
  box-shadow:
    0 0 34px rgba(255, 79, 195, var(--fill-glow)),
    0 0 82px rgba(143, 92, 255, var(--track-wide-glow));
  opacity: 1;
  transform: none;
  z-index: 2;
}

.case-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.1) 35%, transparent 53%);
  transform: translateX(-100%);
  animation: slider-shine 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

.case-slider-thumb {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 92px;
  height: 66px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) 0%, #c45cff 52%, var(--accent-2) 100%);
  background-size: var(--track-width) 100%;
  background-position: calc(var(--slide-x) * -1) 0;
  box-shadow: none;
  transform: translateX(var(--slide-x));
  transition: transform 220ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.case-slider-chevrons {
  position: relative;
  display: block;
  width: 36px;
  height: 26px;
  font-size: 0;
  transform: translateX(-5px);
}

.case-slider-chevrons::before,
.case-slider-chevrons::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-top: 4px solid rgba(255, 255, 255, 0.88);
  border-right: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
}

.case-slider-chevrons::before {
  left: 2px;
}

.case-slider-chevrons::after {
  left: 15px;
}

.case-slider-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-left: 42px;
  color: rgba(255, 255, 255, 0.9);
  opacity: var(--label-opacity);
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.14);
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.case-slider:not(.is-disabled):hover {
  box-shadow:
    0 0 68px rgba(255, 79, 195, 0.44),
    0 0 132px rgba(143, 92, 255, 0.24),
    0 22px 58px rgba(0, 0, 0, 0.52);
}

.case-slider.is-dragging {
  cursor: grabbing;
}

.case-slider.is-dragging .case-slider-thumb {
  transition: none;
}

.case-slider.is-complete .case-slider-label {
  opacity: 0;
}

.case-slider.is-vibrating {
  animation: slider-vibrate 180ms linear both;
}

.case-slider.is-disabled {
  cursor: not-allowed;
  opacity: 0.54;
  filter: grayscale(0.35);
}

.case-slider.is-disabled::after,
.case-slider.is-disabled .case-slider-thumb {
  animation: none;
}

@keyframes slider-shine {
  0% {
    transform: translateX(-100%);
  }
  42%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes slider-vibrate {
  0%,
  100% {
    transform: translateX(0);
  }
  22% {
    transform: translateX(-2px);
  }
  45% {
    transform: translateX(2px);
  }
  68% {
    transform: translateX(-1px);
  }
}

.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.catalog-card,
.prize-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(5, 7, 13, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.catalog-card img,
.prize-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.catalog-card div,
.prize-card-body {
  padding: 8px;
}

.catalog-card div {
  display: grid;
  gap: 7px;
}

.catalog-card h3,
.prize-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.rarity-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 99px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rarity-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.rarity-common {
  color: #4aa8ff;
}

.rarity-uncommon {
  color: #9a6cff;
}

.rarity-rare {
  color: #ff5ecb;
}

.rarity-epic {
  color: #ff4f5f;
}

.rarity-legendary {
  color: #ffd43b;
}

.prize-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.54);
  height: var(--app-visible-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: max(14px, var(--app-safe-top)) 10px max(0px, var(--app-safe-bottom));
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  animation: code-backdrop-in 220ms ease both;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.drawer.is-closing {
  animation: code-backdrop-out 220ms ease both;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.54);
  height: var(--app-visible-height, 100dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(14px, var(--app-safe-top)) 14px max(14px, var(--app-safe-bottom));
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  animation: code-backdrop-in 220ms ease both;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.modal-backdrop.is-closing {
  animation: code-backdrop-out 220ms ease both;
}

.modal-panel {
  width: min(100%, 620px);
  max-height: calc(var(--app-visible-height, 100dvh) - 28px - var(--app-safe-top) - var(--app-safe-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.8);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    var(--shadow);
  -webkit-overflow-scrolling: touch;
  animation: code-sheet-in 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.modal-backdrop.is-closing .modal-panel {
  animation: code-sheet-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.8);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 14px;
}

.confirm-box {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid rgba(255, 93, 143, 0.38);
  border-radius: var(--radius);
  background: rgba(255, 93, 143, 0.08);
  padding: 12px;
}

.confirm-box span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.drawer-panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  height: min(84vh, calc(var(--app-visible-height, 100dvh) - var(--app-safe-top) - 12px));
  max-height: calc(var(--app-visible-height, 100dvh) - var(--app-safe-top) - 12px);
  margin: 0 auto;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 30px 30px 0 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.8);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    var(--shadow);
  -webkit-overflow-scrolling: touch;
  animation: code-sheet-in 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.drawer.is-closing .drawer-panel {
  animation: code-sheet-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
}

.drawer-head {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 18px 18px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.8);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  z-index: 2;
}

.drawer-head h2 {
  margin: 0;
  font-size: 18px;
}

.prize-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  height: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px max(18px, var(--app-safe-bottom));
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.prize-card {
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014)),
    rgba(5, 7, 13, 0.68);
  color: #fff;
  cursor: pointer;
  padding: 16px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 36px rgba(0, 0, 0, 0.2);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.prize-card:focus,
.prize-card:focus-visible {
  outline: none;
}

.prize-card:not(:disabled):active {
  transform: scale(0.985);
}

.prize-card.is-used {
  opacity: 0.62;
  cursor: default;
}

.prize-card img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(143, 92, 255, 0.12);
  object-fit: cover;
}

.prize-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.prize-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.prize-meta h3 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-meta p {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.46);
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-card-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.prize-card-tags .rarity-pill {
  padding: 4px 9px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.prize-status {
  justify-self: end;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  white-space: nowrap;
}

.prize-status.is-active {
  border: 1px solid rgba(33, 214, 103, 0.42);
  background: rgba(33, 214, 103, 0.14);
  color: #50f19b;
}

.roulette-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  height: var(--app-visible-height, 100dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(160deg, rgba(255, 79, 195, 0.22), transparent 36%),
    rgba(4, 7, 11, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: max(18px, var(--app-safe-top)) 18px max(18px, var(--app-safe-bottom));
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.roulette-box {
  width: min(100%, 820px);
  display: grid;
  gap: 18px;
  margin: auto;
  padding: 4px 0;
}

.roulette-title {
  text-align: center;
}

.roulette-title h2 {
  margin: 0;
  font-size: 28px;
}

.roulette-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.roulette-window {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: #090d14;
  height: 172px;
}

.roulette-window::before,
.roulette-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 3;
  pointer-events: none;
}

.roulette-window::before {
  left: 0;
  background: linear-gradient(90deg, #090d14, transparent);
}

.roulette-window::after {
  right: 0;
  background: linear-gradient(270deg, #090d14, transparent);
}

.roulette-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
}

.roulette-track {
  display: flex;
  gap: 10px;
  height: 100%;
  padding: 14px;
  transform: translateX(0);
  transition: transform 5200ms cubic-bezier(0.09, 0.72, 0.13, 1);
}

.roll-card {
  position: relative;
  flex: 0 0 132px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.roll-card img {
  width: 100%;
  height: 94px;
  object-fit: cover;
  display: block;
}

.roll-card span {
  display: block;
  padding: 8px;
  font-size: 12px;
  line-height: 1.15;
}

.result-rarity-common {
  --result-rarity-border: rgba(74, 168, 255, 0.5);
  --result-rarity-bg: rgba(74, 168, 255, 0.1);
  --result-rarity-color: #4aa8ff;
  --result-rarity-glow: rgba(74, 168, 255, 0.42);
}

.result-rarity-uncommon {
  --result-rarity-border: rgba(154, 108, 255, 0.52);
  --result-rarity-bg: rgba(154, 108, 255, 0.11);
  --result-rarity-color: #9a6cff;
  --result-rarity-glow: rgba(154, 108, 255, 0.44);
}

.result-rarity-rare {
  --result-rarity-border: rgba(255, 94, 203, 0.54);
  --result-rarity-bg: rgba(255, 94, 203, 0.11);
  --result-rarity-color: #ff5ecb;
  --result-rarity-glow: rgba(255, 94, 203, 0.44);
}

.result-rarity-epic {
  --result-rarity-border: rgba(255, 79, 95, 0.56);
  --result-rarity-bg: rgba(255, 79, 95, 0.12);
  --result-rarity-color: #ff4f5f;
  --result-rarity-glow: rgba(255, 79, 95, 0.46);
}

.result-rarity-legendary {
  --result-rarity-border: rgba(255, 212, 59, 0.6);
  --result-rarity-bg: rgba(255, 212, 59, 0.12);
  --result-rarity-color: #ffd43b;
  --result-rarity-glow: rgba(255, 212, 59, 0.48);
}

.roulette-screen.is-result-ready {
  place-items: center;
  overflow-y: auto;
}

.roulette-screen.is-result-ready .roulette-box {
  width: min(100%, 520px);
  max-height: calc(var(--app-visible-height, 100dvh) - 18px - var(--app-safe-top) - var(--app-safe-bottom));
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(12px, 2vh, 18px);
  overflow: visible;
  padding: 0;
}

.roulette-screen.is-result-ready .roulette-title {
  display: none;
}

.roulette-screen.is-result-ready .roulette-window {
  order: 2;
  height: clamp(78px, 13vh, 108px);
  border-radius: 12px;
  background: rgba(8, 13, 22, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.roulette-screen.is-result-ready .roulette-track {
  padding: 8px;
  transition: none;
}

.roulette-screen.is-result-ready .roulette-marker {
  background: var(--result-rarity-color, var(--accent));
  box-shadow: 0 0 18px var(--result-rarity-color, var(--accent));
}

.roulette-screen.is-result-ready .roll-card {
  flex-basis: clamp(82px, 20vw, 106px);
  background: rgba(255, 255, 255, 0.04);
}

.roulette-screen.is-result-ready .roll-card img {
  height: clamp(46px, 7.6vh, 62px);
}

.roulette-screen.is-result-ready .roll-card span {
  padding: 6px;
  font-size: 10px;
}

.roulette-screen.is-result-ready .roll-card.is-winner {
  box-shadow: 0 0 18px var(--result-rarity-glow, rgba(255, 79, 195, 0.4));
}

.roulette-screen.is-result-ready .roll-card.is-winner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 2px solid var(--result-rarity-color, var(--accent));
  border-radius: inherit;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.05),
    0 0 16px var(--result-rarity-glow, rgba(255, 79, 195, 0.4));
  pointer-events: none;
}

.roulette-screen.is-result-ready .result-card {
  order: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(96px, 1fr) auto auto;
  gap: clamp(12px, 2vh, 18px);
  align-items: center;
  justify-items: center;
  max-height: calc(var(--app-visible-height, 100dvh) - clamp(104px, 17vh, 138px) - 28px - var(--app-safe-top) - var(--app-safe-bottom));
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 clamp(8px, 2.4vw, 14px);
  color: var(--text);
  overflow: visible;
}

.roulette-screen.is-result-ready .result-card h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(25px, 8vw, 42px);
  line-height: 1;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.result-prize-frame {
  position: relative;
  isolation: isolate;
  width: min(100%, clamp(230px, 78vw, 390px));
  height: min(clamp(190px, 40vh, 390px), 100%);
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 0;
  outline: 2px solid var(--result-rarity-color, var(--accent));
  outline-offset: -2px;
  border-radius: clamp(18px, 5vw, 28px);
  background: rgba(255, 255, 255, 0.04);
  background:
    radial-gradient(circle at 28% 22%, color-mix(in srgb, var(--result-rarity-color, var(--accent)) 22%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--result-rarity-color, var(--accent)) 18%, rgba(255, 255, 255, 0.05)), rgba(255, 255, 255, 0.035));
  box-shadow:
    0 0 34px var(--result-rarity-glow, rgba(255, 79, 195, 0.4)),
    inset 0 0 34px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.result-prize-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 2px solid var(--result-rarity-color, var(--accent));
  border-radius: inherit;
  box-shadow:
    0 0 22px var(--result-rarity-glow, rgba(255, 79, 195, 0.4)),
    inset 0 0 18px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.result-prize-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.12) 18%, transparent 34%),
    radial-gradient(circle at 70% 72%, rgba(0, 0, 0, 0.2), transparent 45%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
}

.result-prize-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roulette-screen.is-result-ready .result-take-button {
  width: min(100%, 400px);
  min-height: clamp(50px, 8vh, 74px);
  border-radius: clamp(16px, 4vw, 22px);
  background: linear-gradient(135deg, #9d00d8 0%, #ff12d6 100%);
  box-shadow:
    0 16px 44px rgba(255, 18, 214, 0.28),
    0 8px 28px rgba(157, 0, 216, 0.26);
  font-size: clamp(18px, 5vw, 27px);
  font-weight: 900;
}

.roulette-screen.is-result-ready .result-hint {
  margin: 0;
  width: min(100%, 390px);
  color: rgba(246, 247, 251, 0.86);
  font-size: clamp(12px, 3.5vw, 16px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.short-webapp-viewport .roulette-screen.is-result-ready .roulette-box {
  gap: 10px;
}

.short-webapp-viewport .roulette-screen.is-result-ready .result-prize-frame {
  height: clamp(112px, 24vh, 210px);
}

.short-webapp-viewport .roulette-screen.is-result-ready .result-card {
  grid-template-rows: auto minmax(86px, 1fr) auto auto;
  gap: clamp(8px, 1.3vh, 12px);
  max-height: calc(var(--app-visible-height, 100dvh) - 88px - var(--app-safe-top) - var(--app-safe-bottom));
}

.short-webapp-viewport .roulette-screen.is-result-ready .roulette-window {
  height: clamp(68px, 11vh, 90px);
}

.short-webapp-viewport .roulette-screen.is-result-ready .result-card h2 {
  font-size: clamp(22px, 7vw, 32px);
}

.short-webapp-viewport .roulette-screen.is-result-ready .result-take-button {
  min-height: 46px;
  font-size: clamp(17px, 4.8vw, 22px);
}

.short-webapp-viewport .roulette-screen.is-result-ready .result-hint {
  font-size: clamp(11px, 3.2vw, 14px);
}

.code-sheet-backdrop {
  place-items: end center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.54);
  padding: 0 8px max(0px, var(--app-safe-bottom));
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  animation: code-backdrop-in 220ms ease both;
}

.code-sheet-backdrop.is-closing {
  animation: code-backdrop-out 220ms ease both;
}

.code-sheet {
  position: relative;
  display: grid;
  gap: clamp(9px, 1.55vh, 14px);
  width: min(100%, 520px);
  max-height: calc(var(--app-visible-height, 100dvh) - var(--app-safe-top) - 8px);
  margin: 0 auto;
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(circle at 75% 0%, color-mix(in srgb, var(--result-rarity-color, var(--accent)) 16%, transparent), transparent 36%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.84);
  overflow: hidden;
  padding: 28px 18px max(14px, calc(12px + var(--app-safe-bottom)));
  transform: translateY(var(--drag-offset, 0));
  transition: transform 180ms ease;
  animation: code-sheet-in 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
  touch-action: pan-y;
}

.code-sheet.is-dragging {
  transition: none;
}

.code-sheet-backdrop.is-closing .code-sheet {
  animation: code-sheet-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
}

.code-sheet-grabber {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 52px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transform: translateX(-50%);
}

.code-sheet-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  cursor: grab;
}

.code-sheet.is-dragging .code-sheet-head {
  cursor: grabbing;
}

.code-sheet-title {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.code-sheet-title h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(19px, 5.2vw, 25px);
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.code-sheet-meta .rarity-pill {
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.code-case-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-sheet-close {
  justify-self: end;
}

.code-prize-image {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 15px;
  background: color-mix(in srgb, var(--result-rarity-color, var(--accent)) 28%, #10131d);
  object-fit: cover;
}

.code-sheet-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(14px, 3.75vw, 17px);
  font-weight: 400;
  line-height: 1.25;
}

.code-qr-card {
  display: grid;
  justify-items: center;
  gap: clamp(9px, 1.45vh, 13px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  padding: clamp(13px, 2vh, 18px) 14px 14px;
  text-align: center;
}

.code-qr-head {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  align-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(13px, 3.55vw, 16px);
  line-height: 1.24;
}

.code-qr-icon {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 9px 0 / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 0 9px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 9px 9px / 5px 5px no-repeat,
    linear-gradient(currentColor 0 0) 14px 14px / 4px 4px no-repeat,
    linear-gradient(currentColor 0 0) 5px 14px / 4px 4px no-repeat;
}

.code-sheet .qr-image {
  width: min(44vw, 176px);
  height: min(44vw, 176px);
  border-radius: 20px;
  background: white;
  padding: 9px;
}

.code-sheet .code-value {
  display: flex;
  width: min(100%, 320px);
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.33);
  padding: 8px 12px;
  color: #fff;
  font-size: clamp(17px, 5.1vw, 24px);
  font-weight: 800;
  letter-spacing: 0.045em;
}

.bonus-sheet {
  gap: clamp(12px, 1.9vh, 16px);
}

.bonus-claim-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--result-rarity-color, var(--accent)) 16%, transparent), transparent 44%),
    rgba(255, 255, 255, 0.045);
  padding: 16px;
  text-align: center;
}

.bonus-claim-card span,
.bonus-claim-card small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  line-height: 1.25;
}

.bonus-claim-card strong {
  color: #fff;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.05;
}

.bonus-confirm-button {
  min-height: 50px;
  border-radius: 17px;
  font-size: 17px;
}

.code-copy-button {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
}

.code-copy-button::before,
.code-copy-button::after {
  position: absolute;
  content: "";
  border: 2px solid currentColor;
  border-radius: 5px;
}

.code-copy-button::before {
  inset: 7px 2px 2px 7px;
}

.code-copy-button::after {
  inset: 2px 7px 7px 2px;
}

.code-sheet-footer {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

@keyframes code-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes code-backdrop-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes code-sheet-in {
  from {
    transform: translateY(104%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes code-sheet-out {
  from {
    transform: translateY(var(--drag-offset, 0));
  }

  to {
    transform: translateY(104%);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 90;
  max-width: min(92vw, 520px);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  border: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 79, 195, 0.14), rgba(143, 92, 255, 0.12)),
    #111824;
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.busy-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  height: var(--app-visible-height, 100dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.54);
  padding: max(18px, var(--app-safe-top)) 18px max(18px, var(--app-safe-bottom));
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  animation: code-backdrop-in 220ms ease both;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.busy-backdrop.is-closing {
  animation: code-backdrop-out 200ms ease both;
}

.result-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  height: var(--app-visible-height, 100dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.54);
  padding: max(18px, var(--app-safe-top)) 18px max(18px, var(--app-safe-bottom));
  backdrop-filter: blur(14px) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  animation: code-backdrop-in 220ms ease both;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.result-backdrop.is-closing {
  animation: code-backdrop-out 220ms ease both;
}

.result-modal {
  width: min(100%, 430px);
  max-height: calc(var(--app-visible-height, 100dvh) - 36px - var(--app-safe-top) - var(--app-safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 79, 195, 0.16), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    var(--shadow);
  padding: 20px;
  text-align: center;
  -webkit-overflow-scrolling: touch;
  animation: code-sheet-in 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.result-backdrop.is-closing .result-modal,
.busy-backdrop.is-closing .busy-panel {
  animation: code-sheet-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(33, 214, 103, 0.16);
  color: var(--success);
  font-size: 34px;
  font-weight: 900;
}

.result-modal-error .result-icon {
  background: rgba(255, 93, 143, 0.16);
  color: var(--danger);
}

.result-modal-error {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 59, 79, 0.2),
    var(--shadow);
}

.result-modal h2 {
  margin: 0;
  font-size: 20px;
}

.result-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.busy-panel {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 79, 195, 0.16), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(34px) saturate(1.35);
  -webkit-backdrop-filter: blur(34px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    var(--shadow);
  padding: 16px;
  animation: code-sheet-in 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.busy-panel h2 {
  margin: 0;
  font-size: 17px;
}

.busy-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.busy-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  padding: 28px 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 14px;
  }

  .club-grid {
    grid-template-columns: 1fr;
  }

  .case-shop-grid {
    gap: 12px;
  }

  .inventory-case-tile {
    flex-basis: 70vw;
    min-height: 154px;
  }

  .shop-copy {
    font-size: 16px;
  }

  .case-summary,
  .result-card {
    grid-template-columns: 1fr;
  }

  .result-card img {
    width: 100%;
    max-height: 32dvh;
    object-fit: cover;
  }

  .catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prize-actions {
    justify-content: flex-end;
  }

  .button-row {
    flex-direction: column;
  }
}

@media (max-height: 700px) {
  .roulette-screen {
    place-items: start center;
  }

  .roulette-box {
    gap: 12px;
  }

  .roulette-title h2 {
    font-size: 22px;
  }

  .roulette-title p {
    margin-top: 3px;
  }

  .roulette-window {
    height: 148px;
  }

  .roll-card img {
    height: 74px;
  }

  .result-card {
    gap: 10px;
  }
}
