:root {
  color-scheme: light;
  --ink: #171a1d;
  --muted: #6d747b;
  --line: #e9ecef;
  --soft: #f5f7f8;
  --teal: #00a68a;
  --teal-dark: #008a73;
  --orange: #ff6b35;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #eef1f3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

.shop-page,
.selection-page,
.report-page,
.confirm-page,
.complete-page,
.intro-page,
.survey-page {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.intro-page {
  display: grid;
  align-items: center;
  padding: 22px 16px;
}
.intro-panel {
  width: 100%;
  padding: 25px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.intro-panel h1 { margin: 5px 0 12px; font-size: 27px; line-height: 1.35; }
.intro-lead { margin: 0 0 18px; color: var(--muted); line-height: 1.75; }
.progress-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 24px;
}
.progress-bars span { height: 5px; border-radius: 6px; background: #dfe4e6; }
.progress-bars span.active { background: var(--teal); }
.notice-card {
  margin-top: 11px;
  padding: 14px 15px;
  border-radius: 13px;
  background: var(--soft);
}
.notice-card strong { font-size: 15px; }
.notice-card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.task-budget-card {
  margin-top: 16px;
  padding: 17px;
  border-radius: 15px;
  color: #164f45;
  background: #eaf8f4;
  border: 1px solid #c9ece3;
}
.task-budget-card span { display: block; font-size: 14px; }
.task-budget-card strong { display: block; margin: 5px 0; color: var(--teal-dark); font-size: 31px; }
.task-budget-card p { margin: 6px 0 0; color: #397267; font-size: 14px; line-height: 1.65; }
.decision-rules {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.decision-rules > div { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.decision-rules > div:last-child { border-bottom: 0; }
.decision-rules strong { font-size: 15px; }
.decision-rules p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.intro-submit { width: 100%; margin-top: 20px; }
.device-list {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.device-list > div {
  display: flex;
  justify-content: space-between;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}
.device-list > div:last-child { border-bottom: 0; }
.device-list span { color: #4e565c; }
.device-list strong.pass { color: var(--teal-dark); }
.device-list strong.fail { color: #bc4949; }
.device-result {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 11px;
  font-size: 14px;
  line-height: 1.6;
}
.pass-result { color: #08735f; background: #eaf8f4; }
.review-result { color: #805e19; background: #fff7df; }
.fail-result { color: #a53b3b; background: #fff0f0; }
.device-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-top: 18px; }
.pretest-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 22px 0;
}
.pretest-button {
  min-height: 50px;
  border: 1.5px solid #cfd5d8;
  border-radius: 12px;
  color: #333b40;
  background: #fff;
  font-weight: 800;
}
.pretest-button.pressed {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: #effbf8;
}
.pretest-label { display: block; margin: 4px 0 8px; font-weight: 700; }
.pretest-select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cfd5d8;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}
.pretest-error { margin: 12px 0 0; }

.shop-header,
.report-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 52px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  text-align: center;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}

.shop-header strong { font-size: 17px; }
.back-mark { font-size: 32px; color: #444; }
.more-mark { letter-spacing: 2px; color: #555; }
.report-header h1 { margin: 0; font-size: 18px; }
.report-header button { border: 0; background: transparent; font-size: 32px; }

.product-hero {
  position: relative;
  overflow: hidden;
  height: min(92vw, 440px);
  touch-action: pan-y;
  background: #f7f7f7;
}

.poster-track {
  display: flex;
  height: 100%;
  transition: transform .25s ease;
}
.poster-track.dragging { transition: none; }
.poster-track img { width: 100%; flex: 0 0 100%; object-fit: cover; }
.image-count {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 5px 10px;
  border-radius: 14px;
  color: #fff;
  background: rgba(0,0,0,.55);
  font-size: 13px;
}

.variant-strip {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 8px solid var(--soft);
}
.variant-label { width: 38px; padding-top: 8px; color: var(--muted); font-size: 13px; }
.variant-list { display: flex; gap: 9px; overflow-x: auto; }
.shop-variant {
  width: 68px;
  padding: 4px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: #fff;
}
.shop-variant.active { border-color: var(--teal); background: #effbf8; }
.shop-variant img { display: block; width: 58px; height: 58px; border-radius: 7px; object-fit: cover; }
.shop-variant span { display: block; margin-top: 4px; font-size: 12px; white-space: nowrap; }

.product-card,
.product-intro-card { padding: 17px 16px; border-bottom: 8px solid var(--soft); }
.price { color: var(--orange); font-size: 29px; font-weight: 800; }
.product-card h1 { margin: 8px 0; font-size: 18px; line-height: 1.48; }
.rating { margin: 0; color: #805d34; font-size: 13px; line-height: 1.6; }
.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 8px solid var(--soft);
  color: #5b6268;
  font-size: 13px;
}
.service-row strong { color: var(--teal-dark); }
.product-intro-card h2 { margin: 0 0 8px; font-size: 18px; }
.product-intro-card p { margin: 0; color: #50575d; line-height: 1.75; font-size: 14px; }
.bottom-spacer { height: 88px; }
.bottom-action {
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0,0,0,.06);
}
.bottom-action small { display: block; color: var(--muted); }
.bottom-action strong { color: var(--orange); font-size: 20px; }
.bottom-action.single-action { justify-content: stretch; }
.bottom-action.single-action button { width: 100%; }
.bottom-action button,
.submit-button {
  border: 0;
  border-radius: 24px;
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  font-weight: 700;
}

.report-page { padding-bottom: 28px; }
.selection-page { padding-bottom: 30px; }
.selection-intro { padding: 22px 18px 10px; }
.selection-intro h2 { margin: 0 0 8px; font-size: 23px; }
.selection-intro > p:last-child { margin: 0; color: var(--muted); }
.selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}
.selection-option {
  padding: 9px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
}
.selection-option.active { border-color: var(--teal); background: #effbf8; }
.selection-option img { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; }
.selection-option span { display: block; margin: 9px 2px 2px; font-weight: 750; }
.selection-option i { margin-left: 2px; color: var(--muted); font-size: 12px; font-style: normal; }
.selection-option.active i { color: var(--teal-dark); font-weight: 700; }
.selection-summary {
  display: flex;
  justify-content: space-between;
  margin: 4px 16px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--soft);
}
.selection-summary span { color: var(--muted); }
.selection-summary strong { color: var(--teal-dark); }
.selection-submit { display: block; width: calc(100% - 32px); margin: 0 16px; }
.mini-product {
  display: flex;
  gap: 13px;
  margin: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.mini-product img { width: 82px; height: 82px; border-radius: 10px; object-fit: cover; }
.mini-product strong { display: block; line-height: 1.4; font-size: 14px; }
.mini-product p { margin: 6px 0 3px; color: var(--muted); font-size: 13px; }
.mini-product span { color: var(--orange); font-weight: 700; font-size: 13px; }

.slider-card {
  margin: 16px;
  padding: 20px;
  border-radius: 16px;
  background: var(--soft);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.bid-card h2 { margin: 0; font-size: 22px; line-height: 1.4; }
.budget-summary {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eaf8f4;
}
.budget-summary span { color: #397568; }
.budget-summary strong { color: var(--teal-dark); }
.bid-divider { height: 1px; margin: 18px 0; background: #dfe4e7; }
.slider-card label { display: block; color: var(--muted); text-align: center; font-size: 14px; }
.slider-value { margin: 12px 0 20px; text-align: center; color: var(--teal-dark); font-size: 42px; font-weight: 800; }
#wtpSlider {
  width: 100%;
  height: 30px;
  accent-color: var(--teal);
}
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.remaining-budget {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dfe4e7;
}
.remaining-budget span { color: var(--muted); }
.remaining-budget strong { float: right; color: var(--teal-dark); font-size: 19px; }
.remaining-budget p { clear: both; margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.price-reference {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #cfd4d8;
}
.price-reference strong { color: var(--orange); }
.report-page > .submit-button { display: block; width: calc(100% - 32px); margin: 18px 16px; }
.error-text { margin: 0 16px; color: #c33; }

.confirm-page,
.complete-page {
  display: grid;
  place-items: center;
  padding: 24px;
}
.confirm-card,
.complete-card {
  width: 100%;
  padding: 30px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,.08);
}
.confirm-card h1,
.complete-card h1 { margin: 8px 0; font-size: 23px; }
.confirm-price { margin: 18px 0; color: var(--teal-dark); font-size: 52px; font-weight: 850; }
.confirm-card > p { color: var(--muted); }
.confirm-variant {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--soft);
}
.confirm-variant strong { color: var(--ink); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.secondary-button {
  border: 1px solid #cbd1d5;
  border-radius: 24px;
  padding: 12px 18px;
  background: #fff;
  color: #3d454b;
  font-weight: 700;
}
.checkmark {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  font-size: 38px;
}
.complete-card > p:not(.eyebrow) { color: var(--muted); }
.complete-card .secondary-button { margin-top: 18px; }

.survey-page { padding: 18px 14px 34px; }
.survey-panel { width: 100%; }
.survey-panel > h1 { margin: 4px 2px 8px; font-size: 25px; line-height: 1.4; }
.survey-lead { margin: 0 2px 16px; color: var(--muted); line-height: 1.7; }
.survey-error { margin: 12px 2px; }
.likert-list { display: grid; gap: 13px; }
.likert-item {
  margin-bottom: 13px;
  padding: 16px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.likert-question { margin: 0 0 14px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.likert-scale {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.likert-scale label { position: relative; }
.likert-scale input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.likert-scale span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid #d4d9dc;
  border-radius: 9px;
  color: #4b5359;
  background: #fff;
  font-weight: 700;
}
.likert-scale input:checked + span {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}
.scale-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.survey-next { display: block; width: 100%; margin-top: 17px; }
.form-label { display: block; margin: 15px 2px 7px; font-weight: 700; }
.form-field {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cfd5d8;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .shop-page, .selection-page, .report-page, .confirm-page, .complete-page, .intro-page, .survey-page {
    min-height: calc(100vh - 48px);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(18,28,36,.12);
  }
}
