:root {
  --cream-50: #fffdf8;
  --cream-100: #fbf3e7;
  --cream-200: #f2dfc6;
  --cream-300: #e6c6a1;
  --peach: #e78f77;
  --peach-dark: #bd6252;
  --rose: #f1b5ad;
  --brown: #36261f;
  --brown-soft: #766157;
  --green: #55745b;
  --paper-shadow: 0 24px 60px rgba(84, 55, 38, 0.14);
  --radius-lg: 30px;
  --radius-md: 20px;
  --page-pad: clamp(20px, 6vw, 34px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream-100);
}

body {
  margin: 0;
  color: var(--brown);
  background:
    radial-gradient(circle at 10% 5%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(180deg, var(--cream-50), var(--cream-100));
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.is-locked {
  height: 100vh;
  overflow: hidden;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(189, 98, 82, 0.45);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

.entry-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  min-height: 100dvh;
  color: #fffaf3;
  background: #2d211c;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.entry-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.entry-screen__photo,
.entry-screen__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.entry-screen__photo {
  object-fit: cover;
  object-position: 48% center;
  transform: scale(1.02);
  animation: slowZoom 12s ease-out both;
}

.entry-screen__veil {
  background:
    linear-gradient(180deg, rgba(42, 30, 24, 0.02) 0%, rgba(42, 30, 24, 0.1) 38%, rgba(42, 30, 24, 0.88) 100%),
    linear-gradient(90deg, rgba(42, 30, 24, 0.18), transparent 60%);
}

.entry-screen__content {
  position: relative;
  width: min(100%, 620px);
  padding: 36px var(--page-pad) max(38px, env(safe-area-inset-bottom));
}

.entry-screen h1 {
  max-width: 560px;
  margin: 10px 0 26px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(34px, 10vw, 60px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  color: var(--cream-50);
  background: var(--brown);
  box-shadow: 0 12px 28px rgba(54, 38, 31, 0.24);
  font-weight: 700;
}

.primary-button--light {
  color: var(--brown);
  background: rgba(255, 251, 244, 0.94);
  box-shadow: 0 10px 32px rgba(20, 12, 8, 0.28);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(2px) scale(0.98);
}

.music-button {
  position: fixed;
  z-index: 40;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(54, 38, 31, 0.1);
  border-radius: 999px;
  color: var(--brown);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 8px 24px rgba(70, 47, 35, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: 0.35s ease;
}

.music-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.music-button__bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 15px;
}

.music-button__bars i {
  display: block;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: var(--peach-dark);
  animation: soundBar 0.8s ease-in-out infinite alternate;
}

.music-button__bars i:nth-child(2) {
  height: 8px;
  animation-delay: -0.4s;
}

.music-button__bars i:nth-child(3) {
  height: 5px;
  animation-delay: -0.2s;
}

.music-button.is-paused .music-button__bars i {
  height: 3px;
  animation-play-state: paused;
}

.music-button__label {
  font-size: 12px;
  font-weight: 700;
}

.section-shell {
  position: relative;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 92px var(--page-pad);
}

.eyebrow {
  margin: 0;
  color: var(--peach-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: rgba(255, 250, 243, 0.74);
}

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  padding-top: max(108px, calc(env(safe-area-inset-top) + 86px));
  overflow: hidden;
}

.hero-section::before {
  position: absolute;
  top: 12%;
  right: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(189, 98, 82, 0.14);
  border-radius: 50%;
  content: "";
}

.hero-section__title {
  margin: 18px 0 24px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(42px, 13vw, 76px);
  line-height: 1.14;
  letter-spacing: -0.07em;
}

.hero-section__title span {
  position: relative;
  color: var(--peach-dark);
  white-space: nowrap;
}

.hero-section__title span::after {
  position: absolute;
  right: -2px;
  bottom: 0;
  left: -2px;
  z-index: -1;
  height: 12px;
  border-radius: 99px;
  background: rgba(241, 181, 173, 0.42);
  content: "";
  transform: rotate(-1deg);
}

.hero-section__lead {
  max-width: 500px;
  margin: 0;
  color: var(--brown-soft);
  font-size: 15px;
}

.hero-section__lead strong {
  color: var(--brown);
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
  border: 1px solid rgba(54, 38, 31, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 14px 40px rgba(84, 55, 38, 0.07);
  overflow: hidden;
}

.report-meta__item {
  padding: 16px 8px;
  text-align: center;
}

.report-meta__item + .report-meta__item {
  border-left: 1px solid rgba(54, 38, 31, 0.1);
}

.report-meta__item span,
.report-meta__item strong {
  display: block;
}

.report-meta__item span {
  margin-bottom: 2px;
  color: var(--brown-soft);
  font-size: 10px;
}

.report-meta__item strong {
  font-size: 13px;
}

.status-live i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: #69a36e;
  box-shadow: 0 0 0 4px rgba(105, 163, 110, 0.12);
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 58px;
  color: var(--brown-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--peach-dark), transparent);
  animation: scrollLine 1.7s ease-in-out infinite;
  transform-origin: top;
}

.doodle--sparkle {
  position: absolute;
  top: 16%;
  right: 12%;
  color: var(--peach);
  font-size: 28px;
  animation: sparkle 2.4s ease-in-out infinite;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading h2,
.meter-panel h2,
.conclusion-card h2 {
  margin: 8px 0 12px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.section-heading > p:last-child,
.meter-panel__description {
  margin: 0;
  color: var(--brown-soft);
  font-size: 14px;
}

.sample-section {
  padding-top: 80px;
}

.sample-card {
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid rgba(54, 38, 31, 0.12);
  background: #fffefa;
  box-shadow: var(--paper-shadow);
  transform: rotate(-0.6deg);
}

.sample-card__tape {
  position: absolute;
  z-index: 2;
  top: -15px;
  left: 50%;
  width: 104px;
  height: 30px;
  background: rgba(233, 203, 159, 0.72);
  clip-path: polygon(5% 6%, 96% 0, 100% 90%, 0 100%);
  transform: translateX(-50%) rotate(1.5deg);
}

.sample-card__topline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--brown-soft);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.sample-card__viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--cream-200);
  overflow: hidden;
  touch-action: pan-y;
}

.sample-card__viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.35s ease;
  user-select: none;
}

.sample-card__viewport img.is-changing {
  opacity: 0;
  transform: scale(0.985);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--brown);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 6px 20px rgba(54, 38, 31, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
}

.gallery-arrow--left {
  left: 10px;
}

.gallery-arrow--right {
  right: 10px;
}

.sample-card__caption {
  display: flex;
  gap: 8px;
  min-height: 66px;
  padding: 18px 4px 8px;
  align-items: flex-start;
}

.sample-card__caption p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.caption-mark {
  color: var(--peach-dark);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream-300);
  transition: width 0.25s ease, background 0.25s ease;
}

.gallery-dot.is-active {
  width: 22px;
  border-radius: 99px;
  background: var(--peach-dark);
}

.meter-section {
  width: min(100%, 780px);
}

.meter-panel {
  position: relative;
  padding: 30px 24px;
  border: 1px solid rgba(54, 38, 31, 0.13);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.52)),
    repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(84, 55, 38, 0.055) 24px);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.meter-panel__stamp {
  position: absolute;
  top: 21px;
  right: -31px;
  width: 128px;
  padding: 5px 0;
  color: rgba(189, 98, 82, 0.65);
  border-top: 2px solid rgba(189, 98, 82, 0.45);
  border-bottom: 2px solid rgba(189, 98, 82, 0.45);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  transform: rotate(39deg);
}

.meter {
  margin: 34px 0 18px;
}

.meter__track {
  height: 17px;
  padding: 3px;
  border: 1px solid rgba(54, 38, 31, 0.16);
  border-radius: 999px;
  background: rgba(54, 38, 31, 0.05);
  overflow: hidden;
}

.meter__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cream-300), var(--peach), var(--peach-dark));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.meter__readout {
  margin-top: 10px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  color: var(--peach-dark);
}

.meter__readout strong {
  font-size: 44px;
  line-height: 1;
}

.meter__readout span {
  font-size: 18px;
}

.meter-panel__result {
  min-height: 52px;
  margin: 0 0 18px;
  color: var(--brown-soft);
  font-size: 13px;
}

.secondary-button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(54, 38, 31, 0.22);
  border-radius: 999px;
  color: var(--brown);
  background: var(--cream-50);
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(84, 55, 38, 0.08);
}

.meter-sticker {
  position: absolute;
  right: 24px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) rotate(8deg) scale(0.8);
  transition: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.meter-sticker.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(8deg) scale(1);
}

.meter-sticker img {
  width: 72px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(54, 38, 31, 0.14);
}

.meter-sticker span {
  margin-top: 4px;
  color: var(--peach-dark);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.signal-section {
  padding-bottom: 108px;
}

.signal-console {
  padding: 12px;
  border: 1px solid rgba(54, 38, 31, 0.14);
  border-radius: 28px;
  background: var(--brown);
  box-shadow: 0 24px 52px rgba(54, 38, 31, 0.18);
}

.signal-console__screen {
  min-height: 362px;
  padding: 22px 18px;
  border-radius: 19px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.96)),
    radial-gradient(circle at 30% 20%, var(--rose), transparent 38%);
}

.chat-bubble {
  width: max-content;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 17px 17px 4px 17px;
  font-size: 13px;
}

.chat-bubble--outgoing {
  margin-left: auto;
  color: #fff;
  background: var(--peach-dark);
}

.reaction-placeholder {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  margin: 32px auto;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--brown-soft);
  background: var(--cream-100);
  font-size: 11px;
  transition: opacity 0.2s ease;
}

.reaction-placeholder i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--peach);
  animation: typingDot 0.8s ease-in-out infinite alternate;
}

.reaction-placeholder i:nth-child(2) {
  animation-delay: 0.15s;
}

.reaction-placeholder i:nth-child(3) {
  animation-delay: 0.3s;
}

.reaction-image {
  width: min(56vw, 210px);
  margin: 26px auto 12px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(54, 38, 31, 0.13);
  opacity: 0;
  transform: translateY(12px) scale(0.86);
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-image.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.signal-console__note {
  margin: 14px 0 0;
  color: var(--brown-soft);
  font-size: 11px;
  text-align: center;
}

.signal-console__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 11px;
}

.signal-console__controls button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  color: var(--cream-50);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.signal-console__controls button.is-active {
  color: var(--brown);
  background: var(--cream-200);
}

.softness-section {
  width: min(100%, 820px);
  background: linear-gradient(180deg, transparent, rgba(230, 198, 161, 0.13), transparent);
}

.portrait-stack {
  position: relative;
  min-height: 790px;
  margin: 44px 0 18px;
}

.portrait-card {
  position: absolute;
  width: min(69vw, 360px);
  margin: 0;
  padding: 10px 10px 18px;
  background: #fffefa;
  box-shadow: var(--paper-shadow);
}

.portrait-card--left {
  top: 0;
  left: 0;
  transform: rotate(-3deg);
}

.portrait-card--right {
  top: 365px;
  right: 0;
  transform: rotate(3.5deg);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.portrait-card figcaption {
  padding: 10px 5px 0;
}

.portrait-card figcaption span,
.portrait-card figcaption strong {
  display: block;
}

.portrait-card figcaption span {
  color: var(--peach-dark);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.portrait-card figcaption strong {
  margin-top: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
}

.finding-note {
  position: relative;
  width: min(88%, 440px);
  margin: 30px auto 0;
  padding: 26px 22px 22px;
  background: #f7df9b;
  box-shadow: 0 18px 38px rgba(84, 55, 38, 0.14);
  transform: rotate(-1deg);
}

.finding-note__pin {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--peach-dark);
  box-shadow: 0 3px 4px rgba(54, 38, 31, 0.25);
  transform: translateX(-50%);
}

.finding-note p {
  margin: 0 0 7px;
  color: rgba(54, 38, 31, 0.55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.finding-note strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  line-height: 1.55;
}

.conclusion-section {
  width: min(100%, 780px);
  padding-top: 80px;
  padding-bottom: 110px;
}

.conclusion-card {
  position: relative;
  padding: 30px 24px;
  border: 1px solid rgba(54, 38, 31, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.9);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.conclusion-card::before {
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(189, 98, 82, 0.2);
  border-radius: 22px;
  content: "";
  pointer-events: none;
}

.conclusion-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conclusion-card__header > span {
  color: var(--brown-soft);
  font-size: 9px;
}

.conclusion-card > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--brown-soft);
  font-size: 14px;
}

.final-letter {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, margin 0.5s ease;
}

.final-letter.is-visible {
  max-height: 980px;
  margin-top: 32px;
  opacity: 1;
}

.final-letter > img {
  width: 112px;
  margin: 0 auto 20px;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(54, 38, 31, 0.14);
}

.final-letter__body {
  padding: 24px 18px;
  border-top: 1px solid rgba(54, 38, 31, 0.11);
  background: linear-gradient(180deg, rgba(251, 243, 231, 0.5), transparent);
}

.final-letter__body p {
  margin: 0 0 14px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.8;
}

.final-letter__sign {
  margin: 24px 0 0 !important;
  color: var(--peach-dark);
  font-size: 23px !important;
  font-weight: 700;
  text-align: right;
}

footer {
  padding: 52px var(--page-pad) max(48px, env(safe-area-inset-bottom));
  color: rgba(255, 253, 248, 0.9);
  background: var(--brown);
  text-align: center;
}

footer span {
  color: rgba(255, 253, 248, 0.44);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

footer p {
  margin: 4px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.heart-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  color: var(--peach);
  font-size: var(--heart-size, 22px);
  animation: heartFloat var(--heart-duration, 2.4s) ease-out forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slowZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.09); }
}

@keyframes soundBar {
  to { height: 3px; }
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.35; transform: scaleY(0.25); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.45; transform: rotate(0deg) scale(0.85); }
  50% { opacity: 1; transform: rotate(18deg) scale(1.15); }
}

@keyframes typingDot {
  to { opacity: 0.25; transform: translateY(-2px); }
}

@keyframes heartFloat {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7); }
  15% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(var(--heart-drift, 0), -105vh, 0) rotate(35deg) scale(1.25); }
}

@media (min-width: 700px) {
  .entry-screen__content {
    padding-left: 7vw;
    padding-bottom: 7vh;
  }

  .hero-section__lead {
    font-size: 17px;
  }

  .meter-panel,
  .conclusion-card {
    padding: 44px;
  }

  .meter-sticker {
    right: 50px;
    bottom: 34px;
  }

  .portrait-stack {
    min-height: 980px;
  }

  .portrait-card--right {
    top: 470px;
  }
}

@media (max-width: 360px) {
  .report-meta__item strong {
    font-size: 11px;
  }

  .signal-console__controls {
    grid-template-columns: 1fr;
  }

  .meter-sticker {
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
