:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --card: rgba(255, 250, 242, 0.92);
  --line: #e7d7bb;
  --text: #2f2924;
  --muted: #7d7267;
  --primary: #8c6132;
  --primary-2: #6f4a25;
  --gold: #c59b58;
  --shadow: 0 14px 30px rgba(74, 48, 24, 0.12);
  --phone-design-width: 360px;
  --phone-design-height: 780px;
}

* {
  box-sizing: border-box;
}

@keyframes riseFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes buttonBreath {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes floatDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(8px, -10px, 0);
  }
}

@keyframes floatDriftReverse {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-8px, 10px, 0);
  }
}

@keyframes selectPulse {
  0% {
    transform: scale(1);
  }

  55% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes popFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatBounceIn {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.96);
  }

  72% {
    opacity: 1;
    transform: translateY(-8px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultRevealExpand {
  from {
    transform: translate(-50%, -50%) scale(0.02);
  }

  to {
    transform: translate(-50%, -50%) scale(90);
  }
}

@keyframes resultTitleReveal {
  from {
    opacity: 0;
    transform: scale(0.88);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes resultArtReveal {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrowFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

@keyframes unlockArrowLoop {
  0% {
    transform: translateY(0);
    opacity: 0.45;
  }

  35% {
    transform: translateY(-8px);
    opacity: 1;
  }

  65% {
    transform: translateY(-14px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
}

@keyframes unlockBreath {
  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

@keyframes courseModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #413730 0%, #1f1b18 65%, #151210 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

.preview-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px 12px;
}

.preview-tip {
  color: #d8c7af;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
}

.phone-frame {
  width: min(var(--phone-design-width), 100%);
  height: min(var(--phone-design-height), calc(100vh - 64px));
  background: #14110f;
  border-radius: 36px;
  padding: 14px 10px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  width: 120px;
  height: 26px;
  background: #111;
  border-radius: 0 0 18px 18px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.result-reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
}

.result-reveal-overlay.is-active {
  opacity: 1;
}

.result-reveal-overlay.is-hiding {
  opacity: 0;
  transition: opacity 0.22s ease;
}

.result-reveal-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f5f3ee;
  transform: translate(-50%, -50%) scale(0.02);
}

.result-reveal-overlay.is-active .result-reveal-circle {
  animation: resultRevealExpand 0.38s ease-out forwards;
}

.music-toggle-btn {
  position: absolute;
  top: 44px;
  right: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(123, 196, 127, 0.22);
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.95);
  color: #547056;
  box-shadow: 0 10px 20px rgba(63, 84, 68, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.music-toggle-btn.is-off {
  color: #8b7b6d;
  border-color: rgba(188, 159, 122, 0.2);
  background: rgba(252, 247, 243, 0.96);
}

.music-toggle-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.music-toggle-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.music-toggle-slash {
  position: absolute;
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: rgba(166, 122, 90, 0.88);
  transform: rotate(-42deg) scaleY(0);
  transition: transform 0.2s ease;
}

.music-toggle-btn.is-off .music-toggle-slash {
  transform: rotate(-42deg) scaleY(1);
}

.app {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: relative;
  margin: 0;
  padding: 18px 10px 18px;
  display: grid;
  gap: 14px;
  background: #f5f9f2;
  scroll-behavior: smooth;
}

.app > section {
  will-change: transform, opacity;
}

.page-animating {
  position: absolute !important;
  inset: 0;
  z-index: 3;
  width: 100%;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#quiz-card.quiz-result-fadeout {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-enter-right {
  opacity: 0;
  transform: translateX(30px);
}

.page-enter-right.page-enter-active {
  opacity: 1;
  transform: translateX(0);
}

.page-exit-left {
  opacity: 1;
  transform: translateX(0);
}

.page-exit-left.page-exit-active {
  opacity: 0;
  transform: translateX(-30px);
}

.screen-card {
  position: relative;
  margin: -18px -10px;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f5f9f2;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cover-layout,
.setup-layout {
  position: relative;
  width: 100%;
  max-width: var(--phone-design-width);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#quiz-card,
#result-card,
#history-card {
  width: min(100%, var(--phone-design-width));
  margin-left: auto;
  margin-right: auto;
}

.cover-layout > *,
.setup-layout > * {
  position: relative;
  z-index: 1;
}

.cover-layout::before,
.cover-layout::after,
.setup-layout::before,
.setup-layout::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.cover-layout::before {
  top: 16%;
  left: 4%;
  width: 60px;
  height: 36px;
  background: radial-gradient(circle, rgba(177, 198, 190, 0.26), rgba(177, 198, 190, 0));
  animation: floatDrift 4.4s ease-in-out infinite;
}

.cover-layout::after {
  right: 7%;
  top: 52%;
  width: 76px;
  height: 46px;
  background: radial-gradient(circle, rgba(197, 214, 204, 0.24), rgba(197, 214, 204, 0));
  animation: floatDriftReverse 4.9s ease-in-out infinite;
}

.setup-layout::before {
  left: 8%;
  top: 18%;
  width: 72px;
  height: 40px;
  background: radial-gradient(circle, rgba(190, 210, 202, 0.22), rgba(190, 210, 202, 0));
  animation: floatDrift 4.2s ease-in-out infinite;
}

.setup-layout::after {
  right: 10%;
  bottom: 20%;
  width: 82px;
  height: 48px;
  background: radial-gradient(circle, rgba(185, 203, 196, 0.22), rgba(185, 203, 196, 0));
  animation: floatDriftReverse 5s ease-in-out infinite;
}

.cover-layout {
  height: 100%;
  padding: 42px 18px 18px;
  justify-content: flex-start;
}

.cover-title-image {
  width: min(96%, 366px);
  display: block;
}

.cover-character-image {
  width: min(96%, 354px);
  max-height: 460px;
  margin-top: 10px;
  display: block;
  object-fit: contain;
}

.cover-actions {
  width: 100%;
  margin-top: 10px;
  padding-top: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.image-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.image-button,
.btn-primary,
.btn-secondary,
.btn-text,
.option-btn {
  transform-origin: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.image-button:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled),
.btn-text:hover:not(:disabled),
.option-btn:hover:not(:disabled) {
  transform: scale(1.03);
  box-shadow: 0 16px 28px rgba(65, 84, 69, 0.14);
}

.image-button:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.btn-text:active:not(:disabled),
.option-btn:active:not(:disabled) {
  transform: scale(0.98);
  filter: brightness(0.97);
}

.image-button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-text:disabled,
.option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.image-button img {
  display: block;
  width: 100%;
  height: auto;
}

.cover-action-btn {
  box-shadow: none !important;
  background: transparent !important;
}

.cover-action-btn img {
  filter: drop-shadow(0 10px 20px rgba(70, 110, 88, 0.08));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cover-action-btn:hover:not(:disabled) {
  box-shadow: none !important;
  background: transparent !important;
  transform: scale(1.03);
}

.cover-action-btn:hover:not(:disabled) img {
  filter: drop-shadow(0 16px 28px rgba(70, 110, 88, 0.18));
}

.cover-action-btn:active:not(:disabled) {
  box-shadow: none !important;
  background: transparent !important;
  transform: scale(0.98);
}

.cover-action-btn {
  width: min(68%, 248px);
}

#cover-start-btn {
  animation: buttonBreath 3.6s ease-in-out infinite;
}

#cover-start-btn:hover:not(:disabled) {
  animation: none;
  transform: scale(1.05);
  box-shadow: 0 18px 34px rgba(70, 110, 88, 0.24);
}

#cover-start-btn:active:not(:disabled) {
  animation: none;
  transform: scale(0.98);
}

.setup-screen {
  background: #f5f9f2;
}

.setup-layout {
  padding: 44px 16px 22px;
}

.setup-title-image {
  width: min(100%, 334px);
  display: block;
}

.setup-gender-grid {
  width: 100%;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.gender-select-btn {
  width: 100%;
  align-self: end;
  padding: 6px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(82, 92, 79, 0.06);
}

.gender-select-btn img {
  transition: transform 0.25s ease;
}

.gender-select-btn:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1.5px rgba(101, 135, 113, 0.28),
    0 18px 30px rgba(73, 86, 76, 0.14);
}

.gender-select-btn:hover:not(:disabled) img {
  transform: scale(1.05);
}

.gender-select-btn.selected {
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 0 0 2px rgba(95, 129, 108, 0.42),
    0 18px 30px rgba(73, 86, 76, 0.14);
}

.gender-select-btn.selected-pulse {
  animation: selectPulse 0.28s ease-out;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.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;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

#result-card {
  position: relative;
  background: #efedcf;
  border-color: #e5dcc0;
  scroll-margin-top: 0;
}

.hidden {
  display: none;
}

.cover-card.page-stagger-in .cover-title-image {
  animation: riseFadeIn 0.6s ease-out both;
}

.cover-card.page-stagger-in .cover-character-image {
  animation: riseFadeIn 0.6s ease-out both 0.12s;
}

.cover-card.page-stagger-in .cover-action-btn:first-child {
  animation: riseFadeIn 0.6s ease-out both 0.24s, buttonBreath 3.6s ease-in-out 0.9s infinite;
}

.cover-card.page-stagger-in .cover-action-btn:last-child {
  animation: riseFadeIn 0.6s ease-out both 0.36s;
}

.setup-screen.page-stagger-in .setup-title-image {
  animation: softFadeIn 0.4s ease-out both;
}

.setup-screen.page-stagger-in .gender-select-btn:first-child {
  animation: riseFadeIn 0.6s ease-out both 0.1s;
}

.setup-screen.page-stagger-in .gender-select-btn:last-child {
  animation: riseFadeIn 0.6s ease-out both 0.2s;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  margin-top: 6px;
  line-height: 1.35;
}

h2 {
  font-size: 20px;
  line-height: 1.45;
}

.sub {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.badge {
  display: inline-block;
  font-size: 12px;
  color: #6f4a29;
  background: rgba(248, 235, 214, 0.86);
  border-radius: 999px;
  padding: 4px 10px;
}

.hero-panel {
  position: relative;
  padding: 18px 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(146, 101, 56, 0.15), rgba(255, 248, 237, 0.8)),
    linear-gradient(180deg, #fbf6ed 0%, #f6ead7 100%);
  border: 1px solid rgba(197, 155, 88, 0.26);
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -26px -26px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(197, 155, 88, 0.25), transparent 68%);
}

.hero-kicker {
  color: var(--primary);
  font-size: 13px;
  letter-spacing: 0.18em;
  margin-top: 12px;
}

.hero-sub {
  max-width: 280px;
}

.field,
.gender-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field span,
.gender-box span {
  color: var(--muted);
  font-size: 14px;
}

input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  width: 100%;
  background: rgba(255, 253, 249, 0.95);
}

.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.btn-primary,
.btn-secondary,
.btn-text {
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.btn-primary {
  margin-top: 14px;
  background: linear-gradient(180deg, #9c6e3d 0%, #7c522a 100%);
  color: #fff;
  width: 100%;
  border-radius: 14px;
  padding: 14px 12px;
  box-shadow: 0 10px 20px rgba(124, 82, 42, 0.24);
}

.btn-primary:hover {
  background: var(--primary-2);
}

.btn-secondary {
  background: rgba(242, 229, 211, 0.95);
  color: #5f4426;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(197, 155, 88, 0.22);
}

.btn-text {
  color: var(--primary);
  background: transparent;
  padding: 2px;
}

.quiz-header,
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.quiz-header #progress-text {
  font-size: 15px;
  font-weight: 600;
  color: #4f6752;
  letter-spacing: 0.04em;
}

#quiz-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(246, 241, 229, 0.94));
}

#quiz-card > * {
  position: relative;
  z-index: 1;
}

#quiz-card::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -16px;
  height: 120px;
  pointer-events: none;
  opacity: 0.4;
  background:
    radial-gradient(36px 18px at 18% 72%, rgba(175, 198, 177, 0.16), rgba(175, 198, 177, 0)),
    radial-gradient(42px 22px at 48% 84%, rgba(179, 209, 185, 0.13), rgba(179, 209, 185, 0)),
    radial-gradient(34px 17px at 78% 70%, rgba(175, 198, 177, 0.14), rgba(175, 198, 177, 0));
}

.quiz-bg-art {
  position: absolute;
  left: 50%;
  bottom: -8px;
  z-index: 0;
  width: 100%;
  max-width: 320px;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.quiz-bg-image {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  filter: saturate(0.92);
  transition: opacity 0.3s ease;
}

.quiz-question-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.quiz-ornament-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7bc47f;
  box-shadow: 0 0 0 5px rgba(123, 196, 127, 0.12);
}

.quiz-ornament-line {
  flex: 1;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(123, 196, 127, 0.6), rgba(123, 196, 127, 0.08));
}

.quiz-progress-track {
  width: 100%;
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(123, 196, 127, 0.16);
}

.quiz-progress-fill {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7bc47f, #95d59a);
  transition: width 0.28s ease-out;
}

.options {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(197, 155, 88, 0.25);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 249, 242, 0.94));
  text-align: left;
  padding: 16px;
  line-height: 1.75;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(74, 48, 24, 0.07);
  animation: riseFadeIn 0.45s ease-out both;
}

.option-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7bc47f;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
  box-shadow: 0 8px 14px rgba(123, 196, 127, 0.22);
}

.option-copy {
  flex: 1;
  color: #3c342e;
}

.option-btn:hover {
  border-color: rgba(123, 196, 127, 0.7);
  background: linear-gradient(180deg, #fffdf9, #f4fbf3);
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(73, 86, 76, 0.14);
}

.option-btn.selected {
  border-color: #7bc47f;
  background: linear-gradient(180deg, rgba(244, 251, 243, 1), rgba(232, 246, 233, 0.92));
  box-shadow:
    0 0 0 1px rgba(123, 196, 127, 0.12),
    0 14px 26px rgba(92, 137, 94, 0.14);
}

.option-btn.selected-pulse {
  animation: selectPulse 0.26s ease-out;
}

.result-badge {
  background: rgba(255, 250, 237, 0.78);
  color: #8b7252;
}

.result-stage {
  position: relative;
  margin-top: 10px;
  min-height: 70vh;
  padding: 22px 14px 14px;
  border-radius: 24px;
  background: #efedcf;
  border: 1px solid rgba(181, 166, 126, 0.26);
  display: grid;
  align-content: start;
  justify-items: center;
}

.result-stage-title {
  margin: 10px auto 8px;
  text-align: center;
  font-family: "STKaiti", "Kaiti SC", "Songti SC", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #2b241e;
}

.result-badge,
.result-stage-title,
.result-art-wrap,
.result-summary-card {
  will-change: transform, opacity;
}

.result-art-wrap {
  width: 100%;
  max-width: 290px;
  height: 360px;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.result-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.result-summary-card {
  margin-top: 10px;
  width: 100%;
  max-width: 320px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.result-summary-card-hero {
  min-height: 88px;
}

.result-short-intro {
  margin: 0 auto;
  max-width: 306px;
  font-size: 17px;
  color: #43372e;
  line-height: 2;
  letter-spacing: 0.01em;
}

.poetry-line {
  display: inline-block;
  font-family: "STKaiti", "Kaiti SC", "Songti SC", serif;
  font-style: italic;
  letter-spacing: 0.04em;
}

.result-trait {
  margin-top: 10px;
  font-size: 14px;
  color: #6f6153;
  line-height: 1.9;
}

.scroll-unlock {
  margin-top: auto;
  padding-top: 22px;
  user-select: none;
}

.scroll-unlock-pill {
  min-width: 182px;
  padding: 12px 16px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(123, 196, 127, 0.14);
  box-shadow: 0 10px 24px rgba(83, 98, 82, 0.08);
  backdrop-filter: blur(8px);
  display: grid;
  justify-items: center;
  gap: 6px;
  animation: unlockBreath 2.8s ease-in-out infinite;
}

.scroll-unlock-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(123, 196, 127, 0.08);
}

.scroll-unlock-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: #7bc47f;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: arrowFloat 2.2s ease-in-out infinite;
}

.scroll-unlock p {
  margin: 0;
  color: #5f665b;
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.result-analysis {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.analysis-card {
  padding: 20px 18px;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.88);
  border: 1px solid rgba(197, 155, 88, 0.14);
  box-shadow: 0 12px 24px rgba(74, 48, 24, 0.05);
}

.analysis-card-quote {
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(248, 238, 220, 0.92));
}

.analysis-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #a08767;
}

.radar-chart {
  width: 100%;
  height: 190px;
}

.radar-layout {
  margin-top: 12px;
  display: block;
}

.radar-box {
  border-radius: 18px;
  border: 1px solid rgba(197, 155, 88, 0.16);
  background: rgba(255, 254, 250, 0.64);
}

.radar-box-combined {
  min-height: auto;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
}

.radar-insight {
  margin-top: 0;
}

.radar-insight.hidden {
  display: none;
}

.analysis-quote {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(140, 97, 50, 0.05);
  color: #5f4c3c;
  font-size: 17px;
  line-height: 2;
  letter-spacing: 0.01em;
}

.analysis-text {
  margin-top: 16px;
  display: grid;
  gap: 18px;
}

.analysis-block {
  padding-top: 14px;
  border-top: 1px dashed rgba(197, 155, 88, 0.2);
}

.analysis-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.analysis-block h4 {
  margin: 0 0 10px;
  font-family: "STKaiti", "Kaiti SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 500;
  color: #685441;
}

.analysis-title-main {
  color: #58432d;
  font-size: 19px;
  font-weight: 600;
}

.analysis-title-main-highlight {
  display: inline-block;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: rgba(123, 196, 127, 0.12);
  color: #4c5f44;
}

.analysis-title-sub {
  color: #6f6254;
  font-size: 16px;
  font-weight: 500;
}

.analysis-block p {
  margin: 0;
  color: #53483e;
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.01em;
}

.analysis-rich-text {
  color: #4b4036;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.01em;
}

.highlight {
  font-weight: 700;
  color: #7bc47f;
}

.quote {
  color: #888888;
}

.key-conclusion {
  font-size: 18px;
  font-weight: 700;
  color: #4f5d45;
}

.course-relation-line {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(123, 196, 127, 0.1);
  color: #4f5d45;
  font-size: 14px;
  line-height: 1.8;
}

.course-visual-card {
  margin-top: 0;
  padding: 0;
  border-radius: 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
}

.course-visual-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(188, 159, 122, 0.18);
  box-shadow: 0 10px 18px rgba(113, 88, 61, 0.06);
}

.course-visual-strip-copy {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  color: #6d5843;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.course-visual-strip-copy span {
  color: #c3a784;
  padding: 0 4px;
}

.course-visual-strip-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fc98f 0%, #71b674 100%);
  color: #fffefb;
  font-size: 13px;
  font-weight: 600;
}

.course-visual-image-wrap {
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
  background: #f4eadb;
  box-shadow: inset 0 0 0 1px rgba(181, 150, 115, 0.12);
}

.course-visual-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.course-visual-image-contain {
  object-fit: contain;
  background: #f8f1e4;
  padding: 4px;
}

.course-relation-line-visual {
  margin-top: 10px;
  background: rgba(123, 196, 127, 0.08);
}

.result-content {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(197, 155, 88, 0.16);
  line-height: 1.85;
  color: #3e3831;
  white-space: pre-wrap;
}

.result-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-footer-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#copy-btn:hover:not(:disabled) {
  transform: scale(1.03);
  box-shadow: 0 14px 24px rgba(95, 79, 56, 0.16);
}

.result-card.page-stagger-in .result-badge,
.result-card.page-stagger-in .result-stage-title {
  animation: popFadeIn 0.55s ease-out both;
}

.result-card.page-stagger-in .result-art-wrap {
  animation: floatBounceIn 0.72s ease-out both 0.12s;
}

.result-card.page-stagger-in .result-summary-card {
  animation: riseFadeIn 0.55s ease-out both 0.22s;
}

.result-card.page-stagger-in .scroll-unlock {
  animation: riseFadeIn 0.55s ease-out both 0.34s;
}

.result-card.result-reveal-active .result-stage-title,
.result-card.result-reveal-active .result-badge {
  opacity: 0;
  animation: resultTitleReveal 0.42s ease-out forwards;
}

.result-card.result-reveal-active .result-art-wrap {
  opacity: 0;
  animation: resultArtReveal 0.48s ease-out forwards 0.12s;
}

.result-card.result-reveal-active .result-summary-card,
.result-card.result-reveal-active .scroll-unlock,
.result-card.result-reveal-active .analysis-card,
.result-card.result-reveal-active .result-actions,
.result-card.result-reveal-active .result-footer-actions {
  opacity: 0;
  animation: riseFadeIn 0.4s ease-out forwards;
}

.result-card.result-reveal-active .result-summary-card {
  animation-delay: 0.22s;
}

.result-card.result-reveal-active .scroll-unlock {
  animation-delay: 0.3s;
}

.result-card.result-reveal-active .analysis-card:nth-of-type(1) {
  animation-delay: 0.38s;
}

.result-card.result-reveal-active .analysis-card:nth-of-type(2) {
  animation-delay: 0.48s;
}

.result-card.result-reveal-active .analysis-card:nth-of-type(3) {
  animation-delay: 0.58s;
}

.result-card.result-reveal-active .result-actions {
  animation-delay: 0.68s;
}

.result-card.result-reveal-active .result-footer-actions {
  animation-delay: 0.78s;
}

.history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.history-intro {
  margin-top: 10px;
}

.history-intro-card {
  border: 1px solid rgba(169, 140, 103, 0.18);
  border-radius: 22px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98) 0%, rgba(247, 240, 228, 0.96) 100%);
  box-shadow: 0 16px 28px rgba(129, 105, 76, 0.08);
}

.history-intro-eyebrow,
.poet-story-eyebrow,
.history-section-label {
  margin: 0 0 8px;
  color: #a07f5d;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.history-intro-card h4 {
  margin: 0;
  color: #5a4631;
  font-size: 20px;
}

.history-intro-copy {
  margin: 10px 0 0;
  color: #6e5d4f;
  line-height: 1.8;
}

.poet-grid-section {
  margin-top: 16px;
}

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

.poet-grid-item {
  border: 1px solid rgba(169, 140, 103, 0.16);
  border-radius: 18px;
  padding: 12px 8px 10px;
  background: rgba(255, 252, 247, 0.95);
  box-shadow: 0 12px 22px rgba(124, 100, 72, 0.08);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.poet-grid-item.is-featured {
  border-color: rgba(151, 122, 85, 0.34);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98) 0%, rgba(247, 239, 226, 0.95) 100%);
}

.poet-grid-avatar-wrap {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #fbf5ea 0%, #f2e5d2 100%);
  box-shadow: inset 0 0 0 1px rgba(165, 136, 103, 0.14);
}

.poet-grid-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.poet-grid-name {
  color: #5b4631;
  font-size: 14px;
  font-weight: 600;
}

.history-detail {
  margin-top: 10px;
}

.history-detail-back {
  margin-bottom: 12px;
}

.history-detail-content {
  display: grid;
  gap: 14px;
}

.poet-story-card {
  border: 1px solid rgba(169, 140, 103, 0.16);
  border-radius: 20px;
  padding: 18px 16px;
  background: rgba(255, 252, 247, 0.95);
  box-shadow: 0 14px 26px rgba(124, 100, 72, 0.08);
}

.poet-story-card.is-featured {
  border-color: rgba(151, 122, 85, 0.3);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98) 0%, rgba(247, 239, 226, 0.95) 100%);
}

.poet-story-title {
  margin: 0;
  color: #533f2b;
  font-size: 19px;
  line-height: 1.45;
}

.poet-detail-hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
}

.poet-detail-art-wrap {
  width: 112px;
  height: 112px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #faf4ea 0%, #efe1cc 100%);
}

.poet-detail-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.poet-detail-meta {
  min-width: 0;
}

.poet-detail-faction {
  margin: 8px 0 0;
  color: #8b6c4d;
  font-size: 14px;
  line-height: 1.7;
}

.poet-story-trait {
  margin: 8px 0 0;
  color: #8c6d4f;
  font-size: 13px;
  line-height: 1.7;
}

.poet-story-text {
  margin-top: 12px;
}

.poet-story-text p {
  margin: 0 0 12px;
  color: #5f5042;
  line-height: 1.9;
  font-size: 14px;
}

.poet-story-lesson {
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(169, 140, 103, 0.14);
  color: #7a5f46;
  line-height: 1.8;
  font-weight: 600;
}

.history-records {
  margin-top: 18px;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: rgba(255, 253, 249, 0.9);
  line-height: 1.75;
  font-size: 14px;
}

.history-item-title,
.history-item-meta,
.history-item-trait,
.history-item-time {
  margin: 0;
}

.history-item-title {
  color: #5b4631;
  font-weight: 700;
}

.history-item-meta,
.history-item-time {
  color: #816b56;
  margin-top: 4px;
}

.history-item-trait {
  color: #6b5848;
  margin-top: 6px;
}

.history-item-empty {
  color: #7b6755;
}

@media (max-width: 480px) {
  body {
    background: linear-gradient(180deg, #f8f4eb 0%, #f1e8d7 100%);
  }

  .preview-shell {
    padding: 0;
  }

  .preview-tip {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }

  .phone-notch {
    display: none;
  }

  .app {
    padding: 0;
  }

  .screen-card {
    margin: 0;
    min-height: 100vh;
    align-items: flex-start;
  }

  .quiz-bg-art {
    max-width: 300px;
    bottom: 0;
  }

  .quiz-bg-image {
    opacity: 1;
  }

  .cover-layout {
    padding: 66px 18px 30px;
  }

  .cover-title-image {
    width: min(100%, 378px);
  }

  .cover-character-image {
    width: min(100%, 372px);
    max-height: 520px;
    margin-top: 18px;
  }

  .cover-actions {
    margin-top: 28px;
    padding-top: 0;
    gap: 18px;
  }

  .cover-action-btn {
    width: min(76%, 282px);
  }

  .music-toggle-btn {
    top: 16px;
    right: 12px;
  }

  .setup-layout {
    padding: 44px 16px 22px;
  }

  .setup-title-image {
    width: min(100%, 334px);
  }

  .setup-gender-grid {
    margin-top: 34px;
    gap: 10px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .result-art-wrap {
    width: 100%;
    max-width: 280px;
    height: 330px;
  }

  .result-stage-title {
    font-size: 25px;
  }

  .result-short-intro {
    font-size: 16px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-footer-actions {
    grid-template-columns: 1fr;
  }

  .poet-grid {
    gap: 10px;
  }

  .poet-grid-avatar-wrap {
    width: 74px;
    height: 74px;
  }

  .poet-detail-hero {
    grid-template-columns: 1fr;
  }

  .poet-detail-art-wrap {
    width: 132px;
    height: 132px;
    margin: 0 auto;
  }

  .radar-box-combined {
    min-height: auto;
  }
}
