:root {
  --ink: #2f2f2f;
  --muted: #5d6878;
  --accent: #ee9184;
  --stage-w: 750px;
  --stage-h: 1334px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", Arial, sans-serif;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(247, 196, 171, 0.45), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(191, 215, 234, 0.52), transparent 36%),
    radial-gradient(circle at 50% 96%, rgba(242, 184, 162, 0.36), transparent 38%),
    linear-gradient(135deg, #fbefe4 0%, #e8f1fb 58%, #f8d6df 100%);
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease, filter 420ms ease;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
}

.screen.is-exiting {
  filter: blur(8px);
}

.base-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.home-copy,
.select-copy,
.result-title,
.poster-copy,
.result-actions,
.home-hint,
.select-hint,
.primary-cta {
  position: absolute;
  z-index: 2;
}

.home-copy {
  left: 76px;
  top: 354px;
  width: 598px;
  text-align: center;
  animation: riseIn 720ms ease both;
}

.brand {
  margin: 0 0 56px;
  color: var(--accent);
  font-size: 34px;
  line-height: 1.2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 44px;
  line-height: 1.24;
  font-weight: 700;
}

.lead {
  margin-top: 55px;
  color: var(--muted);
  font-size: 25px;
  line-height: 1.55;
  font-weight: 500;
}

.primary-cta {
  left: 159px;
  top: 1090px;
  width: 432px;
  height: 94px;
  border-radius: 48px;
  background: rgba(255, 246, 242, 0.74);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.84), 0 14px 34px rgba(172, 141, 161, 0.16);
  font-size: 31px;
  font-weight: 500;
  animation: pulse 2100ms ease-in-out infinite;
}

.primary-cta:active,
.action-btn:active,
.mood-card:active {
  transform: scale(0.96);
}

.home-hint {
  left: 0;
  top: 1235px;
  width: 750px;
  color: rgba(95, 105, 120, 0.82);
  font-size: 20px;
  text-align: center;
}

.select-copy {
  left: 105px;
  top: 169px;
  width: 540px;
  text-align: center;
  animation: riseIn 640ms ease both;
}

.select-copy h2 {
  font-size: 41px;
  line-height: 1.25;
  font-weight: 700;
}

.select-copy p {
  margin-top: 22px;
  color: rgba(88, 98, 116, 0.92);
  font-size: 22px;
}

.option-grid {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.mood-card {
  position: absolute;
  width: 312px;
  height: 312px;
  border-radius: 30px;
  transition: transform 220ms ease, filter 220ms ease;
}

.mood-card::before {
  content: "";
  position: absolute;
  left: 60px;
  top: 222px;
  width: 196px;
  height: 58px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78);
}

.mood-card span {
  position: absolute;
  left: 0;
  top: 230px;
  width: 312px;
  text-align: center;
  font-size: 28px;
  font-weight: 500;
}

.mood-card:hover,
.mood-card.is-picked {
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.88));
  transform: scale(1.045);
}

.mood-card.is-picked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 30px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 38px rgba(238, 145, 132, 0.46);
}

.card-confused {
  left: 39px;
  top: 402px;
}

.card-lucky {
  left: 391px;
  top: 402px;
}

.card-energy {
  left: 39px;
  top: 742px;
}

.card-relax {
  left: 391px;
  top: 742px;
}

.select-hint {
  left: 0;
  top: 1235px;
  width: 750px;
  color: rgba(95, 105, 120, 0.85);
  font-size: 21px;
  text-align: center;
}

.result-title {
  left: 0;
  top: 92px;
  width: 750px;
  text-align: center;
  font-size: 39px;
  line-height: 1.2;
  font-weight: 700;
  animation: riseIn 620ms ease both;
}

.poster-copy {
  left: 0;
  top: 0;
  width: 750px;
  height: 1334px;
  text-align: center;
  pointer-events: none;
}

.keyword {
  position: absolute;
  left: 0;
  top: 278px;
  width: 750px;
  color: var(--accent);
  font-size: 31px;
  line-height: 1.2;
  font-weight: 700;
}

.quote {
  position: absolute;
  left: 50px;
  top: 494px;
  width: 650px;
  font-size: 40px;
  line-height: 1.28;
  font-weight: 700;
  white-space: normal;
}

.quote-note {
  position: absolute;
  left: 90px;
  top: 579px;
  width: 570px;
  color: rgba(86, 96, 112, 0.94);
  font-size: 23px;
  line-height: 1.4;
  font-weight: 600;
}

.desc {
  position: absolute;
  left: 100px;
  top: 819px;
  width: 550px;
  color: rgba(86, 96, 112, 0.94);
  font-size: 27px;
  line-height: 1.58;
  font-weight: 600;
}

.date {
  position: absolute;
  left: 80px;
  top: 976px;
  width: 590px;
  color: rgba(102, 112, 130, 0.84);
  font-size: 21px;
  line-height: 1.2;
}

.result-actions {
  left: 82px;
  top: 1175px;
  display: grid;
  width: 586px;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 30px;
}

.action-btn {
  height: 62px;
  padding-top: 36px;
  border-radius: 24px;
  font-size: 20px;
  font-weight: 500;
  transition: transform 180ms ease, filter 180ms ease;
}

.action-btn:hover {
  filter: drop-shadow(0 8px 16px rgba(110, 123, 148, 0.14));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(520px, calc(100vw - 48px));
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(47, 47, 47, 0.84);
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.poster-canvas {
  display: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.84), 0 14px 34px rgba(172, 141, 161, 0.16);
  }
  50% {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.96), 0 18px 42px rgba(238, 145, 132, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
