:root {
  --orange: #ff6a00;
  --orange-2: #f26a21;
  --gold: #ffb35c;
  --dark: #1a1a1a;
  --bg: #fff7f1;
  --soft: #fff3ec;
  --cream: #fff9f3;
  --line: #ececec;
  --muted: #667085;
  --red: #d92d20;
  --green: #12b76a;
  --blue: #2e90fa;
  --shadow: 0 14px 36px rgba(71, 48, 32, 0.08);
  --soft-shadow: 0 8px 22px rgba(71, 48, 32, 0.06);
  color: var(--dark);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--dark);
  background:
    linear-gradient(180deg, #fffaf6 0%, #fff7f1 38%, #f8f8f8 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.page {
  width: min(100%, 744px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 28px;
}

.admin-page {
  width: min(100%, 1180px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.topbar > div {
  min-width: 0;
}

.eyebrow,
.source {
  margin: 0;
}

.eyebrow {
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
}

.source {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill {
  flex: 0 0 auto;
  margin-top: 4px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #ffffff;
  color: var(--orange);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 15px;
  font-weight: 900;
}

.brand-img {
  width: clamp(128px, 32vw, 176px);
  height: auto;
  display: block;
}

.brand-text {
  border: 1px solid #ffd8b8;
  border-radius: 999px;
  background: #ffffff;
  color: #9a4d14;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.card,
.block,
.footer {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card {
  border: 1px solid rgba(255, 216, 184, 0.62);
  padding: 24px;
}

.home-card {
  border: 1px solid #ffd8b8;
  border-top: 4px solid var(--orange);
  background: linear-gradient(180deg, #ffffff 0%, #fff9f3 100%);
  box-shadow: 0 18px 46px rgba(154, 77, 20, 0.10);
}

.block,
.footer {
  border: 1px solid rgba(234, 236, 240, 0.92);
  padding: 20px;
}

.section {
  display: grid;
  gap: 16px;
}

.hidden {
  display: none !important;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.3;
}

p,
li {
  color: #5f6673;
  line-height: 1.8;
}

.lead {
  color: #344054;
  font-size: 18px;
  font-weight: 700;
}

.plain-copy {
  margin: 18px 0 22px;
}

.plain-copy p {
  margin-bottom: 8px;
}

.primary,
.secondary,
.ghost,
.icon-button {
  min-height: 48px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.18s ease;
}

.primary {
  width: 100%;
  border: 0;
  padding: 12px 18px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff7a1a 0%, var(--orange-2) 100%);
  box-shadow: 0 10px 22px rgba(242, 106, 33, 0.24);
}

.secondary,
.ghost,
.icon-button {
  border: 1px solid var(--line);
  background: #ffffff;
}

.secondary {
  width: 100%;
  padding: 12px 18px;
  border-color: #fed7aa;
  color: var(--orange);
}

.ghost {
  padding: 10px 14px;
  color: #475467;
}

.icon-button {
  width: 48px;
  color: #475467;
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.audience,
.grid-2,
.score-grid,
.chip-grid,
.sales-grid {
  display: grid;
  gap: 12px;
}

.audience {
  margin-top: 16px;
}

.audience-item,
.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 216, 184, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px 16px;
  color: #344054;
  font-weight: 700;
  box-shadow: var(--soft-shadow);
}

.problem-item {
  border-color: #eef0f4;
  background: #f9fafb;
  font-weight: 500;
  box-shadow: none;
}

.check {
  flex: 0 0 auto;
  color: var(--orange);
  font-weight: 900;
}

.field {
  display: block;
  margin-top: 16px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.field input,
.admin-field input,
.admin-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 14px;
  outline: none;
  color: var(--dark);
  background: #ffffff;
  font-size: 16px;
}

.field input:focus,
.admin-field input:focus,
.admin-field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 106, 33, 0.14);
}

.required {
  color: var(--orange);
}

.fineprint {
  margin: 14px 0 0;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.6;
}

.chips {
  margin-top: 18px;
}

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

.choice-chip {
  min-height: 44px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 800;
}

.choice-chip.active {
  border-color: var(--orange);
  background: var(--soft);
  color: var(--dark);
  box-shadow: 0 0 0 3px rgba(242, 106, 33, 0.12);
}

.error,
.notice {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.error {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: var(--red);
}

.notice {
  border: 1px solid #d0d5dd;
  background: #f9fafb;
  color: #475467;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #5f6673;
  font-size: 14px;
  font-weight: 800;
}

.progress {
  height: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e7ec;
}

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

.question-type {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--orange);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 900;
}

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

.option {
  width: 100%;
  min-height: 58px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: #ffffff;
  color: #344054;
  text-align: left;
  font-weight: 700;
}

.option.active {
  border-color: var(--orange);
  background: var(--soft);
  box-shadow: 0 0 0 3px rgba(242, 106, 33, 0.12);
}

.option-key {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f7;
  color: #667085;
  font-size: 14px;
  font-weight: 900;
}

.option.active .option-key {
  background: var(--orange);
  color: #ffffff;
}

.quiz-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-top: 24px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
}

.green {
  border-color: #abefc6;
  background: #ecfdf3;
  color: var(--green);
}

.blue {
  border-color: #b2ddff;
  background: #eff8ff;
  color: var(--blue);
}

.orange {
  border-color: #fed7aa;
  background: var(--soft);
  color: var(--orange);
}

.red {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--red);
}

.green-text {
  color: var(--green);
}

.blue-text {
  color: var(--blue);
}

.orange-text {
  color: var(--orange);
}

.red-text {
  color: var(--red);
}

.score-grid {
  grid-template-columns: 1fr;
  margin-top: 20px;
}

.score-card {
  border: 1px solid #f3eadf;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.score-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.score-row span {
  color: #667085;
  font-size: 14px;
  font-weight: 800;
}

.score-row strong {
  font-size: 28px;
}

.bar {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e7ec;
}

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

.qr-card {
  display: grid;
  gap: 16px;
}

.qr-img {
  width: 168px;
  height: 168px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  object-fit: cover;
  background: #ffffff;
}

.result-card {
  border: 1px solid #ffd8b8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(112, 61, 28, 0.10);
  overflow: hidden;
}

.report-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff9f3 100%);
}

.result-brand,
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f1 100%);
}

.result-footer {
  display: grid;
  gap: 4px;
  justify-content: stretch;
  color: #7a4a24;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.made-by {
  flex: 0 0 auto;
  border: 1px solid #ffd8b8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--orange);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.report-kicker {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.report-hero {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  border-top: 1px solid #ffd8b8;
  border-bottom: 1px solid #ffd8b8;
  background: linear-gradient(135deg, #ffffff 0%, #fff7f1 100%);
}

.diagnosis-head {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
}

.diagnosis-head h1 {
  margin-bottom: 10px;
}

.danger-index {
  min-width: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f26a21 0%, #ff9a3d 100%);
  color: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(242, 106, 33, 0.22);
}

.danger-index span,
.danger-index em {
  display: block;
}

.danger-index span {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.88;
}

.danger-index strong {
  display: block;
  margin: 4px 0;
  font-size: 46px;
  line-height: 1;
}

.danger-index small {
  font-size: 22px;
}

.danger-index em {
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.diagnosis-grid {
  display: grid;
  gap: 18px;
  padding: 22px 20px;
}

.diagnosis-grid h2,
.diagnosis-actions h2 {
  font-size: 17px;
}

.diagnosis-actions {
  border-top: 1px solid #f2f4f7;
  padding: 20px;
  background: #fcfcfd;
}

.diagnosis-actions p:last-child {
  margin-bottom: 0;
}

.problem-stack {
  display: grid;
  gap: 10px;
}

.report-summary {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #f3eadf;
}

.report-summary > div {
  border: 1px solid #f3eadf;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--soft-shadow);
}

.report-summary span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.report-summary strong {
  display: block;
  color: var(--dark);
  font-size: 19px;
  line-height: 1.35;
}

.report-grid {
  display: grid;
  gap: 12px;
  padding: 18px 20px 0;
}

.report-section {
  border: 1px solid #f3eadf;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.report-card > .report-section {
  margin: 18px 20px 0;
}

.report-section h2 {
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 16px;
}

.report-section p {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  border: 1px solid #ffd8b8;
  border-radius: 999px;
  background: #fff7f1;
  color: #9a4d14;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.route-list {
  display: grid;
  gap: 10px;
}

.route-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: start;
}

.route-item strong {
  color: var(--orange);
  font-size: 13px;
}

.route-item span {
  color: #344054;
  line-height: 1.65;
}

.copy-link {
  justify-self: center;
  border: 0;
  background: transparent;
  color: #7a4a24;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.result-actions {
  margin-top: 0;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.actions.result-actions {
  margin-top: 0;
}

.footer {
  margin-top: 22px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.footer p {
  margin-bottom: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.7;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.modal-card {
  width: min(100%, 430px);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.modal .qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-top: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.lead-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.lead-table th,
.lead-table td {
  border-bottom: 1px solid #eef0f4;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.lead-table th {
  color: #475467;
  background: #f9fafb;
  font-weight: 900;
}

.lead-table button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 900;
}

.detail {
  display: grid;
  gap: 12px;
}

.detail dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.detail dt {
  color: #667085;
  font-weight: 800;
}

.detail dd {
  margin: 0;
  color: #344054;
}

.admin-filter-grid {
  display: grid;
  gap: 12px;
}

.admin-actions {
  margin-top: 16px;
}

.answer-list {
  display: grid;
  gap: 10px;
}

.answer-item {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: #f9fafb;
  padding: 12px;
}

.answer-item strong {
  color: #344054;
  font-size: 14px;
}

.answer-item span {
  color: #667085;
  line-height: 1.7;
}

.sales-card {
  border: 1px solid #f3eadf;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.sales-card img {
  width: 108px;
  height: 108px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  object-fit: cover;
}

.sales-card code {
  display: block;
  overflow-wrap: anywhere;
  margin: 10px 0;
  color: #344054;
  font-size: 13px;
}

@media (min-width: 640px) {
  .page {
    padding: 32px 24px;
  }

  .card {
    padding: 32px;
  }

  .audience,
  .grid-2,
  .score-grid,
  .sales-grid,
  .diagnosis-head,
  .diagnosis-grid,
  .report-hero,
  .report-summary,
  .report-grid,
  .admin-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .qr-card {
    grid-template-columns: 180px 1fr;
    align-items: center;
  }

  .modal {
    align-items: center;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }
}
