.kxm-actions {
  margin: 18px 0 20px;
  display: grid;
  grid-template-columns: max-content max-content max-content;
  gap: 8px;
  align-items: center;
  justify-content: start;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.kxm-popularity-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #444;
  white-space: nowrap;
}


.kxm-action {
  box-sizing: border-box;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #b8b8b8;
  border-radius: 9px;
  background: #fff;
  color: #222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .08s ease;
}

.kxm-action:hover,
.kxm-action:focus-visible {
  border-color: #666;
  background: #f5f5f5;
  color: #111;
}

.kxm-action:active {
  transform: translateY(1px);
}

.kxm-favorite-button.is-active {
  background: #222;
  border-color: #222;
  color: #fff;
}

.kxm-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.kxm-favorite-button.is-active .kxm-icon path {
  fill: currentColor;
}


.kxm-toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  z-index: 999999;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 20, 20, .94);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .24);
  transition: opacity .18s ease, transform .18s ease;
}

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

.kxm-mylist {
  margin: 12px 0 28px;
}

.kxm-mylist-guide {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #555;
}

.kxm-mylist-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.kxm-count {
  font-size: 13px;
  font-weight: 700;
}

.kxm-clear {
  appearance: none;
  border: 1px solid #bbb;
  border-radius: 7px;
  background: #fff;
  color: #444;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

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

.kxm-card {
  position: relative;
  min-width: 0;
}

.kxm-card-link {
  display: block;
  text-decoration: none !important;
}

.kxm-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  background: #eee;
}

.kxm-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kxm-no-thumb {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 11px;
  letter-spacing: .04em;
}

.kxm-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .94);
  background: rgba(0, 0, 0, .58);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

.kxm-play-badge::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
}

.kxm-remove {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .64);
  color: #fff;
  font-size: 21px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
}

.kxm-empty {
  margin: 28px 0;
  text-align: center;
  color: #777;
  font-size: 14px;
}

@media (min-width: 600px) {
  .kxm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .kxm-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .kxm-action {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
  }

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


@media (max-width: 420px) {
  .kxm-actions {
    gap: 5px;
  }

  .kxm-action {
    min-height: 42px;
    padding: 8px 7px;
    font-size: 12px;
    gap: 4px;
  }

  .kxm-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .kxm-popularity-count {
    min-width: 1.2em;
    font-size: 13px;
  }
}
