/* ==========================================================================
   Gumtti Block Challenge — ad landing page section
   Mobile-first. Tint palette matches Gumtti (coral/sky/sun/mint/lilac/peach).
   ========================================================================== */

.gb-wrap {
  overflow-x: clip;
}

/* ---- tint palette (shared with Gumtti vault sections) ---- */
.gb-tint--coral { --gb-tint: #ff6b4a; --gb-tint-soft: #ffe3da; --gb-tint-ink: #7a2410; }
.gb-tint--sky   { --gb-tint: #35a7e0; --gb-tint-soft: #d8f0fc; --gb-tint-ink: #0c5883; }
.gb-tint--sun   { --gb-tint: #ffc53d; --gb-tint-soft: #fff2cf; --gb-tint-ink: #6b4b00; }
.gb-tint--mint  { --gb-tint: #2fbf8f; --gb-tint-soft: #d7f5ea; --gb-tint-ink: #0b5c42; }
.gb-tint--lilac { --gb-tint: #9b7bd8; --gb-tint-soft: #ece3fb; --gb-tint-ink: #4a2d85; }
.gb-tint--peach { --gb-tint: #f7a072; --gb-tint-soft: #fde9dd; --gb-tint-ink: #7d3c12; }

/* ---------------------------------------------------------------------------
   Ad-to-game strip
   --------------------------------------------------------------------------- */
.gb-ad {
  margin: 0;
  padding: 0.8rem 1.6rem;
  background: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.gb-hero {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  padding: 2.4rem 1.6rem 1.6rem;
}

/* Once the game is live, collapse the big hero so the whole
   play area fits on one screen (no scrolling) */
.gb-wrap.is-playing .gb-hero {
  display: none;
}

.gb-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: var(--gb-tint-soft);
  color: var(--gb-tint-ink);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gb-hero__title {
  margin: 0;
  font-weight: var(--font-heading-weight);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.gb-hero__sub {
  margin: 0;
  max-width: 46rem;
  font-size: 1.7rem;
  line-height: 1.6;
  color: rgba(var(--color-foreground), 0.78);
}

.gb-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

.gb-hero__note {
  margin: 0;
  font-size: 1.3rem;
  color: rgba(var(--color-foreground), 0.62);
}

.gb-hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.6rem;
  margin-top: 0.4rem;
}

.gb-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(var(--color-foreground), 0.8);
}

/* ---------------------------------------------------------------------------
   Intro card / Play Lab Launchpad (Overlay on Game Pad)
   --------------------------------------------------------------------------- */
.gb-intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background: rgba(14, 18, 28, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 2.2rem;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gb-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gb-intro__card {
  width: 100%;
  max-width: 48rem;
  margin: auto;
  padding: 2.4rem 2rem 2.2rem;
  border-radius: 2.4rem;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1.6rem 4.4rem rgba(0, 0, 0, 0.4);
  text-align: center;
  color: #1e293b;
  animation: gb-card-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gb-card-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gb-intro__badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.gb-intro__badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(var(--color-foreground), 0.06);
  color: rgba(var(--color-foreground), 0.82);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gb-intro__badge-pill--accent {
  background: #ffe3da;
  color: #c43f21;
}

.gb-intro h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: -0.01em;
}

.gb-intro p {
  margin: 0 0 1.6rem;
  font-size: 1.5rem;
  color: rgba(var(--color-foreground), 0.75);
}

.gb-intro__sub {
  margin: 0 0 1.4rem !important;
  line-height: 1.5;
}

/* 3-step intuitive how-to-play guide */
.gb-intro__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.6rem auto 2.2rem;
  max-width: 48rem;
}

.gb-intro__step {
  position: relative;
  flex: 1;
  background: rgba(var(--color-foreground), 0.04);
  border: 1px solid rgba(var(--color-foreground), 0.08);
  border-radius: 1.4rem;
  padding: 1.2rem 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.gb-intro__step-num {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--gb-tint, #ff6b4a);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.gb-intro__step-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-top: 0.2rem;
}

.gb-intro__step-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(var(--color-foreground), 0.85);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.gb-intro__step-arrow {
  font-size: 1.4rem;
  color: rgba(var(--color-foreground), 0.3);
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .gb-intro__steps {
    gap: 0.4rem;
  }
  .gb-intro__step {
    padding: 1rem 0.4rem 0.7rem;
  }
  .gb-intro__step-text {
    font-size: 1rem;
  }
  .gb-intro__step-icon {
    font-size: 1.8rem;
  }
}

.gb-btn-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em;
  padding: 1.3rem 3.4rem !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff7a5c 0%, #ff522b 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 0 #cc3a18, 0 10px 24px rgba(255, 107, 74, 0.4) !important;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}

.gb-btn-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #cc3a18, 0 12px 28px rgba(255, 107, 74, 0.48) !important;
}

.gb-btn-launch:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #cc3a18, 0 4px 10px rgba(255, 107, 74, 0.3) !important;
}

.gb-btn-launch__icon {
  font-size: 1.8rem;
}

.gb-intro__hint {
  margin: 1.4rem 0 0 !important;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--color-foreground), 0.55) !important;
}

/* ---------------------------------------------------------------------------
   Tip banner
   --------------------------------------------------------------------------- */
.gb-tip {
  max-width: 72rem;
  margin: 0.4rem auto 1.2rem;
  padding: 0.6rem 1.6rem;
  text-align: center;
  font-size: 1.3rem;
  color: rgba(var(--color-foreground), 0.72);
  background: rgba(var(--color-foreground), 0.04);
  border-radius: 999px;
  border: 1px dashed rgba(var(--color-foreground), 0.12);
}

.gb-tip b {
  color: var(--gb-tint-ink);
}

.gb-wrap.is-playing .gb-intro,
.gb-wrap.is-playing .gb-tip {
  display: none;
}

/* ---------------------------------------------------------------------------
   HUD (Timer, Score, Height, Best)
   --------------------------------------------------------------------------- */
.gb-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: nowrap;
  max-width: 76rem;
  margin: 0 auto 1.2rem;
  padding: 0 1rem;
}

.gb-hud__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  padding: 0.8rem 0.6rem 0.9rem;
  border-radius: 1.6rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  border: 2px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gb-hud__icon {
  font-size: 1.6rem;
  line-height: 1;
}

.gb-hud__label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--color-foreground), 0.6);
  white-space: nowrap;
}

.gb-hud__value {
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 2.8rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gb-hud__item--timer {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffcf0, #fff7d6);
}
.gb-hud__item--timer .gb-hud__value {
  color: #b45309;
}

.gb-hud__item--score {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7f2, #ffeedd);
}
.gb-hud__item--score .gb-hud__value {
  color: #ea580c;
}

.gb-hud__item--height {
  border-color: #7dd3fc;
  background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
}
.gb-hud__item--height .gb-hud__value {
  color: #0284c7;
}

.gb-hud__item--best {
  border-color: #d8b4fe;
  background: linear-gradient(180deg, #faf5ff, #f3e8ff);
}
.gb-hud__item--best .gb-hud__value {
  color: #7e22ce;
}

.gb-hud__value.is-pop {
  animation: gb-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gb-hud__value--timer.is-low {
  color: #dc2626 !important;
  animation: gb-timer-low 0.65s ease-in-out infinite;
}

@keyframes gb-timer-low {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Playful shout feedback banner */
.gb-shout {
  min-height: 2.2rem;
  margin: 0.2rem auto 0.6rem;
  max-width: 70rem;
  padding: 0 1.2rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ff6b4a;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.gb-shout.is-show {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------------------
   Play Stage Chassis & Console Bar
   --------------------------------------------------------------------------- */
.gb-stage {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0;
  border-radius: 2.4rem;
  background: #191e2b;
  border: 3px solid #293247;
  box-shadow: 0 1.6rem 4.4rem rgba(10, 16, 28, 0.28), 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.gb-console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(180deg, #252b3d 0%, #1c2130 100%);
  border-bottom: 2px solid #293247;
  color: #e2e8f0;
}

.gb-console-bar__status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.gb-console-bar__led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71, 0 0 2px #ffffff;
  animation: gb-led-glow 2.5s ease-in-out infinite;
}

@keyframes gb-led-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.gb-console-bar__title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
}

.gb-console-sound {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
  position: relative;
  z-index: 10;
}

.gb-console-sound:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.36);
  color: #ffffff;
}

.gb-console-sound.is-active {
  background: rgba(46, 204, 113, 0.22);
  border-color: #2ecc71;
  color: #2ecc71;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
}

/* ---------------------------------------------------------------------------
   Board & Interactive Column Guide
   --------------------------------------------------------------------------- */
.gb-play {
  position: relative;
  display: block;
  padding: 1.2rem 1.2rem 1.6rem;
  min-height: 52rem;
}

.gb-aside {
  display: block;
}

.gb-board-wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0;
}

.gb-board {
  --gb-cell: 40px;
  --gb-rows: 14;
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: calc(var(--gb-cell) * var(--gb-rows));
  border-radius: 1.8rem;
  border: 2px solid #333d54;
  overflow: hidden;
  background-color: #aee0f8;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: var(--gb-cell) var(--gb-cell);
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.2);
  touch-action: pan-y;
  overscroll-behavior: auto;
}

/* Interactive drop beam hover guide */
.gb-col-guide {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 107, 74, 0.26) 0%, rgba(255, 107, 74, 0.08) 100%);
  border-left: 2px dashed rgba(255, 107, 74, 0.65);
  border-right: 2px dashed rgba(255, 107, 74, 0.65);
  box-shadow: 0 0 16px rgba(255, 107, 74, 0.22);
  z-index: 2;
  transition: left 0.06s ease, width 0.06s ease;
}

/* Toy brick green baseplate on the bottom row */
.gb-board__baseplate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--gb-cell, 40px);
  background: linear-gradient(180deg, #27ae60 0%, #1e8449 100%);
  border-top: 3px solid #145a32;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 3;
}

.gb-board__baseplate::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background-image: radial-gradient(circle, #2ecc71 44%, transparent 48%);
  background-size: calc(var(--gb-cell, 40px) / 2) 6px;
}

#gumtti-block-game .gb-board.is-disabled {
  opacity: 0.7;
}

.gb-grid {
  position: absolute;
  inset: 0;
}

/* ---------------------------------------------------------------------------
   Blocks (Authentic 3D Toy Brick Style)
   --------------------------------------------------------------------------- */
.gb-block {
  position: absolute;
  display: block;
  box-sizing: border-box;
  border-radius: 4px;
  background: var(--gb-tint);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.28),
    inset 2px 0 0 rgba(255, 255, 255, 0.25),
    inset -2px 0 0 rgba(0, 0, 0, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.22);
  z-index: 4;
  transition: transform 0.12s ease;
}

.gb-block:empty {
  display: block;
}

/* 3D Toy Brick Stud Peg */
.gb-block::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  height: 52%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gb-tint);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.32),
    0 1.5px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 1;
}

.gb-block--placed {
  cursor: pointer;
  border-radius: 3px;
  transition: none;
}

.gb-block--placed.is-fresh {
  animation: gb-fall var(--gb-fall-ms, 0.3s) cubic-bezier(0.25, 0.85, 0.35, 1);
  transform-origin: center top;
}

@keyframes gb-fall {
  0% { transform: translateY(calc(var(--gb-fall-distance, 0px) * -1)); }
  100% { transform: translateY(0); }
}

.gb-block--selected {
  outline: 3px dashed #ffffff;
  outline-offset: -3px;
  z-index: 5;
}

.gb-block--ghost {
  opacity: 0.68;
  z-index: 5;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2.5px #ffffff, 0 0 10px rgba(255, 255, 255, 0.6);
  animation: gb-ghost-pulse 1.2s infinite alternate ease-in-out;
  transition: none;
}

@keyframes gb-ghost-pulse {
  0% { opacity: 0.55; }
  100% { opacity: 0.85; }
}

/* ---------------------------------------------------------------------------
   Tray & Collectible Mini Cards
   --------------------------------------------------------------------------- */
.gb-aside__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.2rem auto 0.8rem;
  padding: 0 0.8rem;
  max-width: 48rem;
  width: 100%;
  box-sizing: border-box;
}

.gb-aside__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
  user-select: none;
}

.gb-rotate-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid #ff7d60;
  background: linear-gradient(180deg, #ff6b4a 0%, #eb5230 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-shadow: 0 2.5px 0 #b33215, 0 4px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  line-height: 1;
  flex-shrink: 0;
}

.gb-rotate-small:hover {
  background: linear-gradient(180deg, #ff7e60 0%, #f25c3b 100%);
  box-shadow: 0 3px 0 #b33215, 0 6px 12px rgba(255, 107, 74, 0.35);
  transform: translateY(-1px);
}

.gb-rotate-small:active {
  transform: translateY(2px);
  box-shadow: 0 0.5px 0 #b33215, 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gb-rotate-small__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gb-rotate-small:hover .gb-rotate-small__icon {
  transform: rotate(45deg);
}

.gb-rotate-small:active .gb-rotate-small__icon {
  transform: rotate(90deg);
}

.gb-rotate-small__text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.gb-rotate-small__kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
}

.gb-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem 1.4rem;
  max-width: 48rem;
  margin: 0 auto;
}

.gb-tray__item {
  flex: 0 0 calc(25% - 0.6rem);
  width: calc(25% - 0.6rem);
  min-width: 6.6rem;
  max-width: 8.2rem;
  min-height: 6.2rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.6rem 0.3rem 0.5rem;
  border-radius: 1.4rem;
  border: 2px solid #2a3348;
  background: #171c28;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.gb-tray__item:hover {
  transform: translateY(-3px);
  border-color: #4a577a;
  background: #1f2638;
}

.gb-tray__item.is-active {
  border-color: #ffc53d;
  background: linear-gradient(180deg, #2d2d38 0%, #1e1e28 100%);
  box-shadow: 0 0 14px rgba(255, 197, 61, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.gb-tray__item.is-active .gb-tray__name {
  color: #ffc53d;
  font-weight: 800;
}

.gb-tray__item:focus-visible {
  outline: 3px solid #ffc53d;
  outline-offset: 2px;
}

.gb-tray__item:active {
  cursor: grabbing;
}

.gb-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4rem;
  overflow: visible;
}

.gb-mini__inner {
  position: relative;
  display: inline-block;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.gb-mini__cell {
  position: absolute;
  background: var(--gb-tint);
  border-radius: 2px;
  box-shadow:
    inset 0 -0.16em 0 rgba(0, 0, 0, 0.25),
    inset 0 0.16em 0 rgba(255, 255, 255, 0.45);
}

.gb-mini--rot1 {
  transform: rotate(90deg);
}

.gb-mini--rot2 {
  transform: rotate(180deg);
}

.gb-mini--rot3 {
  transform: rotate(270deg);
}

.gb-tray__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #94a3b8;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.2;
}

.gb-tray.gb-shake {
  animation: gb-shake 0.3s ease;
}

@keyframes gb-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-0.4rem); }
  75% { transform: translateX(0.4rem); }
}

/* ---------------------------------------------------------------------------
   Controls & 3D Arcade Buttons
   --------------------------------------------------------------------------- */
.gb-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 48rem;
  margin: 0.8rem auto 1.2rem;
  padding: 0 0.8rem;
}

.gb-arcade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.9rem 1.8rem;
  border-radius: 1.4rem;
  border: none;
  font-weight: 900;
  font-size: 1.35rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gb-arcade-btn--rotate {
  background: #ff6b4a;
  color: #ffffff;
  box-shadow: 0 5px 0 #c43f21, 0 8px 14px rgba(0, 0, 0, 0.3);
}

.gb-arcade-btn--rotate:hover {
  background: #ff7d60;
}

.gb-arcade-btn--rotate:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #c43f21, 0 3px 6px rgba(0, 0, 0, 0.2);
}

.gb-arcade-btn__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  padding: 0.1rem 0.5rem;
  font-weight: 800;
}

.gb-arcade-btn--play {
  background: #2fbf8f;
  color: #ffffff;
  box-shadow: 0 5px 0 #1b8563, 0 8px 14px rgba(0, 0, 0, 0.3);
  min-width: 20rem;
}

.gb-arcade-btn--play:hover {
  background: #39d4a0;
}

.gb-arcade-btn--play:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #1b8563, 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* ---------------------------------------------------------------------------
   Result Panel (Overlay in Center of Game Pad)
   --------------------------------------------------------------------------- */
.gb-result {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 25;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background: rgba(14, 18, 28, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 2.2rem;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gb-result.is-shown {
  display: flex;
  animation: gb-fade-in 0.3s ease;
}

@keyframes gb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gb-result__card {
  width: 100%;
  max-width: 48rem;
  margin: auto;
  padding: 2.4rem 2rem 2.6rem;
  border-radius: 2.4rem;
  background: linear-gradient(180deg, #fff7f2 0%, #ffffff 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1.8rem 4.6rem rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #1e293b;
  animation: gb-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gb-pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gb-result__title {
  margin: 0 0 0.4rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  font-weight: 900;
}

.gb-result__sub {
  margin: 0 0 1.8rem;
  font-size: 1.6rem;
  color: rgba(var(--color-foreground), 0.8);
}

.gb-result__trophy {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc53d, #ff9e6d);
  color: #4a2d00;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 18px rgba(255, 197, 61, 0.4);
  animation: gb-trophy 0.55s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes gb-trophy {
  from { transform: scale(0.4) rotate(-6deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.gb-result__stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.8rem;
}

.gb-result__stat {
  flex: 1 1 12rem;
  padding: 1.2rem 1.4rem;
  border-radius: 1.8rem;
  background: #ffffff;
  border: 2px solid rgba(var(--color-foreground), 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.gb-result__stat-icon {
  font-size: 2rem;
  line-height: 1;
}

.gb-result__stat b {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgb(var(--color-foreground));
}

.gb-result__stat--score b {
  color: #ff6b4a;
}

.gb-result__stat span {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--color-foreground), 0.6);
}

.gb-result__compare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 0 2.2rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gb-result__best,
.gb-result__current {
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  border: 2px solid rgba(var(--color-foreground), 0.12);
  background: #ffffff;
  color: rgba(var(--color-foreground), 0.8);
}

.gb-result__best b,
.gb-result__current b {
  font-variant-numeric: tabular-nums;
  margin-left: 0.4rem;
}

.gb-result__best b {
  color: #ea580c;
}

.gb-result__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gb-result__actions .button {
  width: 100%;
  max-width: 34rem;
}

.gb-btn-pop {
  border-radius: 999px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 18px rgba(255, 107, 74, 0.35);
}

.gb-btn-shop {
  border-radius: 999px !important;
  font-weight: 800 !important;
}

.gb-btn-shop--focus {
  background: linear-gradient(180deg, #ff6b4a 0%, #eb4d28 100%) !important;
  color: #ffffff !important;
  border: 2px solid #ff856b !important;
  box-shadow: 0 4px 0 #b33215, 0 8px 20px rgba(255, 107, 74, 0.42) !important;
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  padding: 1.1rem 2.2rem !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease !important;
}

.gb-btn-shop--focus:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 0 #b33215, 0 12px 24px rgba(255, 107, 74, 0.5) !important;
  filter: brightness(1.05);
}

.gb-btn-shop--focus:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #b33215, 0 4px 8px rgba(255, 107, 74, 0.3) !important;
}

.gb-btn-restart {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 999px !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 0 #94a3b8 !important;
}

.gb-btn-restart:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 0 #94a3b8 !important;
}

.gb-btn-restart:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #94a3b8 !important;
}

.gb-share {
  display: none;
  margin-top: 0.4rem;
  border-radius: 999px !important;
}

.gb-share.is-visible {
  display: inline-flex;
}

/* ---------------------------------------------------------------------------
   Products ("BUILD IT FOR REAL")
   --------------------------------------------------------------------------- */
.gb-products {
  display: none;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-top: clamp(5rem, 7.5vw, 8.5rem);
  scroll-margin-top: 6rem;
}

.gb-products.is-shown,
.gb-products[style*="display: block"],
.gb-products[style*="display:block"] {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  animation: gb-slide-reveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gb-products.is-shown .scroll-trigger,
.gb-products.is-shown .scroll-trigger.animate--slide-in,
.gb-products.is-shown .grid__item,
.gb-products.is-shown .card-wrapper,
.gb-products.is-shown .card {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  visibility: visible !important;
}

@keyframes gb-slide-reveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gb-products__header {
  text-align: center;
  margin-bottom: 2.4rem;
}

.gb-products__header h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.gb-products__header p {
  margin: 0.6rem auto 0;
  max-width: 52rem;
  font-size: 1.6rem;
  color: rgba(var(--color-foreground), 0.75);
}

.gb-products .grid {
  margin-bottom: 2.4rem;
}

@media screen and (max-width: 749px) {
  .gb-products .grid,
  .gb-products .product-grid,
  .gb-products .grid--2-col-tablet-down {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    row-gap: 1.6rem !important;
    column-gap: clamp(0.8rem, 2.5vw, 1.2rem) !important;
    width: 100% !important;
  }

  .gb-products .grid > .grid__item,
  .gb-products .product-grid > .grid__item,
  .gb-products .grid--2-col-tablet-down > .grid__item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .gb-products .card__content {
    padding: 0.9rem 0.8rem 1.1rem;
  }

  .gb-products .card__heading {
    min-height: 3.5rem;
    max-height: 3.5rem;
    font-size: clamp(1.2rem, 3vw, 1.35rem);
    line-height: 1.32;
  }

  .gb-products .price {
    font-size: clamp(1.25rem, 3vw, 1.4rem);
  }
}

@media screen and (min-width: 750px) and (max-width: 989px) {
  .gb-products .grid,
  .gb-products .product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    row-gap: 2.4rem !important;
    column-gap: 1.6rem !important;
    width: 100% !important;
  }

  .gb-products .grid > .grid__item,
  .gb-products .product-grid > .grid__item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
}

.gb-products__config-note {
  margin: 0 auto;
  max-width: 52rem;
  padding: 2.4rem;
  border: 1px dashed rgba(var(--color-foreground), 0.4);
  border-radius: 1.6rem;
  text-align: center;
  color: rgba(var(--color-foreground), 0.7);
}

/* ---------------------------------------------------------------------------
   Why kids love building
   --------------------------------------------------------------------------- */
.gb-why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  max-width: 72rem;
  margin: clamp(2.4rem, 4vw, 3.6rem) auto 0;
  padding: 0 1.2rem;
  overflow: visible;
}

.gb-why__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2.2rem) clamp(0.5rem, 1.6vw, 1.8rem);
  border-radius: clamp(1.4rem, 2.5vw, 2rem);
  background: var(--gb-tint-soft);
  color: var(--gb-tint-ink);
  text-align: center;
}

.gb-why__icon {
  font-size: clamp(1.8rem, 4.6vw, 2.6rem);
  line-height: 1;
}

.gb-why__card h3 {
  margin: 0.5rem 0 0.2rem;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  letter-spacing: 0.03em;
  font-weight: 700;
}

.gb-why__card p {
  margin: 0;
  font-size: clamp(0.95rem, 2.3vw, 1.35rem);
  line-height: 1.25;
  opacity: 0.92;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 750px) {
  .gb-why {
    gap: 1.6rem;
    padding: 0 1.6rem;
  }

  .gb-why__card {
    padding: 2.2rem 2rem;
  }
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gb-block,
  .gb-tray__item,
  .gb-mini__inner,
  .gb-result,
  .gb-products,
  .gb-tray.gb-shake,
  .gb-hud__value--timer.is-low,
  .gb-hud__value.is-pop,
  .gb-shout,
  .gb-result__trophy,
  .gb-block--placed.is-fresh {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Larger tap targets / desktop layout
   --------------------------------------------------------------------------- */
@media (min-width: 750px) {
  .gb-play {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    grid-template-areas: "board aside";
    align-items: stretch;
    gap: 1.6rem;
    max-width: none;
    margin: 0;
    padding: 1.6rem 2rem 1.8rem;
    min-height: 56rem;
  }

  .gb-board-wrap {
    grid-area: board;
    max-width: none;
    width: 100%;
    padding: 0;
    justify-self: center;
  }

  .gb-aside {
    grid-area: aside;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .gb-aside__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 1rem;
    max-width: none;
    padding: 0 0.2rem;
  }

  .gb-tray {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    max-width: none;
    margin: 0;
    padding: 0 0 1.2rem;
  }

  .gb-tray__item {
    flex: none;
    width: 100%;
    max-width: none;
    padding: 0.9rem 0.4rem 0.7rem;
  }

  .gb-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    margin: auto 0 0;
    padding: 0;
    gap: 0.8rem;
  }

  .gb-arcade-btn {
    width: 100%;
  }

  .gb-hero {
    padding: 6rem 2rem 1.2rem;
  }

  .gb-result__actions {
    flex-direction: row;
    justify-content: center;
  }

  .gb-result__actions .button {
    width: auto;
    max-width: none;
  }
}

/* ---------------------------------------------------------------------------
   Safe areas (notched / gesture-bar phones) + contained touch on small screens
   --------------------------------------------------------------------------- */
.gb-wrap {
  overscroll-behavior: auto;
}

@media (max-width: 749px) {
  .gb-hud,
  .gb-tip,
  .gb-controls,
  .gb-tray {
    padding-left: max(0.8rem, env(safe-area-inset-left));
    padding-right: max(0.8rem, env(safe-area-inset-right));
  }

  .gb-stage {
    padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
  }

  .gb-board,
  .gb-tray__item {
    touch-action: pan-y;
  }

  .gb-aside__head {
    padding-left: max(0.8rem, env(safe-area-inset-left));
    padding-right: max(0.8rem, env(safe-area-inset-right));
  }

  .gb-controls {
    display: flex;
    justify-content: center;
    max-width: 28rem;
    margin: 0.4rem auto 0.8rem;
    padding: 0 0.8rem;
  }

  .gb-arcade-btn {
    width: 100%;
    max-width: 24rem;
    min-width: 0;
    padding: 0.85rem 1.6rem;
    font-size: 1.3rem;
  }

  .gb-rotate-small__kbd {
    display: none;
  }
}

@media (max-width: 380px) {
  .gb-aside__head {
    padding: 0 0.4rem;
  }
  .gb-aside__title {
    font-size: 1rem;
    letter-spacing: 0.08em;
  }
  .gb-rotate-small {
    padding: 0.35rem 0.65rem;
    font-size: 1.05rem;
    gap: 0.35rem;
  }
  .gb-rotate-small__icon {
    width: 1.2rem;
    height: 1.2rem;
  }
  .gb-rotate-small__text {
    font-size: 1.05rem;
  }
  .gb-tray {
    gap: 0.4rem;
  }
  .gb-tray__item {
    flex: 0 0 calc(25% - 0.4rem);
    width: calc(25% - 0.4rem);
    min-width: 5.8rem;
    padding: 0.5rem 0.2rem 0.4rem;
    min-height: 5.8rem;
  }
  .gb-mini {
    min-height: 3.4rem;
  }
  .gb-mini__inner {
    transform: scale(0.85);
  }
  .gb-mini__inner.gb-mini--rot1 {
    transform: scale(0.85) rotate(90deg);
  }
  .gb-mini__inner.gb-mini--rot2 {
    transform: scale(0.85) rotate(180deg);
  }
  .gb-mini__inner.gb-mini--rot3 {
    transform: scale(0.85) rotate(270deg);
  }
  .gb-tray__name {
    font-size: 0.85rem;
  }
}