:root {
  --bg: #fff1f6;
  --bg-soft: #fff8fb;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-strong: rgba(255, 250, 252, 0.96);
  --ink: #6a2846;
  --ink-soft: #9b627d;
  --line: rgba(255, 137, 181, 0.22);
  --line-strong: rgba(255, 137, 181, 0.38);
  --accent: #ff6ea8;
  --accent-2: #ff89b5;
  --accent-3: #ffd56b;
  --accent-4: #ffb5d2;
  --shadow: 0 26px 55px rgba(255, 110, 168, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 213, 107, 0.35), transparent 20%),
    radial-gradient(circle at 88% 8%, rgba(255, 137, 181, 0.26), transparent 24%),
    linear-gradient(180deg, #fff8fb 0%, #fff1f6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 182, 210, 0.15) 0, rgba(255, 182, 210, 0.15) 2px, transparent 2px),
    radial-gradient(circle at 70px 70px, rgba(255, 214, 107, 0.12) 0, rgba(255, 214, 107, 0.12) 3px, transparent 3px);
  background-size: 120px 120px;
}

a {
  color: #ef4f91;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app {
  width: min(1140px, calc(100% - 28px));
  margin: clamp(16px, 3vw, 34px) auto 48px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.brand {
  display: grid;
  gap: 4px;
}

.brand__eyebrow,
.eyebrow,
.sectionHead__eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: none;
  color: #f05d97;
  font-weight: 800;
}

.brand__title {
  font-family: "Comic Sans MS", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: 40px;
  line-height: 1;
  color: #ff5c9a;
}

.screen {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none;
}

.card {
  border: 2px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 250, 0.9)), var(--paper);
  box-shadow: var(--shadow);
  padding: 34px 34px;
}

.card--soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 244, 248, 0.92)),
    var(--paper-strong);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 182, 210, 0.55), rgba(255, 182, 210, 0));
}

.hero__main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
}

.hero__title,
.sectionHead__title,
.pageHero__title {
  margin: 6px 0 0;
  font-family: "Comic Sans MS", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.18;
  font-weight: 700;
  color: #5e2440;
}

.hero__title {
  max-width: 13em;
}

.hero__subtitle,
.pageHero__subtitle {
  margin: 0;
  color: #ef4f91;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
}

.hero__body,
.pageSection {
  display: grid;
  gap: 18px;
}

.hero__text,
.pageHero__text,
.bodyText {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.9;
  font-size: 18px;
}

.hero__callout {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 24px;
  border: 2px solid rgba(255, 137, 181, 0.22);
  background: linear-gradient(135deg, rgba(255, 213, 107, 0.24), rgba(255, 192, 218, 0.3));
}

.hero__calloutTag {
  color: #ef4f91;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  padding-top: 2px;
}

.hero__calloutText {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.9;
  font-size: 16px;
}

.panel,
.summaryCard,
.axisCard,
.box,
.introAxis,
.pagePanel,
.galleryCard {
  border: 2px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
}

.galleryCard {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 248, 0.88)),
    rgba(255, 255, 255, 0.8);
}

.panel,
.pagePanel {
  padding: 20px 22px;
}

.guideRow,
.summaryGrid,
.resultGrid,
.axisGrid,
.galleryGrid {
  display: grid;
  gap: 14px;
}

.guideRow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.guideItem {
  padding: 16px 18px;
  border-radius: 20px;
  border: 2px solid rgba(255, 182, 210, 0.26);
  background: linear-gradient(180deg, rgba(255, 248, 251, 0.95), rgba(255, 239, 246, 0.9));
}

.guideItem strong,
.panel__title,
.box__title,
.introAxis__title,
.summaryCard__title,
.question__index,
.resultTitle,
.pagePanel__title,
.galleryCard__title {
  font-weight: 800;
}

.guideItem strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--ink);
}

.guideItem span,
.introAxis__body,
.summaryCard__text,
.axisCard__tip,
.box__body,
.pagePanel__body,
.galleryCard__body,
.stackList--muted {
  color: var(--ink-soft);
  line-height: 1.82;
}

.actions,
.chipWrap,
.docLinks,
.resultBadges,
.footer__links,
.filterBar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions {
  margin-top: 18px;
}

.actions--spread {
  justify-content: space-between;
}

.btn {
  appearance: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 12px 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.btn:hover,
.choice:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn--primary {
  color: #fff;
  border-color: rgba(255, 110, 168, 0.4);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 26px rgba(255, 110, 168, 0.26);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.62);
}

.btn--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip,
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 12px;
}

.pill {
  background: rgba(255, 182, 210, 0.2);
  color: #ef4f91;
}

.pill--ghost {
  background: rgba(255, 249, 252, 0.9);
  color: var(--ink-soft);
}

.chip,
.badge {
  background: rgba(255, 245, 249, 0.95);
}

.sectionHead,
.topbar,
.axisCard__head,
.axisCard__meta,
.galleryCard__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.sectionHead {
  margin-bottom: 16px;
  align-items: end;
}

.sectionHead__title,
.pagePanel__title {
  font-size: 28px;
}

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

.summaryCard,
.axisCard,
.box,
.introAxis,
.galleryCard {
  padding: 18px;
}

.introAxis__code,
.axisCard__code {
  color: #ef4f91;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.testMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.progress {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7cae, #ffb86d);
  transition: width 140ms ease;
}

.progress__text {
  color: var(--ink-soft);
  font-size: 13px;
}

.questionShell {
  margin-top: 20px;
  padding: 28px;
  border-radius: 28px;
  border: 2px solid rgba(255, 137, 181, 0.22);
  background:
    radial-gradient(circle at right top, rgba(255, 182, 210, 0.28), transparent 34%),
    rgba(255, 255, 255, 0.82);
}

.question__index {
  color: #ef4f91;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.question__stem {
  margin-top: 10px;
  font-family: "Comic Sans MS", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.5;
}

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

.choice {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 148px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 248, 0.92));
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.choice--selected {
  border-color: rgba(255, 110, 168, 0.45);
  box-shadow: 0 12px 24px rgba(255, 110, 168, 0.16);
  background: linear-gradient(180deg, rgba(255, 220, 232, 0.95), rgba(255, 248, 251, 0.96));
}

.choice__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 182, 210, 0.34);
  color: #ef4f91;
  font-size: 18px;
  font-weight: 800;
}

.choice__value {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.78;
}

.resultHero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.resultType {
  font-family: "Comic Sans MS", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.16;
  color: #ff5c9a;
}

.resultTitle {
  margin-top: 8px;
  font-size: 20px;
  color: #ef4f91;
}

.resultLead {
  margin: 14px 0 0;
  max-width: 700px;
  color: var(--ink-soft);
  line-height: 1.9;
}

.resultHero__main {
  flex: 1 1 420px;
}

.resultHero__art {
  flex: 0 0 220px;
}

.portraitFrame {
  display: grid;
  place-items: center;
  padding: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: 0 20px 36px rgba(255, 110, 168, 0.16);
}

.portraitFrame--hero,
.portraitFrame--detail,
.galleryCard__media {
  aspect-ratio: 1;
}

.portraitFrame--mini {
  width: 74px;
  height: 74px;
  padding: 6px;
  border-radius: 22px;
  flex: 0 0 74px;
}

.galleryCard__media {
  display: grid;
  place-items: center;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.48), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1));
  box-shadow: 0 16px 28px rgba(255, 110, 168, 0.14);
}

.portraitImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(106, 40, 70, 0.12));
}

.portraitImage--hero,
.portraitImage--detail,
.portraitImage--gallery {
  aspect-ratio: 1;
}

.axes {
  display: grid;
  gap: 14px;
}

.axisCard__state {
  color: #ef4f91;
  font-size: 13px;
  font-weight: 800;
}

.meter {
  position: relative;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--line);
  overflow: hidden;
}

.meter__mid {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: rgba(139, 90, 112, 0.18);
}

.meter__fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff7cae, #ffd56b);
}

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

.stackList {
  margin: 0;
  padding-left: 18px;
}

.footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 13px;
}

.footer__slogan {
  font-family: "Comic Sans MS", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: 18px;
  color: #ef4f91;
  text-align: center;
}

.pageHero {
  margin-bottom: 18px;
}

.field,
.searchField {
  display: grid;
  gap: 8px;
  flex: 1 1 220px;
}

.field__label {
  color: var(--ink-soft);
  font-size: 13px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
}

.galleryGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.galleryCard__body {
  font-size: 14px;
  flex: 1 1 auto;
}

.galleryCard__title {
  font-size: 20px;
  line-height: 1.3;
}

.galleryCard__head {
  align-items: flex-start;
}

.galleryCard__head a {
  flex: 0 0 auto;
  padding-top: 2px;
}

.metaText {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 10px;
}

.matchRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.matchRow + .matchRow {
  border-top: 1px solid rgba(255, 137, 181, 0.16);
}

.matchRow__body {
  min-width: 0;
}

.matchRow__title,
.matchRow__meta {
  margin: 0;
}

.matchRow__title {
  font-weight: 700;
  color: var(--ink);
}

.matchRow__meta {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
}

.emptyState {
  padding: 28px;
  text-align: center;
}

@media (max-width: 1040px) {
  .summaryGrid,
  .galleryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resultGrid,
  .guideRow,
  .hero__callout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app {
    width: min(100% - 22px, 1140px);
  }

  .card {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .hero__title,
  .sectionHead__title,
  .pageHero__title {
    font-size: clamp(30px, 6vw, 42px);
  }

  .hero__subtitle,
  .pageHero__subtitle,
  .hero__text,
  .pageHero__text,
  .choice__value {
    font-size: 15px;
    line-height: 1.75;
  }

  .summaryGrid,
  .axisGrid,
  .scale,
  .resultGrid,
  .galleryGrid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .resultHero,
  .axisCard__head,
  .axisCard__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .progress__text {
    text-align: right;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 18px, 1140px);
  }

  .header {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .header__actions {
    width: 100%;
  }

  .brand__title {
    font-size: 34px;
  }

  .card,
  .panel,
  .questionShell,
  .summaryCard,
  .axisCard,
  .box,
  .pagePanel,
  .galleryCard {
    border-radius: 18px;
  }

  .card {
    padding: 22px 16px;
  }

  .resultHero__art {
    flex-basis: auto;
  }

  .actions,
  .actions--spread,
  .filterBar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
