:root {
  color-scheme: light;
  --primary-color: #ff85a2;
  --secondary-color: #ffa8be;
  --accent-color: #ffeaa7;
  --page-background: #fff5f8;
  --page-background-deep: #fff0f5;
  --dark-color: #2d3436;
  --muted-color: #7f8790;
  --light-muted: #a6adb5;
  --soft-border: rgba(255, 133, 162, 0.16);
  --soft-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --primary-shadow: 0 4px 15px rgba(255, 133, 162, 0.16);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--dark-color);
  background: linear-gradient(180deg, var(--page-background) 0%, var(--page-background-deep) 54%, #ffe9ef 100%);
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.loading {
  margin: 28px auto;
  color: var(--muted-color);
  text-align: center;
}

.page-shell {
  width: min(100%, 634px);
  margin: 18px auto 44px;
  padding: 0 12px;
}

.brand-header {
  position: relative;
  min-height: 136px;
  margin: 0 0 30px;
  padding: 18px 24px 17px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  box-shadow: var(--primary-shadow);
}

.brand-header h1 {
  margin: 0 0 5px;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}

.brand-header p {
  margin: 0;
  font-size: 1.12rem;
  opacity: 0.94;
}

.settings-btn {
  position: fixed;
  z-index: 3;
  top: 22px;
  right: max(20px, calc((100vw - 1230px) / 2));
  display: grid;
  width: 36px;
  height: 36px;
  padding: 7px;
  color: var(--primary-color);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.settings-btn:hover {
  background: rgba(255, 133, 162, 0.1);
}

.settings-btn svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.intro-card,
.feature-card,
.quiz-card,
.brief-summary-card,
.chart-wrapper,
.dimension-details,
.deep-analysis,
.footer-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.intro-card {
  padding: 25px 35px 28px;
}

.intro-card h2 {
  margin: 0 0 16px;
  color: var(--primary-color);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.intro-copy {
  margin-bottom: 21px;
  line-height: 1.75;
}

.intro-copy p {
  margin: 8px 0 12px;
}

.intro-highlight {
  color: var(--primary-color);
  font-weight: 600;
}

.age-input-container {
  margin: 22px 0 0;
  text-align: left;
}

.age-input-container label {
  display: block;
  margin: 0 0 7px 4px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.age-input-container input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: #1f2937;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
}

.age-input-container input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 133, 162, 0.15);
}

.age-input-container input::placeholder {
  color: #94a3b8;
}

.privacy-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 6px 0 0;
  color: #9aa3ad;
  font-size: 0.7rem;
}

.start-button {
  display: block;
  width: 100%;
  min-height: 68px;
  margin: 27px auto 0;
  padding: 14px 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 0;
  border-radius: 32px;
  box-shadow: var(--primary-shadow);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.start-button:hover,
.share-button:hover,
.primary-small:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.feature-card {
  margin-top: 24px;
  padding: 20px 22px;
  background: linear-gradient(180deg, #fff9fb, #fff5f8);
  border: 1px solid var(--soft-border);
}

.feature-card h2 {
  margin: 0 0 17px;
  padding: 0 0 14px;
  color: var(--primary-color);
  border-bottom: 1px dashed rgba(255, 133, 162, 0.3);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
}

.feature-card h2 em {
  color: #d63384;
  font-style: normal;
}

.feature-card ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.75;
}

.feature-card strong {
  color: #374151;
}

.feature-number {
  color: var(--primary-color);
  font-weight: 800;
}

.site-footer {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.footer-block {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 133, 162, 0.12);
  box-shadow: none;
}

.footer-block h2 {
  margin: 0 0 7px;
  color: #69727c;
  font-size: 0.78rem;
}

.footer-block p {
  margin: 4px 0;
  color: #8b929b;
  font-size: 0.68rem;
}

.quiz-card {
  padding: 22px 24px 24px;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 0.86rem;
}

.quiz-meta div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.quiz-meta strong {
  color: #343840;
  font-size: 1rem;
}

.quiz-meta span {
  color: #adb2b8;
}

.quiz-meta i {
  color: #d3d6da;
  font-style: normal;
}

.quiz-meta b {
  color: var(--primary-color);
  font-weight: 700;
}

.progress-pill {
  flex: 0 0 auto;
  padding: 2px 13px;
  color: #fff !important;
  background: var(--primary-color);
  border-radius: 16px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  background: #eceff1;
  border-radius: 99px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: inherit;
  transition: width 0.2s ease;
}

.question-panel {
  display: flex;
  min-height: 116px;
  margin-top: 14px;
  padding: 20px;
  align-items: center;
  background: linear-gradient(180deg, #fff 0%, #fdfdfd 100%);
  border: 1px solid #f0f0f0;
  border-radius: 16px;
}

.question-panel p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.7;
}

.answer-options {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 12px 0 0;
}

.answer-option {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.option-circle {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.answer-option:hover .option-circle,
.answer-option.selected .option-circle {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.option-label {
  color: #858a90;
  font-size: 0.68rem;
  white-space: nowrap;
}

.scale-guide {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 8px;
  color: #fff;
  background: linear-gradient(90deg, #ff9ca6 0%, #ffd36e 48%, #65c982 100%);
  border-radius: 2px;
  font-size: 0.72rem;
}

.scale-guide span {
  margin-top: 8px;
  color: var(--primary-color);
}

.scale-guide span:last-child {
  color: #62bb80;
}

.quiz-hint,
.random-note {
  margin: 6px 0 0;
  color: #9aa0a7;
  font-size: 0.68rem;
  text-align: center;
}

.random-note {
  color: #a3a7ad;
}

.quiz-actions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.secondary-button {
  min-height: 45px;
  padding: 8px 16px;
  color: #7e8388;
  background: #f8f8f8;
  border: 1px solid #ededed;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.secondary-button:hover:not(:disabled) {
  color: var(--primary-color);
  background: #fff6f8;
  border-color: var(--soft-border);
}

.secondary-button:disabled {
  color: #c4c8cc;
  cursor: not-allowed;
}

.result-container {
  padding-bottom: 25px;
}

.result-title {
  margin: 43px 0 34px;
  color: #343840;
  font-size: 1.55rem;
  text-align: center;
}

.score-container {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.result-visualization {
  display: flex;
  justify-content: center;
  width: 100%;
}

.age-badge {
  display: flex;
  width: 200px;
  height: 200px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(255, 133, 162, 0.2);
}

.age-number {
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1.1;
}

.age-unit {
  font-size: 1.05rem;
}

.age-range {
  width: 100%;
  max-width: 600px;
  margin: 59px auto 0;
  padding: 0 14px;
}

.age-range-bar {
  position: relative;
  height: 12px;
  background: rgba(255, 133, 162, 0.13);
  border-radius: 99px;
}

.age-range-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: inherit;
}

.age-marker {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  transform: translate(-50%, -50%);
}

.age-marker-label {
  position: absolute;
  bottom: 17px;
  padding: 3px 11px;
  color: #fff;
  background: var(--primary-color);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.age-marker-dot {
  width: 21px;
  height: 21px;
  background: var(--primary-color);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.age-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  color: #72777e;
  font-size: 0.85rem;
}

.age-comparison {
  display: flex;
  width: min(100%, 570px);
  margin: 24px auto 0;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  color: #6f757d;
  font-size: 0.82rem;
  text-align: center;
}

.age-comparison strong {
  color: #50565e;
}

.age-comparison-copy {
  margin-top: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--soft-border);
  border-radius: 12px;
  text-align: left;
}

.age-comparison-copy b {
  color: var(--primary-color);
}

.age-comparison-copy p {
  margin: 6px 0 0;
  line-height: 1.8;
}

.brief-summary-card {
  margin: 32px 12px 18px;
  padding: 18px 20px;
}

.brief-description {
  margin: 0;
  color: #666d75;
  line-height: 1.8;
}

.brief-suggestion {
  margin-top: 12px;
  padding: 12px 14px;
  color: #646b73;
  background: rgba(255, 133, 162, 0.08);
  border-left: 3px solid var(--primary-color);
  border-radius: 5px;
  line-height: 1.8;
}

.brief-suggestion strong {
  color: #4b5158;
}

.chart-wrapper,
.dimension-details,
.deep-analysis {
  margin: 18px 12px;
  padding: 20px;
}

.chart-wrapper h3,
.dimension-details h3,
.deep-analysis > h2 {
  margin: 0 0 15px;
  color: #343840;
  font-size: 1.08rem;
  text-align: center;
}

.radar-chart {
  display: block;
  width: min(100%, 400px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: #f4dfe5;
  stroke-width: 1;
}

.radar-axis {
  stroke: #eee5e8;
  stroke-width: 1;
}

.radar-area {
  fill: rgba(255, 133, 162, 0.27);
  stroke: var(--primary-color);
  stroke-width: 2;
}

.radar-dot {
  fill: var(--primary-color);
  stroke: #fff;
  stroke-width: 1.5;
}

.radar-label {
  fill: #6c7178;
  font-size: 10px;
}

.dimension-cards {
  display: grid;
  gap: 9px;
}

.dim-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--soft-border);
  border-radius: 10px;
}

.dim-card summary {
  display: block;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.dim-card summary::-webkit-details-marker {
  display: none;
}

.dim-header,
.dim-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dim-name {
  color: #4d535b;
  font-weight: 700;
}

.dim-score {
  color: var(--primary-color);
  font-size: 1.08rem;
  font-weight: 800;
}

.dim-bar {
  display: block;
  height: 7px;
  margin: 8px 0 7px;
  overflow: hidden;
  background: #f3f3f3;
  border-radius: 99px;
}

.dim-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: inherit;
}

.dim-level {
  color: #a1a6ac;
  font-size: 0.72rem;
}

.dim-level-tag {
  padding: 1px 8px;
  border-radius: 99px;
}

.level-low {
  color: #e16d73;
  background: #fff0ef;
}

.level-medium {
  color: #cb9b32;
  background: #fff8e7;
}

.level-high {
  color: #50a775;
  background: #edf9f0;
}

.dim-expand-hint::before {
  content: "点击展开";
}

.dim-card[open] .dim-expand-hint::before {
  content: "点击收起";
}

.dim-expand-hint {
  font-size: 0;
}

.dim-expand-hint::before {
  font-size: 0.72rem;
}

.dim-desc {
  display: none;
  padding: 0 14px 14px;
  color: #727982;
  font-size: 0.86rem;
  line-height: 1.8;
}

.dim-card[open] .dim-desc {
  display: block;
}

.deep-analysis > h2 {
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--soft-border);
}

.analysis-section {
  margin: 18px 0 0;
}

.analysis-section h3 {
  margin: 0 0 8px;
  color: var(--primary-color);
  font-size: 1rem;
}

.analysis-section p,
.strength-list {
  margin: 0;
  color: #656c75;
  line-height: 1.85;
}

.analysis-section .advice-line {
  margin-top: 8px;
}

.strength-list {
  padding: 0;
  list-style: none;
}

.strength-list li {
  margin: 8px 0;
}

.strength-list strong {
  color: #4e555e;
}

.highlight-card {
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff9fb, #fff5f8);
  border: 1px solid var(--soft-border);
  border-radius: 12px;
}

.highlight-card h4 {
  margin: 0 0 7px;
  color: var(--primary-color);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 12px 0;
}

.share-button,
.primary-small {
  min-height: 52px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 0;
  border-radius: 28px;
  box-shadow: var(--primary-shadow);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.result-actions .start-button {
  min-height: 52px;
  margin: 0;
  padding: 10px 18px;
  font-size: 1rem;
}

.theme-backdrop,
.dialog-backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(32, 36, 42, 0.28);
}

.theme-panel,
.exit-dialog {
  width: min(100%, 390px);
  padding: 17px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.theme-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 700;
}

.theme-panel-header button {
  width: 32px;
  height: 32px;
  color: #7d8288;
  background: #f6f6f6;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.theme-swatch {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.theme-swatch.active {
  box-shadow: 0 0 0 2px #555;
}

.exit-dialog h2 {
  margin: 0 0 8px;
  color: #d76172;
  font-size: 1.1rem;
}

.exit-dialog p {
  margin: 0 0 17px;
  color: #69717a;
}

.exit-dialog > div {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.exit-dialog .secondary-button,
.primary-small {
  min-height: 40px;
  padding: 7px 15px;
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  left: 18px;
  width: fit-content;
  max-width: calc(100vw - 36px);
  margin: auto;
  padding: 10px 15px;
  color: #fff;
  background: rgba(44, 48, 54, 0.9);
  border-radius: 10px;
  box-shadow: var(--soft-shadow);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .page-shell {
    padding: 0 12px;
  }

  .brand-header {
    padding: 20px 22px 18px;
    border-radius: 16px;
  }

  .brand-header h1 {
    font-size: 2.5rem;
  }

  .brand-header p {
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .page-shell {
    margin-top: 10px;
    padding: 0 8px;
  }

  .brand-header {
    margin-bottom: 20px;
    padding: 14px 42px 13px 16px;
    border-radius: 12px;
  }

  .brand-header h1 {
    font-size: 1.8rem;
  }

  .brand-header p {
    font-size: 0.92rem;
  }

  .settings-btn {
    position: absolute;
    top: 11px;
    right: 8px;
  }

  .intro-card {
    padding: 19px 17px 21px;
  }

  .intro-card h2 {
    font-size: 1.35rem;
  }

  .intro-copy {
    font-size: 0.94rem;
  }

  .start-button {
    min-height: 58px;
  }

  .feature-card {
    padding: 16px 14px;
  }

  .quiz-card {
    padding: 17px 14px;
  }

  .quiz-meta {
    font-size: 0.8rem;
  }

  .quiz-meta div {
    gap: 6px;
  }

  .question-panel {
    min-height: 120px;
    padding: 16px;
  }

  .question-panel p {
    font-size: 1.06rem;
  }

  .answer-options {
    gap: 3px;
  }

  .option-circle {
    width: min(52px, 13vw);
    height: min(52px, 13vw);
  }

  .option-label {
    font-size: 0.62rem;
  }

  .result-title {
    margin-top: 30px;
  }

  .age-badge {
    width: 178px;
    height: 178px;
  }

  .age-number {
    font-size: 3.9rem;
  }

  .age-range {
    margin-top: 55px;
    padding: 0 11px;
  }

  .age-range-labels {
    font-size: 0.72rem;
  }

  .brief-summary-card,
  .chart-wrapper,
  .dimension-details,
  .deep-analysis {
    margin-right: 4px;
    margin-left: 4px;
    padding: 16px;
  }

  .result-actions {
    margin-right: 4px;
    margin-left: 4px;
  }

  .result-actions .start-button,
  .share-button {
    min-height: 48px;
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .theme-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .theme-swatch {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
