:root {
  --bg: #f6f3ee;
  --panel: #fffdfa;
  --ink: #25211d;
  --muted: #746d64;
  --line: #e4dbcf;
  --accent: #d94f3d;
  --accent-dark: #a9362a;
  --mint: #1d7d72;
  --yellow: #f0b84d;
  --shadow: 0 16px 48px rgba(72, 54, 38, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.screen {
  min-height: 100vh;
  padding: 24px 20px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-bottom: 20px;
}

.back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
}

.hero {
  padding-top: 20px;
}

.hero-copy {
  margin-top: 16px;
  max-width: 360px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--accent);
}

.button.primary:active {
  background: var(--accent-dark);
}

.button.secondary {
  color: var(--ink);
  background: #efe7dc;
}

.button.ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.button:disabled {
  opacity: 0.45;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 16px;
}

.tag {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: #fff8ef;
  font-size: 14px;
  font-weight: 700;
}

.notice {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbf6ee;
  font-size: 13px;
  line-height: 1.6;
}

.ai-progress {
  margin-top: 28px;
}

.ai-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfd2;
}

.ai-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a65 0%, var(--accent) 100%);
  transition: width 0.35s ease;
}

.ai-progress strong {
  display: block;
  margin-top: 12px;
  color: var(--accent-dark);
  font-size: 14px;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfd2;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

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

.option {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  line-height: 1.45;
}

.option.selected {
  border-color: var(--accent);
  background: #fff1ed;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.invite-card,
.result-card,
.report-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.invite-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0 4px;
}

.score strong {
  font-size: 56px;
  line-height: 1;
}

.keyword {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #442017;
  background: #ffe3d8;
  font-weight: 800;
}

.unlock-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.unlock-list li {
  display: flex;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
}

.unlock-list li::before {
  content: "✓";
  color: var(--mint);
  font-weight: 900;
}

.dimension {
  margin-top: 14px;
}

.dimension-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
}

.dimension-bar {
  height: 8px;
  border-radius: 999px;
  background: #eadfd2;
  overflow: hidden;
}

.dimension-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
}

.share-card {
  margin-top: 18px;
  padding: 24px;
  border-radius: 8px;
  color: #1f1a16;
  background:
    linear-gradient(135deg, rgba(217, 79, 61, 0.16), transparent 42%),
    #fff7eb;
  border: 1px solid #ead4bd;
}

.share-card .mini {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.history-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  text-align: left;
}

.history-item + .history-item {
  margin-top: 10px;
}

.history-item strong {
  display: block;
  margin-bottom: 4px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: #efe7dc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.empty {
  margin-top: 36px;
  text-align: center;
}

.icp-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.icp-footer a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.icp-footer a:hover {
  color: var(--accent-dark);
}

@media (max-width: 360px) {
  .screen {
    padding-inline: 16px;
  }

  h1 {
    font-size: 30px;
  }

  .score strong {
    font-size: 48px;
  }
}
