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

.course-landing-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #f8f5ef;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.course-landing-layer.is-active {
  opacity: 1;
  transform: translateX(0);
}

.course-landing-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 54px 1fr;
  background: #fbf8f1;
}

.course-landing-nav {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(188, 159, 122, 0.14);
  background: rgba(255, 252, 247, 0.96);
}

.course-landing-back-btn {
  border: 0;
  background: transparent;
  color: #5d4b39;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
}

.course-landing-back-btn span[aria-hidden="true"] {
  font-size: 24px;
  line-height: 1;
  margin-top: -2px;
}

.course-landing-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f7f3ec;
}

.course-landing-image {
  display: block;
  width: 100%;
  height: auto;
}

.music-toggle-btn {
  position: absolute;
  top: 92px;
  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.music-on-cover {
  top: 172px;
  right: 14px;
}

.music-toggle-btn.music-on-setup {
  top: 148px;
  right: 14px;
}

.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(112%, 430px);
  display: block;
}

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

.cover-actions {
  width: 100%;
  margin-top: 0;
  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(112%, 420px);
  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);
  overflow: hidden;
}

.gender-select-btn img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s ease;
}

#gender-boy-btn img {
  transform: translateX(-18px);
}

.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-boy-btn:hover:not(:disabled) img {
  transform: translateX(-18px) 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;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hidden {
  display: none;
}

#quiz-card.hidden,
#result-card.hidden,
#history-card.hidden {
  display: none !important;
}

.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 .btn-text:disabled {
  color: #b4a390;
  opacity: 0.85;
}

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

.quiz-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quiz-header #progress-text,
.quiz-progress-badge {
  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;
}

#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: relative;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(80, 100, 80, 0.12);
}

.quiz-progress-badge {
  display: none;
}

.quiz-img-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  margin-top: 4px;
  pointer-events: auto;
}

.quiz-img-actions-right {
  display: flex;
  gap: 8px;
}

.quiz-progress-badge-inline {
  font-size: 14px;
  font-weight: 700;
  color: #4f6752;
  letter-spacing: 0.04em;
}

.quiz-img-btn {
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #4f6752;
  background: rgba(79, 140, 84, 0.12);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  transition: background 0.18s ease, transform 0.15s ease;
}

.quiz-img-btn:active {
  transform: scale(0.96);
  background: rgba(79, 140, 84, 0.25);
}

.quiz-img-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

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

@keyframes quizQuestionFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.quiz-q-animate {
  animation: quizQuestionFadeIn 0.3s ease-out both;
}

.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: auto;
  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;
  width: 100%;
}

.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;
  width: 100%;
  max-width: 100%;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-stage-title-image {
  display: block;
  width: min(100%, 640px);
  height: 118px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}

.result-stage-title-image.hidden {
  display: none;
}

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

.result-art-wrap {
  width: 100%;
  max-width: 360px;
  height: 458px;
  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: 20px;
  width: 100%;
  max-width: 372px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

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

.result-short-intro {
  margin: 0 auto;
  max-width: 350px;
  font-size: 18px;
  color: #5a7a6a;
  line-height: 2;
  letter-spacing: 0.02em;
}

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

.result-summary-line {
  display: none;
}

.result-trait {
  margin-top: 18px;
}

.result-trait-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.result-trait-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #e8f5e8;
  color: #7bc47f;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.result-trait-note {
  display: none;
}

.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;
  width: 100%;
}

.analysis-card {
  width: 100%;
  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-card-ai {
  background: linear-gradient(180deg, rgba(240, 246, 255, 0.96), rgba(228, 240, 255, 0.88));
  border-color: rgba(99, 155, 230, 0.18);
}

.ai-insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-insight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #4a90d9, #6b5ecf);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ai-insight-content {
  font-size: 14px;
  line-height: 1.85;
  color: #3c3a50;
}

.ai-insight-loading {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}

.ai-loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7a9fd4;
  animation: aiDotPulse 1.2s ease-in-out infinite;
}

.ai-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dot:nth-child(3) { animation-delay: 0.4s; }

.ai-loading-text {
  font-size: 13px;
  color: #8899bb;
  margin-left: 4px;
}

@keyframes aiDotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.ai-insight-text {
  white-space: pre-wrap;
}

.ai-insight-course-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px 0;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #6b8f71 0%, #4a7c59 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(75, 124, 89, 0.25);
  transition: transform 0.18s, box-shadow 0.18s;
}
.ai-insight-course-btn:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(75, 124, 89, 0.18);
}

.ai-insight-error {
  font-size: 13px;
  color: #b07a5a;
}

.ai-unlock-mask {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 246, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

.radar-ai-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.radar-ai-divider-text {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.radar-ai-ref {
  margin-top: 10px;
  font-size: 11px;
  color: #999;
  text-align: right;
}

#ai-insight-card {
  position: relative;
  overflow: hidden;
}

.ai-unlock-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  text-align: center;
}

.ai-unlock-icon {
  font-size: 26px;
  line-height: 1;
}

.ai-unlock-title {
  font-size: 15px;
  font-weight: 700;
  color: #3c3a50;
  margin: 0;
}

.ai-unlock-desc {
  font-size: 13px;
  color: #6b6880;
  line-height: 1.6;
  margin: 0;
}

.ai-unlock-btn {
  margin-top: 4px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4a90d9, #6b5ecf);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(99, 94, 207, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ai-unlock-btn:active {
  transform: scale(0.96);
  box-shadow: 0 3px 8px rgba(99, 94, 207, 0.2);
}

.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 24, 48, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.share-modal-overlay.hidden {
  display: none;
}

.share-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: shareModalSlideUp 0.3s ease-out both;
}

@keyframes shareModalSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.share-modal-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #9b8ecf;
  font-weight: 600;
  margin: 0;
}

.share-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e1830;
  margin: 0;
  line-height: 1.4;
}

.share-modal-desc {
  font-size: 14px;
  color: #5c5470;
  line-height: 1.7;
  margin: 0;
}

.share-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(235, 232, 255, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
}

.share-modal-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #3c3450;
  line-height: 1.5;
}

.share-step-num {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90d9, #6b5ecf);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-modal-copy-btn {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4a90d9, #6b5ecf);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(99, 94, 207, 0.3);
  transition: transform 0.15s ease;
}

.share-modal-copy-btn:active {
  transform: scale(0.97);
}

.share-modal-confirm-btn {
  padding: 14px;
  border-radius: 14px;
  background: rgba(235, 232, 255, 0.6);
  color: #4a38a8;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(107, 94, 207, 0.2);
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-modal-confirm-btn:active {
  background: rgba(235, 232, 255, 0.9);
}

.share-modal-cancel-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
}

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

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

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

.radar-box {
  width: 100%;
  margin: 0 auto;
  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;
  width: 100%;
  margin: 0 auto;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
}

.radar-insight {
  margin-top: 0;
  width: 100%;
}

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

.score-summary {
  margin-top: -18px;
  width: 100%;
  padding: 0 8px 6px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0;
}

.compare {
  font-size: 14px;
  color: #7bc47f;
  line-height: 1.7;
  text-align: center;
}

.dimension-scores {
  display: none;
}

.dimension-item {
  display: none;
}

.dimension-item .name {
  font-size: 14px;
  color: #4f5d45;
  text-align: left;
}

.dimension-item .stars {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: #7bc47f;
  text-align: center;
  white-space: nowrap;
}

.dimension-item .score {
  font-size: 14px;
  font-weight: 600;
  color: #6b5845;
  text-align: right;
}

.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: 10px;
  width: 100%;
  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: center;
  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;
  color: #6d5843;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

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

.course-visual-image-wrap {
  margin-top: 10px;
  width: 100%;
  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-visual-main-cta {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fc98f 0%, #71b674 100%);
  color: #fffefb;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 22px rgba(113, 182, 116, 0.2);
}

.result-content {
  margin-top: 14px;
  width: 100%;
  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;
  width: 100%;
}

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

.result-archive-entry {
  width: 100%;
  margin-top: 10px;
}

.result-archive-entry-note {
  margin: 8px 6px 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #7d6a53;
  background: rgba(255, 246, 232, 0.82);
  border: 1px dashed rgba(187, 146, 98, 0.32);
  border-radius: 999px;
  padding: 5px 12px;
}

.result-archive-entry-note.hidden {
  display: none !important;
}

.result-archive-entry-btn {
  width: 100%;
  border: 1px solid rgba(150, 116, 76, 0.24);
  border-radius: 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.96), rgba(252, 242, 225, 0.98));
  position: relative;
  display: block;
  text-align: center;
  box-shadow: 0 12px 26px rgba(140, 107, 71, 0.12);
  color: #4f4032;
}

.result-archive-entry-kicker {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7e0bf, #ebc79d);
  color: #7e5a30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.result-archive-entry-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0 72px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 20;
  transform: translateX(-50%) translateY(12px);
  width: min(calc(100% - 32px), 280px);
  padding: 14px 16px 13px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.97);
  border: 1px solid rgba(123, 196, 127, 0.18);
  box-shadow: 0 16px 36px rgba(77, 91, 79, 0.16);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.copy-toast.hidden {
  display: none !important;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast-title {
  color: #47624f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.copy-toast-text {
  margin-top: 4px;
  color: #7a7f77;
  font-size: 13px;
  line-height: 1.5;
}

#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-archive-entry,
.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 .analysis-card:nth-of-type(4) {
  animation-delay: 0.66s;
}

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

.result-card.result-reveal-active .result-archive-entry {
  animation-delay: 0.78s;
}

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

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

  .app > section {
    width: 100%;
  }

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

  #quiz-card,
  #result-card,
  #history-card {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  #quiz-card {
    min-height: 100vh;
  }

  .quiz-bg-art {
    margin-top: 6px;
    margin-left: 0;
    width: 100%;
  }

  .quiz-bg-image {
    height: 240px;
    opacity: 1;
  }

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

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

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

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

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

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

  .music-toggle-btn.music-on-cover {
    top: 168px;
    right: 12px;
  }

  .music-toggle-btn.music-on-setup {
    top: 144px;
    right: 12px;
  }

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

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

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

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .result-art-wrap {
    width: 100%;
    max-width: 342px;
    height: 430px;
  }

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

  .result-stage-title-image {
    width: min(100%, 100%);
    height: 108px;
  }

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

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

  .result-archive-entry-btn {
    padding: 14px 14px;
  }

  .result-archive-entry-title {
    font-size: 16px;
    padding: 0 64px;
  }

  .result-archive-entry-kicker {
    left: 14px;
  }

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

/* ========== 退出确认弹窗 ========== */
.quit-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.quit-confirm-overlay.hidden {
  display: none !important;
}

.quit-confirm-modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  animation: claimSlideUp 0.22s ease-out both;
}

.quit-confirm-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.quit-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px;
}

.quit-confirm-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 22px;
}

.quit-confirm-actions {
  display: flex;
  gap: 12px;
}

.quit-confirm-cancel {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #4caf80, #3a9d6a);
  color: #fff;
  transition: transform 0.15s ease;
}

.quit-confirm-cancel:active {
  transform: scale(0.97);
}

.quit-confirm-ok {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: #999;
  transition: transform 0.15s ease;
}

.quit-confirm-ok:active {
  transform: scale(0.97);
  background: #f5f5f5;
}

@keyframes claimSlideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ========== 领取成功弹窗 ========== */
.claim-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(12, 20, 16, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.claim-success-overlay.hidden {
  display: none !important;
}

.claim-success-modal {
  background: linear-gradient(180deg, #fffdf8 0%, #f6f1e7 100%);
  border-radius: 24px;
  padding: 30px 22px 22px;
  width: 100%;
  max-width: 332px;
  text-align: center;
  box-shadow: 0 20px 56px rgba(44, 33, 20, 0.28);
  border: 1px solid rgba(190, 164, 128, 0.24);
  animation: claimSlideUp 0.28s ease-out both;
}

.claim-success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: radial-gradient(circle at 25% 25%, #9ad66e 0%, #4f9d44 88%);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 58px;
  box-shadow: 0 8px 18px rgba(79, 157, 68, 0.32);
}

.claim-success-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.1;
  color: #2b2b2b;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.claim-success-desc {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.45;
  color: #3c4a3f;
  font-weight: 600;
}

.claim-success-close-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 13px 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #a76e37 0%, #8a5728 100%);
  box-shadow: 0 8px 16px rgba(138, 87, 40, 0.28);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.claim-success-close-btn:hover {
  filter: brightness(1.02);
}

.claim-success-close-btn:active {
  transform: scale(0.98);
  filter: brightness(0.97);
}

@media (max-width: 480px) {
  .claim-success-modal {
    max-width: 320px;
    padding: 28px 20px 20px;
  }
  .claim-success-title {
    font-size: 23px;
  }
  .claim-success-desc {
    font-size: 15px;
  }
}

/* 分享海报 */
.share-poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.share-poster-overlay.hidden {
  display: none;
}
.share-poster-dialog {
  background: linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
  border-radius: 18px;
  padding: 16px 16px 14px;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 18px 48px rgba(17, 29, 21, 0.28);
}
.share-poster-hint {
  font-size: 14px;
  color: #5f5e5b;
  margin: 0 0 12px;
}

.share-poster-preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  width: min(340px, calc(100vw - 72px));
  aspect-ratio: 9 / 16;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  background: #f3efe9;
  box-shadow: inset 0 0 0 1px rgba(80, 80, 80, 0.08);
}
.share-poster-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: top;
  transition: opacity 0.22s ease;
}
.share-poster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #5b6e5c;
  background: linear-gradient(135deg, rgba(250, 247, 240, 0.94), rgba(247, 242, 232, 0.96));
}
.share-poster-loading.hidden {
  display: none;
}
.share-poster-overlay.is-loading .share-poster-image {
  opacity: 0.22;
}
.share-poster-close {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 15px;
  color: #4f6752;
  background: rgba(79, 103, 82, 0.12);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
