:root {
  --paper: #fbf4e8;
  --paper-2: #fffaf0;
  --ink: #1d1d1b;
  --muted: #6f665d;
  --line: #23211f;
  --coral: #f26a4b;
  --coral-soft: #ffe2d8;
  --mustard: #f3c84b;
  --teal: #54aa99;
  --blue: #2f6fae;
  --pink: #f3a7a0;
  --green-soft: #dbe9c7;
  --shadow: 0 22px 60px rgba(40, 34, 28, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(243, 200, 75, 0.28), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(84, 170, 153, 0.22), transparent 25%),
    linear-gradient(180deg, #f8e7d8 0%, #fbf4e8 42%, #f3e7d4 100%);
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
  transform: none;
}

.app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(251, 244, 232, 0.7);
  position: relative;
  overflow-x: hidden;
}

.screen {
  min-height: 100vh;
  padding: 22px 20px 28px;
  display: flex;
  flex-direction: column;
}

.hero {
  justify-content: space-between;
  gap: 24px;
  background: var(--blue);
  color: var(--paper-2);
  border: 8px solid var(--ink);
  border-radius: 30px;
  margin: 10px;
  min-height: calc(100vh - 20px);
  box-shadow: 6px 6px 0 rgba(29, 29, 27, 0.3);
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 10px;
  font-size: 58px;
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 4px 4px 0 rgba(29, 29, 27, 0.28);
}

.hero-subtitle {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 800;
  color: var(--paper-2);
}

.hero-copy {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

.hero-bottom-card {
  background: #fff1d6;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 4px 4px 0 rgba(29, 29, 27, 0.28);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: 2px solid var(--ink);
  border-radius: 10px;
  min-height: 52px;
  padding: 13px 18px;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn {
  background: var(--coral);
  color: var(--ink);
}

.secondary-btn {
  background: var(--paper-2);
  color: var(--ink);
}

.ghost-btn {
  background: transparent;
  box-shadow: none;
  min-height: 44px;
}

.dev-preview {
  width: 100%;
  margin-top: 12px;
}

.primary-btn:active,
.secondary-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.hero-ill,
.result-ill,
.share-ill {
  width: 100%;
  display: block;
}

.role-art {
  width: 100%;
  aspect-ratio: 1.33 / 1;
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: #fff1d6;
  position: relative;
}

.role-art img {
  position: absolute;
  left: 0;
  top: 0;
  width: 400%;
  height: 300%;
  object-fit: fill;
  transform-origin: left top;
  max-width: none;
}

.gallery-art {
  border-radius: 12px;
}

.caption-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.progress-wrap {
  padding-top: 6px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.type-pill {
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
}

.progress-bar {
  height: 8px;
  margin-top: 12px;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--mustard));
  width: 0;
}

.question-card {
  margin-top: 28px;
  background: rgba(255, 250, 240, 0.86);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.question-title {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 950;
}

.scenario {
  margin: 0;
  color: #443a32;
  font-size: 16px;
  line-height: 1.72;
  white-space: pre-line;
}

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

.question-media {
  margin: 16px 0 2px;
}

.question-media svg {
  display: block;
  width: 100%;
}

.option-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  text-align: left;
  width: 100%;
  border: 2px solid rgba(29, 29, 27, 0.7);
  background: #fffaf3;
  border-radius: 12px;
  padding: 13px 12px;
  color: var(--ink);
  box-shadow: none;
}

.option-card.selected {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.option-key {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 950;
  background: var(--mustard);
}

.option-text {
  font-size: 15px;
  line-height: 1.55;
}

.question-actions {
  margin-top: auto;
  padding-top: 18px;
}

.nav-row {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 12px;
}

.feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--green-soft);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}

.profile-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select {
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 9px 12px;
}

.loader {
  justify-content: center;
  gap: 18px;
}

.signal-list {
  display: grid;
  gap: 14px;
  font-weight: 900;
  font-size: 17px;
}

.signal-line {
  opacity: 0;
  transform: translateY(8px);
  animation: signalIn 0.45s ease forwards;
}

.signal-line:nth-child(2) { animation-delay: 0.35s; }
.signal-line:nth-child(3) { animation-delay: 0.7s; }
.signal-line:nth-child(4) { animation-delay: 1.05s; }
.signal-line:nth-child(5) { animation-delay: 1.4s; color: var(--coral); }

@keyframes signalIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-page {
  gap: 14px;
}

.page-title {
  margin: 0;
  font-size: 33px;
  line-height: 1.1;
  font-weight: 950;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.identity-card {
  margin-top: 16px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.identity-name {
  margin: 6px 0 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 950;
}

.ai-comment {
  margin: 14px 0 0;
  font-size: 25px;
  line-height: 1.28;
  font-weight: 950;
}

.share-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.detail-intro {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--green-soft);
  line-height: 1.7;
}

.detail-card {
  margin-top: 14px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper-2);
}

.detail-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.detail-label {
  margin: 13px 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.detail-label.designed {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mustard);
  color: var(--ink);
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-line {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.choice-line span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 950;
}

.choice-line p {
  margin: 0;
}

.choice-line.good {
  background: #dff0e8;
}

.choice-line.risk {
  background: #ffe2d8;
}

.choice-line.neutral {
  background: #fff4cc;
}

.response-block {
  margin-top: 12px;
  padding: 13px;
  border: 2px solid var(--ink);
  border-radius: 14px;
}

.response-block.good {
  background: #dff0e8;
}

.response-block.risk {
  background: #ffe2d8;
}

.response-block.neutral {
  background: #fff4cc;
}

.response-title {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 950;
}

.detail-card p {
  margin: 0;
  line-height: 1.65;
}

.share-stage {
  align-items: center;
}

.share-card {
  width: min(100%, 390px);
  aspect-ratio: 9 / 16;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper-2);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.share-actions {
  width: min(100%, 390px);
}

.link-row {
  margin-top: 12px;
  text-align: center;
}

.tiny-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 800;
}

.role-gallery {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.role-tile {
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper-2);
}

.role-tile h3 {
  margin: 8px 0 6px;
  font-size: 24px;
}

.role-tile p {
  margin: 0;
  font-weight: 900;
  line-height: 1.45;
}

@media (min-width: 760px) {
  .app {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border: 2px solid var(--ink);
    border-radius: 28px;
    box-shadow: var(--shadow);
  }
}
