.apps-library {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: clamp(12px, 1.4vw, 18px);
  border-radius: 20px;
  color: #f7f9fc;
  background:
    linear-gradient(135deg, rgba(255, 163, 92, 0.2), transparent 32%),
    radial-gradient(circle at bottom right, rgba(93, 166, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #10192b 0%, #0a1020 100%);
  overflow: hidden;
}

.apps-library__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.apps-library__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.apps-library__title strong {
  font-size: clamp(18px, 2vw, 24px);
}

.apps-library__title span {
  font-size: 12px;
  color: rgba(247, 249, 252, 0.68);
}

.apps-library__shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  align-content: start;
}

.apps-library__card {
  display: grid;
  justify-items: start;
  align-content: end;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.apps-library__card--puzzle {
  background:
    linear-gradient(180deg, rgba(255, 167, 86, 0.24), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--photoprism {
  background:
    linear-gradient(180deg, rgba(228, 177, 95, 0.24), rgba(94, 165, 255, 0.12)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--reader {
  background:
    linear-gradient(180deg, rgba(96, 219, 255, 0.26), rgba(59, 118, 255, 0.16)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--baseball-ticket-bay {
  background:
    linear-gradient(180deg, rgba(255, 128, 82, 0.3), rgba(78, 132, 255, 0.14)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--beat {
  background:
    linear-gradient(180deg, rgba(127, 114, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.apps-library__card--tetris {
  background:
    linear-gradient(180deg, rgba(255, 212, 84, 0.24), rgba(255, 119, 82, 0.12)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--template1 {
  background:
    linear-gradient(180deg, rgba(113, 184, 255, 0.24), rgba(96, 138, 255, 0.16)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--the-quest {
  background:
    linear-gradient(180deg, rgba(255, 201, 112, 0.24), rgba(104, 198, 255, 0.14)),
    rgba(255, 255, 255, 0.06);
}

.apps-library__card--sticker {
  background:
    linear-gradient(180deg, rgba(255, 95, 149, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.apps-library__card--launch {
  background:
    linear-gradient(180deg, rgba(94, 183, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.apps-library__card--arcade {
  background:
    linear-gradient(180deg, rgba(255, 115, 92, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.apps-library__card--vault {
  background:
    linear-gradient(180deg, rgba(96, 255, 194, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.apps-library__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.apps-library__card strong {
  font-size: 16px;
  line-height: 1.1;
}

.apps-library__meta {
  font-size: 12px;
  color: rgba(247, 249, 252, 0.72);
}

.apps-library__card:disabled {
  opacity: 0.72;
  cursor: default;
}

@media (max-width: 960px) {
  .apps-library__shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .apps-library {
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  .apps-library__topbar .ant-tag {
    font-size: 11px;
    padding-inline: 8px;
  }

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

  .apps-library__card {
    min-height: 78px;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 12px;
  }

  .apps-library__title strong {
    font-size: 18px;
  }

  .apps-library__icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 13px;
  }

  .apps-library__card strong {
    font-size: 12px;
  }

  .apps-library__meta {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .apps-library__shelf,
  .apps-library__shelf--compact {
    gap: 6px;
  }

  .apps-library__card {
    min-height: 72px;
    padding: 8px 7px;
  }

  .apps-library__icon {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}
