.screen-game.is-mines {
  min-height: calc(var(--tg-viewport-height, 100dvh) - var(--app-header-h));
  padding:
    16px
    var(--app-gutter)
    calc(20px + var(--tg-safe-bottom) + var(--tg-content-safe-bottom));
}

.mines-screen {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.mines-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mines-demo-slot {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mines-ladder,
.MineCell,
.mines-feed,
.mines-modal__card,
.mines-screen .mines-btn,
.mines-modal .mines-btn {
  isolation: isolate;
  backdrop-filter: blur(40px) saturate(120%);
  -webkit-backdrop-filter: blur(40px) saturate(120%);
}

.mines-ladder {
  display: flex;
  gap: 7px;
  width: 100%;
  height: 68px;
  margin: 4px 0 0;
}

.mines-ladder__item {
  position: relative;
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 68px;
  padding: 6px 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.45;
  box-shadow:
    inset 1px 1px 0 -0.5px #333,
    inset -1px -1px 0 -0.5px #262626,
    inset 1px 1px 0.5px -1px #fff,
    inset -1px -1px 0.5px -1px #fff,
    inset 0 0 3.5px rgba(255, 255, 255, 0.5);
}

.mines-ladder__item.is-current {
  border-width: 1.5px;
  border-color: #296eff;
  opacity: 1;
}

.mines-ladder__item.is-done {
  border-width: 1.5px;
  border-color: #42c96a;
  opacity: 1;
}

.mines-ladder__lottie {
  width: 28px;
  height: 28px;
  overflow: hidden;
}

.mines-ladder__lottie canvas,
.mines-ladder__lottie svg,
.mines-ladder__lottie img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.mines-ladder__lottie.is-nft-gift img {
  object-fit: cover;
  border-radius: 8px;
}

.mines-ladder__name {
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 600;
  line-height: 11px;
  white-space: nowrap;
}

.mines-ladder__val {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #ffbf32;
  font-size: 9px;
  font-weight: 600;
  line-height: 11px;
}

.stars-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.star-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.mines-ladder__val .star-icon {
  width: 10px;
  height: 10px;
}

.mines-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2px 0 0;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

.mines-hint[hidden] {
  display: none;
}

.mines-hint .star-icon {
  width: 12px;
  height: 12px;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 8px;
  width: 100%;
  margin: 4px 0 2px;
}

.MineCell {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.MineCell:disabled {
  cursor: default;
}

.MineCell:not(:disabled):active {
  transform: scale(0.96);
}

.MineCell.is-safe {
  border-color: rgba(31, 194, 126, 0.45);
  background: rgba(31, 194, 126, 0.22);
}

.MineCell.is-mine {
  border-color: rgba(243, 43, 43, 0.5);
  background: rgba(255, 41, 41, 0.22);
}

.MineCell.is-mine-dim {
  opacity: 0.55;
}

.MineCell--closed-symbol {
  color: rgba(255, 255, 255, 0.3);
  font-size: 22px;
  font-weight: 700;
}

.MineCell--image {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  pointer-events: none;
}

.MineCell.is-mine .MineCell--image {
  width: 32px;
  height: 32px;
}

.MineCell--image.is-nft-gift {
  object-fit: cover;
  border-radius: 10px;
}

.mines-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mines-attempts {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.mines-actions__note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.mines-btn {
  appearance: none;
  border: none;
  width: 100%;
  height: 52px;
  border-radius: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mines-btn--primary {
  background: #296eff;
}

.mines-btn--success {
  background: #2fbf6b;
}

.mines-btn--ghost {
  background: #ffffff14;
}

.mines-btn:active {
  filter: brightness(0.94);
}

.mines-btn:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.mines-btn .star-icon {
  width: 16px;
  height: 16px;
}

.mines-screen .mines-btn,
.mines-modal .mines-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  box-shadow:
    inset 1px 1px 0.5px -1px #fff,
    inset -1px -1px 0.5px -1px #fff,
    inset 0 0 3.5px rgba(255, 255, 255, 0.4);
}

.mines-screen .mines-btn--ghost,
.mines-modal .mines-btn--ghost {
  height: 46px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  line-height: 20px;
}

.mines-screen .mines-btn--ghost .star-icon,
.mines-modal .mines-btn--ghost .star-icon {
  width: 15px;
  height: 15px;
}

.mines-feed {
  margin-top: 0;
  flex: 1;
  min-height: 220px;
  max-height: none;
  padding: 10px 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
}

.mines-feed .rfeed__title {
  height: 20px;
  padding: 0 4px;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.mines-feed .rfeed__list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mines-feed .rfeed__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 6px 4px;
  background: transparent;
  border-radius: 0;
}

.mines-feed .rfeed__avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  object-fit: cover;
  background: #3a3a3a;
  flex-shrink: 0;
}

.mines-feed .rfeed__body {
  flex: 1;
  min-width: 0;
}

.mines-feed .rfeed__nick {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mines-feed .rfeed__prize {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.mines-feed .rfeed__prize-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.mines-feed .rfeed__prize-img--nft {
  object-fit: cover;
  border-radius: 8px;
}

.mines-feed .rfeed__prize-name {
  display: none;
}

.mines-feed .rfeed__empty {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

.mines-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.mines-modal[hidden] {
  display: none;
}

.mines-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.mines-modal__card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 32px, 318px);
  padding: 24px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.94);
  transform: translate(-50%, -50%);
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.mines-modal__lottie {
  width: 120px;
  height: 120px;
}

.mines-modal__lottie canvas,
.mines-modal__lottie svg,
.mines-modal__lottie img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.mines-modal__lottie.is-nft-gift img {
  object-fit: cover;
  border-radius: 24px;
}

.mines-modal__title {
  margin: 10px 0 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 27px;
  text-align: center;
}

.mines-modal__sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  line-height: 17px;
}

.mines-modal__sub .star-icon {
  width: 14px;
  height: 14px;
}

.mines-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}
