@font-face {
  font-family: "MC";
  src: url("minecraft.ttf") format("truetype");
  font-display: swap;
}

.mc-icon {
  position: relative;
  display: inline-block;
  flex: none;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.mc-icon.is-smooth { image-rendering: auto; }
.mc-icon > img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.mc-icon > img.is-head { image-rendering: auto; }
.mc-icon__glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("glint.png");
  background-size: 180% 180%;
  mix-blend-mode: plus-lighter;
  opacity: .55;
  -webkit-mask-image: var(--m);
  mask-image: var(--m);
  -webkit-mask-size: var(--ms);
  mask-size: var(--ms);
  -webkit-mask-position: var(--mp);
  mask-position: var(--mp);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: mc-glint 6s linear infinite;
}
.mc-icon__glint.is-img {
  -webkit-mask-image: none;
  mask-image: none;
  opacity: .35;
}
@keyframes mc-glint {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}
.mc-icon__letter {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: #3a4b57;
  color: #dfe9ef;
  font: 700 12px/1 var(--font, sans-serif);
  text-transform: uppercase;
}

.mc-slot {
  --slot: 40px;
  position: relative;
  width: var(--slot);
  height: var(--slot);
  display: grid;
  place-items: center;
  flex: none;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #ffffff;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.mc-slot.is-dark { background: #2a3a46; box-shadow: inset 2px 2px 0 #13202a, inset -2px -2px 0 #3d5363; }
.mc-slot.has-item { cursor: help; }
.mc-slot.has-item:hover::after, .mc-slot.has-item.is-active::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(255, 255, 255, .45);
  pointer-events: none;
}
.mc-slot.is-dark.has-item:hover::after, .mc-slot.is-dark.has-item.is-active::after { background: rgba(255, 255, 255, .16); }
.mc-slot:focus-visible { outline: 2px solid var(--accent, #00cbff); outline-offset: 1px; z-index: 1; }
.mc-slot__count {
  position: absolute;
  right: 1px;
  bottom: -1px;
  font: 16px/1 "MC", var(--font, sans-serif);
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  pointer-events: none;
}
.mc-slot__dur {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 4px;
  background: #000;
  pointer-events: none;
}
.mc-slot__dur > i { display: block; height: 2px; }
.mc-slot__ghost {
  position: absolute;
  inset: 10%;
  opacity: .9;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.mc-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 9), var(--slot, 40px));
  gap: 0;
  width: max-content;
}

.mc-tip {
  position: fixed;
  z-index: 200;
  max-width: min(420px, calc(100vw - 16px));
  padding: 6px 8px 4px;
  background: rgba(16, 0, 16, .95);
  border: 2px solid #34097a;
  outline: 2px solid rgba(16, 0, 16, .95);
  font: 16px/18px "MC", var(--font, sans-serif);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .1s, transform .12s;
  -webkit-font-smoothing: none;
}
.mc-tip.is-on { opacity: 1; transform: none; }
.mc-tip.is-pinned { pointer-events: auto; }
.mc-tip__line { display: block; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 2px 2px 0 color-mix(in srgb, currentColor 25%, #000); }
.mc-tip__line.is-first { margin-bottom: 4px; }
.mc-tip__line.is-i { font-style: italic; }
