:root {
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(22px, env(safe-area-inset-bottom));
  --app-height: 100dvh;
  --stage-width: 100%;
  --stage-height: 100dvh;
  --stage-left: 0px;
  --stage-top: 0px;
  --quiz-nav-top: 89.6%;
  --quiz-nav-prev-left: 10.5%;
  --quiz-nav-prev-width: 32.5%;
  --quiz-nav-next-left: 55.5%;
  --quiz-nav-next-width: 32.5%;
  --gold: #ffd36a;
  --gold-deep: #f5a72c;
  --cream: #fff4d8;
  --violet: #b783ff;
  --night: #061044;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  touch-action: pan-y;
  background: #02072a;
  color: var(--cream);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
}

button {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 24%, rgba(47, 82, 204, 0.28), transparent 44%),
    linear-gradient(180deg, #020930 0%, #071f7a 64%, #030a35 100%);
  box-shadow: 0 0 80px rgba(4, 9, 45, 0.75);
}

.page-shell.is-quiz {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.page-shell.is-report {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #020a35;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.home-screen {
  position: absolute;
  top: var(--stage-top);
  left: var(--stage-left);
  width: var(--stage-width);
  height: var(--stage-height);
  overflow: hidden;
}

.home-bg {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: fill;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}

.page-shell::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 8, 38, 0.06) 0%, rgba(3, 8, 38, 0) 42%),
    linear-gradient(0deg, rgba(2, 7, 42, 0.18) 0%, rgba(2, 7, 42, 0) 26%);
}

.brand-bar {
  position: absolute;
  top: 9.4%;
  left: 50%;
  width: min(30vw, 126px);
  height: auto;
  transform: translateX(-50%);
  opacity: 0.9;
  filter:
    drop-shadow(0 2px 5px rgba(2, 8, 35, 0.52))
    drop-shadow(0 0 8px rgba(255, 245, 212, 0.18));
  z-index: 1;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.home-actions {
  position: fixed;
  right: auto;
  bottom: calc(var(--safe-bottom) + 72px);
  left: 50%;
  display: grid;
  width: min(82vw, 320px);
  height: clamp(52px, 7.2dvh, 62px);
  justify-items: center;
  transform: translateX(-50%);
  z-index: 4;
}

.start-button {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 32px;
  overflow: hidden;
  border: 2px solid rgba(255, 242, 188, 0.92);
  border-radius: 999px;
  color: #331d08;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 248, 204, 0.92) 0%, rgba(255, 210, 96, 0.96) 46%, rgba(244, 151, 33, 0.98) 100%);
  box-shadow:
    0 0 18px rgba(255, 190, 66, 0.95),
    0 10px 30px rgba(252, 144, 28, 0.36),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -4px 8px rgba(174, 87, 12, 0.22);
  -webkit-tap-highlight-color: transparent;
}

.button-glow {
  position: absolute;
  inset: 3px 16px auto;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  opacity: 0.82;
}

.button-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4em;
  font-size: clamp(20px, 5.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 250, 211, 0.7);
}

.start-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 0 12px rgba(255, 190, 66, 0.9),
    0 7px 20px rgba(252, 144, 28, 0.26),
    inset 0 2px 4px rgba(255, 255, 255, 0.44);
}

.home-note {
  position: fixed;
  right: auto;
  bottom: max(2px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100vw - 32px), 370px);
  max-width: none;
  margin: 0;
  margin-inline: 0;
  transform: translateX(-50%);
  color: rgba(255, 247, 224, 0.54);
  font-size: clamp(8.5px, 2.28vw, 10px);
  font-weight: 500;
  line-height: 1.34;
  text-align: center;
  text-shadow:
    0 1px 5px rgba(3, 8, 40, 0.82),
    0 0 8px rgba(22, 34, 92, 0.52);
  overflow-wrap: anywhere;
  word-break: normal;
  z-index: 3;
}

.home-note span {
  display: block;
}

.home-record-line {
  margin-top: 2px;
  line-height: 1.45;
  white-space: nowrap;
}

.home-record-line--police[hidden] {
  display: none;
}

.home-record-line--police:not([hidden])::before {
  content: " · ";
}

.home-record-link {
  color: rgba(255, 247, 224, 0.78);
  text-decoration: none;
}

.home-record-link:focus-visible {
  outline: 1px solid rgba(255, 221, 128, 0.9);
  outline-offset: 2px;
}

@media (hover: hover) {
  .home-record-link:hover {
    color: rgba(255, 247, 224, 0.96);
    text-decoration: underline;
  }
}

.toast {
  position: fixed;
  right: 28px;
  bottom: calc(var(--safe-bottom) + 22px);
  left: 28px;
  z-index: 30;
  padding: 10px 14px;
  border: 1px solid rgba(255, 236, 168, 0.38);
  border-radius: 999px;
  color: rgba(255, 247, 226, 1);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  background: rgba(8, 13, 50, 0.9);
  box-shadow:
    0 10px 28px rgba(2, 5, 25, 0.38),
    0 0 14px rgba(255, 210, 110, 0.18);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-screen {
  position: relative;
  width: 100%;
  height: var(--stage-height);
  min-height: var(--app-height);
  background: #061044;
}

#quizScreen,
#quiz2Screen,
#quiz3Screen,
#quiz4Screen {
  height: auto;
  min-height: var(--stage-height);
}

.quiz-canvas {
  position: absolute;
  top: var(--stage-top);
  left: var(--stage-left);
  width: var(--stage-width);
  height: var(--stage-height);
  overflow: hidden;
}

.quiz-canvas--dynamic {
  position: relative;
  top: 0;
  min-height: var(--stage-height);
  height: auto;
  overflow: visible;
  background-color: #061044;
  background-image:
    var(--quiz-bg-top),
    var(--quiz-bg-bottom),
    var(--quiz-bg-mid);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: top center, bottom center, center center;
  background-size: 100% auto, 100% auto, 100% 100%;
}

.quiz-canvas--page1 {
  --quiz-bg-top: url("./assets/quiz1-bg-top.webp?v=20260724-retouch-v1");
  --quiz-bg-mid: url("./assets/quiz1-bg-mid.png");
  --quiz-bg-bottom: url("./assets/quiz1-bg-bottom.webp");
  --quiz-dynamic-top-space: clamp(372px, 94vw, 404px);
}

.quiz-canvas--page2 {
  --quiz-bg-top: url("./assets/quiz2-bg-top.webp?v=20260724-retouch-v1");
  --quiz-bg-mid: url("./assets/quiz2-bg-mid.png");
  --quiz-bg-bottom: url("./assets/quiz2-bg-bottom.webp");
  --quiz-dynamic-top-space: clamp(402px, 102vw, 434px);
}

.quiz-canvas--page3 {
  --quiz-bg-top: url("./assets/quiz3-bg-top.webp?v=20260805-retouch-v2");
  --quiz-bg-mid: url("./assets/quiz3-bg-mid.png");
  --quiz-bg-bottom: url("./assets/quiz3-bg-bottom.webp");
  --quiz-dynamic-top-space: clamp(350px, 88vw, 382px);
}

.quiz-canvas--page4 {
  --quiz-bg-top: url("./assets/quiz4-bg-top.webp?v=20260717-image-opt-v1");
  --quiz-bg-mid: url("./assets/quiz4-bg-mid.png");
  --quiz-bg-bottom: url("./assets/quiz4-bg-bottom.webp");
  --quiz-dynamic-top-space: clamp(382px, 98vw, 420px);
}

.quiz-canvas--dynamic .quiz-bg {
  display: none;
}

.quiz-canvas--dynamic .quiz-layer {
  position: relative;
  min-height: var(--stage-height);
  padding: var(--quiz-dynamic-top-space) 0 clamp(62px, 16vw, 78px);
}

.quiz-question-list,
.quiz3-question-list {
  display: flex;
  flex-direction: column;
  gap: clamp(11px, 3.1vw, 14px);
  width: min(90%, 388px);
  margin: 0 auto;
}

.quiz-question-card,
.quiz3-question-card {
  position: relative;
  width: 100%;
  min-height: clamp(98px, 26vw, 120px);
  margin: 0;
  padding: clamp(2px, 0.9vw, 5px) clamp(8px, 2.8vw, 13px) clamp(5px, 1.5vw, 8px) 0;
  border: clamp(14px, 4vw, 19px) solid transparent;
  border-image-source: url("./assets/quiz-question-frame.png");
  border-image-slice: 28 fill;
  border-image-repeat: stretch;
}

.quiz-question-card.is-missing {
  animation: missing-pulse 900ms ease-in-out 2;
  filter:
    drop-shadow(0 0 12px rgba(255, 208, 92, 0.72))
    drop-shadow(0 0 24px rgba(255, 111, 88, 0.34));
}

.quiz-question-card.is-missing::after {
  position: absolute;
  top: -18px;
  right: -15px;
  z-index: 2;
  padding: 3px 8px;
  border: 1px solid rgba(255, 228, 136, 0.9);
  border-radius: 999px;
  color: #2a1748;
  content: "请完成";
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(180deg, #fff2b8 0%, #ffc45c 100%);
  box-shadow: 0 0 12px rgba(255, 202, 74, 0.44);
}

@keyframes missing-pulse {
  0%,
  100% {
    transform: translateY(0);
  }

  42% {
    transform: translateY(-2px);
  }
}

.quiz-question-title,
.quiz3-question-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(6px, 2vw, 10px);
  margin: 0 0 clamp(6px, 1.7vw, 9px);
  color: #fff3d7;
  font-size: clamp(16px, 4.35vw, 20px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: 0;
  text-shadow:
    0 2px 4px rgba(4, 8, 44, 0.76),
    0 0 9px rgba(255, 221, 142, 0.3);
}

.quiz-question-title img,
.quiz3-question-title img {
  flex: 0 0 auto;
  width: clamp(22px, 6.2vw, 28px);
  height: clamp(22px, 6.2vw, 28px);
  object-fit: contain;
}

.quiz-nav-row,
.quiz3-nav-row {
  display: flex;
  justify-content: space-between;
  width: min(86%, 372px);
  margin: clamp(22px, 5.8vw, 30px) auto 0;
}

.quiz-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.quiz-logo {
  position: absolute;
  top: var(--quiz-logo-top, 62px);
  left: var(--quiz-logo-left, 22px);
  z-index: 8;
  width: min(var(--quiz-logo-width, 114px), 128px);
  opacity: 0.96;
  filter: drop-shadow(0 2px 5px rgba(4, 8, 44, 0.42));
  pointer-events: none;
}

.quiz-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.choice-row {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: clamp(7px, 1.95vw, 11px) clamp(8px, 2.15vw, 12px);
}

.row-height{
  right: 0.5%;
  left: 6.8%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2.3%;
}

.row-weight,
.row-age,
.row-gender {
  right: 6.8%;
  left: 6.8%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2.3%;
}

.row-height {
  top: 47%;
}

.row-weight {
  top: 59%;
}

.row-age {
  top: 70%;
}

.row-gender {
  top: 81%;
}

.choice-button {
  --choice-button-height: clamp(38px, 10.2vw, 46px);
  --choice-cap-width: clamp(19px, 5.1vw, 23px);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  width: auto;
  min-width: clamp(76px, 19vw, 100px);
  max-width: 100%;
  height: var(--choice-button-height);
  padding: 0 clamp(14px, 3.7vw, 22px);
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  color: #fff6e4;
  font-family: inherit;
  cursor: pointer;
  background-color: transparent;
  background-image:
    url("./assets/option-cap-left.png"),
    url("./assets/option-cap-right.png"),
    url("./assets/option-fill.png");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: left center, right center, center center;
  background-size:
    var(--choice-cap-width) var(--choice-button-height),
    var(--choice-cap-width) var(--choice-button-height),
    calc(100% - var(--choice-button-height) + 2px) var(--choice-button-height);
  filter: drop-shadow(0 0 8px rgba(105, 91, 225, 0.25));
  -webkit-tap-highlight-color: transparent;
}

.choice-button.is-selected {
  color: #171725;
  background-image:
    url("./assets/option-selected-cap-left.png"),
    url("./assets/option-selected-cap-right.png"),
    url("./assets/option-selected-fill.png");
  filter:
    drop-shadow(0 0 10px rgba(255, 197, 82, 0.72))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.22));
}

.choice-text {
  display: block;
  width: auto;
  overflow: hidden;
  font-size: clamp(12px, 3.45vw, 15px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 5px rgba(8, 13, 57, 0.4);
}

.choice-button.is-selected .choice-text {
  text-shadow: 0 1px 0 rgba(255, 244, 196, 0.62);
}

.weight-empty {
  position: absolute;
  top: 59%;
  right: 12%;
  left: 12%;
  margin: 0;
  color: rgba(219, 212, 255, 0.62);
  font-size: clamp(12px, 3.3vw, 18px);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 8px rgba(2, 7, 40, 0.6);
  pointer-events: none;
}

.weight-empty.is-hidden {
  display: none;
}

.image-nav {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  filter: drop-shadow(0 0 10px rgba(78, 69, 196, 0.28));
}

.image-nav img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.nav-return {
  top: 89.6%;
  left: 8.7%;
  width: 35.5%;
}

.nav-next {
  top: 89.6%;
  right: 8.7%;
  width: 35.5%;
}

.quiz2-row-posture,
.quiz2-row-discomfort,
.quiz2-row-feel,
.quiz2-row-body,
.quiz2-row-neck {
  right: 6.8%;
  left: 6.8%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2.35%;
}

.quiz2-row-posture {
  top: 47.2%;
}

.quiz2-row-discomfort {
  top: 56.5%;
}

.quiz2-row-feel {
  top: 65.5%;
}

.quiz2-row-body {
  top: 74.6%;
}

.quiz2-row-neck {
  top: 83.8%;
}

.quiz2-nav-prev {
  top: 89.6%;
  left: 8.7%;
  width: 35.5%;
}

.quiz2-nav-next {
  top: 89.6%;
  right: 8.7%;
  width: 35.5%;
}

.quiz3-row-duration,
.quiz3-row-latency,
.quiz3-row-snoring,
.quiz3-row-nightwake,
.quiz3-row-earlywake {
  right: 6.8%;
  left: 6.8%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2.35%;
}

.quiz3-row-duration {
  top: 43.8%;
}

.quiz3-row-latency {
  top: 53.7%;
}

.quiz3-row-snoring {
  top: 63.7%;
}

.quiz3-row-nightwake {
  top: 74%;
}

.quiz3-row-earlywake {
  top: 84%;
}

.quiz3-nav-prev {
  top: 89.6%;
  left: 8.7%;
  width: 35.5%;
}

.quiz3-nav-next {
  top: 89.6%;
  right: 8.7%;
  width: 35.5%;
}

.quiz3-question-card .choice-row {
  position: relative;
  inset: auto;
  right: auto;
  left: auto;
  top: auto;
  z-index: 1;
  width: 100%;
  column-gap: clamp(7px, 2vw, 10px);
  row-gap: clamp(8px, 2.2vw, 11px);
}

.quiz-canvas--page3 .choice-button {
  --choice-button-height: clamp(36px, 9.6vw, 43px);
  min-width: clamp(80px, 21vw, 108px);
  padding-right: clamp(15px, 3.8vw, 22px);
  padding-left: clamp(15px, 3.8vw, 22px);
}

.quiz-canvas--page3 .choice-text {
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 800;
  line-height: 1.08;
}

.quiz-canvas--page3 .quiz3-nav-prev,
.quiz-canvas--page3 .quiz3-nav-next {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  width: 44.5%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(80, 74, 210, 0.24));
}

.quiz-canvas--page3 .quiz3-nav-prev img,
.quiz-canvas--page3 .quiz3-nav-next img {
  height: auto;
  object-fit: contain;
}

.quiz4-row-wakeup,
.quiz4-row-daytime {
  right: 6.8%;
  left: 6.8%;
  right: var(--quiz-option-row-right, 6.8%);
  left: var(--quiz-option-row-left, 6.8%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2.35%;
}

.quiz4-row-mattress,
.quiz4-row-pillow {
  right: 2%;
  left: 6.8%;
  right: var(--quiz-option-row-right, 6.8%);
  left: var(--quiz-option-row-left, 6.8%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 1.2vw, 6px) 2.35%;
}

.quiz4-row-wakeup .choice-button,
.quiz4-row-daytime .choice-button,
.quiz4-row-mattress .choice-button,
.quiz4-row-pillow .choice-button {
  justify-self: start;
  width: auto;
  min-height: var(--choice-button-height);
  aspect-ratio: auto;
}

.quiz4-row-wakeup .choice-button:nth-child(2),
.quiz4-row-daytime .choice-button:nth-child(2),
.quiz4-row-mattress .choice-button:nth-child(2),
.quiz4-row-pillow .choice-button:nth-child(2),
.quiz4-row-mattress .choice-button:nth-child(5),
.quiz4-row-pillow .choice-button:nth-child(5) {
  margin-left: 0;
}

.quiz4-row-wakeup .choice-button:nth-child(3),
.quiz4-row-daytime .choice-button:nth-child(3),
.quiz4-row-mattress .choice-button:nth-child(3),
.quiz4-row-pillow .choice-button:nth-child(3) {
  margin-left: 0;
}

.quiz4-row-mattress .choice-button:nth-child(-n + 3),
.quiz4-row-pillow .choice-button:nth-child(-n + 3) {
  grid-column: auto;
}

.quiz4-row-mattress .choice-button:nth-child(n + 4),
.quiz4-row-pillow .choice-button:nth-child(n + 4) {
  grid-column: auto;
  width: auto;
}

.quiz4-row-mattress .choice-button:nth-child(5),
.quiz4-row-pillow .choice-button:nth-child(5) {
  margin-left: 0;
}

.quiz4-row-mattress .choice-button:nth-child(4),
.quiz4-row-pillow .choice-button:nth-child(4) {
  grid-column: auto;
  grid-row: auto;
}

.quiz4-row-mattress .choice-button:nth-child(5),
.quiz4-row-pillow .choice-button:nth-child(5) {
  grid-column: auto;
  grid-row: auto;
}

.quiz4-row-wakeup {
  top: 47.8%;
}

.quiz4-row-daytime {
  top: 56.4%;
}

.quiz4-row-mattress {
  top: 65.3%;
}

.quiz4-row-pillow {
  top: 78.8%;
}

.quiz4-nav-prev {
  top: 89.6%;
  left: 8.7%;
  width: 35.5%;
}

.quiz4-nav-report {
  top: 89.6%;
  right: 8.7%;
  width: 35.5%;
}

.nav-return,
.quiz2-nav-prev,
.quiz3-nav-prev,
.quiz4-nav-prev {
  top: 89.6%;
  left: 10.5%;
  width: 32.5%;
  height: clamp(38px, 9.8vw, 48px);
}

.nav-next,
.quiz2-nav-next,
.quiz3-nav-next,
.quiz4-nav-report {
  top: 89.6%;
  right: 12%;
  width: 32.5%;
  height: clamp(38px, 9.8vw, 48px);
}

.quiz4-nav-prev,
.quiz4-nav-report {
  position: absolute;
  top: 89.6%;
  height: clamp(38px, 9.8vw, 48px);
  z-index: 4;
}

.quiz4-nav-prev {
  left: 10.5%;
  width: 32.5%;
}

.quiz4-nav-report {
  right: 12%;
  left: auto;
  width: 32.5%;
}

.quiz4-nav-report img {
  transform: scale(0.98, 0.94);
}

.quiz-canvas--dynamic .quiz-question-card .choice-row {
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 1;
  width: 100%;
  column-gap: clamp(7px, 2vw, 10px);
  row-gap: clamp(8px, 2.2vw, 11px);
}

.quiz-canvas--dynamic .choice-button {
  --choice-button-height: clamp(36px, 9.6vw, 43px);
  min-width: clamp(80px, 21vw, 108px);
  width: auto;
  min-height: 0;
  padding-right: clamp(15px, 3.8vw, 22px);
  padding-left: clamp(15px, 3.8vw, 22px);
  aspect-ratio: auto;
}

.quiz-canvas--dynamic .choice-text {
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 800;
  line-height: 1.08;
}

.quiz-canvas--dynamic .weight-empty {
  position: relative;
  inset: auto;
  z-index: 1;
  margin: clamp(6px, 1.8vw, 9px) 0 0;
  font-size: clamp(13px, 3.45vw, 15px);
}

.quiz-canvas--dynamic .nav-return,
.quiz-canvas--dynamic .nav-next,
.quiz-canvas--dynamic .quiz2-nav-prev,
.quiz-canvas--dynamic .quiz2-nav-next,
.quiz-canvas--dynamic .quiz3-nav-prev,
.quiz-canvas--dynamic .quiz3-nav-next,
.quiz-canvas--dynamic .quiz4-nav-prev,
.quiz-canvas--dynamic .quiz4-nav-report {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  width: 44.5%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(80, 74, 210, 0.24));
}

.quiz-canvas--dynamic .nav-return img,
.quiz-canvas--dynamic .nav-next img,
.quiz-canvas--dynamic .quiz2-nav-prev img,
.quiz-canvas--dynamic .quiz2-nav-next img,
.quiz-canvas--dynamic .quiz3-nav-prev img,
.quiz-canvas--dynamic .quiz3-nav-next img,
.quiz-canvas--dynamic .quiz4-nav-prev img,
.quiz-canvas--dynamic .quiz4-nav-report img {
  height: auto;
  object-fit: contain;
  transform: none;
}

.quiz-canvas--dynamic .quiz4-nav-report {
  width: 48%;
}

.image-nav:active,
.choice-button:active {
  transform: translateY(1px) scale(0.99);
}

.phone-modal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  width: 100%;
  height: var(--app-height);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.phone-modal.is-visible {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.phone-modal-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(2, 6, 30, 0.68);
  backdrop-filter: blur(2px);
}

.phone-card {
  position: relative;
  width: min(96vw, 410px);
  aspect-ratio: 853 / 917;
  max-height: calc(var(--app-height) - 28px);
  transform: translateY(-1.5%) scale(0.96);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.phone-modal.is-visible .phone-card {
  transform: translateY(-1.5%) scale(1);
  opacity: 1;
}

.phone-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.phone-field {
  position: absolute;
  top: 41.8%;
  left: 50%;
  z-index: 1;
  display: block;
  width: 62%;
  aspect-ratio: 540 / 227;
  transform: translateX(-50%);
}

.phone-field-bg,
.phone-submit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.phone-input {
  position: absolute;
  top: 47%;
  right: 15%;
  left: 25%;
  z-index: 1;
  height: 44%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #131a3e;
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  background: transparent;
  transform: translateY(-50%);
}

.phone-input::placeholder {
  color: rgba(30, 36, 69, 0.46);
  font-weight: 700;
}

.phone-consent-row {
  position: absolute;
  top: 60.2%;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72%;
  color: #6650a9;
  font-size: clamp(9.5px, 2.45vw, 11.5px);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: none;
  transform: translateX(-50%);
}

.phone-consent {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.phone-consent-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.phone-consent-box {
  display: inline-grid;
  flex: 0 0 auto;
  width: clamp(12px, 3vw, 14px);
  height: clamp(12px, 3vw, 14px);
  margin: 0.05em 4px 0 0;
  place-items: center;
  border: 1.5px solid rgba(113, 88, 191, 0.7);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 7px rgba(113, 88, 191, 0.18);
}

.phone-consent-input:checked + .phone-consent-box::after {
  width: 55%;
  height: 32%;
  border-bottom: 2px solid #7158bf;
  border-left: 2px solid #7158bf;
  content: "";
  transform: rotate(-45deg) translate(1px, -1px);
}

.phone-consent-text {
  display: block;
}

.phone-consent-link {
  color: #7158bf;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.phone-legal-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  gap: 2px;
  width: auto;
  margin-left: 2px;
  font: inherit;
}

.phone-consent-note {
  position: absolute;
  top: 61.8%;
  left: 50%;
  z-index: 2;
  width: 70%;
  margin: 0;
  color: rgba(92, 82, 124, 0.68);
  font-size: clamp(8.5px, 2.25vw, 10px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transform: translateX(-50%);
}

.phone-submit {
  position: absolute;
  top: 59.6%;
  left: 50%;
  z-index: 1;
  width: 62%;
  aspect-ratio: 540 / 227;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  filter:
    drop-shadow(0 0 10px rgba(255, 195, 74, 0.55))
    drop-shadow(0 8px 18px rgba(111, 62, 21, 0.22));
  transform: translateX(-50%);
}

.phone-edit {
  position: absolute;
  top: 78.4%;
  left: 50%;
  z-index: 1;
  padding: 0;
  border: 0;
  color: #7158bf;
  cursor: pointer;
  background: transparent;
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
  transform: translateX(-50%);
}

.phone-submit:active,
.phone-edit:active {
  transform: translateX(-50%) translateY(1px) scale(0.99);
}

.consent-confirm {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 11%;
  background: rgba(24, 18, 56, 0.18);
  backdrop-filter: blur(1px);
}

.consent-confirm.is-visible {
  display: flex;
}

.consent-confirm-card {
  width: 100%;
  padding: clamp(16px, 4vw, 20px) clamp(14px, 4vw, 18px) clamp(14px, 3.8vw, 17px);
  border: 2px solid rgba(255, 215, 126, 0.86);
  border-radius: 18px;
  color: #3d2b61;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 238, 184, 0.86), transparent 42%),
    rgba(255, 249, 240, 0.98);
  box-shadow:
    0 12px 30px rgba(49, 31, 94, 0.28),
    0 0 14px rgba(255, 196, 74, 0.24);
}

.consent-confirm-card h3 {
  margin: 0 0 8px;
  color: #2f2454;
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 900;
  line-height: 1.2;
}

.consent-confirm-card p {
  margin: 0;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 700;
  line-height: 1.45;
}

.consent-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 14px;
}

.consent-confirm-actions button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 900;
}

.consent-confirm-cancel {
  border: 1px solid rgba(113, 88, 191, 0.38);
  color: #7158bf;
  background: rgba(255, 255, 255, 0.72);
}

.consent-confirm-agree {
  border: 0;
  color: #fff9df;
  background: linear-gradient(180deg, #ffc960 0%, #f2a52d 100%);
  box-shadow: 0 5px 12px rgba(239, 164, 45, 0.34);
}

.consent-confirm-actions button:active {
  transform: translateY(1px) scale(0.99);
}

.personality-screen {
  --personality-safe-top: calc(var(--safe-top) + clamp(2px, 1.2dvh, 10px));
  --personality-safe-bottom: max(24px, calc(var(--safe-bottom) - 6px));
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #061044;
  cursor: pointer;
}

.personality-canvas {
  position: absolute;
  top: var(--stage-top);
  left: var(--stage-left);
  width: var(--stage-width);
  height: var(--stage-height);
  overflow: hidden;
}

.personality-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
  opacity: 0;
}

.personality-poster.is-ready {
  opacity: 1;
}

.personality-logo {
  position: absolute;
  top: var(--personality-safe-top);
  left: 50%;
  z-index: 2;
  display: block;
  width: min(30vw, 126px);
  height: auto;
  opacity: 0.9;
  filter:
    drop-shadow(0 2px 5px rgba(2, 8, 35, 0.52))
    drop-shadow(0 0 8px rgba(255, 245, 212, 0.18));
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}

.personality-next {
  position: absolute;
  bottom: var(--personality-safe-bottom);
  left: 50%;
  z-index: 5;
  display: block;
  width: min(74vw, 304px);
  aspect-ratio: 470 / 71;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  filter:
    drop-shadow(0 0 12px rgba(255, 200, 84, 0.58))
    drop-shadow(0 8px 20px rgba(5, 8, 34, 0.34));
  transform: translateX(-50%);
}

.personality-next img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

a.personality-next {
  inset: 0;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  color: inherit;
  text-decoration: none;
  transform: none;
}

a.personality-next img {
  position: absolute;
  bottom: var(--personality-safe-bottom);
  left: 50%;
  width: min(74vw, 304px);
  height: auto;
  aspect-ratio: 470 / 71;
  transform: translateX(-50%);
}

.personality-next:active {
  transform: translateX(-50%) translateY(1px) scale(0.99);
}

@font-face {
  font-family: "MOSA Jiangcheng Report";
  src: url("./assets/fonts/jiangcheng-yuanti-700w-report.woff2?v=20260723-v1") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

a.personality-next:active {
  transform: none;
}

a.personality-next:active img {
  transform: translateX(-50%) translateY(1px) scale(0.99);
}

.report-detail-screen {
  --report-width: min(100vw, 430px);
  --report-bg-top-height: calc(var(--report-width) * 0.93827);
  --report-bg-bottom-height: calc(var(--report-width) * 0.75185);
  --report-card-gap: clamp(18px, 5vw, 24px);
  --report-mattress-top: calc(var(--report-width) * 1.01);
  --report-mattress-height: clamp(520px, 138vw, 594px);
  position: relative;
  width: 100%;
  height: auto;
  min-height: max(
    100%,
    calc(var(--report-width) * 2.616)
  );
  display: none;
  place-items: center;
  padding: var(--report-mattress-top) 0 0;
  font-family: "MOSA Jiangcheng Report", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #020a35;
  background-image:
    url("./assets/report-bg-top.png"),
    url("./assets/report-bg-bottom.webp"),
    url("./assets/report-bg-mid.png");
  background-position:
    center top,
    center bottom,
    center var(--report-bg-top-height);
  background-size:
    100% auto,
    100% auto,
    100% calc(100% - var(--report-bg-top-height) - var(--report-bg-bottom-height));
  background-repeat: no-repeat;
}

.report-detail-screen.is-active {
  display: block;
}

.report-logo {
  position: absolute;
  top: calc(var(--report-width) * 0.08);
  left: calc(var(--report-width) * 0.05762);
  z-index: 2;
  display: block;
  width: min(calc(var(--report-width) * 0.30012), 128px);
  height: auto;
  opacity: 0.96;
  filter: drop-shadow(0 2px 5px rgba(4, 8, 44, 0.42));
  user-select: none;
  pointer-events: none;
}

.report-personality-frame {
  position: absolute;
  top: calc(var(--report-width) * -0.035);
  left: calc(50% + clamp(7px, 2.1vw, 9px));
  z-index: 1;
  display: block;
  width: min(122vw, 525px);
  height: auto;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 0 12px rgba(153, 132, 255, 0.42))
    drop-shadow(0 12px 22px rgba(1, 6, 35, 0.25));
  user-select: none;
  pointer-events: none;
  opacity: 0;
}

.report-personality-frame.is-ready {
  opacity: 1;
}

.report-score-panel {
  position: absolute;
  top: clamp(235px, 61.2vw, 266px);
  left: calc(50% + clamp(17px, 4.8vw, 26px));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 2.2vw, 12px);
  width: min(52vw, 208px);
  color: #fff1cc;
  pointer-events: none;
}

.report-score-block {
  padding: 0;
}

.report-rating-block {
  padding: 0;
}

.report-metric-label {
  margin-bottom: clamp(4px, 1.3vw, 7px);
  color: rgba(255, 246, 223, 0.96);
  font-size: clamp(12px, 3.2vw, 15px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(52, 33, 6, 0.48),
    0 0 8px rgba(255, 214, 133, 0.18);
  white-space: nowrap;
}

.report-score-value {
  display: flex;
  align-items: flex-end;
  color: #ffd873;
  line-height: 1;
  white-space: nowrap;
}

.report-score-number {
  display: inline-block;
  color: #ffd873;
  font-size: clamp(50px, 13.2vw, 62px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff4b4 0%, #ffd96f 20%, #ffc447 58%, #f4a42d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.8px rgba(255, 238, 128, 0.58);
  filter:
    drop-shadow(0 2px 0 rgba(140, 76, 17, 0.35))
    drop-shadow(0 0 10px rgba(255, 210, 77, 0.36));
  user-select: none;
  pointer-events: none;
}

.report-score-unit {
  display: inline-block;
  margin-left: clamp(1px, 0.4vw, 2px);
  margin-bottom: clamp(3px, 0.9vw, 5px);
  color: #ffd873;
  font-size: clamp(15px, 4vw, 21px);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(147, 83, 20, 0.42),
    0 0 7px rgba(255, 220, 124, 0.34);
}

.report-stars {
  display: flex;
  align-items: center;
  gap: clamp(3px, 1vw, 5px);
  min-height: clamp(24px, 6.5vw, 31px);
}

.report-stars img {
  display: block;
  width: clamp(24px, 6.2vw, 30px);
  height: auto;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(255, 184, 55, 0.32));
}

.report-mattress-card,
.report-pillow-card {
  position: relative;
  z-index: 1;
  width: min(91vw, 392px);
  min-height: var(--report-card-min-height);
  margin: 0 auto;
  padding: clamp(22px, 5.4vw, 28px) clamp(17px, 4.6vw, 22px) clamp(24px, 6vw, 30px);
  color: #fff7e3;
  background: transparent;
  filter:
    drop-shadow(0 0 14px rgba(146, 127, 255, 0.38))
    drop-shadow(0 12px 24px rgba(1, 6, 35, 0.22));
}

.report-mattress-card {
  --report-card-min-height: var(--report-mattress-height);
}

.report-mattress-card.has-two-products {
  --report-card-min-height: 0px;
}

.report-pillow-card {
  --report-card-min-height: 0px;
  margin-top: var(--report-card-gap);
}

.report-mattress-card::before,
.report-pillow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: clamp(28px, 7.4vw, 34px) solid transparent;
  border-image-source: url("./assets/report-card-frame.png");
  border-image-slice: 58 fill;
  border-image-width: 1;
  border-image-repeat: stretch;
  pointer-events: none;
}

.report-mattress-card > *,
.report-pillow-card > * {
  position: relative;
  z-index: 2;
}

.report-mattress-title,
.report-pillow-title {
  position: relative;
  z-index: 2;
  display: block;
  width: min(50vw, 214px);
  height: auto;
  user-select: none;
  pointer-events: none;
}

.report-mattress-icon,
.report-pillow-icon {
  position: absolute;
  top: clamp(60px, 16.4vw, 72px);
  right: clamp(4px, 1.8vw, 10px);
  z-index: 1;
  display: block;
  width: min(36vw, 155px);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 208, 91, 0.26));
  user-select: none;
  pointer-events: none;
}

.report-pillow-icon {
  top: clamp(12px, 4.2vw, 24px);
  right: clamp(8px, 2.2vw, 12px);
  width: min(34vw, 146px);
}

.report-mattress-summary,
.report-pillow-summary {
  position: relative;
  z-index: 2;
  margin: clamp(8px, 2.2vw, 11px) 0 clamp(12px, 3.2vw, 16px);
  padding-right: min(35vw, 146px);
  color: #ffd96b;
  font-size: clamp(13px, 3.72vw, 16px);
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(103, 55, 8, 0.46),
    0 0 8px rgba(255, 177, 48, 0.22);
}

.report-mattress-section,
.report-pillow-section {
  position: relative;
  z-index: 2;
  padding-top: clamp(11px, 3vw, 14px);
  border-top: 1px solid rgba(255, 205, 99, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(168, 126, 255, 0.24),
    inset 0 2px 8px rgba(255, 201, 85, 0.08);
}

.report-mattress-section + .report-mattress-section,
.report-pillow-section + .report-pillow-section {
  margin-top: clamp(12px, 3.2vw, 16px);
}

.report-section-title {
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.9vw, 9px);
  width: fit-content;
  min-width: 0;
  height: auto;
  margin: 0 0 clamp(7px, 2vw, 9px);
  color: #ffd568;
  font-size: clamp(20px, 5.35vw, 23px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(67, 37, 10, 0.62),
    0 0 8px rgba(255, 184, 52, 0.3);
  white-space: nowrap;
}

.report-section-star {
  flex: 0 0 auto;
  display: block;
  width: clamp(21px, 5.7vw, 25px);
  height: auto;
  filter: drop-shadow(0 0 5px rgba(255, 184, 55, 0.34));
  user-select: none;
  pointer-events: none;
}

.report-mattress-rec-title,
.report-pillow-rec-title {
  width: fit-content;
  height: auto;
}

.report-mattress-copy,
.report-pillow-copy {
  margin: 0;
  color: rgba(255, 248, 229, 0.96);
  font-size: clamp(11.5px, 3.08vw, 13.2px);
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: 0;
  text-shadow: 0 2px 6px rgba(2, 8, 36, 0.48);
}

.report-product-list {
  display: grid;
  gap: clamp(7px, 1.9vw, 9px);
}

.report-product-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(5px, 1.6vw, 8px);
  align-items: start;
  padding-top: clamp(9px, 2.6vw, 12px);
  border-top: 1px dashed rgba(255, 193, 98, 0.3);
}

.report-product-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.report-product-pill {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  width: fit-content;
  min-width: min(34vw, 124px);
  max-width: 100%;
  height: clamp(30px, 8.2vw, 38px);
  padding: 0 clamp(18px, 5vw, 24px);
  color: #ffd568;
  background: transparent url("./assets/report-product-pill.png") center / 100% 100% no-repeat;
  font-size: clamp(13px, 3.45vw, 16px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(67, 37, 10, 0.56),
    0 0 8px rgba(255, 184, 52, 0.34);
  white-space: nowrap;
}

.report-pillow-card .report-product-row {
  grid-template-columns: 1fr;
}

.report-pillow-card .report-product-pill {
  max-width: 100%;
}

.report-product-text {
  margin: 0;
  padding-left: clamp(2px, 0.8vw, 4px);
  color: rgba(255, 248, 230, 0.96);
  font-size: clamp(11.5px, 3.08vw, 13.2px);
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: 0;
  text-shadow: 0 2px 6px rgba(2, 8, 36, 0.5);
}

.report-disclaimer {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 32px), 370px);
  margin: clamp(18px, 4.8vw, 24px) auto 0;
  padding: 0;
  border: 0;
  color: rgba(255, 247, 224, 0.54);
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.report-disclaimer p {
  margin: 0;
  font-size: clamp(8.5px, 2.28vw, 10px);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: 0;
  text-shadow:
    0 1px 5px rgba(3, 8, 40, 0.82),
    0 0 8px rgba(22, 34, 92, 0.52);
  overflow-wrap: anywhere;
  word-break: normal;
}

.report-actions {
  position: relative;
  z-index: 1;
  width: min(91vw, 392px);
  margin: clamp(14px, 4vw, 18px) auto 0;
  padding-bottom: clamp(32px, 9vw, 48px);
}

.report-guide-wrap {
  display: block;
  width: 100%;
  margin: 0 0 clamp(22px, 5.8vw, 26px);
  line-height: 0;
}

.report-guide {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
  filter:
    drop-shadow(0 0 10px rgba(135, 117, 255, 0.24))
    drop-shadow(0 8px 18px rgba(1, 6, 35, 0.18));
}

.report-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vw, 20px);
  margin-top: 0;
}

.report-action-link {
  display: block;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease;
}

.report-action-link:active {
  transform: translateY(1px) scale(0.985);
}

.report-action-link img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.report-share-link {
  width: min(39vw, 156px);
}

.report-home-link {
  width: min(38vw, 154px);
}

.report-consult-link {
  width: min(38vw, 152px);
}

.consult-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.consult-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.consult-modal-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(2, 6, 30, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.consult-card {
  position: relative;
  z-index: 1;
  width: min(88vw, 360px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: clamp(24px, 6vw, 30px) clamp(18px, 5.2vw, 24px) clamp(20px, 5.2vw, 25px);
  border: 1px solid rgba(255, 214, 110, 0.82);
  border-radius: 8px;
  color: #fff8df;
  background: #09154d;
  box-shadow:
    0 0 0 4px rgba(100, 91, 214, 0.22),
    0 0 28px rgba(255, 196, 64, 0.2),
    0 22px 56px rgba(0, 3, 24, 0.58);
  text-align: center;
  transform: translateY(10px) scale(0.975);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.consult-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(188, 170, 255, 0.24);
  border-radius: 5px;
  pointer-events: none;
}

.consult-modal.is-visible .consult-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.consult-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 231, 157, 0.58);
  border-radius: 50%;
  color: #fff6d9;
  background: #111c5d;
  box-shadow: 0 5px 14px rgba(0, 3, 25, 0.28);
  cursor: pointer;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.consult-brand {
  margin: 0 42px 8px;
  color: #ffd66d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.consult-card h2 {
  position: relative;
  margin: 0;
  color: #fff8df;
  font-size: clamp(20px, 5.6vw, 25px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(255, 194, 65, 0.18);
}

.consult-intro {
  position: relative;
  margin: 7px 0 15px;
  color: rgba(238, 231, 255, 0.88);
  font-size: clamp(12px, 3.35vw, 14px);
  font-weight: 650;
  line-height: 1.5;
}

.consult-qr-frame {
  position: relative;
  display: grid;
  width: min(68vw, 252px);
  margin: 0 auto;
  padding: 9px;
  place-items: center;
  border: 2px solid #f4ca61;
  border-radius: 7px;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(255, 218, 119, 0.12),
    0 10px 28px rgba(0, 4, 35, 0.36);
}

.consult-qr-image {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

.consult-hold-tip {
  position: relative;
  margin: 14px 0 0;
  color: #ffd873;
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 900;
  line-height: 1.4;
}

.consult-service-copy {
  position: relative;
  margin: 7px auto 0;
  max-width: 292px;
  color: rgba(239, 233, 255, 0.78);
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 600;
  line-height: 1.55;
}

.share-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.share-preview-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.share-preview-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(2, 6, 30, 0.76);
  backdrop-filter: blur(4px);
}

.share-preview-card {
  position: relative;
  z-index: 1;
  width: min(78vw, 322px);
  max-width: calc(100vw - 46px);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.share-preview-modal.is-visible .share-preview-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.share-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 242, 188, 0.72);
  border-radius: 999px;
  color: #fff6db;
  background: rgba(14, 21, 78, 0.96);
  box-shadow:
    0 0 12px rgba(129, 113, 255, 0.45),
    0 8px 18px rgba(1, 5, 24, 0.32);
  cursor: pointer;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.share-preview-image-wrap {
  position: relative;
  display: grid;
  min-height: 240px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(188, 164, 255, 0.52);
  border-radius: 10px;
  background: rgba(5, 13, 56, 0.86);
  box-shadow:
    0 0 20px rgba(126, 112, 255, 0.32),
    0 18px 38px rgba(1, 5, 24, 0.45);
}

.share-preview-image {
  display: none;
  width: 100%;
  max-height: min(72dvh, 650px);
  height: auto;
  object-fit: contain;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

.share-preview-image.is-ready {
  display: block;
}

.share-preview-canvas-fallback {
  width: 100%;
}

.share-preview-canvas-fallback canvas {
  display: block;
  width: 100%;
  max-height: min(72dvh, 650px);
  height: auto;
  object-fit: contain;
}

.share-preview-loading {
  margin: 0;
  padding: 18px;
  color: rgba(255, 247, 226, 0.9);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 8px rgba(2, 7, 40, 0.6);
}

.share-preview-hint {
  width: fit-content;
  max-width: 100%;
  margin: clamp(10px, 2.8vw, 14px) auto 0;
  padding: 8px 13px;
  border: 1px solid rgba(255, 216, 115, 0.36);
  border-radius: 999px;
  color: rgba(255, 248, 229, 0.96);
  background: rgba(8, 15, 60, 0.88);
  box-shadow: 0 0 12px rgba(255, 204, 92, 0.14);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.report-placeholder {
  display: none;
  width: min(82vw, 330px);
  padding: 26px 22px;
  border: 1px solid rgba(255, 221, 138, 0.35);
  border-radius: 18px;
  text-align: center;
  background: rgba(11, 22, 82, 0.72);
  box-shadow:
    0 16px 34px rgba(1, 5, 24, 0.32),
    inset 0 0 24px rgba(131, 99, 255, 0.18);
}

.report-placeholder-title {
  margin: 0 0 8px;
  color: #fff3cf;
  font-size: 22px;
  font-weight: 800;
}

.report-placeholder-text {
  margin: 0;
  color: rgba(236, 229, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
}

body.share-page-body {
  display: grid;
  min-height: 100dvh;
  place-items: start center;
  overflow: auto;
  background: #02072a;
}

.share-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100dvh;
  overflow: hidden;
  background: #02072a;
  box-shadow: 0 0 80px rgba(4, 9, 45, 0.75);
}

.share-poster {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-height: 720px) {
  .brand-bar {
    top: 9.4%;
    left: 50%;
    width: 92px;
  }

  .home-actions {
    bottom: calc(var(--safe-bottom) + 62px);
    width: min(82vw, 300px);
    height: clamp(48px, 7dvh, 56px);
  }

  .start-button {
    width: 100%;
    min-height: 0;
  }

  .home-note {
    right: auto;
    bottom: max(2px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(calc(100vw - 24px), 370px);
    font-size: 9px;
  }

  .phone-card {
    width: min(96vw, 392px);
  }
}
