:root {
  color-scheme: light;
  --ink: #6b421e;
  --nav-h: 160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #b9efff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  position: relative;
  width: min(100vw, 390px);
  height: min(100vh, 844px);
  margin: 0 auto;
  overflow: hidden;
  background: #b9efff;
}

.play {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  transform-origin: top center;
}

.scene-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  display: block;
  width: 390px;
  height: 684px;
  pointer-events: none;
  user-select: none;
}

.scene-art,
.nav-art-img {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.scene-bg {
  z-index: 0;
}

.scene-text {
  position: absolute;
  z-index: 5;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 246, 211, 0.75);
  white-space: normal;
}

.scene-text.hatch-subtitle-text {
  display: block;
  overflow: visible;
  white-space: nowrap;
}

.scene-text.home-guide-plaque-text {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

.scene-text.hatch-primary-label {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

.scene-art.hatch-egg {
  transform-origin: 50% 72%;
  will-change: transform, filter, opacity;
}

.scene-art.hatch-egg-warming {
  animation: hatch-egg-warming 0.75s ease-in-out infinite;
}

.scene-art.hatch-egg-cracking {
  animation: hatch-egg-cracking 0.28s ease-in-out infinite;
}

.scene-art.hatch-egg-success {
  animation: hatch-egg-success 0.58s cubic-bezier(0.2, 0.85, 0.28, 1.2) both;
}

.scene-art.hatch-status-plaque,
.scene-text.hatch-status-text {
  animation: hatch-status-in 0.24s ease-out both;
}

.scene-text.hatch-status-text {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

@keyframes hatch-egg-warming {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.035); filter: brightness(1.12) drop-shadow(0 0 12px rgba(255, 218, 88, 0.88)); }
}

@keyframes hatch-egg-cracking {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-4px) rotate(-1.2deg); }
  75% { transform: translateX(4px) rotate(1.2deg); }
}

@keyframes hatch-egg-success {
  0% { opacity: 0; transform: translateY(18px) scale(0.72); }
  58% { opacity: 1; transform: translateY(-5px) scale(1.07); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hatch-status-in {
  from { opacity: 0; transform: translateY(5px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-art.hatch-egg-warming,
  .scene-art.hatch-egg-cracking,
  .scene-art.hatch-egg-success,
  .scene-art.hatch-status-plaque,
  .scene-text.hatch-status-text {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
.scene-text.dino-name {
  display: block;
  max-height: none;
  overflow: visible;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-shadow:
    0 2px 0 rgba(127, 72, 24, 0.72),
    1px 0 0 rgba(127, 72, 24, 0.42),
    -1px 0 0 rgba(127, 72, 24, 0.42);
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
  -webkit-text-stroke: 0.75px rgba(127, 72, 24, 0.46);
}
.screen {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  display: none;
  width: 390px;
  height: 684px;
  padding: 0;
}

.screen.active {
  display: block;
}

.component-scene,
.component-page {
  position: relative;
  width: 390px;
  height: 684px;
  overflow: hidden;
  background: transparent;
}

body.asset-mode .component-scene,
body.asset-mode .component-page {
  background: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-button,
.hotspot {
  position: absolute;
  z-index: 20;
  display: block;
  background: transparent;
  color: rgba(122, 87, 52, 0.62);
  border: 0;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.image-button:active,
.hotspot:active,
.nav-button:active,
.nav-button:focus {
  background: transparent;
  box-shadow: none;
}
.image-button:focus-visible,
.hotspot:focus-visible,
.nav-button:focus-visible {
  outline: 3px solid rgba(255, 196, 72, 0.9);
  outline-offset: 2px;
}

.music-hotspot {
  left: 344px;
  top: 36px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.dino-choice-main {
  left: 114px;
  top: 238px;
  width: 166px;
  height: 218px;
}

.dino-choice-left {
  left: 0;
  top: 404px;
  width: 184px;
  height: 230px;
}

.dino-choice-right {
  left: 206px;
  top: 404px;
  width: 184px;
  height: 230px;
}

.story-title-art {
  left: 52px;
  top: 48px;
  width: 286px;
  height: 94px;
}

.story-choice-a {
  left: 48px;
  top: 556px;
  width: 136px;
  height: 54px;
}

.story-choice-b {
  left: 206px;
  top: 556px;
  width: 136px;
  height: 54px;
}

.story-mic {
  left: 44px;
  top: 470px;
  width: 56px;
  height: 64px;
  border-radius: 32px;
}

.story-replay {
  left: 100px;
  top: 470px;
  width: 62px;
  height: 64px;
  border-radius: 32px;
}

.story-finish {
  left: 162px;
  top: 470px;
  width: 72px;
  height: 64px;
  border-radius: 32px;
}

.hidden-form {
  position: absolute;
  left: 46px;
  top: 618px;
  z-index: 25;
  display: flex;
  gap: 8px;
  width: 298px;
  opacity: 0;
  pointer-events: none;
}

.hatch-hotspots,
.gallery-hotspots,
.parent-hotspots {
  position: absolute;
  inset: 0;
}

.hatch-prompt-input {
  position: absolute;
  left: 97px;
  top: 527px;
  z-index: 24;
  width: 196px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #7a5734;
  caret-color: #7a5734;
  font-size: 13px;
  font-weight: 800;
  line-height: 36px;
  opacity: 1;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.hatch-prompt-input::placeholder {
  color: transparent;
}

.hatch-prompt-input.has-value {
  background: rgb(255, 246, 221);
  box-shadow: none;
}
.hatch-mic {
  left: 44px;
  top: 591px;
  width: 64px;
  height: 54px;
  border-radius: 27px;
}

.hatch-image {
  left: 282px;
  top: 591px;
  width: 64px;
  height: 54px;
  border-radius: 27px;
}

.hatch-chip { display: none; pointer-events: none; }

.chip-blue { left: 46px; }
.chip-sing { left: 148px; width: 95px; }
.chip-horn { left: 249px; }
.chip-berry { display: none; pointer-events: none; }

.hatch-submit {
  left: 116px;
  top: 591px;
  width: 158px;
  height: 54px;
  border-radius: 30px;
}

.hatch-mic,
.hatch-image,
.hatch-submit {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.hatch-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.works-refresh {
  left: 116px;
  top: 610px;
  width: 158px;
  height: 54px;
  border-radius: 27px;
}

.works-live-list {
  position: absolute;
  left: 78px;
  top: 308px;
  z-index: 22;
  width: 236px;
  min-height: 80px;
  color: #77502b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  pointer-events: none;
}

.parent-theme {
  position: absolute;
  left: 100px;
  top: 472px;
  z-index: 24;
  width: 74px;
  height: 34px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: rgba(122, 87, 52, 0.62);
}

.parent-limit {
  position: absolute;
  left: 264px;
  top: 402px;
  z-index: 24;
  width: 68px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(122, 87, 52, 0.62);
}

.parent-toggle {
  position: absolute;
  z-index: 24;
  width: 92px;
  height: 44px;
  color: rgba(122, 87, 52, 0.62);
}

.parent-toggle input {
  width: 100%;
  height: 100%;
  opacity: 0;
}

.parent-safety { left: 244px; top: 252px; }
.parent-music { left: 244px; top: 340px; }
.parent-image { left: 244px; top: 427px; }

.parent-save {
  left: 82px;
  top: 615px;
  width: 226px;
  height: 60px;
  border-radius: 30px;
}

.bottom-nav {
  position: absolute;
  left: 0;
  top: 684px;
  z-index: 30;
  width: 390px;
  height: var(--nav-h);
  overflow: hidden;
  background: transparent;
}

.nav-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 390px;
  height: var(--nav-h);
  pointer-events: none;
  user-select: none;
}

.nav-button {
  position: absolute;
  top: 0;
  z-index: 10;
  width: 130px;
  height: 160px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(122, 87, 52, 0.62);
  -webkit-tap-highlight-color: transparent;
}

#homeTab { left: 12px; }
#hatchTab { left: 130px; }
#worksTab { left: 247px; }

.nav-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 12;
  display: block;
  color: #6b421e;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 30px;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 244, 205, 0.9), 0 4px 0 rgba(123, 75, 30, 0.28);
  pointer-events: none;
}
@media (max-width: 389px), (max-height: 843px) {
  .play {
    transform: scale(min(calc(100vw / 390), calc(100vh / 844)));
  }
}

/* H5 runtime uses the same element coordinates as the WeChat mini-game scenes. */
.music-hotspot { left: 335px; top: 34px; width: 54px; height: 54px; }
.dino-choice-main { left: 92px; top: 236px; width: 210px; height: 248px; }
.dino-choice-left { left: 0; top: 430px; width: 184px; height: 250px; }
.dino-choice-right { left: 206px; top: 430px; width: 184px; height: 250px; }
.story-title-art { left: 50px; top: 38px; width: 290px; height: 92px; }
.story-choice-a { left: 52px; top: 568px; width: 142px; height: 58px; }
.story-choice-b { left: 196px; top: 568px; width: 142px; height: 58px; }
.story-mic { left: 77px; top: 468px; width: 236px; height: 78px; }
.story-replay { display: none; pointer-events: none; }
.story-finish { display: none; pointer-events: none; }
.hatch-prompt-input {
  position: absolute;
  left: 97px;
  top: 527px;
  z-index: 24;
  width: 196px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #7a5734;
  caret-color: #7a5734;
  font-size: 13px;
  font-weight: 800;
  line-height: 36px;
  opacity: 1;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.hatch-image {
  left: 282px;
  top: 591px;
  width: 64px;
  height: 54px;
  border-radius: 27px;
}
.hatch-chip { display: none; pointer-events: none; }
.chip-blue { left: 46px; }
.chip-sing { left: 148px; width: 95px; }
.chip-horn { left: 249px; }
.chip-berry { display: none; pointer-events: none; }
.hatch-submit {
  left: 116px;
  top: 591px;
  width: 158px;
  height: 54px;
  border-radius: 30px;
}
.works-refresh { left: 116px; top: 610px; width: 158px; height: 54px; }
.works-live-list { left: 55px; top: 246px; width: 280px; min-height: 220px; opacity: 0; }
.parent-theme { left: 70px; top: 522px; width: 250px; height: 34px; }
.parent-limit { left: 68px; top: 482px; width: 270px; height: 40px; }
.parent-toggle { width: 72px; height: 40px; }
.parent-safety { left: 248px; top: 260px; }
.parent-music { left: 248px; top: 420px; }
.parent-image { left: 248px; top: 340px; }
.parent-save { left: 82px; top: 616px; width: 225px; height: 58px; }

/* Three-choice model story layout */
.story-title-art {
  left: 78px;
  top: 34px;
  width: 234px;
  height: 74px;
}

.story-choice {
  left: 26px;
  width: 338px;
  height: 60px;
  padding: 0 18px 0 54px;
  overflow: hidden;
  border: 3px solid #d79a47;
  border-radius: 17px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff0c8 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.92),
    0 4px 0 #a9632e,
    0 7px 12px rgba(78, 48, 22, 0.24);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #5b351b;
}

.story-choice-a { top: 400px; --choice-accent: #ff9d2f; }
.story-choice-b { top: 470px; --choice-accent: #78c947; }
.story-choice-c { top: 540px; --choice-accent: #2fc2b8; }

.story-choice::before {
  position: absolute;
  left: 13px;
  top: 50%;
  display: grid;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: var(--choice-accent);
  box-shadow: 0 2px 0 rgba(112, 65, 25, 0.28);
  color: #fffdf2;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  place-items: center;
  text-shadow: 0 1px 0 rgba(92, 52, 24, 0.34);
  content: "";
}

.story-choice-a::before { content: "1"; }
.story-choice-b::before { content: "2"; }
.story-choice-c::before { content: "3"; }

.story-choice-label {
  position: relative;
  z-index: 2;
  display: -webkit-box;
  width: 100%;
  max-height: 42px;
  overflow: hidden;
  color: #5b351b;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 20px;
  text-align: left;
  text-overflow: clip;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  white-space: normal;
  pointer-events: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.image-button.story-choice:active {
  transform: translateY(2px);
  background: linear-gradient(180deg, #fff4d7 0%, #ffe7b2 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    0 2px 0 #a9632e,
    0 4px 8px rgba(78, 48, 22, 0.2);
}

.story-choice:disabled {
  cursor: wait;
  opacity: 0.82;
}

.scene-text.story-title-text {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

.scene-art.story-dino-art {
  object-fit: contain;
  transform-origin: 50% 92%;
  will-change: transform;
}

.scene-art.story-dino-idle {
  animation: story-dino-idle 3.2s ease-in-out infinite;
}

.scene-art.story-dino-loading {
  animation: story-dino-thinking-walk 2.6s ease-in-out infinite;
}


@keyframes story-dino-idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-2px) rotate(-0.7deg); }
  70% { transform: translateY(0) rotate(0.7deg); }
}

@keyframes story-dino-thinking-walk {
  0% { transform: translate(0, 0) scaleX(1) rotate(0); }
  10% { transform: translate(-22px, -2px) scaleX(1) rotate(-1deg); }
  20% { transform: translate(-45px, 0) scaleX(1) rotate(0); }
  30% { transform: translate(-68px, -2px) scaleX(1) rotate(-1deg); }
  40% { transform: translate(-90px, 0) scaleX(1) rotate(0); }
  48% { transform: translate(-112px, -2px) scaleX(1) rotate(-1deg); }
  52% { transform: translate(-112px, 0) scaleX(-1) rotate(0); }
  60% { transform: translate(-90px, -2px) scaleX(-1) rotate(-1deg); }
  70% { transform: translate(-68px, 0) scaleX(-1) rotate(0); }
  80% { transform: translate(-45px, -2px) scaleX(-1) rotate(-1deg); }
  90% { transform: translate(-22px, 0) scaleX(-1) rotate(0); }
  96% { transform: translate(0, -2px) scaleX(-1) rotate(-1deg); }
  100% { transform: translate(0, 0) scaleX(1) rotate(0); }
}


.scene-text.story-dialog-text {
  line-height: 24px !important;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .scene-art.story-dino-idle {
    animation: none;
    transform: none;
  }
}

.scene-text.works-subtitle-text,
.scene-text.works-featured-label,
.scene-text.works-refresh-text {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}


/* Works carousel v1 */
.works-page-button {
  z-index: 28;
  width: 58px;
  height: 58px;
  border-radius: 50%;
}
.works-prev { left: 37px; top: 529px; }
.works-next { left: 295px; top: 529px; }
.works-adventure {
  left: 84px;
  top: 228px;
  width: 222px;
  height: 276px;
  z-index: 24;
  border-radius: 26px;
}
.works-delete {
  position: absolute;
  left: 274px;
  top: 216px;
  z-index: 34;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 2px solid #ffe2ae;
  border-radius: 14px;
  background: #e75f46;
  color: #fff8e8;
  box-shadow: 0 2px 0 #9b3b2e, 0 3px 7px rgba(86, 47, 20, 0.2);
  font: 900 12px/24px Arial, Microsoft YaHei, sans-serif;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}
.works-delete:active { transform: translateY(1px); box-shadow: 0 1px 0 #9b3b2e; }
.works-delete:focus-visible { outline: 3px solid #ffcf50; outline-offset: 2px; }
.works-delete[hidden], .works-adventure[hidden] { display: none; }
.works-refresh { left: 116px; top: 615px; width: 158px; height: 54px; }
.scene-art.works-carousel-arrow-next { transform: rotate(180deg); }
.scene-art.works-carousel-dino { object-fit: contain; }
.scene-art.works-page-dot { opacity: 0.28; }
.scene-art.works-page-dot.active { opacity: 1; }
.scene-text.works-card-name,
.scene-text.works-card-description,
.scene-text.works-page-count {
  letter-spacing: 0;
  text-align: center;
}
.scene-text.works-card-description {
  line-height: 18px !important;
}

.scene-text.works-card-name,
.scene-text.works-page-count {
  display: block;
  overflow: visible;
  white-space: nowrap;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}
.scene-text.works-card-name { height: 24px; }
.scene-text.works-card-description {
  display: block;
  height: 36px;
  max-height: 36px !important;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}
.scene-text.works-page-count { height: 20px; }


/* Works content alignment v2 */
.scene-text.works-card-name {
  height: 22px;
  line-height: 22px !important;
}
.scene-text.works-card-description {
  height: 32px;
  max-height: 32px !important;
  line-height: 16px !important;
  padding: 0 2px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.scene-art.hatch-side-action {
  object-fit: fill;
}

.hatch-mic {
  left: 47px;
  top: 588px;
  width: 58px;
  height: 60px;
  border-radius: 30px;
}

.hatch-image {
  left: 285px;
  top: 588px;
  width: 58px;
  height: 60px;
  border-radius: 30px;
}
