.number-cards {
  container-type: inline-size;
  padding: 20px;
  border-radius: 16px;
  background: #0c2847;
  color: #f6e7bb;
  background-position: center;
  background-size: cover;
  min-width: 0;
}
@container (max-width: 520px) {
  .number-cards .number-card-list {
    grid-template-columns: 1fr;
  }
}
.number-cards > header,
.number-card > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.number-cards h3 {
  margin: 0 0 10px;
}
.number-cards p {
  line-height: 1.8;
}
.number-cards details {
  padding: 8px 0;
}
.number-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 15px;
}
.number-card {
  padding: 10px;
  border: 1px solid #87b5c7;
  border-radius: 10px;
  background: #112c49cc;
  min-width: 0;
}
.number-card > header {
  font-size: 13px;
  margin-bottom: 8px;
}
.number-card-grid {
  display: grid;
  gap: 4px;
}
.card-number {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 5px;
  background: #78a9be center/100% 100%;
  color: #10263a;
  font-size: clamp(14px, 2.3vw, 24px);
  font-weight: 800;
}
.card-number.marked {
  background-color: #ffb473;
  color: #6c1304;
}
.card-number.lucky {
  outline: 2px solid #ffdd49;
  outline-offset: -2px;
}
.card-number small {
  position: absolute;
  right: 2px;
  top: 0;
  font-size: 10px;
  color: #673b00;
}
.pattern-win {
  filter: drop-shadow(0 0 4px #ffe26b);
}
.lucky-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 2px;
  color: #543300;
  background: #ffe590 center/contain no-repeat;
  border-radius: 50%;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.number-cards button {
  color: #102f40;
  background: #f0d28d;
  border: 1px solid #f7e4aa;
  border-radius: 7px;
  padding: 10px;
  cursor: pointer;
}
.number-cards button:disabled {
  cursor: default;
  opacity: 0.55;
}
.card-chests {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.card-chest {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.card-chest img {
  width: 100%;
  height: 80px;
  object-fit: contain;
}
.number-cards .card-chest.opened {
  opacity: 1;
  background: #678b9c;
}
.card-settlement {
  border-top: 1px solid #86a6b3;
  padding-top: 10px;
}
@media (max-width: 600px) {
  .number-cards {
    padding: 12px;
  }
  .number-card-list {
    grid-template-columns: 1fr;
  }
  .card-chests {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-chest img {
    height: 60px;
  }
}
