:root {
  color-scheme: light;
  --bg: #f3f4ef;
  --ink: #202326;
  --muted: #6d6862;
  --line: #ded8cf;
  --panel: #fffefb;
  --soft-panel: rgba(255, 254, 251, 0.78);
  --accent: #d9475f;
  --accent-2: #20786f;
  --accent-3: #284f76;
  --warm: #f1b75b;
  --analyst: #8f5bb7;
  --diplomat: #33a474;
  --sentinel: #2d7fb8;
  --explorer: #d99a2b;
  --shadow: 0 18px 42px rgba(36, 35, 31, 0.1);
  --shadow-soft: 0 8px 26px rgba(36, 35, 31, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(217, 71, 95, 0.06), transparent 30%),
    linear-gradient(220deg, rgba(32, 120, 111, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(255, 254, 251, 0.9), rgba(255, 254, 251, 0) 360px),
    var(--bg);
  color: var(--ink);
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.screen {
  display: none;
  min-height: calc(100vh - 48px);
}

.screen.active {
  display: block;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
  padding: 64px 0 76px;
}

.intro-first {
  min-height: calc(100vh - 56px);
  padding-top: 34px;
}

.front-system {
  padding-top: 72px;
}

.front-system .section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 5.8vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.78;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary,
.secondary,
.scale-choice,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(217, 71, 95, 0.24);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
}

.compact {
  min-height: 44px;
  white-space: nowrap;
}

.primary:hover,
.secondary:hover,
.scale-choice:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.note {
  max-width: 620px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.archetype-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.archetype-strip img {
  width: 100%;
  object-fit: contain;
  padding: 8px 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.archetype-strip {
  margin-top: 16px;
}

.archetype-strip img {
  aspect-ratio: 5 / 6;
  object-position: top center;
}

.visual-panel {
  display: grid;
  gap: 16px;
  align-self: start;
}

.visual-story {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.visual-panel img,
.visual-story img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.visual-story figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(255, 254, 251, 0.34);
  border-radius: 8px;
  background: rgba(32, 35, 38, 0.66);
  color: #fffefb;
  backdrop-filter: blur(10px);
}

.visual-story strong,
.visual-story span {
  display: block;
}

.visual-story strong {
  font-size: 14px;
}

.visual-story span {
  color: rgba(255, 254, 251, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

.image-collage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.image-collage img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  box-shadow: none;
}

.type-system {
  margin-top: 18px;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(32, 35, 38, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 71, 95, 0.18), transparent 36%),
    linear-gradient(315deg, rgba(32, 120, 111, 0.18), transparent 40%),
    #202326;
  color: #fffefb;
  box-shadow: 0 24px 60px rgba(32, 35, 38, 0.18);
}

.front-system {
  min-height: auto;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h1 {
  font-size: clamp(42px, 5.4vw, 70px);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.section-head p:not(.eyebrow) {
  margin: 12px 0 0;
  color: rgba(255, 254, 251, 0.7);
  font-size: 17px;
  line-height: 1.75;
}

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

.type-group {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 254, 251, 0.12);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.07);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.type-group.analyst {
  border-color: rgba(143, 91, 183, 0.32);
}

.type-group.diplomat {
  border-color: rgba(51, 164, 116, 0.32);
}

.type-group.sentinel {
  border-color: rgba(45, 127, 184, 0.32);
}

.type-group.explorer {
  border-color: rgba(217, 154, 43, 0.36);
}

.type-group strong {
  display: block;
  margin-bottom: 8px;
  color: #fffefb;
  font-size: 20px;
}

.type-group p {
  margin: 0;
  color: rgba(255, 254, 251, 0.68);
  font-size: 14px;
  line-height: 1.7;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.type-cards figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 254, 251, 0.12);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.92);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.type-cards figure:hover,
.type-cards figure:focus-visible {
  border-color: rgba(255, 254, 251, 0.42);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
  outline: none;
}

.analyst .type-cards figure {
  background: linear-gradient(180deg, rgba(143, 91, 183, 0.22), #fff 68%);
}

.diplomat .type-cards figure {
  background: linear-gradient(180deg, rgba(51, 164, 116, 0.22), #fff 68%);
}

.sentinel .type-cards figure {
  background: linear-gradient(180deg, rgba(45, 127, 184, 0.22), #fff 68%);
}

.explorer .type-cards figure {
  background: linear-gradient(180deg, rgba(217, 154, 43, 0.24), #fff 68%);
}

.type-cards img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 10px 10px 0;
}

.zodiac-panel {
  max-width: 720px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  box-shadow: var(--shadow-soft);
}

.zodiac-panel h2 {
  margin: 0;
  font-size: 22px;
}

.zodiac-panel p {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

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

.zodiac-choice {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.zodiac-choice img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(80, 58, 43, 0.08);
}

.zodiac-copy,
.zodiac-choice strong,
.zodiac-choice em {
  display: block;
}

.zodiac-choice strong {
  font-size: 14px;
}

.zodiac-choice em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.zodiac-choice.selected {
  border-color: var(--accent);
  background: rgba(217, 71, 95, 0.08);
  box-shadow: 0 0 0 3px rgba(217, 71, 95, 0.12);
}

.zodiac-choice.selected img {
  box-shadow: 0 10px 22px rgba(217, 71, 95, 0.22);
}

.type-cards figcaption {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px 10px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.type-cards figcaption span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 18px;
}

.icon-button {
  width: 44px;
  height: 44px;
  background: var(--panel);
  color: var(--ink);
  font-size: 22px;
}

.progress-wrap {
  flex: 1;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

#progressBar {
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 0.24s ease;
}

.question-card {
  margin: 72px auto 0;
  max-width: 760px;
  min-height: 560px;
  padding: 32px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.78);
  box-shadow: var(--shadow);
}

.question-copy {
  display: grid;
  align-content: start;
  min-height: 150px;
}

.question-card h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 3.8vw, 38px);
  line-height: 1.28;
  letter-spacing: 0;
}

.scale-card {
  display: grid;
  grid-template-rows: minmax(172px, auto) 84px 22px;
  gap: 22px;
}

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

.pole {
  min-height: 172px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pole span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(47, 125, 116, 0.1);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.right-pole span {
  background: rgba(217, 71, 95, 0.1);
  color: var(--accent);
}

.pole strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
}

.scale-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: center;
  justify-items: center;
  min-height: 84px;
  padding: 0;
}

.scale-choice {
  display: block;
  border-radius: 999px;
  background: #fff;
  background-clip: padding-box;
  color: var(--ink);
  border-width: 3px;
}

.scale-choice.size-1 {
  width: 38px;
  height: 38px;
}

.scale-choice.size-2 {
  width: 50px;
  height: 50px;
}

.scale-choice.size-3 {
  width: 62px;
  height: 62px;
}

.scale-choice[data-value^="-"] {
  border-color: #2f7d74;
}

.scale-choice[data-value="1"],
.scale-choice[data-value="2"] {
  border-color: #8f4ab8;
}

.scale-choice.neutral {
  border-color: #a8a09a;
}

.scale-choice.selected {
  box-shadow: 0 0 0 6px rgba(34, 36, 38, 0.08), var(--shadow);
}

.scale-choice.selected[data-value^="-"] {
  background: #2f7d74;
}

.scale-choice.selected[data-value="1"],
.scale-choice.selected[data-value="2"] {
  background: #8f4ab8;
}

.scale-choice.selected.neutral {
  background: #a8a09a;
}

.scale-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.scale-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scale-labels span:nth-child(2) {
  text-align: center;
}

.scale-labels span:nth-child(3) {
  text-align: right;
}

.scale-choice:focus-visible,
.primary:focus-visible,
.secondary:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(47, 125, 116, 0.28);
  outline-offset: 2px;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: end;
  margin-top: 18px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(315deg, rgba(20, 86, 74, 0.92), rgba(33, 160, 112, 0.92)),
    #1f9a6e;
  box-shadow: 0 26px 64px rgba(31, 119, 91, 0.25);
  color: #fff;
}

.result-portrait {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(15, 70, 55, 0.22);
  backdrop-filter: blur(10px);
}

.result-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 14px 14px 0;
}

.result-portrait figcaption {
  padding: 10px 12px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.type-name {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chips span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.result-lead {
  max-width: 590px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 560px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 82, 63, 0.26);
}

.result-stats span {
  display: grid;
  gap: 4px;
  min-height: 78px;
  align-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: center;
}

.result-stats strong {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.score-grid,
.report,
.full-report,
.coupon {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
  box-shadow: var(--shadow-soft);
}

.compact-result.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.compact-result .result-header,
.compact-result .score-grid,
.compact-result .report-index,
.compact-result .bottom-actions,
.compact-result .coupon {
  grid-column: 1 / -1;
}

.report-index {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.report-index-head {
  display: block;
  padding: 30px 32px 26px;
  border-bottom: 1px solid var(--line);
}

.report-index-head .eyebrow {
  margin-bottom: 8px;
}

.report-index-head h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.15;
}

.report-index-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.report-chapters {
  display: grid;
}

.report-chapter.section-open {
  display: grid;
  grid-template-columns: 42px minmax(190px, 0.65fr) minmax(240px, 1fr) 24px;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 14px 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.report-chapter.section-open:last-child {
  border-bottom: 0;
}

.report-chapter.section-open:hover,
.report-chapter.section-open:focus-visible {
  background: rgba(32, 120, 111, 0.06);
}

.report-chapter span {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.report-chapter strong {
  font-size: 18px;
}

.report-chapter small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.report-chapter i {
  color: var(--accent-2);
  font-size: 30px;
  font-style: normal;
  line-height: 0.7;
  text-align: right;
}

.compact-result .classic-profile,
.compact-result .xhs-report,
.compact-result .report {
  grid-column: span 6;
}

.compact-result .zodiac-report,
.compact-result .xhs-deep-report {
  grid-column: span 6;
}

.compact-result .full-report {
  grid-column: 1 / -1;
}

.compact-result .classic-profile,
.compact-result .zodiac-report,
.compact-result .xhs-report,
.compact-result .xhs-deep-report,
.compact-result .report,
.compact-result .full-report,
.compact-result .score-grid {
  margin-top: 0;
}

.score-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 24px;
}

.classic-profile {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.9);
  box-shadow: var(--shadow-soft);
}

.zodiac-report {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.9);
  box-shadow: var(--shadow-soft);
}

.xhs-report {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 24px;
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(217, 71, 95, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 71, 95, 0.08), transparent 40%),
    rgba(255, 254, 251, 0.9);
  box-shadow: var(--shadow-soft);
}

.xhs-report article {
  align-self: stretch;
  padding: 22px;
  border: 1px solid rgba(217, 71, 95, 0.18);
  border-radius: 8px;
  background: #fff;
}

.xhs-report article h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.xhs-report article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.xhs-deep-report {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(47, 125, 116, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(47, 125, 116, 0.08), transparent 36%),
    linear-gradient(320deg, rgba(241, 183, 91, 0.12), transparent 42%),
    rgba(255, 254, 251, 0.94);
  box-shadow: var(--shadow-soft);
}

.long-reading {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-top: 22px;
}

.compact-result .classic-profile .letter-badges,
.compact-result .classic-profile .classic-grid,
.compact-result .zodiac-report .classic-grid,
.compact-result .xhs-deep-report .long-reading,
.compact-result .full-report .report-visual-grid,
.compact-result .full-report .theory-strip,
.compact-result .full-report .analysis-block,
.compact-result .full-report .reference-block,
.compact-result .full-report .deep-grid,
.compact-result .report .report-grid {
  display: none;
}

.compact-result .classic-profile,
.compact-result .zodiac-report,
.compact-result .xhs-deep-report,
.compact-result .full-report,
.compact-result .report {
  margin-top: 16px;
}

.compact-result.active .classic-profile,
.compact-result.active .zodiac-report,
.compact-result.active .xhs-report,
.compact-result.active .xhs-deep-report,
.compact-result.active .report,
.compact-result.active .full-report,
.compact-result.active .score-grid {
  margin-top: 0;
}

.section-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 16px;
  border: 1px solid rgba(32, 120, 111, 0.26);
  border-radius: 8px;
  background: rgba(32, 120, 111, 0.08);
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 800;
}

.section-open:hover,
.section-open:focus-visible {
  background: rgba(32, 120, 111, 0.13);
  outline: none;
}

.long-reading p {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.95;
}

.classic-head {
  max-width: 840px;
}

.classic-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.18;
}

.classic-head p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.78;
}

.letter-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.letter-badges article {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.letter-badges strong {
  display: block;
  color: var(--accent-2);
  font-size: 32px;
  line-height: 1;
}

.letter-badges span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 800;
}

.letter-badges p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.classic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.classic-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.classic-grid h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.classic-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.score-row {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.score-row div {
  position: relative;
  height: 12px;
  overflow: visible;
  border-radius: 99px;
  background: #e7e3dc;
}

.score-row i {
  position: absolute;
  top: 0;
  left: var(--fill-start, 50%);
  display: block;
  width: var(--fill-width, 0%);
  height: 100%;
  border-radius: 99px;
  background: var(--bar-color, #a8a09a);
}

.score-row div::before {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.score-row div::after {
  position: absolute;
  top: 50%;
  left: var(--position, 50%);
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--bar-color, #a8a09a);
  box-shadow: 0 2px 8px rgba(32, 35, 38, 0.18);
  content: "";
  transform: translate(-50%, -50%);
}

.trait-strengths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.trait-strengths span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.report,
.full-report,
.coupon {
  margin-top: 26px;
  padding: clamp(24px, 3vw, 36px);
}

.report h2,
.full-report h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.report p,
.coupon {
  color: var(--muted);
  line-height: 1.75;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.report-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.report-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.full-report-head h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
}

.full-report-head p:not(.eyebrow) {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.78;
}

.report-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.report-visual-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-visual-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.report-visual-grid figcaption {
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.deep-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.theory-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.theory-strip article {
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.theory-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 14px;
}

.theory-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analysis-block,
.reference-block {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.analysis-block h3,
.reference-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.analysis-block p,
.reference-block p,
.reference-block li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-line;
}

.reference-block ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.deep-grid article {
  padding: 14px;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #fff;
}

.expandable-card {
  min-height: 138px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.expandable-card:hover,
.expandable-card:focus-visible {
  background: #fffefb;
  box-shadow: 0 12px 26px rgba(36, 35, 31, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.open-detail {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.deep-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.deep-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.coupon {
  color: var(--ink);
}

.bottom-actions {
  margin-bottom: 24px;
}

.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 24, 0.54);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 254, 251, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 120, 111, 0.08), transparent 38%),
    #fffefb;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-panel h2 {
  margin: 0;
  padding-right: 42px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.modal-body {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.modal-body p {
  margin: 0;
}

.modal-type-hero {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.modal-type-hero img {
  width: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal-type-hero p {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}

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

.modal-insight-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal-insight-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 16px;
}

.modal-note {
  margin-top: 16px !important;
  color: var(--accent);
  font-weight: 800;
}

.modal-visual {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal-visual img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.modal-visual figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.modal-report-stack {
  display: grid;
  gap: 10px;
}

.modal-report-stack h3 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.modal-report-stack ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 960px) {
  .compact-result .report-grid,
  .compact-result .deep-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app {
    padding: 18px;
  }

  .intro-grid,
  .result-header,
  .type-group,
  .type-gallery,
  .classic-grid,
  .report-grid,
  .deep-grid,
  .report-visual-grid,
  .theory-strip,
  .xhs-report {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    align-content: center;
  }

  .intro-first {
    min-height: auto;
    padding: 22px 0 52px;
  }

  .intro-first h1 {
    font-size: 42px;
  }

  .intro-first .lead {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.65;
  }

  .intro-first .actions {
    margin-top: 18px;
  }

  .intro-first .primary {
    width: 100%;
    min-height: 56px;
    font-size: 18px;
  }

  .intro-first .visual-panel {
    margin-top: 28px;
  }

  .intro-first .hero-visual img {
    aspect-ratio: 16 / 10;
  }

  .front-system {
    padding-top: 26px;
  }

  .archetype-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .type-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zodiac-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .letter-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classic-profile,
  .zodiac-report,
  .xhs-report,
  .xhs-deep-report,
  .report,
  .full-report {
    padding: 18px;
  }

  .type-system {
    padding-top: 10px;
  }

  .result-header {
    align-items: start;
    gap: 20px;
    padding: 28px 22px;
    text-align: center;
  }

  .result-portrait {
    width: 156px;
    max-width: 156px;
    justify-self: center;
  }

  .result-portrait figcaption {
    display: none;
  }

  .result-lead {
    max-width: 310px;
    margin: 18px auto 0;
    font-size: 14px;
    line-height: 1.65;
  }

  .compact-result .result-header h1 {
    margin-inline: auto;
    font-size: 58px;
  }

  .compact-result .result-header .eyebrow {
    color: rgba(255, 255, 255, 0.76);
  }

  .compact-result .chips {
    justify-content: center;
  }

  .result-stats {
    max-width: none;
    margin-top: 22px;
  }

  .result-stats span {
    min-height: 68px;
    padding: 10px 6px;
    font-size: 12px;
  }

  .result-stats strong {
    font-size: 24px;
  }

  .compact-result .trait-strengths {
    display: none;
  }

  .report-index-head {
    padding: 24px 20px 22px;
  }

  .report-index-head h2 {
    font-size: 25px;
  }

  .report-index-head p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.65;
  }

  .report-chapter.section-open {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    gap: 8px 10px;
    min-height: 82px;
    padding: 14px 18px;
  }

  .report-chapter strong {
    font-size: 16px;
  }

  .report-chapter small {
    grid-column: 2;
    font-size: 12px;
    line-height: 1.45;
  }

  .report-chapter i {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .compact-result .classic-profile,
  .compact-result .zodiac-report,
  .compact-result .xhs-report,
  .compact-result .xhs-deep-report,
  .compact-result .report,
  .compact-result .full-report,
  .compact-result .score-grid {
    box-shadow: none;
  }

  .compact-result .classic-profile,
  .compact-result .zodiac-report,
  .compact-result .xhs-report,
  .compact-result .xhs-deep-report,
  .compact-result .report,
  .compact-result .full-report {
    padding: 16px;
  }

  .compact-result .classic-head h2,
  .compact-result .full-report-head h2,
  .compact-result .report h2 {
    font-size: 22px;
  }

  .compact-result .classic-head p:not(.eyebrow),
  .compact-result .full-report-head p:not(.eyebrow),
  .compact-result .report p,
  .compact-result .xhs-report article p {
    font-size: 14px;
    line-height: 1.65;
  }

  .compact-result .classic-profile .classic-head p:not(.eyebrow),
  .compact-result .zodiac-report .classic-head p:not(.eyebrow),
  .compact-result .xhs-report .classic-head p:not(.eyebrow),
  .compact-result .xhs-deep-report .full-report-head p:not(.eyebrow),
  .compact-result .report > p,
  .compact-result .full-report .full-report-head p:not(.eyebrow) {
    display: none;
  }

  .compact-result .section-open {
    width: 100%;
  }

  .compact-result .xhs-report article {
    display: none;
  }

  .classic-head h2,
  .full-report-head h2 {
    font-size: 28px;
  }

  .classic-head p:not(.eyebrow),
  .full-report-head p:not(.eyebrow) {
    font-size: 16px;
  }

  .long-reading {
    width: 100%;
    max-width: none;
  }

  .long-reading p {
    font-size: 16px;
    line-height: 1.9;
  }

  .compact-result .report-grid,
  .compact-result .deep-grid {
    grid-template-columns: 1fr;
  }

  .compact-result .classic-profile,
  .compact-result .zodiac-report,
  .compact-result .xhs-report,
  .compact-result .xhs-deep-report,
  .compact-result .report,
  .compact-result .full-report {
    grid-column: 1 / -1;
  }

  .compact-result .xhs-report article {
    display: none;
  }

  .modal {
    padding: 14px;
  }

  .modal-panel {
    max-height: calc(100vh - 28px);
  }

  .modal-type-hero,
  .modal-insight-grid {
    grid-template-columns: 1fr;
  }

  .modal-type-hero img {
    width: 132px;
  }

  .visual-panel img {
    aspect-ratio: 16 / 10;
  }

  .question-card {
    margin-top: 46px;
    min-height: 610px;
    padding: 22px;
  }

  .question-copy {
    min-height: 132px;
  }

  .question-card h2 {
    font-size: 25px;
  }

  .scale-card {
    grid-template-rows: minmax(212px, auto) 76px 40px;
    gap: 18px;
  }

  .pole-row {
    grid-template-columns: 1fr;
  }

  .pole {
    min-height: 96px;
  }

  .pole strong {
    font-size: 16px;
  }

  .scale-row {
    gap: 10px;
    min-height: 76px;
  }

  .scale-choice.size-1 {
    width: 34px;
    height: 34px;
  }

  .scale-choice.size-2 {
    width: 44px;
    height: 44px;
  }

  .scale-choice.size-3 {
    width: 54px;
    height: 54px;
  }

  .scale-labels {
    min-height: 40px;
    font-size: 12px;
  }

  .scale-labels span {
    white-space: normal;
  }
}
