.image-tile {
  position: relative;
  width: 100%;
  max-width: var(--tile-max-width);
  aspect-ratio: 1;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sky);
  border: 1px solid rgba(23, 32, 42, 0.14);
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.06), 0 10px 28px rgba(23, 32, 42, 0.08);
  animation: image-rise 280ms ease both;
}

.page-tile {
  position: relative;
  width: 100%;
  max-width: var(--tile-max-width);
  flex: 0 0 auto;
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 32, 42, 0.14);
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.06), 0 10px 28px rgba(23, 32, 42, 0.08);
  animation: image-rise 280ms ease both;
}

.tile-close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.tile-close-button:hover {
  background: #fff;
}

.tile-close-button:focus-visible {
  outline: 3px solid rgba(47, 156, 107, 0.34);
  outline-offset: 2px;
}

.image-like-button {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.image-like-button:hover {
  background: #fff;
}

.image-like-button:focus-visible {
  outline: 3px solid rgba(47, 156, 107, 0.34);
  outline-offset: 2px;
}

.image-like-button:disabled {
  cursor: default;
}

.image-like-icon::before {
  content: "\2661";
  font-size: 17px;
  line-height: 1;
}

.image-like-button.is-liked .image-like-icon::before {
  content: "\2665";
  color: #d8335b;
}

.image-like-count {
  min-width: 1ch;
}

.page-tile h2,
.page-tile h3,
.page-tile p {
  margin: 0;
}

.page-tile h2 {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.page-lede {
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.page-section {
  margin-top: 20px;
}

.page-section h3 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-section p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.starter-tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  animation: none;
}

.starter-instructions {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(23, 32, 42, 0.1);
  background: rgba(219, 238, 255, 0.92);
}

.starter-instructions ol {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.28;
}

.starter-instructions li + li {
  margin-top: 5px;
}

.starter-instructions code {
  font: inherit;
  font-weight: 800;
  color: var(--rind);
}

.image-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--sky);
}

.image-progress {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #fff;
  font-size: clamp(42px, 12vw, 78px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 18px rgba(23, 32, 42, 0.62), 0 1px 2px rgba(23, 32, 42, 0.82);
  background: rgba(23, 32, 42, 0.18);
  pointer-events: none;
}

.image-reveal-fader {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 480ms ease;
}

.image-tile.is-reveal-black .image-reveal-fader {
  opacity: 1;
}

.popular-image-tile .popular-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 6px;
  max-height: 42%;
  padding: 36px 12px 12px;
  overflow: auto;
  background: linear-gradient(
    to top,
    rgba(23, 32, 42, 0.84),
    rgba(23, 32, 42, 0.56) 68%,
    rgba(23, 32, 42, 0)
  );
  color: #fff;
  scrollbar-width: none;
}

.popular-image-tile .popular-caption::-webkit-scrollbar {
  display: none;
}

.popular-image-tile.is-guessable {
  cursor: pointer;
}

.popular-image-tile.is-guessable:focus-visible {
  outline: 3px solid rgba(47, 156, 107, 0.42);
  outline-offset: 4px;
}

.popular-caption strong,
.popular-caption p {
  margin: 0;
}

.popular-caption strong {
  font-size: 14px;
  line-height: 1.1;
}

.popular-note,
.popular-reveal {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.3;
}

.popular-reveal {
  color: #fff;
  font-weight: 850;
}

.image-tile.is-pending img {
  filter: saturate(0.88) brightness(0.96);
}

.starter-tile .starter-tile-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
}

@keyframes image-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
