/* ==========================================================================
   DIVLAB — LAB SECTION 1 & TANGRAM STAGE (dvl-lab.css)
   Elementor Theme Builder Viewport-Lock + Exact Figma Tokens (#3A301E)
   ========================================================================== */

:root {
  --dvl-lab-bg: #fcfcfc;
  --dvl-font-dark: #3A301E;
  --dvl-font-light: rgba(58, 48, 30, 0.5);
  --dvl-grid-stroke: rgba(58, 48, 30, 0.08);
}

/* 1. Viewport Lock: Zero body scroll in Elementor Theme Builder */
html.dvl-lab-page,
html.dvl-lab-page body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  background-color: var(--dvl-lab-bg) !important;
  font-family: 'IBM Plex Mono', monospace, -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* 2. Theme Builder Header & Footer pinned at top and bottom without altering their internal paddings/margins */
header.elementor-location-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 100 !important;
  background: transparent !important;
  pointer-events: auto !important;
}

footer.elementor-location-footer,
[data-elementor-type="footer"] {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 100 !important;
  background: transparent !important;
  pointer-events: auto !important;
}

/* Standalone Mock Header & Footer for local lab-test.html only */
.mock-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 60px !important;
  z-index: 100 !important;
  background: transparent !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 clamp(20px, 4.2vw, 72px) !important;
  box-sizing: border-box !important;
}

.mock-footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 60px !important;
  z-index: 100 !important;
  background: transparent !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 clamp(20px, 4.2vw, 72px) !important;
  box-sizing: border-box !important;
}

/* 3. Main Stage Container */
.dvl-lab-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  background-color: var(--dvl-lab-bg);
  z-index: 1;
}

/* 4. Triangle Truss Background Grid (Figma Frame 2460) */
.dvl-lab-stage__grid-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.dvl-lab-stage__grid-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 5. Section 1: Hero & Ring Stage */
.dvl-lab-hero {
  position: absolute;
  inset: 0;
  padding: 0 clamp(20px, 4.2vw, 72px);
  box-sizing: border-box;
  overflow: hidden;
  z-index: 10;
  pointer-events: auto;
}

/* Primary Headline Layer: "Remember The Tangram Game?" (Initial top: 27vh) */
.dvl-lab-hero__headline {
  position: absolute;
  left: clamp(20px, 4.2vw, 72px);
  top: 27vh;
  transform-origin: top left;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  user-select: none;
  max-width: 100%;
  will-change: transform;
}

.dvl-lab-hero__line {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400; /* Regular */
  font-size: clamp(34px, 9.15vw, 184px);
  line-height: 1.12;
  letter-spacing: -0.1em;
  background: linear-gradient(90deg, var(--dvl-font-light) 0%, var(--dvl-font-dark) 66%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--dvl-font-dark);
  margin: 0;
  white-space: nowrap;
  pointer-events: auto;
  cursor: default; /* Non-clickable hover movement only */
  transform: translateX(0);
  /* Very gentle, smooth, slow transition for subtle hover */
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* Subtle, gentle hover nudge to the right */
.dvl-lab-hero__line:hover {
  transform: translateX(clamp(14px, 1.6vw, 24px));
}

/* Secondary Headline: "Let's Play" (Exact top: 50vh per Figma measurements) */
.dvl-lab-hero__play-headline {
  position: absolute;
  left: clamp(20px, 4.2vw, 72px);
  top: 50vh;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px);
  transform-origin: 0 0;
  will-change: transform, opacity;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dvl-lab-hero__play-text {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400; /* Regular */
  font-size: clamp(34px, 9.15vw, 184px);
  line-height: 1.12;
  letter-spacing: -0.1em;
  background: linear-gradient(90deg, var(--dvl-font-light) 0%, var(--dvl-font-dark) 66%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--dvl-font-dark);
  margin: 0;
  padding: 0 0.18em 0 0; /* Padding only on right for 'y' glyph, zero on left */
  white-space: nowrap;
  overflow: visible;
}

/* Tag under Let's Play: <LAB-BOX> */
.dvl-lab-hero__tag {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.12;
  letter-spacing: -0.06em;
  color: var(--dvl-font-light); /* Divlab font light: rgba(58, 48, 30, 0.5) */
  margin: 6px 0 0 0;
  padding: 0;
  text-align: left;
  /* Visual correction: optical alignment flush with Let's Play */
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  user-select: none;
}

.dvl-lab-hero__play-headline.is-docked .dvl-lab-hero__tag {
  opacity: 1;
  transform: translateY(0);
}

/* Foreground Huge Prism Ring Layer (Exact Match to Figma & media_1792149238438_0c0dfe95.jpg) */
.dvl-lab-hero__ring-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  perspective: 1600px;
  overflow: visible;
}

.dvl-lab-hero__ring-img,
.elementor .dvl-lab-hero__ring-img,
.elementor img.dvl-lab-hero__ring-img {
  position: absolute !important;
  left: -26vw !important;
  top: 11vh !important;
  width: clamp(1200px, 135vw, 2600px) !important;
  max-width: none !important;
  height: auto !important;
  object-fit: contain;
  filter: drop-shadow(0 25px 45px rgba(220, 150, 150, 0.18));
  opacity: 0.85;
  transform-style: preserve-3d;
  will-change: transform;
  transform-origin: 50% 50%;
}

/* Tablet & iPad Portrait */
@media (max-width: 1024px) and (orientation: portrait) {
  .dvl-lab-hero__ring-img,
  .elementor .dvl-lab-hero__ring-img,
  .elementor img.dvl-lab-hero__ring-img {
    left: -32vw !important;
    top: 13vh !important;
    width: clamp(900px, 165vw, 1700px) !important;
    max-width: none !important;
    transform-origin: 50% 50%;
  }
}

/* Mobile Portrait */
@media (max-width: 767px) {
  .dvl-lab-hero__ring-img,
  .elementor .dvl-lab-hero__ring-img,
  .elementor img.dvl-lab-hero__ring-img {
    left: -50vw !important;
    top: 14.5vh !important;
    width: clamp(650px, 200vw, 950px) !important;
    max-width: none !important;
    transform-origin: 50% 50%;
  }
}

/* ========================================================
   6. Section 2: Cards Carousel & Caption (Figma Frame 2465)
   ======================================================== */
.dvl-lab-carousel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  will-change: opacity, transform;
}

.dvl-lab-carousel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dvl-lab-carousel__track-wrap {
  position: relative;
  width: 100vw;
  max-width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  overflow: visible;
}

/* Navigation arrows - pushed towards screen edges matching Figma Frame 2465 */
.dvl-lab-stage .dvl-lab-carousel__arrow,
button.dvl-lab-carousel__arrow {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 16px !important;
  cursor: pointer !important;
  z-index: 35 !important;
  color: var(--dvl-font-dark) !important;
  opacity: 0.55 !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dvl-lab-stage .dvl-lab-carousel__arrow svg,
button.dvl-lab-carousel__arrow svg {
  display: block !important;
  width: 14px !important;
  height: 26px !important;
  stroke: var(--dvl-font-dark) !important;
  transition: transform 0.25s ease !important;
  pointer-events: none !important;
}

.dvl-lab-stage .dvl-lab-carousel__arrow:hover,
.dvl-lab-stage .dvl-lab-carousel__arrow:focus,
.dvl-lab-stage .dvl-lab-carousel__arrow:active,
button.dvl-lab-carousel__arrow:hover,
button.dvl-lab-carousel__arrow:focus,
button.dvl-lab-carousel__arrow:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--dvl-font-dark) !important;
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.15) !important;
}

.dvl-lab-carousel__arrow--prev {
  left: clamp(24px, 4.5vw, 86px) !important;
}

.dvl-lab-carousel__arrow--next {
  right: clamp(24px, 4.5vw, 86px) !important;
}

/* Cards track */
.dvl-lab-carousel__cards {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Diamond Card Element */
/* Unified base size: cards smoothly scale from 0.2 to 1.0 via continuous transform */
.dvl-lab-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(210px, 17.68vw, 340px);
  height: clamp(210px, 17.68vw, 340px);
  transform-origin: center center;
  cursor: pointer;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Diamond Background Shape (rotated 45 deg) */
.dvl-lab-card__shape {
  position: absolute;
  inset: 0;
  background: #E5E5E5; /* Light grey diamond background per Figma */
  border-radius: 12px;
  transform: rotate(45deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}

/* Card Silhouette Icon (un-rotated to stay upright) */
.dvl-lab-card__icon {
  position: relative;
  z-index: 2;
  width: 60%;
  height: 60%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.dvl-lab-card__icon svg,
.dvl-lab-card__icon img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Active center card highlights */
.dvl-lab-card[data-pos="0"] {
  z-index: 10;
  cursor: pointer;
}

.dvl-lab-card[data-pos="0"] .dvl-lab-card__shape {
  background: #DFDFDF;
  box-shadow: 0 10px 30px rgba(58, 48, 30, 0.12);
}

.dvl-lab-card[data-pos="0"]:hover .dvl-lab-card__shape {
  background: #D5D5D5;
  box-shadow: 0 14px 38px rgba(58, 48, 30, 0.18);
}

.dvl-lab-card[data-pos="-1"],
.dvl-lab-card[data-pos="1"] {
  z-index: 8;
}

.dvl-lab-card[data-pos="-2"],
.dvl-lab-card[data-pos="2"] {
  z-index: 6;
}

/* Hidden cards outside visible 5-card range */
.dvl-lab-card[data-hidden="true"] {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Cursor grabbing for drag / swipe gesture */
.dvl-lab-carousel__track-wrap {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}

.dvl-lab-carousel__track-wrap.is-dragging {
  cursor: grabbing !important;
}

/* Caption under center card */
.dvl-lab-carousel__caption {
  margin-top: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400; /* Regular */
  font-size: clamp(13px, 1.1vw, 18px);
  line-height: 1.12;
  letter-spacing: -0.1em;
  color: var(--dvl-font-dark);
  text-align: center;
  user-select: none;
}

/* Responsive adjustments for Tablet and Mobile */
@media (max-width: 1024px) and (orientation: portrait) {
  .dvl-lab-hero {
    padding: 0 clamp(20px, 4vw, 40px);
  }
  .dvl-lab-hero__headline {
    top: clamp(28vh, 32vh, 36vh);
  }
  .dvl-lab-hero__play-headline {
    top: 50vh;
  }
  .dvl-lab-hero__line,
  .dvl-lab-hero__play-text {
    font-size: clamp(30px, 8.2vw, 92px);
  }
  .dvl-lab-carousel__arrow {
    display: none !important;
  }
  .dvl-lab-carousel__caption {
    margin-top: 18px;
    font-size: 13px;
    padding: 0 16px;
  }
}

@media (max-width: 767px) {
  .dvl-lab-hero {
    padding: 0 16px;
  }
  .dvl-lab-hero__headline {
    top: clamp(23vh, 25vh, 28vh);
  }
  .dvl-lab-hero__play-headline {
    top: 50vh;
  }
  .dvl-lab-hero__line,
  .dvl-lab-hero__play-text {
    font-size: clamp(26px, 8.8vw, 70px);
  }
  .dvl-lab-hero__line:hover {
    transform: translateX(8px);
  }

  /* Mobile: Hide cluttering arrows on touch devices to favor swipe gesture */
  .dvl-lab-carousel__arrow {
    display: none !important;
  }

  .dvl-lab-carousel__caption {
    margin-top: 16px;
    font-size: 12px;
    padding: 0 16px;
  }
}

/* ========================================================
   7. Section 3: Tangram Game Stage (Figma Frames 2467-2474)
   ======================================================== */
.dvl-lab-game {
  position: absolute;
  inset: 0;
  display: none;
  visibility: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.dvl-lab-game.is-active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.dvl-lab-stage.is-game-playing .dvl-lab-hero__headline {
  opacity: 0 !important;
  pointer-events: none !important;
}

.dvl-lab-game:not(.is-active) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.dvl-lab-game:not(.is-active) * {
  pointer-events: none !important;
}

.dvl-lab-game__stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Center Silhouette & Board Container */
.dvl-lab-game__board {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Silhouette */
.dvl-lab-game__silhouette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.dvl-lab-game__silhouette svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.dvl-lab-game__silhouette svg path {
  stroke: none !important;
  fill: #1A1612 !important;
  transition: opacity 0.4s ease;
}

/* Game Pieces Layer */
.dvl-lab-game__pieces {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  z-index: 10;
}

/* Individual Piece Element */
.dvl-lab-piece {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, filter 0.25s ease;
  z-index: 15;
}

.dvl-lab-piece img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}

.dvl-lab-piece.is-dragging {
  cursor: grabbing !important;
  z-index: 90 !important;
  transition: none !important;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.26));
}

.dvl-lab-piece.is-snapped {
  z-index: 20;
  cursor: default;
}

/* Floating Hint Tooltip (Frame 2471) */
.dvl-lab-hint-tooltip {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 120;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.dvl-lab-hint-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dvl-lab-hint-pill {
  background: rgba(58, 48, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(12px, 1.1vw, 18px);
  line-height: 1.12;
  letter-spacing: -0.1em;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Bottom Game Caption & Win States (Frames 2469, 2474 / Lab12) */
.dvl-lab-game__caption {
  position: absolute;
  bottom: clamp(24px, 7.5vh, 72px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.12;
  letter-spacing: -0.1em;
  color: var(--dvl-font-dark);
  text-align: center;
  white-space: nowrap;
  z-index: 30;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dvl-lab-game__caption.is-solved {
  font-size: clamp(18px, 1.65vw, 24px);
}

.dvl-lab-stage .dvl-lab-game__try-btn,
button.dvl-lab-game__try-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  color: var(--dvl-font-dark) !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  text-transform: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dvl-lab-stage .dvl-lab-game__try-btn:hover,
.dvl-lab-stage .dvl-lab-game__try-btn:focus,
.dvl-lab-stage .dvl-lab-game__try-btn:active,
button.dvl-lab-game__try-btn:hover,
button.dvl-lab-game__try-btn:focus,
button.dvl-lab-game__try-btn:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--dvl-font-dark) !important;
  opacity: 0.65 !important;
  transform: translateX(4px) !important;
}

/* Back to Carousel button (Choose another card - matches carousel caption typography) */
.dvl-lab-stage .dvl-lab-game__back-btn,
button.dvl-lab-game__back-btn {
  position: absolute !important;
  top: clamp(80px, 11vh, 120px) !important;
  right: clamp(20px, 4.2vw, 72px) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-weight: 400 !important;
  font-size: clamp(13px, 1.1vw, 18px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.06em !important;
  color: var(--dvl-font-dark) !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 35 !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  user-select: none !important;
  text-transform: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dvl-lab-stage .dvl-lab-game__back-btn:hover,
.dvl-lab-stage .dvl-lab-game__back-btn:focus,
.dvl-lab-stage .dvl-lab-game__back-btn:active,
button.dvl-lab-game__back-btn:hover,
button.dvl-lab-game__back-btn:focus,
button.dvl-lab-game__back-btn:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--dvl-font-dark) !important;
  opacity: 0.65 !important;
  transform: translateX(-3px) !important;
}

/* Universal button reset to prevent any Elementor global button styles leaking in */
.dvl-lab-stage button,
.dvl-lab-stage button:hover,
.dvl-lab-stage button:focus,
.dvl-lab-stage button:active {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-radius: 0 !important;
  text-transform: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* ========================================================
   Mobile Landscape Mode Optimization
   Accommodates mobile landscape viewports (e.g. 360px - 450px height)
   Ensures Let's Play exits and ONLY the cards carousel is cleanly visible
   ======================================================== */
@media (max-height: 550px), (orientation: landscape) and (max-height: 620px) {
  /* Hide Let's Play headline when carousel is reached / docked in landscape */
  .dvl-lab-hero__play-headline.is-docked {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, -150px, 0) !important;
  }

  /* Center carousel cleanly with safe margins from header and footer */
  .dvl-lab-carousel {
    justify-content: center !important;
    padding-top: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
  }

  .dvl-lab-carousel__track-wrap {
    height: clamp(160px, 58vh, 250px) !important;
    max-height: 250px !important;
  }

  /* Scale diamond cards to fit vertically inside landscape viewport without clipping header/footer */
  .dvl-lab-card {
    width: clamp(105px, 26vh, 150px) !important;
    height: clamp(105px, 26vh, 150px) !important;
  }

  /* Compact caption under active card */
  .dvl-lab-carousel__caption {
    margin-top: 6px !important;
    font-size: 11px !important;
  }

  /* Ensure arrow buttons fit nicely without intruding on cards */
  .dvl-lab-carousel__arrow--prev {
    left: clamp(12px, 2.5vw, 28px) !important;
  }
  .dvl-lab-carousel__arrow--next {
    right: clamp(12px, 2.5vw, 28px) !important;
  }
  .dvl-lab-stage .dvl-lab-carousel__arrow,
  button.dvl-lab-carousel__arrow {
    padding: 8px !important;
  }

  /* Tangram game stage adjustments for landscape */
  .dvl-lab-game__header {
    top: 8px !important;
  }
  .dvl-lab-game__stage {
    max-height: 84vh !important;
  }
}