.app-scroll.is-case {
  background: radial-gradient(100% 100%, #2f6fa8, #0c1f2e 100%);
}

.screen-game.is-case {
  padding:
    16px
    16px
    calc(20px + var(--tg-safe-bottom) + var(--tg-content-safe-bottom));
}

.case-screen {
  width: min(100%, 420px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.case-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.case-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.case-reel {
  position: relative;
  height: 128px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(180deg, rgba(12, 28, 64, 0.95) 0%, rgba(4, 10, 28, 0.98) 100%);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(34, 92, 213, 0.2);
}

.case-reel__fade {
  position: absolute;
  inset-block: 0;
  width: 56px;
  z-index: 20;
  pointer-events: none;
}

.case-reel__fade--left {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

.case-reel__fade--right {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

.case-reel__pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 30;
  width: 3px;
  transform: translateX(-50%);
  pointer-events: none;
}

.case-reel__pointer-line {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, #93c5fd 0%, #2563eb 50%, #93c5fd 100%);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.85);
}

.case-reel__pointer::before,
.case-reel__pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}

.case-reel__pointer::before {
  top: -1px;
  border-top: 9px solid #3b82f6;
}

.case-reel__pointer::after {
  bottom: -1px;
  border-bottom: 9px solid #3b82f6;
}

.case-reel__window {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.case-reel__track {
  display: flex;
  align-items: center;
  will-change: transform;
}

.case-slot {
  flex: 0 0 auto;
  height: 104px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(60, 60, 70, 0.35) 0%, rgba(16, 18, 28, 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-slot--bear {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.5) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.case-slot--rose {
  border-color: rgba(244, 114, 182, 0.5);
  background: linear-gradient(180deg, rgba(136, 19, 55, 0.45) 0%, rgba(40, 10, 25, 0.95) 100%);
}

.case-slot.is-winner {
  transform: scale(1.04);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.35);
  border-color: rgba(147, 197, 253, 0.8);
}

.case-slot__art {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.case-slot__lottie {
  width: 56px;
  height: 56px;
}

.case-slot__empty {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  position: relative;
}

.case-slot__empty::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) rotate(-35deg);
}

.case-slot__name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffffcc;
}

.case-result {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  min-height: 22px;
}

.case-result.is-ok {
  color: #7dffa8;
}

.case-result.is-miss {
  color: #ffffff88;
}

.case-open {
  width: 100%;
  margin-top: 4px;
}

.case-open:disabled {
  opacity: 0.45;
}

.case-attempts {
  text-align: center;
  margin: 4px 0 8px;
}

.case-attempts__line {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #ffffffb3;
}

.case-attempts__cd {
  margin: 4px 0 0;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  color: #ffffff66;
}

.case-buy {
  width: 100%;
  margin-top: 8px;
}

.case-feed {
  margin-top: 8px;
  flex: 1;
  min-height: 160px;
}

.case-screen .rfeed__list {
  max-height: min(42vh, 320px);
}
