.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px clamp(14px, 3vw, 34px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(90deg, var(--navy), #4d238f 52%, var(--purple));
  box-shadow: 0 10px 24px var(--shadow);
}

.brand,
.main-nav,
.floating-actions,
.character-dock {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.brand img {
  width: 170px;
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 0 18px rgba(240, 199, 74, 0.55);
}

.main-nav {
  justify-content: center;
  gap: 8px;
}

.main-nav a,
.login-button,
.primary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 900;
  letter-spacing: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.main-nav a:hover,
.login-button:hover,
.primary-button:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 18px rgba(240, 199, 74, 0.45);
  transform: translateY(-1px);
}

.login-button {
  justify-self: end;
  background: linear-gradient(180deg, var(--pink), #cf4a77);
}

.scene-page {
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: var(--dock-h);
}

.without-dock .scene-page {
  padding-bottom: 0;
}

.world-stage {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--dock-h));
  overflow: hidden;
  isolation: isolate;
}

.without-dock .world-stage,
.without-dock .section-page {
  min-height: calc(100vh - var(--header-h));
}

.asset,
.stage-bg,
.section-bg {
  position: absolute;
  user-select: none;
}

.stage-bg,
.section-bg {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-world {
  background:
    radial-gradient(circle at 48% 20%, rgba(255, 255, 255, 0.72), transparent 13rem),
    linear-gradient(180deg, #87e9ff 0%, #b5f3ff 42%, #ffe7f1 70%, #f9d4a8 100%);
}

.cloud {
  z-index: 1;
  opacity: 0.92;
  animation: cloudDrift 55s linear infinite;
}

.cloud-a {
  left: 7%;
  top: 10%;
  width: min(24vw, 360px);
}

.cloud-b {
  right: 16%;
  top: 16%;
  width: min(27vw, 420px);
  animation-duration: 68s;
}

.cloud-c {
  right: -2%;
  top: 7%;
  width: min(20vw, 300px);
  animation-duration: 44s;
}

.ocean {
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 28%;
  object-fit: cover;
}

.rocks {
  z-index: 3;
  left: -2%;
  bottom: 3%;
  width: min(34vw, 520px);
}

.palm {
  z-index: 4;
  bottom: 12%;
  width: min(18vw, 280px);
  transform-origin: 50% 100%;
}

.palm-left {
  left: 5%;
}

.palm-right {
  right: 5%;
}

.umbrella {
  z-index: 5;
  right: 7%;
  bottom: 10%;
  width: min(22vw, 360px);
}

.garden {
  z-index: 5;
  left: 8%;
  bottom: 7%;
  width: min(25vw, 430px);
}

.fountain {
  z-index: 7;
  left: 50%;
  bottom: 0;
  width: min(23vw, 380px);
  transform: translateX(-50%);
}

.mansion {
  z-index: 6;
  left: 50%;
  bottom: 5%;
  width: min(67vw, 950px);
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 18px rgba(27, 27, 91, 0.23));
}

.mansion-door {
  z-index: 8;
  left: 50%;
  bottom: 11%;
  width: min(13vw, 150px);
  transform: translateX(-50%);
}

.mailbox {
  z-index: 7;
  left: 25%;
  bottom: 9%;
  width: min(13vw, 210px);
}

.lobby-world,
.room-world {
  background: var(--navy);
}

.chandelier {
  z-index: 3;
  left: 50%;
  top: 6%;
  width: min(20vw, 260px);
  transform: translateX(-50%);
}

.staircase {
  z-index: 3;
  left: 50%;
  bottom: 10%;
  width: min(44vw, 650px);
  transform: translateX(-50%);
}

.lobby-door,
.wall-portrait {
  position: absolute;
  z-index: 6;
  display: block;
  transition: transform 160ms ease, filter 160ms ease;
}

.lobby-door:hover,
.wall-portrait:hover {
  transform: translateY(-6px) scale(1.03);
  filter: drop-shadow(0 0 18px rgba(240, 199, 74, 0.66));
}

.lobby-door {
  bottom: 7%;
  width: min(11.5vw, 150px);
}

.door-one { left: 15%; }
.door-two { left: 28%; }
.door-three { left: 41%; }
.door-four { left: 54%; }
.door-five { left: 67%; }
.door-six { left: 5%; }
.door-seven { right: 5%; }

.wall-portrait {
  width: min(9vw, 120px);
}

.portrait-1 { left: 8%; top: 16%; }
.portrait-2 { left: 19%; top: 14%; }
.portrait-3 { left: 30%; top: 16%; }
.portrait-4 { left: 41%; top: 13%; }
.portrait-5 { left: 52%; top: 16%; }
.portrait-6 { left: 63%; top: 13%; }
.portrait-7 { left: 74%; top: 16%; }
.portrait-8 { left: 84%; top: 21%; }
.portrait-9 { left: 13%; top: 38%; }
.portrait-10 { right: 13%; top: 38%; }

.bunny-decor {
  z-index: 5;
  bottom: 4%;
  width: min(10vw, 140px);
}

.decor-left { left: 24%; }
.decor-right { right: 24%; }

.room-page {
  background: var(--navy);
}

.back-button,
.static-back {
  position: fixed;
  z-index: 95;
  left: 18px;
  top: calc(var(--header-h) + 14px);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(180deg, var(--navy), var(--purple));
  box-shadow: 0 8px 20px var(--shadow);
}

.room-character {
  position: absolute;
  z-index: 5;
  bottom: 7%;
  left: 6%;
  width: clamp(150px, 24vw, 320px);
  max-height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.24));
}

.extra-character {
  z-index: 6;
  left: 24%;
  bottom: 5%;
  width: clamp(92px, 14vw, 190px);
}

.kitkat-highlight .extra-character {
  animation: focusSparkle 1.2s ease-in-out infinite;
}

.launcher-button {
  position: absolute;
  z-index: 8;
  right: 10%;
  bottom: 12%;
  width: clamp(145px, 20vw, 280px);
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 0 rgba(27, 27, 91, 0.4);
}

.launcher-button img {
  width: 100%;
  filter: drop-shadow(0 12px 18px rgba(27, 27, 91, 0.3));
}

.section-page {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
}

.section-panel {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 0;
}

.section-sign {
  width: min(42vw, 440px);
  margin: 0 auto 12px;
}

.cabinet-grid,
.profile-grid,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.lounge-couch,
.lounge-shelves,
.theater-seats {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.lounge-couch {
  left: 4%;
  bottom: 3%;
  width: min(45vw, 760px);
}

.lounge-shelves {
  right: 3%;
  top: 12%;
  width: min(40vw, 700px);
}

.cards-panel {
  padding-top: 70px;
}

.theater-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding-top: clamp(26px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 240px;
  gap: 24px;
  align-items: start;
}

.screen-frame {
  position: relative;
}

.screen-frame img {
  width: 100%;
}

.screen-frame iframe {
  position: absolute;
  left: 7%;
  top: 12%;
  width: 86%;
  height: 72%;
  border: 0;
  border-radius: 18px;
  background: #111;
}

.video-tabs {
  display: grid;
  gap: 12px;
}

.theater-seats {
  left: 50%;
  bottom: -3%;
  width: min(70vw, 1000px);
  transform: translateX(-50%);
}

.locker-panel,
.coming-card {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100vw - 36px));
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  border: 3px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  color: var(--navy);
  text-align: center;
  background: rgba(255, 247, 255, 0.86);
  box-shadow: 0 18px 36px var(--shadow);
}

.game-shell {
  position: relative;
  min-height: 100vh;
  padding-top: var(--header-h);
  background: var(--navy);
}

.flappy-frame {
  display: block;
  width: 100%;
  height: calc(100vh - var(--header-h));
  border: 0;
}

.hero-shell {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--dock-h));
  overflow: hidden;
}

.phase-a-placeholder {
  min-height: inherit;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
  color: var(--navy);
}

.phase-a-placeholder h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 7rem);
}

.phase-a-placeholder p {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(180deg, var(--purple), #742ecb);
}

.floating-actions {
  position: fixed;
  z-index: 90;
  right: 16px;
  top: 104px;
  flex-direction: column;
  gap: 12px;
}

.floating-actions button {
  width: 50px;
  height: 50px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: var(--navy);
  background: linear-gradient(180deg, #fff, #ffe7f0);
  box-shadow: 0 8px 18px var(--shadow);
  cursor: pointer;
}

.character-dock {
  position: fixed;
  z-index: 85;
  left: 50%;
  bottom: 12px;
  width: min(1080px, calc(100vw - 28px));
  min-height: 90px;
  transform: translateX(-50%);
  gap: 10px;
  justify-content: center;
  overflow-x: auto;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(27, 27, 91, 0.88), rgba(82, 36, 148, 0.86));
  box-shadow: 0 16px 34px var(--shadow);
}

@media (max-width: 768px) {
  :root {
    --header-h: 132px;
    --dock-h: 104px;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: center;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .login-button {
    justify-self: center;
  }

  .floating-actions {
    top: 148px;
    right: 10px;
  }

  .floating-actions button {
    width: 44px;
    height: 44px;
  }

  .character-dock {
    justify-content: flex-start;
    border-radius: 24px;
  }

  .world-stage {
    min-height: calc(100svh - var(--header-h) - var(--dock-h));
  }

  .home-world {
    min-height: 760px;
  }

  .cloud-a { top: 9%; width: 190px; }
  .cloud-b { top: 18%; width: 210px; }
  .cloud-c { display: none; }
  .palm { width: 150px; bottom: 20%; }
  .palm-left { left: -6%; }
  .palm-right { right: -8%; }
  .mansion {
    width: min(112vw, 620px);
    bottom: 18%;
  }
  .mansion-door {
    width: 82px;
    bottom: 25%;
  }
  .fountain {
    width: 155px;
    bottom: 9%;
  }
  .umbrella {
    width: 155px;
    right: -5%;
    bottom: 15%;
  }
  .garden {
    width: 180px;
    left: -6%;
    bottom: 13%;
  }
  .mailbox {
    width: 110px;
    left: 20%;
    bottom: 18%;
  }
  .rocks {
    width: 210px;
    bottom: 12%;
  }

  .lobby-world,
  .room-world {
    min-height: 830px;
  }

  .lobby-door {
    width: 84px;
  }

  .door-one { left: 8%; bottom: 25%; }
  .door-two { left: 21%; bottom: 18%; }
  .door-three { left: 34%; bottom: 25%; }
  .door-four { left: 47%; bottom: 18%; }
  .door-five { left: 60%; bottom: 25%; }
  .door-six { left: 73%; bottom: 18%; }
  .door-seven { right: 2%; bottom: 25%; }

  .wall-portrait {
    width: 66px;
  }

  .portrait-8,
  .portrait-9,
  .portrait-10 {
    display: none;
  }

  .staircase {
    width: 410px;
    bottom: 32%;
  }

  .chandelier {
    width: 120px;
    top: 14%;
  }

  .room-character {
    left: 3%;
    bottom: 13%;
    width: 170px;
  }

  .extra-character {
    left: 35%;
    width: 105px;
  }

  .launcher-button {
    right: 4%;
    bottom: 15%;
    width: 145px;
  }

  .cabinet-grid,
  .profile-grid,
  .shop-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .section-panel {
    width: min(560px, calc(100vw - 24px));
    padding-top: 18px;
  }

  .section-sign {
    width: 260px;
  }

  .theater-layout {
    grid-template-columns: 1fr;
  }

  .video-tabs {
    grid-template-columns: 1fr;
  }

  .lounge-couch,
  .lounge-shelves {
    display: none;
  }

  .flappy-frame {
    height: calc(100svh - var(--header-h));
  }
}
