:root {
  --red: #c6242f;
  --deep-red: #8e1824;
  --gold: #f4bd54;
  --green: #2f7a4f;
  --blue: #b9dff2;
  --cream: #fff6e7;
  --ink: #2e2a27;
  --muted: #705f55;
  --stone: #34363a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff0d6 0%, #d9edf7 48%, #b9d3be 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", Arial, sans-serif;
  overflow: hidden;
}

button {
  font: inherit;
}

.phone {
  position: relative;
  width: min(430px, 100vw);
  height: min(860px, 100dvh);
  overflow: hidden;
  background: var(--cream);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(56, 43, 30, 0.22);
}

.slide-track {
  display: flex;
  width: 600%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.78, 0.27, 1);
  will-change: transform;
}

.page {
  position: relative;
  flex: 0 0 16.6667%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: var(--cream);
  scrollbar-width: none;
}

.page::-webkit-scrollbar {
  display: none;
}

.page-inner {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: 46px 24px 110px;
}

.page h1,
.page h2 {
  margin: 0;
  color: var(--deep-red);
  line-height: 1.16;
  letter-spacing: 0;
  animation: fadeUp 0.8s ease both;
}

.page h1 {
  font-size: 42px;
  max-width: 340px;
}

.page h2 {
  font-size: 31px;
}

.lead,
.subtitle,
.body-text {
  line-height: 1.75;
}

.lead {
  margin: 16px 0 22px;
  color: #6a392b;
  font-size: 18px;
  font-weight: 700;
}

.subtitle {
  margin: 10px 0 18px;
  color: #ffe4a5;
  font-size: 15px;
  font-weight: 700;
}

.subtitle.dark {
  color: #80614e;
}

.body-text {
  margin: 18px 0;
  color: #5a4c43;
  font-size: 15px;
}

.tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(198, 36, 47, 0.1);
  color: var(--deep-red);
  font-size: 13px;
  font-weight: 800;
}

.eyebrow.light {
  background: rgba(255, 246, 231, 0.16);
  color: #fff3cf;
}

.section-title {
  margin: 22px 0 14px;
  color: var(--deep-red);
  font-size: 20px;
  font-weight: 900;
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--red), #e24c37);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(157, 28, 38, 0.28);
  font-weight: 900;
}

.secondary-btn {
  padding: 0 20px;
  background: #fff3dc;
  color: var(--deep-red);
  border: 1px solid rgba(198, 36, 47, 0.2);
  font-weight: 900;
}

.primary-btn:active,
.secondary-btn:active,
.product-card:active {
  transform: scale(0.96);
  filter: brightness(0.98);
}

.bottom-action {
  margin-top: 22px;
}

.compact {
  width: auto;
  min-width: 124px;
}

.cover-page {
  background: linear-gradient(180deg, #bfe5f6 0%, #fff4da 48%, #f9d987 100%);
}

.cover-inner {
  padding-top: 70px;
}

.sky-layer,
.hero-field,
.ribbon,
.skyline {
  pointer-events: none;
}

.sky-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  width: 92px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 28px 4px 0 rgba(255, 255, 255, 0.72), -22px 7px 0 rgba(255, 255, 255, 0.68);
  animation: drift 8s ease-in-out infinite alternate;
}

.cloud-a {
  top: 48px;
  left: 22px;
}

.cloud-b {
  top: 112px;
  right: 34px;
  width: 72px;
  animation-duration: 10s;
}

.bird {
  position: absolute;
  color: rgba(142, 24, 36, 0.72);
  font-size: 28px;
  font-weight: 900;
  transform: rotate(8deg);
  animation: fly 5s ease-in-out infinite alternate;
}

.bird-a {
  top: 162px;
  right: 78px;
}

.bird-b {
  top: 196px;
  left: 58px;
  animation-delay: 0.5s;
}

.glow-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff2ae;
  box-shadow: 0 0 18px #fff1a0;
  animation: pulse 2.5s ease-in-out infinite;
}

.dot-a {
  top: 96px;
  left: 67%;
}

.dot-b {
  top: 246px;
  left: 18%;
  animation-delay: 0.8s;
}

.hero-field {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
}

.ribbon-top {
  position: absolute;
  top: 14px;
  right: -48px;
  width: 210px;
  opacity: 0.9;
  animation: ribbonWave 4.6s ease-in-out infinite alternate;
}

.skyline {
  display: block;
  width: 100%;
  margin: 22px auto 26px;
  filter: drop-shadow(0 10px 16px rgba(65, 83, 61, 0.18));
}

.intro-page {
  background: linear-gradient(180deg, #fff7e9 0%, #e7f4df 100%);
}

.impression-grid {
  display: grid;
  gap: 14px;
}

.info-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(132, 88, 48, 0.1);
  box-shadow: 0 12px 24px rgba(90, 77, 58, 0.1);
}

.info-card h3,
.info-card p {
  margin: 0;
}

.info-card h3 {
  color: var(--deep-red);
  font-size: 18px;
}

.info-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
}

.card-icon span {
  position: absolute;
  inset: 14px;
}

.red-mark {
  background: #ffe5df;
}

.red-mark span {
  background: var(--red);
  clip-path: polygon(50% 0, 62% 33%, 100% 33%, 68% 54%, 82% 92%, 50% 69%, 18% 92%, 32% 54%, 0 33%, 38% 33%);
}

.green-mountain {
  background: #dff2e4;
}

.green-mountain span {
  inset: 18px 8px 12px;
  background: linear-gradient(135deg, #79b36f 0 48%, #2f7a4f 49% 100%);
  clip-path: polygon(0 100%, 30% 28%, 47% 62%, 67% 12%, 100% 100%);
}

.gold-basket {
  background: #fff0c8;
}

.gold-basket span {
  inset: 15px 10px 11px;
  border-radius: 0 0 15px 15px;
  background: #d69b37;
  box-shadow: inset 0 8px 0 #f4bd54;
}

.float-card {
  animation: cardFloat 3.6s ease-in-out infinite alternate;
}

.delay-1 {
  animation-delay: 0.35s;
}

.delay-2 {
  animation-delay: 0.7s;
}

.memorial-page {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 220, 158, 0.18), transparent 28%),
    linear-gradient(180deg, #8f1d27 0%, #3b3030 100%);
  color: #fff7e6;
}

.memorial-page h2 {
  color: #fff6dc;
}

.scene-panel,
.cemetery-layout {
  position: relative;
  margin: 18px 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 246, 231, 0.1);
  border: 1px solid rgba(255, 236, 201, 0.16);
}

.memorial-img,
.cemetery-img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.18));
}

.book-card {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: 74px;
  height: 52px;
  padding: 13px 10px;
  border-radius: 6px;
  background: #fff8e8;
  transform: rotate(-4deg);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.book-line {
  display: block;
  height: 5px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: #b94a3a;
}

.book-line.short {
  width: 70%;
}

.red-body {
  color: #fff0d1;
}

.slogan {
  margin: 22px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffdf90, #d84939);
  color: #5a171c;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(36, 20, 20, 0.24);
}

.cemetery-layout {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.star-field span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe9a9;
  box-shadow: 0 0 16px #ffe9a9;
  animation: pulse 2.4s ease-in-out infinite;
}

.star-field span:nth-child(1) {
  top: 24px;
  right: 42px;
}

.star-field span:nth-child(2) {
  top: 76px;
  left: 36px;
  animation-delay: 0.4s;
}

.star-field span:nth-child(3) {
  bottom: 46px;
  right: 74px;
  animation-delay: 0.8s;
}

.spirit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.spirit-card {
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 246, 231, 0.12);
  border: 1px solid rgba(255, 236, 201, 0.18);
  color: #ffe9a9;
  font-size: 20px;
  font-weight: 900;
  animation: cardFloat 3s ease-in-out infinite alternate;
}

.spirit-card:nth-child(2) {
  animation-delay: 0.25s;
}

.spirit-card:nth-child(3) {
  animation-delay: 0.5s;
}

.slogan.outline {
  background: rgba(255, 246, 231, 0.08);
  color: #fff3cf;
  border: 1px solid rgba(255, 236, 201, 0.2);
  box-shadow: none;
  font-size: 20px;
}

.product-page {
  background:
    radial-gradient(circle at 88% 9%, rgba(244, 189, 84, 0.28), transparent 24%),
    linear-gradient(180deg, #fff6e7 0%, #e7f2df 100%);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.product-card {
  min-height: 192px;
  padding: 12px 10px 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 22px rgba(83, 66, 45, 0.1);
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  box-shadow: 0 16px 28px rgba(83, 66, 45, 0.16);
}

.product-card img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: contain;
  margin-bottom: 8px;
}

.product-name {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.product-copy {
  display: block;
  margin-top: 7px;
  color: #6f6256;
  font-size: 12px;
  line-height: 1.48;
}

.cattle {
  border-top: 5px solid #9b6435;
}

.kiwi {
  border-top: 5px solid #5d9f45;
}

.chicken {
  border-top: 5px solid #d89529;
}

.chestnut {
  border-top: 5px solid #7a4a2e;
}

.travel-note {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(47, 122, 79, 0.1);
  color: #2f6f4a;
  text-align: center;
  font-weight: 900;
}

.invite-page {
  background:
    linear-gradient(180deg, rgba(255, 248, 230, 0.95), rgba(255, 236, 198, 0.96)),
    radial-gradient(circle at 16% 18%, rgba(198, 36, 47, 0.16), transparent 28%);
}

.tag-cloud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 18px;
}

.tag-cloud span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fffdf7;
  color: var(--deep-red);
  border: 1px solid rgba(198, 36, 47, 0.15);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(87, 58, 38, 0.08);
}

.student-panel {
  display: grid;
  gap: 6px;
  margin: 18px 0 20px;
  padding: 16px;
  border-radius: 8px;
  background: #fffdf7;
  border: 1px solid rgba(140, 82, 48, 0.12);
  box-shadow: 0 12px 24px rgba(87, 58, 38, 0.08);
}

.student-panel p {
  margin: 0;
  color: #463b36;
  font-size: 13px;
  line-height: 1.45;
}

.student-panel strong {
  color: var(--deep-red);
}

.dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.progress-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 20;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 12px 28px rgba(69, 48, 35, 0.18);
  backdrop-filter: blur(10px);
}

#pageCounter {
  color: var(--deep-red);
  font-size: 13px;
  font-weight: 900;
}

.dots {
  display: flex;
  gap: 7px;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(142, 24, 36, 0.24);
  transition: width 0.25s ease, background 0.25s ease;
}

.dots span.active {
  width: 24px;
  border-radius: 999px;
  background: var(--red);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(34, 25, 21, 0.46);
}

.modal-box {
  position: relative;
  width: min(340px, calc(100vw - 48px));
  padding: 24px 20px 20px;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 24px 64px rgba(22, 13, 10, 0.32);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.modal.show .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box h3 {
  margin: 0 0 10px;
  color: var(--deep-red);
  font-size: 22px;
}

.modal-box p {
  margin: 0 0 18px;
  color: #5a4c43;
  line-height: 1.7;
}

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

@keyframes drift {
  from {
    transform: translateX(-8px);
  }
  to {
    transform: translateX(18px);
  }
}

@keyframes fly {
  from {
    transform: translate(0, 0) rotate(8deg);
  }
  to {
    transform: translate(18px, -8px) rotate(2deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes ribbonWave {
  from {
    transform: rotate(-4deg) translateY(0);
  }
  to {
    transform: rotate(2deg) translateY(10px);
  }
}

@keyframes cardFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-5px);
  }
}

@media (max-width: 430px) {
  body {
    display: block;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .page-inner {
    padding-left: 22px;
    padding-right: 22px;
  }
}

@media (max-height: 720px) {
  .page-inner {
    padding-top: 32px;
    padding-bottom: 96px;
  }

  .page h1 {
    font-size: 36px;
  }

  .page h2 {
    font-size: 27px;
  }

  .product-card {
    min-height: 174px;
  }
}
