@charset "UTF-8";

:root {
  --paper: #fff9fa;
  --paper-deep: #fff2f5;
  --card: rgba(255, 255, 255, 0.88);
  --ink: #3e3034;
  --muted: #837277;
  --pink: #df718d;
  --pink-deep: #c95072;
  --pink-soft: #f7dce4;
  --pink-pale: #fff0f4;
  --line: #efdde2;
  --shadow: 0 22px 70px rgba(124, 75, 88, 0.09);
  --shadow-soft: 0 10px 32px rgba(124, 75, 88, 0.06);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --page: min(1180px, calc(100vw - 48px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  scrollbar-color: rgba(201, 80, 114, 0.52) rgba(255, 242, 245, 0.7);
  scrollbar-width: thin;
}

::selection {
  color: var(--ink);
  background: rgba(223, 113, 141, 0.24);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 242, 245, 0.7);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--paper-deep);
  border-radius: 999px;
  background: rgba(201, 80, 114, 0.52);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 7%, rgba(244, 193, 207, 0.24), transparent 25rem),
    radial-gradient(circle at 91% 31%, rgba(250, 220, 228, 0.32), transparent 28rem),
    var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  caret-color: var(--pink-deep);
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  color: white;
  background: var(--pink-deep);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.19;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.floating-doodle {
  position: fixed;
  z-index: -1;
  color: var(--pink-soft);
  pointer-events: none;
  user-select: none;
}

.floating-doodle--one {
  top: 28%;
  left: 2.5%;
  font: 90px/1 Georgia, serif;
  transform: rotate(-13deg);
}

.floating-doodle--two {
  right: 3%;
  bottom: 24%;
  font-size: 110px;
}

:focus-visible {
  outline: 3px solid rgba(201, 80, 114, 0.3);
  outline-offset: 4px;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid transparent;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.topbar.is-scrolled {
  border-color: rgba(223, 113, 141, 0.14);
  background: rgba(255, 249, 250, 0.86);
  box-shadow: 0 8px 30px rgba(94, 58, 67, 0.06);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--pink-soft);
  border-radius: 50%;
  color: var(--pink-deep);
  font: 21px/1 Georgia, serif;
}

.brand-variant {
  padding: 4px 8px;
  border: 1px solid rgba(213, 157, 173, 0.45);
  border-radius: 999px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-share {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(213, 157, 173, 0.55);
  border-radius: 999px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.topbar-share:hover {
  border-color: var(--pink);
  color: white;
  background: var(--pink-deep);
  transform: translateY(-1px);
}

.topbar-share svg,
.share-results-button svg,
.share-dialog-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.save-state.is-saving .save-dot {
  animation: savingPulse 900ms infinite;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #82aa91;
  box-shadow: 0 0 0 4px rgba(130, 170, 145, 0.12);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.icon-button > span:not(.sr-only) {
  margin-top: -7px;
  color: var(--pink-deep);
  font-size: 17px;
  letter-spacing: 3px;
}

.mobile-menu {
  position: absolute;
  top: 62px;
  right: max(24px, calc((100vw - 1320px) / 2));
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mobile-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.mobile-menu button:hover,
.mobile-menu button:focus-visible {
  background: var(--pink-pale);
}

.mobile-menu .danger-action {
  color: #b5445f;
}

.cover {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 95px 24px 58px;
  place-items: center;
  overflow: hidden;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cover::before {
  top: 12%;
  left: -100px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(223, 113, 141, 0.12);
}

.cover::after {
  right: -40px;
  bottom: 9%;
  width: 130px;
  height: 130px;
  background: rgba(248, 218, 226, 0.2);
}

.cover-inner {
  width: min(860px, 100%);
  text-align: center;
}

.thread-illustration {
  width: min(390px, 78vw);
  margin: -14px auto 2px;
}

.thread-illustration svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.friends-emblem {
  display: none;
}

.hand {
  fill: rgba(248, 210, 218, 0.52);
  stroke: rgba(223, 113, 141, 0.12);
  stroke-width: 1;
  stroke-linejoin: round;
}

.thread,
.thread-tail {
  fill: none;
  stroke: var(--pink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thread {
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: drawThread 2.1s var(--ease) 180ms forwards;
}

.thread-tail {
  opacity: 0;
  animation: fadeIn 500ms ease 1.75s forwards;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--pink-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.cover h1 {
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-size: clamp(36px, 5.5vw, 66px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.cover-copy {
  margin: 26px 0 0;
  color: #6f6064;
  font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-size: clamp(14px, 2vw, 17px);
  letter-spacing: 0.05em;
}

.cover-copy p {
  margin: 6px 0;
}

.tiny-heart {
  width: 42px;
  margin: 22px auto;
}

.tiny-heart path {
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.7;
}

.version-picker {
  width: min(820px, 100%);
  margin: 0 auto 18px;
}

.version-picker > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.version-options button {
  position: relative;
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(223, 113, 141, 0.22);
  border-radius: 16px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms var(--ease);
}

.version-options button:hover {
  border-color: rgba(201, 80, 114, 0.55);
  transform: translateY(-2px);
}

.version-options button.is-active {
  border-color: var(--pink-deep);
  color: var(--pink-deep);
  background: var(--pink-pale);
}

.version-options strong {
  font-size: 14px;
  line-height: 1.35;
}

.version-options span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.version-options button.is-active span {
  color: #875461;
}

.conversation-guide {
  width: min(760px, 100%);
  margin: 0 auto 18px;
  padding: 13px 18px;
  border-block: 1px solid rgba(223, 113, 141, 0.2);
  color: var(--muted);
  background: rgba(255, 249, 250, 0.48);
  font-size: 12px;
  line-height: 1.65;
}

.conversation-guide p {
  margin: 0;
}

.conversation-guide p + p {
  margin-top: 4px;
}

.conversation-guide strong {
  color: var(--pink-deep);
}

.cover-fields {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  margin: 0 auto 25px;
}

.cover-field {
  display: flex;
  min-height: 94px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 15px 20px;
  border: 1px solid rgba(223, 113, 141, 0.17);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
}

.cover-field span {
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cover-field input {
  min-width: 0;
  padding: 5px 0 7px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  text-align: center;
  background: transparent;
  outline: 0;
}

.cover-field input:focus {
  border-color: var(--pink);
}

.cover-field input::placeholder {
  color: #76696d;
  opacity: 1;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 25px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  border: 1px solid var(--pink-deep);
  color: white;
  background: linear-gradient(135deg, #e68099, #cf5778);
  box-shadow: 0 12px 30px rgba(201, 80, 114, 0.23);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(201, 80, 114, 0.28);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--pink-deep);
  background: white;
}

.secondary-button:hover {
  background: var(--pink-pale);
}

.cover-note {
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.questionnaire-shell {
  display: grid;
  width: var(--page);
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 42px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.progress-rail {
  position: sticky;
  top: 108px;
  align-self: start;
  padding: 24px 17px;
  border: 1px solid rgba(223, 113, 141, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.progress-orbit {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 23px;
}

.progress-orbit svg {
  display: block;
  width: 100%;
  transform: rotate(-90deg);
}

.progress-orbit circle {
  fill: none;
  stroke-width: 3;
}

.orbit-track {
  stroke: var(--pink-soft);
}

.orbit-value {
  stroke: var(--pink-deep);
  stroke-linecap: round;
  stroke-dasharray: 144.51;
  stroke-dashoffset: 144.51;
  transition: stroke-dashoffset 500ms var(--ease);
}

.progress-orbit > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 800;
}

.section-nav {
  display: grid;
  gap: 5px;
}

.section-nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px;
  padding: 9px 7px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.section-nav a span {
  color: #c3b3b7;
  font-family: Georgia, serif;
  font-size: 10px;
}

.section-nav a:hover,
.section-nav a.is-active {
  color: var(--pink-deep);
  background: var(--pink-pale);
}

.section-nav a.is-active span {
  color: var(--pink-deep);
}

.rail-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.rail-count strong {
  color: var(--pink-deep);
  font: 28px/1 Georgia, serif;
}

.rail-count span {
  font-size: 11px;
}

#relationshipForm {
  min-width: 0;
}

.form-section {
  padding: 60px 0 88px;
  border-top: 1px solid rgba(223, 113, 141, 0.14);
}

.form-section:first-child {
  border-top: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-number {
  margin: 0 0 8px;
  color: var(--pink-deep);
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.section-heading h2 {
  margin: 0;
  color: var(--pink-deep);
  font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-size: clamp(30px, 4vw, 47px);
  line-height: 1.25;
  letter-spacing: 0.05em;
}

.section-heading p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chapter-mark {
  color: rgba(223, 113, 141, 0.26);
  font: 38px/1 Georgia, serif;
}

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

.question-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 275px;
  flex-direction: column;
  padding: 26px 27px 22px;
  overflow: hidden;
  border: 1px solid rgba(223, 113, 141, 0.2);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(255, 255, 255, 0.68);
  transition: transform 220ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
}

.question-grid--compact .question-card {
  min-height: 235px;
}

.question-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 42px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background: var(--pink-soft);
  transition: width 220ms ease, background 220ms ease;
}

.question-card:hover,
.question-card:focus-within {
  border-color: rgba(223, 113, 141, 0.38);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transform: translateY(-3px);
}

.question-card.is-complete::before {
  width: 72px;
  background: var(--pink);
}

.question-card.is-complete::after {
  content: "✓";
  position: absolute;
  top: 18px;
  right: 21px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--pink);
  font-size: 12px;
  font-weight: 800;
}

.question-card > label,
.question-card > legend,
.card-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 24px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.015em;
}

.question-card > legend {
  width: 100%;
  margin-bottom: 18px;
}

.question-card label small,
.question-card legend small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.question-index {
  display: inline-grid;
  flex: 0 0 34px;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: var(--pink-deep);
  background: var(--pink-pale);
  font: 700 11px/1 Georgia, serif;
  letter-spacing: 0.04em;
}

.question-card textarea {
  width: 100%;
  min-height: 116px;
  flex: 1;
  margin-top: 16px;
  padding: 10px 2px 20px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #554549;
  background:
    repeating-linear-gradient(transparent, transparent 31px, rgba(239, 221, 226, 0.58) 32px);
  background-attachment: local;
  line-height: 32px;
  outline: 0;
}

.question-card textarea:focus {
  border-bottom-color: var(--pink);
}

.question-card textarea::placeholder,
.ranked-inputs input::placeholder {
  color: #76696d;
  opacity: 1;
}

.line-count {
  position: absolute;
  right: 27px;
  bottom: 8px;
  color: #c1b3b6;
  font: 9px/1.2 Georgia, serif;
  opacity: 0;
  transition: opacity 160ms ease;
}

.question-card:focus-within .line-count {
  opacity: 1;
}

.choice-card,
.score-card {
  margin: 0;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.choice-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.025em;
}

.choice-list label {
  cursor: pointer;
}

.choice-list input[type="checkbox"],
.score-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-list label span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 249, 250, 0.6);
  font-size: 13px;
  transition: all 160ms ease;
}

.choice-list input:checked + span {
  border-color: var(--pink);
  color: white;
  background: var(--pink);
  box-shadow: 0 7px 18px rgba(201, 80, 114, 0.2);
}

.choice-list input:focus-visible + span,
.score-options input:focus-visible + span {
  outline: 3px solid rgba(201, 80, 114, 0.28);
  outline-offset: 3px;
}

.custom-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(213, 157, 173, 0.45);
}

.custom-choice label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.custom-choice input {
  width: 100%;
  min-width: 0;
  padding: 9px 2px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.custom-choice input:focus {
  border-bottom-color: var(--pink);
}

.custom-choice input::placeholder {
  color: #76696d;
  opacity: 1;
}

.love-language-card {
  grid-column: 1 / -1;
  min-height: 430px;
  border-color: rgba(223, 113, 141, 0.24);
  background:
    radial-gradient(circle at 92% 10%, rgba(247, 220, 228, 0.42), transparent 13rem),
    var(--card);
}

.choice-list--love {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-list--love label > span {
  width: 100%;
  min-height: 68px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: 14px;
  line-height: 1.35;
  text-align: left;
}

.choice-list--love label small {
  margin-top: 3px;
  color: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.72;
}

.love-language-detail {
  position: relative;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(213, 157, 173, 0.45);
}

.love-language-detail > label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.love-language-detail textarea {
  min-height: 112px;
  margin-top: 7px;
}

.love-language-detail .line-count {
  right: 2px;
  bottom: 3px;
}

@media (max-width: 480px) {
  .custom-choice {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.score-card {
  grid-column: 1 / -1;
  min-height: 225px;
}

.score-scale {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 16px;
  margin: auto 0;
}

.score-caption {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.score-caption--right {
  text-align: right;
}

.score-options {
  display: grid;
  grid-template-columns: repeat(11, minmax(29px, 1fr));
  gap: 5px;
}

.score-options label {
  cursor: pointer;
}

.score-options label span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  font: 12px/1 Georgia, serif;
  transition: all 160ms ease;
}

.score-options input:checked + span {
  border-color: var(--pink-deep);
  color: white;
  background: var(--pink-deep);
  box-shadow: 0 6px 16px rgba(201, 80, 114, 0.22);
  transform: translateY(-2px);
}

.important-card {
  min-height: 310px;
}

.ranked-inputs {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.ranked-inputs label {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 11px;
}

.ranked-inputs label > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pink-deep);
  font: 13px/1 Georgia, serif;
}

.ranked-inputs input {
  min-width: 0;
  padding: 9px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  outline: 0;
}

.ranked-inputs input:focus {
  border-color: var(--pink);
}

.final-message-card {
  min-height: 310px;
  background:
    radial-gradient(circle at 90% 15%, rgba(247, 220, 228, 0.38), transparent 11rem),
    var(--card);
}

.corner-heart {
  position: absolute;
  right: 31px;
  bottom: 24px;
  color: rgba(223, 113, 141, 0.28);
  font: 56px/1 Georgia, serif;
  pointer-events: none;
  transform: rotate(-9deg);
}

.finish-panel {
  max-width: 680px;
  margin: 92px auto 0;
  text-align: center;
}

.finish-panel::before {
  content: "♡";
  display: block;
  margin-bottom: 14px;
  color: var(--pink);
  font: 44px/1 Georgia, serif;
}

.finish-panel h2 {
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.35;
}

.finish-panel > p:not(.eyebrow):not(.share-privacy-note) {
  margin: 15px 0 25px;
  color: var(--muted);
}

.finish-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.share-results-button {
  min-height: 52px;
}

.share-privacy-note {
  max-width: 470px;
  margin: 16px auto 0;
  color: #8d777d;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.025em;
}

.footer {
  display: flex;
  width: var(--page);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.footer-actions {
  display: flex;
  gap: 7px;
}

.footer-actions button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.footer-actions button:hover {
  color: var(--pink-deep);
  background: var(--pink-pale);
}

.completion-dialog {
  width: min(500px, calc(100% - 32px));
  padding: 45px 40px 38px;
  border: 1px solid var(--line);
  border-radius: 34px;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 251, 252, 0.98);
  box-shadow: 0 35px 100px rgba(93, 51, 62, 0.25);
}

.completion-dialog::backdrop {
  background: rgba(76, 51, 58, 0.27);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 15px;
  right: 17px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 25px;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--pink-pale);
}

.dialog-heart {
  margin-bottom: 8px;
  color: var(--pink);
  font: 65px/1 Georgia, serif;
  animation: heartBeat 1.4s ease-in-out infinite;
}

.completion-dialog h2 {
  margin: 0 0 11px;
  font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  font-size: 28px;
}

.completion-dialog > p:not(.eyebrow) {
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.dialog-actions .primary-button,
.dialog-actions .secondary-button {
  min-height: 46px;
  padding: 0 18px;
  font-size: 13px;
}

.dialog-text-button {
  flex: 1 0 100%;
  padding: 7px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(143, 111, 119, 0.4);
  text-underline-offset: 4px;
  cursor: pointer;
}

.dialog-text-button:hover {
  color: var(--pink-deep);
}

.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 28px;
  max-width: calc(100vw - 30px);
  padding: 11px 18px;
  border-radius: 999px;
  color: white;
  background: rgba(62, 48, 52, 0.93);
  box-shadow: 0 10px 30px rgba(42, 25, 30, 0.17);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity 200ms ease, transform 200ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Friends edition: a quieter, non-romantic visual language. */
html[data-questionnaire-version="friends"] {
  --paper: #f4f7f6;
  --paper-deep: #eaf0ef;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #203536;
  --muted: #5c6f70;
  --pink: #5d8883;
  --pink-deep: #2f6763;
  --pink-soft: #d9e6e3;
  --pink-pale: #e8f1ef;
  --line: #d5e2df;
  --shadow: 0 22px 64px rgba(31, 69, 67, 0.1);
  --shadow-soft: 0 10px 28px rgba(31, 69, 67, 0.07);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-md: 12px;
  scrollbar-color: rgba(47, 103, 99, 0.58) rgba(234, 240, 239, 0.8);
}

html[data-questionnaire-version="friends"] ::selection {
  color: var(--ink);
  background: rgba(93, 136, 131, 0.25);
}

html[data-questionnaire-version="friends"] ::-webkit-scrollbar-track {
  background: rgba(234, 240, 239, 0.8);
}

html[data-questionnaire-version="friends"] ::-webkit-scrollbar-thumb {
  border-color: var(--paper-deep);
  background: rgba(47, 103, 99, 0.58);
}

html[data-questionnaire-version="friends"] body {
  background:
    radial-gradient(circle at 8% 8%, rgba(174, 203, 198, 0.22), transparent 25rem),
    radial-gradient(circle at 92% 34%, rgba(199, 215, 212, 0.28), transparent 30rem),
    var(--paper);
}

html[data-questionnaire-version="friends"] .paper-noise,
html[data-questionnaire-version="friends"] .floating-doodle,
html[data-questionnaire-version="friends"] .thread-illustration {
  display: none;
}

html[data-questionnaire-version="friends"] :focus-visible {
  outline-color: rgba(47, 103, 99, 0.34);
}

html[data-questionnaire-version="friends"] .topbar.is-scrolled {
  border-color: rgba(47, 103, 99, 0.13);
  background: rgba(244, 247, 246, 0.9);
  box-shadow: 0 8px 28px rgba(28, 61, 59, 0.07);
}

html[data-questionnaire-version="friends"] .brand-mark {
  position: relative;
  border-color: rgba(47, 103, 99, 0.35);
  border-radius: 9px;
  color: transparent;
  font-size: 0;
}

html[data-questionnaire-version="friends"] .brand-mark::before {
  content: "";
  width: 12px;
  height: 8px;
  border: 1.5px solid var(--pink-deep);
  border-radius: 3px;
}

html[data-questionnaire-version="friends"] .brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-left: 1.5px solid var(--pink-deep);
  border-bottom: 1.5px solid var(--pink-deep);
  transform: skew(-28deg);
}

html[data-questionnaire-version="friends"] .brand-variant,
html[data-questionnaire-version="friends"] .topbar-share {
  border-color: rgba(47, 103, 99, 0.3);
}

html[data-questionnaire-version="friends"] .friends-emblem {
  position: relative;
  display: block;
  width: 250px;
  height: 112px;
  margin: -2px auto 18px;
}

html[data-questionnaire-version="friends"] .friend-bubble {
  position: absolute;
  display: grid;
  align-content: center;
  gap: 11px;
  padding: 20px 24px;
  border: 2px solid var(--pink);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

html[data-questionnaire-version="friends"] .friend-bubble::after {
  content: "";
  position: absolute;
  bottom: -9px;
  width: 17px;
  height: 17px;
  border-bottom: 2px solid var(--pink);
  background: var(--paper);
}

html[data-questionnaire-version="friends"] .friend-bubble i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--pink);
  opacity: 0.72;
}

html[data-questionnaire-version="friends"] .friend-bubble i:last-child {
  width: 65%;
}

html[data-questionnaire-version="friends"] .friend-bubble--back {
  top: 0;
  left: 12px;
  width: 140px;
  height: 72px;
}

html[data-questionnaire-version="friends"] .friend-bubble--back::after {
  left: 21px;
  border-left: 2px solid var(--pink);
  transform: skew(-30deg);
}

html[data-questionnaire-version="friends"] .friend-bubble--front {
  right: 10px;
  bottom: 0;
  width: 132px;
  height: 68px;
  border-color: var(--pink-deep);
  background: rgba(244, 247, 246, 0.96);
  box-shadow: 0 14px 30px rgba(31, 69, 67, 0.1);
}

html[data-questionnaire-version="friends"] .friend-bubble--front::after {
  right: 20px;
  border-right: 2px solid var(--pink-deep);
  border-bottom-color: var(--pink-deep);
  transform: skew(30deg);
}

html[data-questionnaire-version="friends"] .friend-bubble--front i {
  background: var(--pink-deep);
}

html[data-questionnaire-version="friends"] .cover::before {
  border-color: rgba(47, 103, 99, 0.14);
  border-radius: 26px;
  transform: rotate(-8deg);
}

html[data-questionnaire-version="friends"] .cover::after {
  border-radius: 24px;
  background: rgba(174, 203, 198, 0.22);
  transform: rotate(12deg);
}

html[data-questionnaire-version="friends"] .cover h1,
html[data-questionnaire-version="friends"] .cover-copy,
html[data-questionnaire-version="friends"] .section-heading h2,
html[data-questionnaire-version="friends"] .finish-panel h2,
html[data-questionnaire-version="friends"] .completion-dialog h2 {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

html[data-questionnaire-version="friends"] .cover > .cover-inner > .eyebrow {
  display: none;
}

html[data-questionnaire-version="friends"] .cover h1 {
  font-weight: 750;
  letter-spacing: -0.025em;
}

html[data-questionnaire-version="friends"] .cover-copy {
  color: #53686a;
  letter-spacing: 0.02em;
}

html[data-questionnaire-version="friends"] .tiny-heart {
  position: relative;
  width: 54px;
  height: 9px;
  margin-block: 24px;
}

html[data-questionnaire-version="friends"] .tiny-heart svg {
  display: none;
}

html[data-questionnaire-version="friends"] .tiny-heart::before,
html[data-questionnaire-version="friends"] .finish-panel::before,
html[data-questionnaire-version="friends"] .dialog-heart::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--pink-deep);
  box-shadow: -15px 0 0 rgba(93, 136, 131, 0.45), 15px 0 0 rgba(93, 136, 131, 0.45);
}

html[data-questionnaire-version="friends"] .version-options button {
  border-color: rgba(47, 103, 99, 0.2);
  border-radius: 12px;
}

html[data-questionnaire-version="friends"] .version-options button:hover {
  border-color: rgba(47, 103, 99, 0.52);
}

html[data-questionnaire-version="friends"] .version-options button.is-active span {
  color: #3d6d69;
}

html[data-questionnaire-version="friends"] .conversation-guide {
  border-color: rgba(47, 103, 99, 0.2);
  background: rgba(244, 247, 246, 0.62);
}

html[data-questionnaire-version="friends"] .cover-field,
html[data-questionnaire-version="friends"] .progress-rail,
html[data-questionnaire-version="friends"] .question-card {
  border-color: rgba(47, 103, 99, 0.18);
}

html[data-questionnaire-version="friends"] .cover-field {
  border-radius: 14px;
}

html[data-questionnaire-version="friends"] .cover-field input::placeholder,
html[data-questionnaire-version="friends"] .question-card textarea::placeholder,
html[data-questionnaire-version="friends"] .ranked-inputs input::placeholder,
html[data-questionnaire-version="friends"] .custom-choice input::placeholder {
  color: #5e7071;
}

html[data-questionnaire-version="friends"] .primary-button {
  border-color: var(--pink-deep);
  background: var(--pink-deep);
  box-shadow: 0 12px 28px rgba(47, 103, 99, 0.2);
}

html[data-questionnaire-version="friends"] .primary-button:hover {
  background: #285c59;
  box-shadow: 0 16px 34px rgba(47, 103, 99, 0.24);
}

html[data-questionnaire-version="friends"] .progress-rail {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

html[data-questionnaire-version="friends"] .section-nav a span {
  color: #829493;
}

html[data-questionnaire-version="friends"] .form-section {
  border-top-color: rgba(47, 103, 99, 0.13);
}

html[data-questionnaire-version="friends"] .section-heading h2 {
  font-weight: 750;
  letter-spacing: -0.02em;
}

html[data-questionnaire-version="friends"] .chapter-mark {
  color: rgba(47, 103, 99, 0.2);
}

html[data-questionnaire-version="friends"] .question-card {
  box-shadow: var(--shadow-soft);
}

html[data-questionnaire-version="friends"] .question-card:hover,
html[data-questionnaire-version="friends"] .question-card:focus-within {
  border-color: rgba(47, 103, 99, 0.4);
  box-shadow: var(--shadow);
}

html[data-questionnaire-version="friends"] .question-index {
  border-radius: 5px;
}

html[data-questionnaire-version="friends"] .question-card textarea {
  color: #314748;
  background: repeating-linear-gradient(transparent, transparent 31px, rgba(213, 226, 223, 0.72) 32px);
}

html[data-questionnaire-version="friends"] .line-count {
  color: #738687;
}

html[data-questionnaire-version="friends"] .final-message-card {
  background: var(--card);
}

html[data-questionnaire-version="friends"] .corner-heart,
html[data-questionnaire-version="friends"] .finish-panel .primary-button span[aria-hidden="true"] {
  display: none;
}

html[data-questionnaire-version="friends"] .finish-panel::before {
  margin-bottom: 20px;
  font-size: 0;
}

html[data-questionnaire-version="friends"] .share-privacy-note {
  color: #637778;
}

html[data-questionnaire-version="friends"] .completion-dialog {
  border-radius: 18px;
  background: rgba(249, 251, 250, 0.99);
  box-shadow: 0 34px 90px rgba(25, 57, 55, 0.24);
}

html[data-questionnaire-version="friends"] .completion-dialog::backdrop {
  background: rgba(26, 52, 51, 0.3);
}

html[data-questionnaire-version="friends"] .dialog-heart {
  height: 18px;
  margin-bottom: 18px;
  font-size: 0;
  animation: none;
}

html[data-questionnaire-version="friends"] .toast {
  background: rgba(32, 53, 54, 0.95);
  box-shadow: 0 10px 30px rgba(24, 49, 48, 0.18);
}

.print-report {
  display: none;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms var(--ease);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drawThread {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes savingPulse {
  50% { transform: scale(0.66); opacity: 0.55; }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.08); }
  30% { transform: scale(1); }
}

@media (max-width: 1020px) {
  :root {
    --page: min(860px, calc(100vw - 38px));
  }

  .questionnaire-shell {
    display: block;
  }

  .progress-rail {
    position: sticky;
    z-index: 40;
    top: 80px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    padding: 9px 12px;
    border-radius: 18px;
    overflow-x: auto;
  }

  .progress-orbit {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    margin: 0;
  }

  .progress-orbit > span {
    font-size: 9px;
  }

  .section-nav {
    display: flex;
    flex: 1;
    gap: 4px;
  }

  .section-nav a {
    display: block;
    flex: 1 0 auto;
    padding: 8px 10px;
    white-space: nowrap;
    text-align: center;
  }

  .section-nav a span {
    display: none;
  }

  .rail-count {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --page: calc(100vw - 28px);
    --radius-xl: 26px;
  }

  html {
    scroll-padding-top: 140px;
  }

  .topbar {
    height: 62px;
    padding: 0 15px;
  }

  .brand {
    font-size: 12px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
    font-size: 18px;
  }

  .brand-variant {
    font-size: 9px;
  }

  .save-state > span:last-child {
    display: none;
  }

  .mobile-menu {
    top: 55px;
    right: 14px;
  }

  .cover {
    min-height: 100svh;
    padding: 80px 14px 42px;
  }

  .thread-illustration {
    width: min(310px, 88vw);
  }

  .cover h1 {
    font-size: clamp(32px, 10.5vw, 48px);
  }

  .cover-copy {
    margin-top: 20px;
  }

  .tiny-heart {
    margin-block: 18px;
  }

  .version-options {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .version-options button {
    min-height: 58px;
    padding: 9px 14px;
  }

  .conversation-guide {
    padding-inline: 8px;
    font-size: 12px;
  }

  .cover-fields {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .cover-field:first-child {
    grid-column: 1 / -1;
  }

  .cover-field {
    min-height: 80px;
    padding: 11px 13px;
    border-radius: 16px;
  }

  .cover-field input {
    font-size: 16px;
  }

  .custom-choice input {
    font-size: 16px;
  }

  .progress-rail {
    top: 69px;
    width: calc(100vw - 28px);
    margin-inline: auto;
  }

  .section-nav a {
    font-size: 12px;
  }

  .form-section {
    padding: 48px 0 64px;
  }

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

  .section-heading h2 {
    font-size: 34px;
  }

  .chapter-mark {
    font-size: 30px;
  }

  .question-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .question-card,
  .question-grid--compact .question-card {
    min-height: 245px;
    padding: 23px 21px 19px;
  }

  .question-card > label,
  .question-card > legend,
  .card-label {
    padding-right: 18px;
    font-size: 15px;
  }

  .question-card textarea {
    min-height: 122px;
  }

  .love-language-card {
    min-height: 600px;
  }

  .choice-list--love {
    grid-template-columns: 1fr;
  }

  .choice-list--love label > span {
    min-height: 58px;
  }

  .line-count {
    right: 21px;
  }

  .score-card {
    grid-column: auto;
    min-height: 315px;
  }

  .score-scale {
    display: block;
    margin-top: 16px;
  }

  .score-options {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 8px 0;
  }

  .score-options label span {
    max-width: 41px;
  }

  .score-caption--right {
    display: block;
  }

  .important-card,
  .final-message-card {
    min-height: 300px;
  }

  .finish-panel {
    margin-top: 70px;
  }

  .finish-actions {
    width: min(100%, 340px);
    flex-direction: column;
    margin-inline: auto;
  }

  .finish-actions button {
    width: 100%;
  }

  .footer {
    display: block;
    padding-bottom: 35px;
    text-align: center;
  }

  .footer-actions {
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .completion-dialog {
    padding: 40px 23px 28px;
  }

  .dialog-actions {
    flex-direction: column;
  }

  .dialog-actions button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .topbar-actions {
    gap: 8px;
  }

  .topbar-share {
    padding-inline: 11px;
  }

  .topbar-share span {
    display: none;
  }

  .brand-variant {
    display: none;
  }

  .cover-fields {
    grid-template-columns: 1fr;
  }

  .cover-field:first-child {
    grid-column: auto;
  }

  .cover-note {
    max-width: 240px;
    margin-inline: auto;
  }

  .progress-orbit {
    display: none;
  }

  .progress-rail {
    padding: 7px;
  }

  .section-nav a {
    padding: 7px 9px;
  }

  .section-heading p:last-child {
    max-width: 250px;
  }

  .chapter-mark {
    display: none;
  }
}

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

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

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  :root {
    --page: 100%;
  }

  body {
    color: #30272a;
    background: white;
    font-size: 11pt;
  }

  body > .topbar,
  body > main,
  body > .footer,
  body > .completion-dialog,
  .floating-doodle,
  .paper-noise,
  .toast {
    display: none !important;
  }

  .print-report {
    display: block !important;
    width: 100%;
    color: #382b2f;
  }

  .print-cover {
    display: flex;
    min-height: 255mm;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15mm 8mm;
    text-align: center;
    break-after: page;
  }

  .print-heart {
    color: #cf5778;
    font: 58pt/1 Georgia, serif;
  }

  .print-chat-mark {
    position: relative;
    width: 34mm;
    height: 20mm;
    margin-bottom: 4mm;
  }

  .print-chat-mark span {
    position: absolute;
    width: 21mm;
    height: 12mm;
    border: 0.6mm solid #356d68;
    border-radius: 4mm;
  }

  .print-chat-mark span:first-child {
    top: 0;
    left: 0;
  }

  .print-chat-mark span:last-child {
    right: 0;
    bottom: 0;
    background: white;
  }

  .print-cover > p,
  .print-chapter > header p {
    margin: 5mm 0 1mm;
    color: #c95072;
    font: 700 8pt/1.3 Georgia, serif;
    letter-spacing: 0.22em;
  }

  .print-cover h1 {
    margin: 2mm 0 10mm;
    font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
    font-size: 30pt;
    line-height: 1.3;
  }

  .print-meta {
    display: grid;
    width: 100%;
    max-width: 170mm;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #efdde2;
    border-radius: 5mm;
    overflow: hidden;
  }

  .print-meta span {
    padding: 5mm 3mm;
    border-right: 1px solid #efdde2;
    font-size: 10pt;
  }

  .print-meta span:last-child {
    border-right: 0;
  }

  .print-meta small {
    display: block;
    margin-bottom: 2mm;
    color: #c95072;
    font-size: 7pt;
    letter-spacing: 0.08em;
  }

  .print-cover blockquote {
    margin: 11mm 0 0;
    color: #746267;
    font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
    font-size: 11pt;
    font-style: normal;
    line-height: 2;
  }

  .print-chapter {
    padding: 3mm 0 6mm;
    break-before: page;
  }

  .print-chapter > header {
    padding-bottom: 5mm;
    border-bottom: 1px solid #efdde2;
  }

  .print-chapter > header h2 {
    margin: 0;
    color: #c95072;
    font-family: "Noto Serif TC", "Songti TC", PMingLiU, serif;
    font-size: 23pt;
  }

  .print-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5mm;
    padding-top: 6mm;
  }

  .print-answer {
    min-height: 48mm;
    padding: 5mm;
    border: 1px solid #ead4da;
    border-radius: 5mm;
    break-inside: avoid;
  }

  .print-question-line {
    display: grid;
    grid-template-columns: 9mm 1fr;
    align-items: start;
    gap: 2mm;
  }

  .print-question-line span {
    display: grid;
    width: 8mm;
    height: 7mm;
    place-items: center;
    border-radius: 2mm;
    color: #c95072;
    background: #fff0f4;
    font: 7pt/1 Georgia, serif;
  }

  .print-question-line h3 {
    margin: 0;
    font-size: 10pt;
    line-height: 1.45;
  }

  .print-answer-parts {
    min-height: 23mm;
    margin: 4mm 0 0;
    padding-top: 3mm;
    border-top: 1px solid #f1e4e8;
  }

  .print-answer-part {
    margin: 0 0 2.5mm;
    color: #554549;
    font-size: 9pt;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .print-answer-part:last-child {
    margin-bottom: 0;
  }

  .print-answer-part strong {
    color: #b44b68;
    font-weight: 700;
  }

  .print-report-footer {
    margin-top: 8mm;
    padding-top: 5mm;
    border-top: 1px solid #efdde2;
    color: #9a7f87;
    text-align: center;
    font-size: 8pt;
  }

  html[data-questionnaire-version="friends"] body,
  html[data-questionnaire-version="friends"] .print-report {
    color: #203536;
  }

  html[data-questionnaire-version="friends"] .print-cover > p,
  html[data-questionnaire-version="friends"] .print-chapter > header p,
  html[data-questionnaire-version="friends"] .print-meta small,
  html[data-questionnaire-version="friends"] .print-chapter > header h2,
  html[data-questionnaire-version="friends"] .print-question-line span {
    color: #356d68;
  }

  html[data-questionnaire-version="friends"] .print-cover h1,
  html[data-questionnaire-version="friends"] .print-chapter > header h2 {
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  }

  html[data-questionnaire-version="friends"] .print-meta,
  html[data-questionnaire-version="friends"] .print-meta span,
  html[data-questionnaire-version="friends"] .print-chapter > header,
  html[data-questionnaire-version="friends"] .print-answer,
  html[data-questionnaire-version="friends"] .print-answer-parts,
  html[data-questionnaire-version="friends"] .print-report-footer {
    border-color: #d5e2df;
  }

  html[data-questionnaire-version="friends"] .print-question-line span {
    background: #e8f1ef;
  }

  html[data-questionnaire-version="friends"] .print-cover blockquote,
  html[data-questionnaire-version="friends"] .print-answer-part,
  html[data-questionnaire-version="friends"] .print-report-footer {
    color: #53686a;
  }

  html[data-questionnaire-version="friends"] .print-answer-part strong {
    color: #2f6763;
  }
}
