.world-preview {
  position: relative;
  width: 100%;
  max-width: 690px;
  justify-self: end;
  translate: var(--parallax-x, 0) var(--parallax-y, 0);
  transition: translate .12s linear;
}

.preview-window {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid #8292cb;
  border-radius: 25px;
  background: #eaf4ff;
  box-shadow: 0 30px 70px rgba(39, 77, 117, .2), 0 2px 0 #fff inset;
  transform: perspective(1200px)
    rotateY(calc(-2deg + var(--tilt-x, 0deg)))
    rotateX(calc(1deg + var(--tilt-y, 0deg)));
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  will-change: transform;
}

.preview-window::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 220px at var(--pointer-x, 65%) var(--pointer-y, 35%), rgba(255, 255, 255, .19), transparent 72%);
  content: "";
  opacity: .72;
}

.preview-window:hover {
  border-color: #667ac4;
  box-shadow: 0 34px 78px rgba(39, 77, 117, .25), 0 2px 0 #fff inset;
  transform: perspective(1200px)
    rotateY(calc(-1deg + var(--tilt-x, 0deg)))
    rotateX(calc(.5deg + var(--tilt-y, 0deg)))
    translateY(-2px);
}

.preview-window:active {
  transform: perspective(1200px) rotateY(0) rotateX(0) translateY(0) scale(.997);
}

.preview-bar {
  display: grid;
  height: 46px;
  grid-template-columns: 94px minmax(0, 1fr) 74px;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid #8292c8;
  background: linear-gradient(#c5d0ff, #aebfff);
  box-shadow: inset 0 1px rgba(255, 255, 255, .58);
  color: #233759;
  font-size: .76rem;
  font-weight: 800;
}

.room-chrome-brand {
  display: inline-flex;
  width: 88px;
  height: 26px;
  align-items: center;
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 3px rgba(42, 57, 109, .2);
}

.room-chrome-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.preview-nav span {
  display: inline-flex;
  min-width: 31px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 7px;
  padding: 0 5px;
  font-size: .56rem;
  white-space: nowrap;
  transition: background .16s ease, transform .16s ease;
}

.preview-nav span:hover {
  background: rgba(255, 255, 255, .45);
  transform: translateY(-1px);
}

.preview-nav svg {
  width: 14px;
  height: 14px;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 5px;
  color: #26436b;
  font-size: .65rem;
  text-transform: uppercase;
}

.online-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #219b68;
  box-shadow: 0 0 0 3px rgba(33, 155, 104, .14);
  animation: connected-pulse 2.5s ease-out infinite;
}

@keyframes connected-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(33, 155, 104, .14); }
  50% { box-shadow: 0 0 0 7px rgba(33, 155, 104, 0); }
}

.preview-scene {
  position: relative;
  aspect-ratio: 1.7;
  overflow: hidden;
  background: #58b8b2;
}

.room-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .22), transparent 24%),
    linear-gradient(148deg, transparent 0 62%, rgba(21, 111, 112, .21) 62.2% 63%, transparent 63.2%),
    linear-gradient(32deg, transparent 0 60%, rgba(255, 255, 255, .15) 60.2% 61%, transparent 61.2%),
    linear-gradient(145deg, #75d1c8, #3d9ea2 72%, #2e858f);
}

.room-conversation {
  position: absolute;
  top: 14%;
  left: 5%;
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 6px 7px;
}

.conversation-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #526ed1;
  color: #fff;
  box-shadow: 0 5px 14px rgba(24, 71, 89, .24);
  animation: conversation-float 5s ease-in-out infinite;
}

.conversation-avatar.is-second {
  grid-row: 2;
  background: #e77270;
  animation-delay: -2.5s;
}

@keyframes conversation-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -3px, 0); }
}

.conversation-avatar svg {
  width: 17px;
}

.conversation-bubble {
  border: 1px solid rgba(107, 139, 164, .55);
  border-radius: 13px 13px 13px 4px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 6px 15px rgba(23, 75, 91, .16);
  color: #294867;
  font-size: .63rem;
  font-weight: 700;
  animation: conversation-breathe 5s ease-in-out .2s infinite;
}

.conversation-bubble.is-reply {
  grid-column: 2;
  border-radius: 13px 13px 4px 13px;
  animation-delay: -2.3s;
}

@keyframes conversation-breathe {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(2px, -2px, 0); }
}

.games-window {
  position: absolute;
  top: 12%;
  right: 4%;
  width: 48%;
  overflow: hidden;
  border: 1px solid #88a8c5;
  border-radius: 13px;
  background: rgba(245, 250, 255, .97);
  box-shadow: 0 15px 35px rgba(22, 67, 91, .24);
  transition: box-shadow .18s ease, transform .18s ease;
  animation: panel-hover 7s ease-in-out infinite;
}

@keyframes panel-hover {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

.games-window:hover {
  box-shadow: 0 18px 42px rgba(22, 67, 91, .3);
  transform: translateY(-2px);
}

.games-window header {
  display: grid;
  height: 39px;
  grid-template-columns: 22px auto 1fr;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-bottom: 1px solid #b8cde2;
  background: linear-gradient(#f8fbff, #e5f0fb);
  color: #294d70;
}

.games-window header svg {
  width: 18px;
}

.games-window header strong {
  font-size: .7rem;
}

.games-window header small {
  justify-self: end;
  color: #6a8094;
  font-size: .55rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px;
}

.game-grid span {
  min-width: 0;
  border: 1px solid #d2dfec;
  border-radius: 8px;
  padding: 5px;
  background: #fff;
  text-align: center;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  animation: game-idle 6s ease-in-out infinite;
}

.game-grid span:hover {
  border-color: #819ed1;
  box-shadow: 0 6px 13px rgba(35, 75, 112, .13);
  transform: translateY(-2px);
}

.game-grid span:nth-child(2) { animation-delay: -1.5s; }
.game-grid span:nth-child(3) { animation-delay: -3s; }
.game-grid span:nth-child(4) { animation-delay: -4.5s; }

@keyframes game-idle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -1px; }
}

.game-grid span:active {
  transform: translateY(0) scale(.97);
}

.game-grid img {
  display: block;
  width: min(100%, 42px);
  margin: 0 auto 3px;
  border-radius: 8px;
}

.game-grid b {
  display: block;
  overflow: hidden;
  color: #35516d;
  font-size: .52rem;
  text-overflow: ellipsis;
}

.room-card-strip {
  position: absolute;
  right: 5%;
  bottom: 21%;
  display: flex;
  gap: 6px;
}

.room-card-strip span {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(104, 137, 163, .58);
  border-radius: 9px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 7px 18px rgba(23, 66, 86, .16);
  color: #315472;
  font-size: .57rem;
  transition: background .16s ease, transform .16s ease;
  animation: card-drift 6s ease-in-out infinite;
}

.room-card-strip span:nth-child(2) {
  animation-delay: -3s;
}

@keyframes card-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2px; }
}

.room-card-strip span:hover {
  background: #fff;
  transform: translateY(-2px);
}

.room-card-strip svg {
  width: 15px;
}

.room-dock {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  display: grid;
  height: 34px;
  grid-template-columns: 1fr 34px;
  align-items: center;
  border: 1px solid #95abc5;
  border-radius: 8px;
  padding-left: 11px;
  background: rgba(249, 252, 255, .96);
  box-shadow: 0 7px 18px rgba(20, 58, 91, .2);
  color: #6a7f94;
  font-size: .62rem;
}

.room-dock i {
  display: grid;
  height: 32px;
  place-items: center;
  border-left: 1px solid #bad0e4;
  color: #2f72b5;
  animation: send-nudge 4s ease-in-out infinite;
}

@keyframes send-nudge {
  0%, 75%, 100% { transform: translate3d(0, 0, 0); }
  84% { transform: translate3d(2px, -1px, 0); }
}

.room-dock svg {
  width: 15px;
}

.preview-caption {
  margin: 0;
  min-height: 34px;
  padding: 9px 14px;
  border-top: 1px solid #b7cde1;
  background: linear-gradient(#f9fcff, #e7f1fb);
  color: #476681;
  font-size: .67rem;
  font-weight: 700;
  text-align: center;
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(49, 94, 209, .14);
  border-radius: 50%;
  translate: var(--parallax-x, 0) var(--parallax-y, 0);
  transition: translate .12s linear;
}

.orbit-one {
  inset: -9% 4% -9% -4%;
  animation: orbit-turn 26s linear infinite;
}

.orbit-two {
  inset: -2% -6% -2% 9%;
  animation: orbit-turn 34s linear infinite reverse;
}

@keyframes orbit-turn {
  to { transform: rotate(360deg); }
}

.site-header,
.hero-copy,
.world-preview,
.site-footer {
  opacity: 0;
  transform: translateY(10px);
}

.landing-ready .site-header,
.landing-ready .hero-copy,
.landing-ready .world-preview,
.landing-ready .site-footer {
  animation: landing-enter .52s cubic-bezier(.2, .72, .25, 1) forwards;
}

.landing-ready .hero-copy { animation-delay: .07s; }
.landing-ready .world-preview { animation-delay: .14s; }
.landing-ready .site-footer { animation-delay: .2s; }

@keyframes landing-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 640px) {
  .world-preview {
    width: min(100%, 380px);
    justify-self: center;
  }

  .preview-window {
    border-radius: 18px;
    transform: none;
  }

  .preview-bar {
    height: 36px;
    grid-template-columns: 76px minmax(0, 1fr) 61px;
    padding: 0 10px;
    font-size: .66rem;
  }

  .preview-scene {
    aspect-ratio: 1.7;
  }

  .room-chrome-brand {
    width: 76px;
    height: 23px;
  }

  .preview-nav {
    gap: 0;
  }

  .preview-nav span {
    min-width: 22px;
    height: 28px;
    padding: 0 3px;
    font-size: 0;
  }

  .preview-nav svg {
    width: 13px;
  }

  .room-conversation {
    top: 10%;
    left: 3%;
    grid-template-columns: 27px auto;
    gap: 4px;
  }

  .conversation-avatar {
    width: 27px;
    height: 27px;
  }

  .conversation-bubble {
    max-width: 105px;
    padding: 5px 7px;
    font-size: .5rem;
  }

  .games-window {
    top: 8%;
    right: 3%;
    width: 51%;
  }

  .games-window header {
    height: 30px;
    grid-template-columns: 17px auto 1fr;
    padding: 0 6px;
  }

  .games-window header small {
    display: none;
  }

  .game-grid {
    gap: 3px;
    padding: 5px;
  }

  .game-grid span {
    padding: 3px;
  }

  .game-grid img {
    width: 31px;
  }

  .game-grid b {
    display: none;
  }

  .room-card-strip {
    right: 3%;
    bottom: 22%;
    gap: 4px;
  }

  .room-card-strip span {
    padding: 5px 6px;
    font-size: .48rem;
  }

  .room-dock {
    right: 8px;
    bottom: 7px;
    left: 8px;
    height: 30px;
    font-size: .59rem;
  }

  .preview-caption {
    min-height: 30px;
    margin: 0;
    padding: 7px 10px;
    font-size: .6rem;
  }
}
@media (max-height: 670px) and (min-width: 641px) {
  .world-preview {
    max-width: 570px;
  }
}
@media (max-width: 390px) and (max-height: 700px) {
  .world-preview {
    max-width: 305px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .site-header,
  .hero-copy,
  .world-preview,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
  }
}
