:root {
  --bg: #fef7e7;
  --brand: #b0966e;
  --ink: #272018;
  --muted: #7b6a57;
  --line: rgba(176, 150, 110, 0.28);
  --theme: #f0dcdc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #e8ded0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

button,
input {
  font: inherit;
}

.phone-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: #111;
}

.app-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 100%);
}

.grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(90deg, rgba(176, 150, 110, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(176, 150, 110, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
}

#view-root,
.page {
  min-height: 100vh;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 42px 24px 28px;
  overflow: hidden;
}

.page-head {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.page-head.compact {
  margin-top: 2px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "SimSun", "Songti SC", serif;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 28px;
  line-height: 1.24;
}

h3 {
  font-size: 20px;
  line-height: 1.38;
}

.page-head p:not(.eyebrow),
.lead,
.rx-card p,
.product-info,
.share-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.primary-btn,
.secondary-btn {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn {
  margin-top: auto;
  padding: 16px 18px;
  background: var(--ink);
  color: #fffaf0;
  box-shadow: 0 16px 36px rgba(39, 32, 24, 0.18);
}

.primary-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.hidden {
  display: none !important;
}

.page-start {
  justify-content: center;
  text-align: center;
}

.brand-block {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.logo {
  width: 172px;
  height: 172px;
  object-fit: cover;
  mix-blend-mode: multiply;
  border-radius: 50%;
}

.tagline {
  color: var(--brand);
  font-family: "SimSun", "Songti SC", serif;
  font-size: 20px;
}

.botanical,
.botanical::before,
.botanical::after {
  position: absolute;
  border: 1px solid rgba(176, 150, 110, 0.22);
  border-radius: 999px 0 999px 0;
}

.botanical-a {
  width: 250px;
  height: 250px;
  top: -80px;
  right: -80px;
  transform: rotate(24deg);
}

.botanical-a::before,
.botanical-a::after {
  content: "";
  width: 120px;
  height: 120px;
}

.botanical-a::before {
  left: -40px;
  bottom: 16px;
}

.botanical-a::after {
  right: 54px;
  bottom: -56px;
}

.sachet-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1.04;
  display: grid;
  place-items: center;
  margin-top: 4px;
}

.sachet-stage img {
  width: 94%;
  height: 94%;
  object-fit: cover;
  border-radius: 8px;
  filter: drop-shadow(0 22px 32px rgba(68, 51, 32, 0.22));
  transition: transform 700ms ease, filter 700ms ease;
}

.static-pack {
  aspect-ratio: 1 / 0.9;
}

.static-pack img {
  width: 112%;
  height: 100%;
  object-fit: cover;
  object-position: 54% center;
}

.unlock-panel {
  display: grid;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.unlocked-copy {
  min-height: 27px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.unlocked-copy.show {
  opacity: 1;
  transform: translateY(0);
}

.question-card,
.rx-card,
.product-card,
.share-card {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.78);
  box-shadow: 0 18px 42px rgba(88, 68, 42, 0.1);
}

.question-card {
  padding: 20px;
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.option {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  text-align: left;
}

.option b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--theme);
  color: var(--ink);
}

.option.selected {
  border-color: var(--brand);
  background: rgba(176, 150, 110, 0.12);
  color: var(--ink);
}

.five-map {
  position: relative;
  width: 270px;
  height: 270px;
  margin: 38px auto 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.five-map::before {
  content: "";
  position: absolute;
  inset: 56px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}

.map-node {
  position: absolute;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  transition: transform 600ms ease, background 600ms ease, color 600ms ease;
}

.map-node.active {
  transform: scale(1.12);
  background: var(--node-color);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(176, 150, 110, 0.22);
}

.complete-copy {
  color: var(--brand);
  text-align: center;
}

.rx-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.rx-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 13px;
}

.rx-card strong {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 22px;
}

.cup-scene {
  position: relative;
  z-index: 1;
  height: 430px;
  display: grid;
  place-items: end center;
}

.floating-pack {
  position: absolute;
  top: -28px;
  right: -40px;
  width: 268px;
  height: 268px;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 18px 24px rgba(45, 34, 23, 0.2));
  transform: rotate(8deg);
  animation: packPour 4.8s ease-in-out infinite;
}

.glass {
  position: relative;
  width: 168px;
  height: 238px;
  overflow: hidden;
  border: 3px solid rgba(110, 100, 90, 0.35);
  border-radius: 28px 28px 34px 34px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.28));
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.84), 0 28px 36px rgba(64, 47, 26, 0.14);
}

.glass::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background-image:
    linear-gradient(45deg, transparent 43%, rgba(176, 150, 110, 0.22) 44%, rgba(176, 150, 110, 0.22) 48%, transparent 49%),
    linear-gradient(-45deg, transparent 43%, rgba(176, 150, 110, 0.2) 44%, rgba(176, 150, 110, 0.2) 48%, transparent 49%);
  background-size: 28px 28px;
  opacity: 0.7;
}

.liquid {
  position: absolute;
  inset: auto 8px 8px;
  height: 18%;
  border-radius: 0 0 26px 26px;
  background: var(--theme);
  opacity: 0.72;
  animation: fillCup 4.8s ease-in-out infinite;
}

.bubbles {
  position: absolute;
  left: 32px;
  bottom: 32px;
  width: 100px;
  height: 120px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px) 12px 70px / 36px 42px,
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 2px, transparent 3px) 38px 34px / 34px 44px;
  animation: bubbles 3s linear infinite;
}

.glass-mark {
  position: absolute;
  z-index: 1;
  top: 54px;
  width: 100%;
  color: rgba(39, 32, 24, 0.24);
  font-family: "SimSun", "Songti SC", serif;
  font-size: 26px;
  text-align: center;
}

.steam {
  position: absolute;
  bottom: 212px;
  width: 28px;
  height: 120px;
  border-left: 2px solid rgba(176, 150, 110, 0.35);
  border-radius: 50%;
  animation: steam 3.2s ease-in-out infinite;
}

.steam-one {
  left: 43%;
}

.steam-two {
  left: 55%;
  animation-delay: 0.8s;
}

.product-card {
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.22 / 1;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.4);
  display: block;
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  font-family: "SimSun", "Songti SC", serif;
  color: var(--ink);
}

dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px 12px;
  margin: 14px 0 0;
}

dt {
  color: var(--brand);
}

dd {
  margin: 0;
}

.share-card {
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  min-height: 380px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 252, 244, 0.94)),
    var(--theme);
}

.share-brand,
.share-card span {
  color: var(--brand);
  font-family: "Times New Roman", "SimSun", serif;
}

.share-card h3 {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 25px;
}

.share-card strong {
  font-size: 22px;
}

#posterCanvas {
  width: 100%;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.download-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 1;
}

.share-sheet {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.94);
  box-shadow: 0 18px 42px rgba(88, 68, 42, 0.12);
}

.platform-btn {
  display: grid;
  gap: 6px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.platform-btn span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
}

.wechat-icon {
  background: #19c15f;
}

.qq-icon {
  background: #2d8cff;
}

.douyin-icon {
  background: #161616;
  box-shadow: inset -5px 0 #fe2c55, inset 5px 0 #25f4ee;
}

.red-icon {
  background: #ff2442;
}

@keyframes steam {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.82) rotate(8deg);
  }
  42% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-62px) scale(1.12) rotate(-10deg);
  }
}

@keyframes packPour {
  0%,
  100% {
    transform: rotate(8deg) translateY(0);
  }
  48% {
    transform: rotate(15deg) translateY(8px);
  }
}

@keyframes fillCup {
  0%,
  20% {
    height: 18%;
  }
  62%,
  100% {
    height: 54%;
  }
}

@keyframes bubbles {
  from {
    transform: translateY(30px);
    opacity: 0.2;
  }
  to {
    transform: translateY(-30px);
    opacity: 0.8;
  }
}

@media (min-width: 431px) {
  body {
    padding: 20px;
  }

  .phone-shell {
    min-height: 844px;
    border: 10px solid #15120f;
    border-radius: 34px;
    box-shadow: 0 26px 80px rgba(51, 38, 25, 0.28);
    overflow: hidden;
  }

  .app-screen,
  #view-root,
  .page {
    min-height: 824px;
  }
}
