.lab-home {
  padding-block: 0 64px;
  color: #142759;
}

.lab-banner {
  position: relative;
  isolation: isolate;
  border-radius: 0;
  min-height: clamp(220px, 15vw, 320px);
  padding: 32px 36px 54px;
}

.lab-banner h1 {
  font: 700 clamp(24px, 3vw, 42px)/1.3 var(--sans);
  letter-spacing: 0.02em;
}

.lab-banner h1 span {
  font-size: 0.78em;
}

.lab-banner p {
  margin-top: 12px;
  color: #435e7d;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.lab-banner::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background: url('/assets/play-lab-reference-v2.d2515f51bb7b.webp') center 59% / 100% auto no-repeat;
  mask-image: linear-gradient(#000 0%, #000 66%, #000b 80%, transparent 100%);
  pointer-events: none;
}

.lab-featured {
  position: relative;
  z-index: 1;
  margin-top: -30px;
  padding: 18px;
  border: 3px solid #fff;
  border-radius: 28px;
  background: #f6f9ffdc;
  box-shadow: 0 8px 28px #87bce62b;
}

.lab-section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.lab-section-heading h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

.lab-section-heading p {
  color: #61738e;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

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

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lab-games {
  margin-top: 28px;
}

.lab-games .channel-filters {
  margin-left: auto;
  gap: 6px;
  flex-wrap: wrap;
}

.lab-home .channel-filters button {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid #bdd6fb;
  color: #526783;
  font-size: 12px;
  font-weight: 500;
  background: #f6fbffba;
}

.lab-home .channel-filters button[aria-pressed='true'] {
  background: #ffe461;
  border-color: #fff3ab;
}

.lab-tile {
  --tile-theme: #d9f4f6;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  min-height: 202px;
  padding: 44px 22px 18px;
  border: 3px solid white;
  border-radius: 24px;
  background: linear-gradient(120deg, #fff, #f3f9ff);
  box-shadow: 0 6px 14px #70b5e42b;
  color: #142759;
}

.lab-tile[data-scenery='mint'] {
  --tile-theme: #d9f4f6;
  --wave-soft: #d9f2f7;
  --wave-strong: #bce8ec;
}

.lab-tile[data-scenery='violet'] {
  --tile-theme: #e5dcff;
  --wave-soft: #e2ddfc;
  --wave-strong: #cec3f3;
}

.lab-tile[data-scenery='peach'] {
  --tile-theme: #ffe1cf;
  --wave-soft: #ffe4d2;
  --wave-strong: #ffd0b1;
}

.lab-tile::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 37% at 107% 109%, var(--wave-strong) 74%, transparent 75%),
    radial-gradient(ellipse 40% 28% at 70% 107%, var(--wave-soft) 74%, transparent 75%),
    radial-gradient(ellipse 29% 27% at 96% 85%, var(--wave-soft) 74%, transparent 75%);
  opacity: 0.7;
}

.lab-bubbles {
  position: absolute;
  z-index: -1;
  width: 19px;
  height: 19px;
  right: 6%;
  top: 31%;
  border: 1px solid #ffffffdb;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 25%, #fff 0 5%, #fff6 12%, transparent 45%);
  box-shadow:
    inset -2px -2px 3px #fff8,
    0 0 3px #b6d5e54d;
}

.lab-bubbles::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  top: 30px;
  left: -15px;
  border: 1px solid #ffffffdb;
  border-radius: 50%;
  box-shadow: inset -1px -1px 2px #fffa;
}

.lab-tile .lab-copy {
  position: relative;
  z-index: 2;
  width: 51%;
}

.lab-tile h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.lab-tile p {
  color: #52647f;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
  min-height: 44px;
}

.lab-label {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 18px;
  border-radius: 30px;
  padding: 3px 11px;
  background: var(--tile-theme);
  color: #52647f;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.lab-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 16px;
  margin-top: 10px;
  white-space: nowrap;
  border: 1px solid #a5b5dc;
  border-radius: 24px;
  background: #ffffffc9;
  color: #43618d;
  font-size: 12px;
  font-weight: 500;
}

.lab-cover {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 54%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

.lab-spotlight {
  min-height: 240px;
  padding: 52px 30px 20px;
  background: linear-gradient(120deg, #fff9, transparent), var(--tile-theme);
}

.lab-spotlight .lab-cover {
  width: 58%;
  height: 100%;
}

.lab-spotlight::before {
  background:
    radial-gradient(ellipse 54% 64% at 108% 108%, var(--wave-strong) 74%, transparent 75%),
    radial-gradient(ellipse 46% 48% at 64% 119%, var(--wave-soft) 74%, transparent 75%),
    radial-gradient(ellipse 38% 42% at 94% 72%, var(--wave-soft) 74%, transparent 75%),
    radial-gradient(ellipse 52% 52% at 59% 3%, #ffffff57 74%, transparent 75%);
  opacity: 1;
}

.lab-spotlight h3 {
  font-size: clamp(28px, 2.6vw, 36px);
}

.lab-spotlight .lab-label {
  top: 12px;
  left: 28px;
  color: #9b432b;
  background: #ffdbc9;
  font-size: 12px;
  font-weight: 600;
}

.lab-spotlight:nth-child(2) .lab-label {
  color: #7046a0;
  background: #e8d9fb;
}

.lab-spotlight .lab-action {
  min-height: 44px;
  padding-inline: 24px;
  font-size: 14px;
  font-weight: 600;
  color: #253d68;
  background: linear-gradient(#fff487, #ffda3e);
  border-color: #ffe886;
  box-shadow: 0 3px 0 #f5bd36;
}
@media (hover: hover) and (pointer: fine) {
  .lab-tile:is(a):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #65a3d642;
  }
}
.lab-tile:focus-visible {
  outline: 3px solid #3a65cc;
  outline-offset: 3px;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .lab-banner {
    padding: 28px 8px 54px;
    min-height: 194px;
  }
  .lab-banner::before {
    background-image:
      linear-gradient(90deg, #dff5fff5, #dff5ffb0 55%, transparent),
      url('/assets/play-lab-reference-v2.d2515f51bb7b.webp');
    background-size:
      100% 100%,
      auto 210%;
    background-position:
      center,
      72% 59%;
  }
  .lab-banner p {
    font-size: 13px;
  }
  .lab-featured {
    padding: 12px;
    border-radius: 22px;
  }
  .lab-featured-grid,
  .lab-grid {
    grid-template-columns: 1fr;
  }
  .lab-section-heading {
    gap: 8px;
  }
  .lab-section-heading h2 {
    font-size: 21px;
  }
  .lab-section-heading p {
    width: 100%;
  }
  .lab-games .channel-filters {
    margin-left: 0;
  }
  .lab-home .channel-filters button {
    min-height: 44px;
  }
  .lab-tile {
    min-height: 200px;
  }
  .lab-spotlight {
    min-height: 224px;
    padding-left: 20px;
  }
  .lab-spotlight .lab-action {
    padding-inline: 16px;
  }
  .lab-tile .lab-copy {
    width: 56%;
  }
  .lab-tile h3 {
    font-size: 20px;
  }
  .lab-spotlight h3 {
    font-size: 26px;
  }
  .lab-action {
    min-height: 44px;
  }
}

html[data-theme='night'] .lab-home {
  color: #e4efff;
}

html[data-theme='night'] .lab-featured {
  background: #142d4fe8;
  border-color: #4d6f94;
}

html[data-theme='night'] .lab-section-heading p {
  color: #bed0e7;
}

.lab-tile[data-art='fish-difference'] .lab-cover {
  width: 100%;
  right: 0;
  object-fit: contain;
}

.lab-tile[data-art='fish-detective'] .lab-cover {
  width: 44%;
  right: 4px;
}

.lab-tile[data-art='fish-detective'] .lab-copy {
  width: 50%;
}

.lab-tile[data-art='duel'] .lab-cover {
  width: 100%;
}

.lab-tile[data-art='strongest-brain'] .lab-cover {
  width: 80%;
}

.lab-tile[data-art='fish-lineup'] .lab-cover {
  width: 100%;
  object-position: right center;
}

@media (max-width: 767px) {
  .lab-tile[data-art='fish-lineup'] .lab-cover {
    width: 84%;
  }
}

.lab-tile[data-art='mahjong'] .lab-cover {
  width: 100%;
  right: 0;
  object-fit: contain;
  object-position: right center;
}
