:root {
  --font-display: "Cormorant Garamond", "Bodoni 72", Didot, Georgia, "Times New Roman", serif;
  --font-serif-cn: "Noto Serif SC", "Songti SC", STSong, "Source Han Serif SC", "Noto Serif CJK SC", SimSun, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #0b0d10;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: #f6f2e8;
  background:
    radial-gradient(circle at 12% 4%, rgba(215, 181, 109, 0.14), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(123, 216, 208, 0.1), transparent 28%),
    linear-gradient(180deg, #0b0d10 0%, #10141a 46%, #0b0d10 100%);
  font-family: var(--font-sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
}

.page {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.brand {
  display: block;
  color: #d7b56d;
  font-size: 20px;
  font-weight: 900;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.test-pill {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(215, 181, 109, 0.48);
  border-radius: 999px;
  color: #d7b56d;
  background: rgba(215, 181, 109, 0.08);
  font-family: var(--font-serif-cn);
  font-size: 15px;
  font-weight: 700;
}

.test-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7b56d;
  opacity: 0.78;
}

.home-title {
  margin: 28px 0 0;
  max-width: 310px;
  color: #f6f2e8;
  font-family: var(--font-display);
  font-size: clamp(54px, 18vw, 76px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 22px 0 0;
  color: #f6f2e8;
  font-family: var(--font-serif-cn);
  font-size: clamp(21px, 6vw, 26px);
  font-weight: 600;
  line-height: 1.45;
}

.desc,
.muted {
  color: #a8b0ba;
  font-size: 15px;
  line-height: 1.75;
}

.desc {
  margin-top: 20px;
}

.meta {
  display: grid;
  gap: 10px;
  margin-top: 34px;
  color: #a8b0ba;
  font-size: 13px;
  font-family: var(--font-serif-cn);
}

.dimension-panel {
  display: none;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(215, 181, 109, 0.22);
  border-radius: 22px;
  background: rgba(20, 20, 23, 0.72);
}

.dimension-panel__title {
  color: #b7aa92;
  font-family: var(--font-serif-cn);
  font-size: 13px;
  font-weight: 700;
}

.dimension-row {
  display: grid;
  grid-template-columns: 52px 1fr 66px 20px 66px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: #c8c2b3;
  font-family: var(--font-serif-cn);
  font-size: 13px;
  font-weight: 700;
}

.dimension-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 12px;
  color: #d7b56d;
  background: rgba(215, 181, 109, 0.11);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
}

.dimension-line {
  height: 1px;
  background: rgba(215, 181, 109, 0.28);
}

.dimension-vs {
  color: #887f6d;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.btn {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  color: #11151b;
  background: linear-gradient(135deg, #f4dc9d 0%, #d7b56d 54%, #b68a3f 100%);
  box-shadow: 0 16px 40px rgba(215, 181, 109, 0.24);
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-serif-cn);
  font-size: 18px;
  line-height: 1.2;
  touch-action: manipulation;
}

.btn.secondary {
  color: #f6f2e8;
  background: rgba(246, 242, 232, 0.06);
  border: 1px solid rgba(246, 242, 232, 0.14);
  box-shadow: none;
}

.progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 242, 232, 0.1);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d7b56d, #7bd8d0);
  transition: width 260ms ease;
}

.count {
  display: block;
  margin-top: 28px;
  color: #d7b56d;
  font-size: 13px;
  font-weight: 800;
}

.question-title {
  margin: 18px 0 0;
  color: #f6f2e8;
  font-family: var(--font-serif-cn);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
}

.question {
  margin-top: 14px;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 58px;
  padding: 18px;
  border: 1px solid rgba(246, 242, 232, 0.1);
  border-radius: 18px;
  color: #f6f2e8;
  background: rgba(23, 28, 35, 0.82);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-serif-cn);
  line-height: 1.48;
  touch-action: manipulation;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.option.active {
  border-color: rgba(215, 181, 109, 0.72);
  background: rgba(215, 181, 109, 0.11);
}

.option-key {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #11151b;
  background: #d7b56d;
  font-size: 13px;
  font-weight: 900;
}

.hero,
.card {
  border: 1px solid rgba(246, 242, 232, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(215, 181, 109, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(23, 28, 35, 0.96), rgba(17, 21, 27, 0.92));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.hero {
  padding: 28px 22px;
}

.eyebrow {
  color: #a8b0ba;
  font-size: 13px;
  font-family: var(--font-serif-cn);
}

.result-name {
  margin: 12px 0 0;
  font-family: var(--font-serif-cn);
  font-size: 44px;
  line-height: 1.1;
}

.code {
  margin-top: 12px;
  color: #7bd8d0;
  font-size: 18px;
  font-weight: 800;
}

.one-liner {
  margin-top: 22px;
  font-family: var(--font-serif-cn);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.badges,
.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.badge,
.keywords span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #ead49b;
  background: rgba(215, 181, 109, 0.1);
  border: 1px solid rgba(215, 181, 109, 0.24);
  font-size: 12px;
}

.cards {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.card {
  padding: 20px;
}

.card-title {
  color: #d7b56d;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-serif-cn);
}

.card-body {
  margin-top: 12px;
  color: #f6f2e8;
  font-size: 15px;
  line-height: 1.7;
  font-family: var(--font-serif-cn);
}

.poster {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 32px 26px;
  border: 1px solid rgba(246, 242, 232, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(215, 181, 109, 0.22), transparent 32%),
    linear-gradient(160deg, #151a21 0%, #0b0d10 68%, #17130c 100%);
}

.poster h2 {
  margin: 56px 0 0;
  font-family: var(--font-serif-cn);
  font-size: 42px;
  line-height: 1.1;
}

@media (max-width: 430px) {
  .app {
    width: 100%;
    padding: 22px 22px calc(18px + env(safe-area-inset-bottom));
  }

  .page {
    min-height: calc(100vh - 40px);
  }

  .home-title {
    max-width: 330px;
    font-family: var(--font-serif-cn);
    font-size: clamp(48px, 13.6vw, 58px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .subtitle {
    margin-top: 18px;
    font-size: clamp(20px, 5.6vw, 24px);
    line-height: 1.42;
  }

  .desc {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.75;
  }

  .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
  }

  .brand {
    display: none;
  }

  .test-pill {
    display: inline-flex;
  }

  .dimension-panel {
    display: block;
  }

  .meta span {
    padding: 7px 10px;
    border: 1px solid rgba(246, 242, 232, 0.12);
    border-radius: 999px;
    background: rgba(246, 242, 232, 0.04);
    font-size: 12px;
    line-height: 1;
  }

  .actions {
    padding-top: 24px;
  }
}

@media (max-height: 760px) and (max-width: 430px) {
  .home-title {
    font-size: clamp(42px, 12vw, 50px);
    line-height: 1.04;
  }

  .subtitle {
    font-size: 19px;
  }

  .desc {
    font-size: 14px;
    line-height: 1.65;
  }

  .meta {
    display: none;
  }

  .dimension-panel {
    margin-top: 18px;
    padding: 14px;
  }

  .dimension-row {
    margin-top: 10px;
    grid-template-columns: 48px 1fr 58px 18px 58px;
    gap: 8px;
    font-size: 12px;
  }
}

.poster .poster-code {
  color: #7bd8d0;
  font-weight: 800;
}

.poster .brand {
  display: block;
}

.qr {
  width: 64px;
  height: 64px;
  margin-top: 28px;
  border: 7px solid #f6f2e8;
  border-radius: 14px;
  background:
    linear-gradient(90deg, #11151b 8px, transparent 8px) 0 0 / 16px 16px,
    linear-gradient(#11151b 8px, transparent 8px) 0 0 / 16px 16px,
    #f6f2e8;
}

.stage {
  margin-top: 12px;
  color: #7bd8d0;
  font-size: 13px;
  font-weight: 700;
}

.resume-card,
.report-card,
.profile-form,
.admin-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(246, 242, 232, 0.12);
  border-radius: 22px;
  background: rgba(246, 242, 232, 0.055);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.mini-stat {
  padding: 14px;
  border-radius: 16px;
  background: rgba(17, 21, 27, 0.72);
}

.mini-stat strong {
  display: block;
  color: #f6f2e8;
  font-size: 24px;
}

.selected-option {
  border-color: rgba(215, 181, 109, 0.9);
  background: rgba(215, 181, 109, 0.16);
}

.form-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.form-field label {
  color: #d7b56d;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(246, 242, 232, 0.16);
  border-radius: 14px;
  color: #f6f2e8;
  background: rgba(11, 13, 16, 0.72);
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
}

.poster-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.asset-bar {
  height: 9px;
  margin: 8px 0 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(246, 242, 232, 0.12);
}

.asset-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d7b56d, #7bd8d0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-box {
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid rgba(215, 181, 109, 0.28);
  border-radius: 24px;
  background: #11151b;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  color: #c8c2b3;
  font-size: 13px;
}

.admin-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(246, 242, 232, 0.08);
}

.result-flow {
  display: grid;
  gap: 2px;
  margin: -24px -22px 0;
  background: #071f58;
  scroll-snap-type: y mandatory;
}

.result-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 26px calc(28px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 82% 12%, rgba(86, 137, 255, 0.34), transparent 30%),
    radial-gradient(circle at 18% 78%, rgba(28, 91, 204, 0.30), transparent 34%),
    linear-gradient(156deg, #123b93 0%, #082d75 43%, #061e55 100%);
  scroll-snap-align: start;
  color: #fff8e7;
}

.result-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 239, 198, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 239, 198, 0.035) 1px, transparent 1px);
  background-size: 78px 78px;
}

.result-screen > * {
  position: relative;
  z-index: 1;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 243, 211, 0.76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.screen-kicker {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(24px, 5svh, 44px);
  padding: 8px 14px;
  border: 1px solid rgba(255, 215, 136, 0.66);
  border-radius: 999px;
  color: #ffe2a4;
  background: rgba(6, 34, 88, 0.36);
  font-size: 12px;
  font-weight: 800;
}

.screen-title {
  margin: 20px 0 0;
  color: #fff2cf;
  font-family: var(--font-serif-cn);
  font-size: clamp(40px, 11vw, 58px);
  font-weight: 900;
  line-height: 1.06;
  overflow-wrap: anywhere;
  text-shadow: 0 8px 28px rgba(2, 15, 48, 0.34);
}

.screen-code {
  margin-top: 10px;
  color: rgba(255, 230, 174, 0.76);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.screen-subtitle {
  margin-top: 16px;
  color: #fff8e7;
  font-family: var(--font-serif-cn);
  font-size: clamp(20px, 5.8vw, 27px);
  font-weight: 800;
  line-height: 1.38;
}

.profile-tags {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.profile-tags span {
  min-width: 0;
  flex: 1;
  padding: 8px 5px;
  border: 1px solid rgba(255, 218, 143, 0.56);
  border-radius: 999px;
  color: #ffe8b8;
  background: rgba(6, 35, 91, 0.46);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.profile-portrait {
  position: relative;
  height: clamp(250px, 39svh, 390px);
  margin: 22px -4px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 218, 143, 0.56);
  border-radius: 50% 50% 22px 22px;
  background: linear-gradient(180deg, rgba(255, 233, 184, 0.18), rgba(4, 32, 84, 0.22));
  box-shadow: 0 26px 60px rgba(2, 16, 54, 0.36);
}

.profile-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(4, 29, 76, 0.48));
  pointer-events: none;
}

.profile-portrait .archetype-image {
  filter: saturate(0.92) contrast(1.04);
}

.profile-closing {
  margin: 18px 0 0;
  color: #ffe4a7;
  font-family: var(--font-serif-cn);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.relation-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.relation-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 230, 175, 0.24);
  color: #fff8e7;
  font-family: var(--font-serif-cn);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.relation-row span {
  color: #ffd887;
  font-family: Georgia, serif;
  font-size: 13px;
}

.insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.insight-card {
  padding: 17px 18px;
  border: 1px solid rgba(255, 223, 160, 0.34);
  border-radius: 8px;
  background: rgba(5, 36, 94, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.insight-card strong {
  display: block;
  margin-bottom: 7px;
  color: #ffd887;
  font-size: 12px;
}

.insight-card p {
  margin: 0;
  color: #fff8e7;
  font-family: var(--font-serif-cn);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.advice-line {
  margin-top: 16px;
  color: rgba(255, 246, 225, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

.result-talent {
  display: flex;
  flex-direction: column;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  text-align: center;
}

.result-talent .screen-kicker { margin-top: 16px; }
.result-talent .screen-title { margin-top: 12px; font-size: clamp(36px, 9.5vw, 50px); }
.result-talent .screen-subtitle { margin-top: 8px; font-size: clamp(18px, 5vw, 23px); }

.talent-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(250px, 32svh, 330px);
  margin: 18px -6px 0;
  padding: 28px 10px;
  border: 1px solid rgba(255, 220, 151, 0.72);
  border-radius: 50% 50% 28px 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(83, 139, 255, 0.58), transparent 42%),
    linear-gradient(180deg, rgba(20, 70, 167, 0.72), rgba(4, 28, 75, 0.48));
  box-shadow: 0 0 48px rgba(255, 201, 103, 0.12), inset 0 0 42px rgba(255, 223, 166, 0.08);
}

.talent-stage::before {
  content: "✦";
  position: absolute;
  top: -19px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 219, 149, 0.82);
  border-radius: 50%;
  color: #ffe4a7;
  background: #0b3480;
  font-size: 18px;
  line-height: 40px;
}

.talent-label {
  color: #ffe4a7;
  font-size: 14px;
  font-weight: 800;
}

.talent-value {
  margin-top: 18px;
  color: #fff0c9;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(31px, 8.4vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-shadow: 0 4px 18px rgba(255, 199, 93, 0.32);
}

.talent-caption {
  margin-top: 14px;
  color: rgba(255, 240, 207, 0.76);
  font-family: var(--font-serif-cn);
  font-size: 14px;
  line-height: 1.5;
}

.entertainment-label {
  display: inline-flex;
  align-self: center;
  margin-top: 12px;
  padding: 8px 22px;
  border: 1px solid rgba(255, 221, 153, 0.68);
  border-radius: 999px;
  color: #ffe5aa;
  font-size: 13px;
  font-weight: 800;
}

.talent-disclaimer {
  margin: 7px 0 0;
  color: rgba(255, 244, 219, 0.64);
  font-size: 11px;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.result-actions .btn {
  min-height: 44px;
}

.result-swipe-hint {
  margin: 16px 0 0;
  color: rgba(255, 241, 211, 0.54);
  font-size: 11px;
  text-align: center;
}

.version-mark {
  margin-top: 18px;
  padding-bottom: env(safe-area-inset-bottom);
  color: rgba(168, 176, 186, 0.58);
  font-size: 11px;
  text-align: center;
  user-select: text;
}

@media (max-height: 820px) {
  .result-relation {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .result-relation .screen-kicker { margin-top: 14px; }
  .result-relation .screen-title { margin-top: 12px; font-size: 34px; line-height: 1.04; }
  .result-relation .relation-list { margin-top: 12px; }
  .result-relation .relation-row { padding: 9px 12px; font-size: 14px; line-height: 1.36; }
  .result-relation .insight-grid { gap: 8px; margin-top: 10px; }
  .result-relation .insight-card { padding: 11px 13px; }
  .result-relation .insight-card strong { margin-bottom: 4px; }
  .result-relation .insight-card p { font-size: 14px; line-height: 1.4; }
  .result-relation .advice-line { margin-top: 9px; font-size: 11px; line-height: 1.45; }
  .result-relation .result-swipe-hint { margin-top: 7px; }
}

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

  .dimension-row {
    grid-template-columns: 48px 1fr;
  }

  .dimension-row span:nth-child(n+3) {
    grid-column: auto;
  }

  .screen-title {
    font-size: clamp(34px, 10vw, 46px);
  }

  .insight-card,
  .option {
    border-radius: 18px;
    padding: 16px;
  }

  .poster {
    padding: 28px 20px;
  }
}

.archetype-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
