* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #2d2a25;
  background: #fff;
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.app {
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 18px 92px;
}
.home-page {
  padding-top: 4px;
}
.compact-page {
  transform: scale(0.8);
  transform-origin: top center;
  width: 125%;
  max-width: 650px;
  min-height: 125vh;
  margin-left: 50%;
  padding-bottom: 150px;
  translate: -50% 0;
}
.home-page {
  overflow-x: hidden;
}
.home-scale {
  transform: scale(0.85);
  transform-origin: top center;
  width: 117.647%;
  margin-left: 50%;
  translate: -50% 0;
  padding-bottom: 26px;
}
.profile-page {
  overflow-x: hidden;
}
.profile-scale {
  transform: scale(0.85);
  transform-origin: top center;
  width: 117.647%;
  margin-left: 50%;
  translate: -50% 0;
  padding-bottom: 126px;
}
.top-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.top-title h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #2d2a25;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}
.top-title h1::after {
  content: none;
}
.home-page .top-title h1 {
  display: inline-block;
  font-size: 0;
  font-weight: 900;
  white-space: nowrap;
  transform: none;
  text-shadow: none;
}
.home-page .top-title h1::after {
  content: none;
}
.image-title img {
  display: block;
  width: 238px;
  height: auto;
  transform: translateY(4px);
}
.home-page .art-title span {
  position: relative;
  display: inline;
  width: auto;
  height: auto;
  margin-right: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #3a3122;
  font-size: 36px;
  line-height: 46px;
  font-weight: 900;
  font-family: "Comic Sans MS", "YouYuan", "Yuanti SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -0.5px;
  transform: skewX(-2deg);
  text-shadow: inherit;
  box-shadow: none;
  -webkit-text-stroke: 0.8px #fff7dc;
}
.home-page .art-title span:nth-child(2) {
  top: -2px;
  color: #2f4b48;
  background: transparent;
  transform: rotate(1deg) skewX(-2deg);
}
.home-page .art-title span:nth-child(3) {
  top: 1px;
  background: transparent;
  transform: rotate(-1deg) skewX(-2deg);
}
.home-page .art-title span:nth-child(2)::after {
  content: none;
}
.top-title > span {
  color: #a29a8e;
  font-size: 13px;
  font-weight: 700;
}
.home-page .top-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #ead39a;
  color: #3a3122;
  font-size: 14px;
  line-height: 30px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 2px;
  box-shadow: 1px 1px 0 rgba(202, 166, 86, 0.34);
}
.card {
  border: 2px solid #ead39a;
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 3px 0 rgba(202, 166, 86, 0.22);
  padding: 18px;
  margin-bottom: 16px;
}
.profile-scale .card {
  padding: 13px;
  margin-bottom: 11px;
  border-radius: 20px;
}
.profile-scale .card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 24px;
}
.profile-scale .top-title {
  margin-bottom: 12px;
}
.profile-scale .profile-head {
  gap: 10px;
}
.profile-scale .avatar {
  width: 58px;
  height: 58px;
}
.profile-scale .profile-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 23px;
}
.test-card {
  min-height: 148px;
  position: relative;
  overflow: hidden;
}
.test-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(246, 223, 154, 0.26);
}
.test-card.cat { background: #f2fbff; }
.test-card.cat::after { background: rgba(189, 239, 255, 0.42); }
.test-card h2 { margin: 0 0 12px; color: #8a8173; font-size: 14px; }
.test-card strong { display: block; max-width: 58%; font-size: 24px; line-height: 1.2; margin-bottom: 20px; }
.card-badge {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #ead39a;
  color: #b79b59;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
.pet-img {
  position: absolute;
  right: 24px;
  bottom: 18px;
  width: 108px;
  height: 108px;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 4px 0 rgba(202, 166, 86, 0.12));
}
.pill-btn {
  min-width: 96px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid #ead39a;
  background: #fff;
  color: #2d2a25;
  font-weight: 800;
}
.primary-btn {
  height: 65px;
  padding: 0 32px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 800;
}
.match-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff8e5;
  border: 1px solid #ead39a;
}
.match-title span { font-size: 16px; }
.match-row { display: flex; gap: 8px; margin-top: 12px; }
.match-row input {
  flex: 1;
  height: 44px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: #f7f7f7;
  padding: 0 16px;
  font-weight: 700;
}
.match-row button {
  width: 72px;
  height: 44px;
  border-radius: 999px;
  background: #f6df9a;
  color: #2d2a25;
  font-weight: 800;
}
.tabs {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: calc(100vw - 32px);
  max-width: 420px;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #ead39a;
  box-shadow: 0 4px 14px rgba(202, 166, 86, 0.25);
}
.tabs button { border-radius: 999px; background: transparent; color: #8a8173; font-weight: 800; }
.tabs button.active { background: #f6df9a; color: #2d2a25; }
.hero {
  min-height: 100vh;
  padding: 0 0 22px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
.hero h1 { font-size: 50px; margin: 0 0 4px; line-height: 1; font-weight: 900; }
.hero h1 { font-size: 68px; }
.hero p { margin: 0; color: #999; font-size: 22px; font-weight: 800; }
.landing-back {
  position: absolute;
  left: 20px;
  top: calc(env(safe-area-inset-top) + 24px);
  width: 58px;
  min-width: 58px;
  height: 36px;
  padding: 0;
  z-index: 5;
}
.home-title {
  padding-top: calc(env(safe-area-inset-top) + 72px);
  position: relative;
  z-index: 2;
}
.cat-home-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cat-title-main {
  display: block;
  font-size: 65px;
  line-height: 70px;
  font-weight: 900;
}
.cat-title-sub {
  margin-top: 4px;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: #999;
}
.animal-stage {
  width: 100%;
  min-height: 454px;
  overflow: hidden;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
}
.cats-stage {
  min-height: 313px;
  padding-top: 0;
  justify-content: flex-start;
}
.animal-row {
  display: flex;
  width: 2332px;
  align-items: center;
}
.row-left {
  animation: scroll-left 18s linear infinite;
}
.row-right {
  animation: scroll-right 22s linear infinite;
}
.row-fast {
  animation-duration: 16s;
}
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.animal-cell {
  width: 146px;
  height: 146px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.animal-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}
.cat-img {
  width: 140px;
  height: 140px;
}
.home-bottom {
  padding: 18px 28px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}
.dog-copy {
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-18px);
}
.cat-copy {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-18px);
}
.cat-copy-title-wrap {
  position: relative;
  display: inline-flex;
  justify-content: center;
}
.cat-copy-title-wrap::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 5px;
  height: 15px;
  background: #f6df9a;
  z-index: -1;
}
.cat-copy-title {
  display: block;
  color: #111;
  font-size: 34px;
  line-height: 46px;
  font-weight: 900;
  text-align: center;
  transform: skewX(-4deg);
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}
.cat-copy-sub {
  margin-top: 8px;
  color: #aeb6c2;
  font-size: 24px;
  line-height: 35px;
  font-weight: 900;
  font-style: italic;
}
.back-btn { margin-bottom: 12px; }
.quiz-page {
  max-width: 520px;
  padding: calc(env(safe-area-inset-top) + 26px) 22px 42px;
  background: #fff;
}
.quiz-head {
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
  color: #a69b88;
  font-size: 13px;
  font-weight: 800;
}
.quiz-back {
  position: absolute;
  left: 0;
  top: 2px;
  min-width: 40px;
  width: auto;
  height: 40px;
  padding: 0 14px;
  line-height: 36px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(202, 166, 86, 0.16);
}
.progress {
  height: 6px;
  border-radius: 999px;
  background: #f0eadc;
  overflow: hidden;
  margin-bottom: 24px;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ead39a, #f6df9a);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.quiz-body {
  padding-top: 0;
}
.quiz-pet-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.quiz-pet-icon {
  width: 62px;
  min-width: 62px;
  height: 62px;
  border: 2px solid #ead39a;
  border-radius: 20px;
  background: #fffaf0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 rgba(202, 166, 86, 0.16);
}
.quiz-pet-icon img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.quiz-bubble {
  flex: 1;
  min-height: 48px;
  padding: 11px 15px;
  border-radius: 18px 18px 18px 7px;
  background: #f7f5f0;
  color: #9d9588;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}
.hint { display: none; }
.question {
  color: #2d2a25;
  font-size: 18px;
  line-height: 1.42;
  font-weight: 850;
  margin: 0 0 20px;
  letter-spacing: 0;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.option {
  min-height: 70px;
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 12px 20px;
  border: 2px solid #eee6d0;
  border-radius: 19px;
  margin-bottom: 0;
  background: #fff;
  color: #2d2a25;
  box-shadow: 0 2px 0 rgba(202, 166, 86, 0.1);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.option:active {
  transform: scale(0.985);
}
.option.selected {
  border-color: #ead39a;
  background: #fff8df;
  color: #2d2a25;
}
.option b {
  color: #b8ad9a;
  width: 20px;
  min-width: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.option.selected b { color: #b28d36; }
.option span { flex: 1; font-size: 13px; line-height: 1.5; font-weight: 700; }
.result-hero { text-align: center; }
.result-hero img {
  width: 126px;
  height: 126px;
  object-fit: contain;
  border-radius: 24px;
  background: #f7f7f7;
}
.result-hero h1 { margin: 12px auto 6px; max-width: 300px; font-size: 24px; line-height: 1.15; white-space: pre-line; }
.muted { color: #aaa; font-weight: 800; }
.quote { padding: 18px; border-radius: 18px; background: #f7f7f7; margin: 20px 0; line-height: 1.7; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.chip { padding: 9px 12px; border-radius: 999px; background: #f6f6f6; font-size: 13px; font-weight: 800; }
.section-title { color: #aaa; font-size: 13px; font-weight: 800; margin: 20px 0 10px; }
.info-card { padding: 14px 16px; border-radius: 16px; background: #f7f7f7; margin-bottom: 10px; }
.info-card b { display: block; margin-bottom: 6px; }
.info-card p { margin: 0; color: #555; line-height: 1.7; }
.desc-p + .desc-p { margin-top: 12px; }
.depth-grid {
  display: grid;
  gap: 10px;
}
.depth-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8e5;
  border: 1px solid #ead39a;
}
.depth-card b {
  display: block;
  margin-bottom: 6px;
}
.depth-card p {
  margin: 0;
  color: #555;
  line-height: 1.7;
}
.locked {
  filter: blur(5px);
  opacity: 0.38;
  user-select: none;
  pointer-events: none;
}
.unlock-card {
  padding: 18px;
  border-radius: 20px;
  background: #fff8e5;
  border: 2px solid #ead39a;
  margin: 16px 0 20px;
  text-align: center;
}
.unlock-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}
.unlock-card p {
  margin: 0 0 14px;
  color: #777;
  line-height: 1.7;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 26px 0 4px;
}
.result-actions .pill-btn,
.result-actions .primary-btn {
  min-width: 118px;
  height: 46px;
}
.dim { margin-bottom: 16px; }
.dim-row { display: flex; justify-content: space-between; font-size: 12px; color: #aaa; font-weight: 700; }
.dim-track { height: 8px; margin: 8px 0; border-radius: 999px; background: #eee; position: relative; overflow: hidden; }
.dim-fill { height: 100%; background: #111; border-radius: 999px; }
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(circle at 92% 14%, rgba(246, 223, 154, 0.46), transparent 58px),
    #fffdf8;
}
.avatar { width: 72px; height: 72px; border-radius: 50%; background: #fff8e5; object-fit: cover; border: 2px solid #ead39a; }
.id-row, .report-row, .match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed #ead39a;
}
.id-row:first-child,
.report-row:first-of-type {
  border-top: 0;
}
.id-card .id-row b {
  width: 58px;
  flex-shrink: 0;
  color: #a69576;
  font-size: 12px;
}
.id-card .id-row span {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff8e8;
  color: #2d2a25;
  font-weight: 900;
  line-height: 34px;
  letter-spacing: 1px;
}
.id-card .id-row .pill-btn {
  width: 54px;
  min-width: 54px;
  height: 34px;
  padding: 0;
  font-size: 12px;
  line-height: 30px;
}
.report-row {
  min-height: 66px;
  padding: 7px 0;
}
.report-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff8e5;
  border: 1px solid #ead39a;
  flex-shrink: 0;
}
.report-copy {
  flex: 1;
  min-width: 0;
}
.inline-report {
  display: flex;
  align-items: center;
  gap: 0;
}
.report-copy b {
  display: block;
  color: #a69576;
  font-size: 14px;
  line-height: 18px;
}
.report-copy div {
  color: #2d2a25;
  font-size: 18px;
  line-height: 24px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-copy span {
  min-width: 0;
  color: #2d2a25;
  font-size: 18px;
  line-height: 24px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-copy p {
  margin: 2px 0 0;
  color: #aaa;
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
}
.report-row .pill-btn {
  width: 54px;
  min-width: 54px;
  height: 34px;
  padding: 0;
  font-size: 12px;
  line-height: 30px;
}
.mini-img { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; background: #fff8e5; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 9px;
}
.collection-item {
  min-width: 0;
  padding: 5px 4px 6px;
  border-radius: 14px;
  background: #fff8e5;
  border: 1px solid #ead39a;
  text-align: center;
}
.collection-item.cat {
  background: #dff5ff;
}
.collection-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}
.collection-item span {
  display: block;
  color: #6e6457;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-empty {
  margin-top: 9px;
  padding: 13px;
  border-radius: 20px;
  border: 1px dashed #ead39a;
  background: #fffaf0;
  text-align: center;
  color: #aaa;
  font-weight: 800;
}
.collection-empty span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ead39a;
  color: #d5bd80;
  font-size: 24px;
}
.collection-empty p { margin: 8px 0 0; }
.h5-match-actions {
  display: flex;
  gap: 7px;
  margin: 0 0 9px;
}
.h5-match-actions .pill-btn {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
}
.match-history-item {
  min-height: 96px;
  margin-bottom: 8px;
  padding: 8px;
  border: 2px solid #f0ddaa;
  border-radius: 20px;
  background: #fffaf0;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 1px 1px 0 rgba(202, 166, 86, 0.18);
}
.match-history-pets {
  width: 118px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.match-history-pet {
  width: 52px;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
}
.match-history-pet img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}
.match-history-pet span {
  display: block;
  width: 52px;
  margin-top: 2px;
  color: #2d2a25;
  font-size: 11px;
  line-height: 15px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-history-pets b {
  color: #c6aa67;
  font-size: 14px;
}
.match-history-main {
  flex: 1;
  min-width: 0;
}
.match-history-main strong {
  display: block;
  color: #2d2a25;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-history-main p {
  margin: 3px 0 0;
  color: #9a9288;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}
.match-history-main em {
  display: block;
  margin-top: 1px;
  color: #b8afa4;
  font-size: 11px;
  line-height: 16px;
  font-style: normal;
  font-weight: 700;
}
.match-history-item > .pill-btn {
  width: 44px;
  min-width: 44px;
  height: 32px;
  padding: 0;
  font-size: 12px;
  line-height: 30px;
}
.match-top-compact {
  transform: scale(0.7);
  transform-origin: top center;
  width: 142.857%;
  margin-left: 50%;
  translate: -50% 0;
  margin-bottom: -128px;
}
.match-score-card {
  padding: 20px;
  border-radius: 24px;
  background: #fff8e5;
  border: 2px solid #ead39a;
  text-align: center;
  margin-bottom: 16px;
}
.match-detail .score { font-size: 58px; line-height: 1; font-weight: 900; text-align: center; }
.match-score-card h2 { margin: 8px 0; }
.match-score-card p { margin: 0; color: #666; line-height: 1.7; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair .card { text-align: center; margin-bottom: 0; }
.person-card p { color: #999; font-size: 12px; line-height: 1.5; margin: 6px 0 10px; word-break: break-all; }
.person-card strong { display: block; margin-top: 8px; }
.match-dim b { color: #2d2a25; }
.empty { color: #aaa; line-height: 1.7; }

@media (max-height: 760px) {
  .landing-back {
    top: calc(env(safe-area-inset-top) + 18px);
  }
  .home-title {
    padding-top: calc(env(safe-area-inset-top) + 62px);
  }
  .hero h1 {
    font-size: 59px;
  }
  .cat-title-main {
    font-size: 57px;
    line-height: 62px;
  }
  .animal-stage {
    min-height: 313px;
  }
  .cats-stage {
    min-height: 289px;
  }
  .animal-cell {
    height: 105px;
  }
  .animal-img {
    width: 100px;
    height: 100px;
  }
  .cat-img {
    width: 108px;
    height: 108px;
  }
  .cat-copy-title {
    font-size: 28px;
    line-height: 38px;
  }
  .cat-copy-sub {
    margin-top: 5px;
    font-size: 20px;
    line-height: 30px;
  }
  .primary-btn {
    height: 59px;
    padding: 0 30px;
  }
}
