:root {
  --bg: #f5f0e8;
  --card: #fffdf9;
  --primary: #7a1f2a;
  --primary-soft: #9f2f3d;
  --gold: #cdb396;
  --text: #36312f;
  --muted: #7a6e64;
  --line: #e6ddd2;
  --ok: #2f7a54;
  --soft-brown: #e8dccd;
  --soft-brown-deep: #d8c5af;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #fffcf6, var(--bg));
  color: var(--text);
  line-height: 1.6;
}

.app-shell {
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
}

.experience-screen {
  height: 165vh;
  position: relative;
  margin-bottom: 0;
}

.hero-stage {
  height: 100vh;
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  transform-origin: center top;
  transition: transform 120ms linear;
  --hero-scale: 1;
  --hero-blur: 0px;
  --hero-fade: 1;
}

.poster-frame {
  width: 100%;
  height: 100vh;
  transform: scale(var(--hero-scale));
  filter: blur(var(--hero-blur));
  opacity: var(--hero-fade);
  transition: transform 120ms linear, filter 120ms linear, opacity 120ms linear;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.hero h1 {
  margin: 0 0 12px;
  line-height: 1.25;
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 0 0 16px;
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
}

.privacy-tag {
  margin: 0;
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  background: #f7eee2;
}

.hero-overlay {
  position: absolute;
  bottom: 32px;
  left: 22px;
  right: 22px;
  color: #1a1512;
  opacity: var(--hero-fade);
  transition: opacity 120ms linear;
  max-width: 500px;
  text-align: left;
  z-index: 2;
}

.hero-overlay .subtitle {
  color: #f3ede7;
}

.hero-copy {
  padding: 0;
  margin: 0;
}

.hero-hello {
  margin: -16px 0 10px -15px;
  font-size: clamp(42px, 6.2vw, 70px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-intro {
  margin: 0;
  font-size: clamp(18px, 2.45vw, 25px);
  line-height: 1.58;
  letter-spacing: 0.01em;
}

.hero-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(43, 34, 28, 0.35);
  font-size: clamp(14px, 1.85vw, 18px);
  line-height: 1.55;
  color: rgba(26, 22, 19, 0.86);
  text-align: center;
}

.scroll-tip {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdf8f2;
  text-align: center;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.28);
  opacity: 0.93;
}

.scroll-tip::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 8px auto 0;
  border-right: 1.5px solid rgba(255, 255, 255, 0.92);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.92);
  transform: rotate(45deg);
}

.hero-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(255, 248, 240, 0.88) 0%, rgba(255, 248, 240, 0.38) 34%, rgba(255, 248, 240, 0) 100%);
  pointer-events: none;
}

.carousel-card,
.question-card,
.done-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(84, 62, 45, 0.08);
}

.carousel-card {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.carousel-track {
  min-height: 100vh;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
}

.carousel-item {
  min-height: 100vh;
  height: 100%;
  padding: 0;
  display: grid;
  align-content: end;
  color: #fff;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-image-mode .carousel-item {
}

.single-image-mode .carousel-item img {
  object-fit: cover;
  object-position: center top;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
}

.carousel-item p {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
  display: none;
}

.carousel-dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.poster-frame .ghost-btn,
.poster-frame .carousel-dots {
  display: none;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8ccd8;
}

.dot.active {
  background: var(--primary);
}

.ghost-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(255, 250, 244, 0.95);
  cursor: pointer;
  z-index: 1;
  color: var(--primary);
}

#prevSlide {
  left: 18px;
}

#nextSlide {
  right: 18px;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  color: #fff;
}

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

.secondary-btn {
  background: var(--soft-brown);
  color: #5e4738;
}

.progress-wrap {
  margin: 8px 0 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(122, 89, 64, 0.18);
  border: 1px solid var(--soft-brown-deep);
  box-shadow: 0 14px 30px rgba(113, 77, 49, 0.12);
  position: sticky;
  top: 10px;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.stage-row {
  display: flex;
  justify-content: space-between;
  color: #5b4638;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.progress-bar {
  height: 10px;
  background: rgba(146, 108, 80, 0.2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

#progressFill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7a1f2a, #9f2f3d, #b64a56);
  box-shadow: 0 0 14px rgba(122, 31, 42, 0.35);
  transition: width 280ms ease;
  position: relative;
}

#progressFill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 10%, rgba(255, 247, 240, 0.5) 45%, transparent 80%);
  transform: translateX(-120%);
  animation: sweep 1.8s infinite;
}

.question-card {
  padding: 20px;
  min-height: 260px;
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(110, 82, 60, 0.12);
}

.question-card.error-card {
  border: 2px solid #8b001b;
  box-shadow: 0 0 0 4px rgba(139, 0, 27, 0.14), 0 12px 26px rgba(139, 0, 27, 0.16);
}

.questions-list {
  display: grid;
  gap: 16px;
}

.question-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.question-title {
  margin: 8px 0 16px;
  line-height: 1.5;
  font-size: clamp(17px, 2.3vw, 22px);
  font-weight: 500;
}

.options-grid {
  display: grid;
  gap: 10px;
}

.chip,
.image-option,
.icon-option,
.scale-point {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip.active,
.image-option.active,
.icon-option.active,
.scale-point.active {
  border-color: var(--primary);
  background: #fdf0f1;
}

.radio-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c5bac8;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

.chip.active .radio-circle {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 55%, #fff 57%);
}

.slider-wrap {
  margin-top: 14px;
}

.slider-value {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 600;
}

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

.ticks {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.image-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.options-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.material-option {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: grid;
  gap: 8px;
}

.material-option.active {
  border-color: var(--primary);
  background: #fdf0f1;
}

.material-photo-wrap {
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: #f7efe3;
  aspect-ratio: 4 / 5;
}

.material-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.material-no-photo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.material-label {
  font-size: 13px;
  color: var(--text);
}

.img-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 20px;
  background: #f3e9de;
}

.scale-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.scale-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.survey-footer {
  margin-top: 18px;
  padding-bottom: 20px;
}

.privacy-inline {
  margin: 0 0 10px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.nav-row button {
  flex: 1;
}

.submit-btn {
  width: 100%;
}

.survey-screen {
  margin-top: -8vh;
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 8px;
}

.done-card {
  margin-top: 40px;
  text-align: center;
  padding: 32px 22px;
}

.success-text {
  color: var(--ok);
  font-weight: 600;
}

.done-screen {
  display: none;
}

.done-screen.active {
  display: block;
}

.site-footer {
  margin-top: 30px;
  padding: 24px 18px;
  border-radius: var(--radius);
  background: #2b201d;
  color: #f4ece5;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.footer-title {
  margin: 0 0 14px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-col {
  display: grid;
  gap: 8px;
}

.footer-col-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d4c2b0;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: #fff8f2;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  font-size: 8px;
  line-height: 1.5;
  font-weight: 400;
  transition: color 180ms ease, opacity 180ms ease;
  opacity: 0.92;
}

.footer-link:hover {
  color: #ffffff;
  opacity: 1;
}

.footer-link:active {
  opacity: 0.78;
}

.footer-link-btn {
  width: 100%;
  text-align: left;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 4px 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.footer-icon {
  display: none;
}

.wechat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: none;
  place-items: center;
  z-index: 20;
  padding: 16px;
}

.wechat-modal.open {
  display: grid;
}

.wechat-panel {
  width: min(360px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  position: relative;
}

.about-modal {
  padding: 0;
  align-items: stretch;
  justify-items: stretch;
  overflow-y: auto;
}

.about-modal .about-panel {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  padding: 18px 14px 20px;
  text-align: left;
  animation: aboutZoomIn 220ms ease;
}

.about-modal .about-panel h3 {
  margin: 0 0 12px;
}

.about-modal .about-panel .wechat-close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
}

.about-modal .about-panel .wechat-qr {
  width: 100%;
  height: auto;
  max-width: 900px;
  display: block;
  margin: 8px auto 0;
  object-fit: contain;
  border-radius: 0;
  border: 0;
}

.about-modal .about-panel .wechat-tip {
  text-align: center;
  margin-top: 10px;
}

.policy-modal {
  padding: 0;
  align-items: stretch;
  justify-items: stretch;
  overflow-y: auto;
}

.policy-modal .policy-panel {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  padding: 18px 14px 20px;
  text-align: left;
  animation: aboutZoomIn 220ms ease;
}

.policy-modal .policy-panel h3 {
  margin: 0 0 12px;
}

.policy-modal .policy-panel .wechat-close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
}

.policy-modal .policy-panel .wechat-qr {
  width: 100%;
  height: auto;
  max-width: 900px;
  display: block;
  margin: 8px auto 0;
  object-fit: contain;
  border-radius: 0;
  border: 0;
}

.policy-modal .policy-panel .wechat-tip {
  text-align: center;
  margin-top: 10px;
}

.biz-modal {
  padding: 0;
  align-items: stretch;
  justify-items: stretch;
  overflow-y: auto;
}

.biz-modal .biz-panel {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 10px 16px;
  text-align: center;
}

.biz-modal .biz-panel h3 {
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.biz-modal .biz-panel .wechat-close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
}

.biz-modal .biz-panel .wechat-qr {
  width: 100%;
  max-width: 980px;
  height: auto;
  display: block;
  margin: 6px auto 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.biz-modal .biz-panel .wechat-tip {
  color: #f0e8df;
}

.wechat-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: var(--soft-brown);
  border-radius: var(--radius);
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.wechat-qr {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.wechat-tip {
  color: #7b667f;
  font-size: 12px;
  margin: 10px 0 0;
}

.wechat-actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.wechat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #f8f1e6;
  color: #332720;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 10px;
}

.wechat-action-btn.secondary {
  background: #fff;
}

.action-status {
  margin-top: 2px;
  text-align: center;
  min-height: 18px;
}

@keyframes sweep {
  to {
    transform: translateX(130%);
  }
}

@keyframes aboutZoomIn {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .question-card {
    min-height: 280px;
    padding: 24px;
  }

  .footer-grid {
    gap: 34px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-overlay {
    left: 20px;
    right: 20px;
    bottom: 24px;
    max-width: calc(100% - 40px);
  }

  .hero-note {
    margin-top: 10px;
    padding-top: 10px;
  }

  .question-card {
    padding: 16px;
  }

  /* keep two columns on mobile */

  .site-footer {
    padding: 18px 14px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
