/* ============================================================
   Alpha 账户结构诊断 — Modern Soft UI
   Cream paper · soft shadow cards · persimmon coral accent
   （与 CGTI 投资人格扫描同款设计语言）
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  /* Surface */
  --bg:        #FAF7F0;
  --bg2:       #FFFFFF;        /* panel / card */
  --bg3:       #F6F1E6;        /* soft inset (inputs) */
  --bg-tint:   #FFF4EE;        /* warm coral tint */
  --panel:     #FFFFFF;
  --border:    #E2D8C2;        /* line-strong */
  --line:      #EFE7D5;

  /* Ink */
  --text:      #1A1A2E;
  --text-dim:  #4A4D6B;
  --text-faint:#8B8FA8;
  --ink-mute:  #C7CADC;

  /* Accent — persimmon coral */
  --accent:      #F26F4E;
  --accent2:     #D8553A;      /* deep */
  --accent-soft: #FFE4DA;
  --accent-line: #F8C7B7;

  /* Supporting */
  --green:     #2EC4A2;        /* mint */
  --green-soft:#E3F5EE;
  --gold:      #B47A0F;
  --gold-soft: #FFF1CE;
  --red:       #E0524A;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(74,77,107,0.06);
  --shadow:    0 10px 32px rgba(74,77,107,0.08);
  --shadow-lg: 0 18px 48px rgba(74,77,107,0.10);
  --shadow-coral: 0 10px 28px rgba(242,111,78,0.30);

  --radius:   18px;
  --r-lg:     24px;
  --r-sm:     12px;
  --r-pill:   999px;

  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }
@media (max-width: 380px) { html { font-size: 15px; } }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }

/* ── Layout ───────────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  padding: 18px 0 56px;
  background:
    radial-gradient(circle at 12% -8%, #FFEFE3 0, transparent 40%),
    radial-gradient(circle at 92% 6%, #FBF1D6 0, transparent 34%),
    var(--bg);
  background-attachment: fixed;
}
.container { max-width: 460px; margin: 0 auto; padding: 0 18px; }

/* ── Brand strip → white pill nav ─────────────────────── */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 22px;
  background: var(--panel);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.brand-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(242,111,78,0.30);
}
.brand-title { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; color: var(--text); }
.brand-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; font-family: var(--f-mono); letter-spacing: 0.04em; }

/* ── Steps ────────────────────────────────────────────── */
.steps { display: flex; align-items: center; margin-bottom: 22px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700;
  border: 1px solid var(--line);
}
.step.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(242,111,78,0.30); }
.step.done .step-num { background: var(--green); border-color: var(--green); color: #fff; }
.step-label { font-size: 10px; color: var(--text-faint); font-weight: 500; }
.step.active .step-label { color: var(--accent2); }
.step.done .step-label { color: var(--green); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 6px 16px; border-radius: 2px; }
.step-line.active { background: var(--accent); }

/* ── Card ─────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; color: var(--text); }
.card-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.7; }
.card-desc small { color: var(--text-faint); }

/* ── Upload ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 14px; min-height: 150px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--bg-tint); }
.upload-icon { font-size: 38px; margin-bottom: 8px; }
.upload-text { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.upload-hint { font-size: 11px; color: var(--text-faint); font-family: var(--f-mono); }
.preview-img { max-width: 100%; max-height: 220px; border-radius: var(--r-sm); object-fit: contain; }
.hidden { display: none !important; }

.warn-badge {
  background: var(--gold-soft); border: 1px solid #F0DDA8; border-radius: var(--r-sm);
  padding: 9px 14px; font-size: 12px; color: var(--gold); margin-bottom: 10px; text-align: center; font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--radius); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .18s ease; border: none; text-decoration: none; font-family: var(--f-sans);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-coral); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent2); box-shadow: 0 16px 36px rgba(242,111,78,0.40); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; background: var(--ink-mute); box-shadow: none; transform: none; }
.btn-ghost { background: var(--panel); border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--r-pill); font-weight: 600; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); transform: translateY(-1px); }
.btn-full { width: 100%; }

/* ── Scan animation ───────────────────────────────────── */
.scan-preview-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
  background: var(--bg3); max-height: 260px; display: flex; align-items: center; justify-content: center;
}
.scan-preview-img { max-width: 100%; max-height: 260px; object-fit: contain; display: block; opacity: .85; }
.scan-overlay { position: absolute; inset: 0; pointer-events: none; }
.scan-line { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 10px var(--accent); animation: scanDown 1.8s ease-in-out infinite; }
@keyframes scanDown { 0% { top: 0%; } 100% { top: 100%; } }
.scan-status { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); justify-content: center; padding: 4px 0; font-weight: 600; }
.scan-spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Confirm step ─────────────────────────────────────── */
.confirm-header { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.confirm-icon { font-size: 18px; }
.confirm-thumb { width: 100%; max-height: 160px; object-fit: contain; border-radius: var(--r-sm); margin-bottom: 14px; background: var(--bg3); }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.confirm-field { display: flex; flex-direction: column; gap: 5px; }
.confirm-field.full { grid-column: 1 / -1; }
.cf-label { font-size: 11px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.01em; }
.cf-hint { font-size: 10px; color: var(--text-faint); margin-top: 2px; font-family: var(--f-mono); }
.cf-input-wrap { position: relative; }
.cf-input-wrap input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 32px 10px 12px; color: var(--text); font-size: 16px; font-weight: 700; font-family: var(--f-mono);
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.cf-input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.cf-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-faint); pointer-events: none; font-family: var(--f-mono); }
.confirm-field select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; color: var(--text); font-size: 13px; font-weight: 600; outline: none; transition: border-color .18s, box-shadow .18s;
}
.confirm-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cf-textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; color: var(--text); font-size: 13px; line-height: 1.6; outline: none; resize: vertical;
  font-family: var(--f-sans); transition: border-color .18s, box-shadow .18s;
}
.cf-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.confirm-tip { font-size: 12px; color: var(--text-faint); margin-bottom: 14px; line-height: 1.6; min-height: 18px; }

.footer-note { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 20px; font-family: var(--f-mono); letter-spacing: 0.02em; }

/* ── Quiz ─────────────────────────────────────────────── */
.quiz-block { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px dashed var(--border); }
.quiz-block:last-of-type { border-bottom: none; }
.quiz-num { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent2); font-family: var(--f-mono); margin-bottom: 8px; }
.quiz-progress { height: 3px; background: var(--bg3); border-radius: 2px; margin-bottom: 14px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; transition: width .3s; }
.quiz-question { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; line-height: 1.6; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.option-label {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px;
  background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .18s; line-height: 1.5;
}
.option-label:hover { border-color: var(--accent-line); background: var(--bg-tint); }
.option-label input[type=radio] { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.option-label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option-label:has(input:checked) .option-text { color: var(--accent2); font-weight: 600; }
.option-text { font-size: 14px; color: var(--text); }
.quiz-note { font-size: 11px; color: var(--text-faint); text-align: center; margin: 8px 0 16px; font-family: var(--f-mono); }

/* ── Loading ──────────────────────────────────────────── */
.loading-card { max-width: 380px; margin: 56px auto 0; text-align: center; padding: 0 18px; }
.loading-logo {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 20px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 32px; box-shadow: var(--shadow-coral); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.loading-title { font-size: 20px; font-weight: 800; margin-bottom: 26px; color: var(--text); }
.loading-steps { text-align: left; background: var(--panel); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
.loading-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); font-weight: 500; }
.ls-icon { font-size: 16px; }
.loading-bar-wrap { height: 7px; background: var(--bg3); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.loading-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width .8s ease; }
.loading-pct { font-size: 12px; color: var(--text-faint); margin-bottom: 16px; font-family: var(--f-mono); font-weight: 700; }
.loading-tip { font-size: 12px; color: var(--text-faint); }

/* ============================================================
   RESULT — 8-section structure report
   ============================================================ */
.result-page {
  min-height: 100vh; padding: 18px 0 56px;
  background:
    radial-gradient(circle at 14% -6%, #FFEAD9 0, transparent 42%),
    radial-gradient(circle at 88% 4%, #FBEFCF 0, transparent 36%),
    var(--bg);
  background-attachment: fixed;
}
.result-toolbar { display: flex; justify-content: space-between; align-items: center; max-width: 430px; margin: 0 auto 16px; padding: 0 16px; }

.report {
  position: relative; width: 410px; max-width: calc(100% - 24px); margin: 0 auto;
  background: var(--panel); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}

.report-header { display: flex; align-items: center; gap: 11px; padding: 18px 22px 16px; border-bottom: 1px solid var(--line); }
.report-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 4px 12px rgba(242,111,78,0.3); }
.report-brand { font-size: 14px; font-weight: 800; color: var(--text); }
.report-brand-sub { font-size: 9px; color: var(--text-faint); font-family: var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 1px; }
.report-date { margin-left: auto; font-size: 10px; color: var(--text-faint); font-family: var(--f-mono); }

/* score block */
.score-block { position: relative; display: flex; align-items: center; gap: 18px; padding: 24px 22px 20px; overflow: hidden; }
.score-block::before { content: ''; position: absolute; top: -50px; right: -50px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); z-index: 0; }
.score-block > * { position: relative; z-index: 1; }
.score-ring-wrap { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.score-ring { width: 112px; height: 112px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg3); stroke-width: 9; }
.ring-fill { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-size: 34px; font-weight: 800; line-height: 1; color: var(--text); font-family: var(--f-mono); }
.score-label { font-size: 11px; color: var(--text-faint); margin-top: 3px; font-family: var(--f-mono); }
.score-meta { flex: 1; }
.score-title { font-size: 11px; color: var(--text-faint); margin-bottom: 8px; font-family: var(--f-mono); letter-spacing: 0.04em; }
.type-badge { display: inline-block; font-size: 15px; font-weight: 800; letter-spacing: 0.02em; color: var(--accent2); background: var(--accent-soft); border-radius: var(--r-sm); padding: 6px 13px; margin-bottom: 10px; }
.score-tip { font-size: 10px; color: var(--text-faint); line-height: 1.6; }

/* sections */
.report-sections { padding: 6px 22px 10px; display: flex; flex-direction: column; gap: 18px; }
.rsec { position: relative; }
.rsec-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; }
.rsec-no { font-size: 13px; font-weight: 700; color: var(--accent); font-family: var(--f-mono); }
.rsec-title { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.005em; }
.rsec-body { font-size: 13px; color: var(--text-dim); line-height: 1.85; text-align: justify; }
.rsec-danger { background: var(--bg-tint); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 15px 15px 16px; }
.rsec-danger .rsec-no { color: var(--accent2); }
.rsec-final { background: var(--green-soft); border: 1px solid #BCE6D8; border-radius: var(--radius); padding: 15px 15px 16px; }
.rsec-final .rsec-no { color: #1A8E70; }

.rsec-callout { margin-top: 10px; background: var(--bg-tint); border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 11px 13px; }
.callout-warn { border-left-color: var(--accent2); background: var(--accent-soft); }
.callout-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 4px; font-family: var(--f-mono); }
.callout-warn .callout-label { color: var(--accent2); }
.callout-text { font-size: 12.5px; color: var(--text); line-height: 1.8; }

.report-footer { margin-top: 12px; padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--bg3); }
.report-footer .footer-brand { font-size: 10px; color: var(--text-faint); font-family: var(--f-mono); }
.report-footer .footer-tip { font-size: 10px; color: var(--accent2); font-weight: 700; }
.report-disclaimer { padding: 13px 22px 18px; font-size: 9.5px; color: var(--text-faint); line-height: 1.7; }

.share-tip { text-align: center; font-size: 12px; color: var(--text-faint); margin: 16px auto 0; max-width: 410px; padding: 0 16px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 440px) {
  .report { width: 100%; max-width: 100%; border-radius: var(--radius); }
  .result-toolbar { padding: 0 14px; }
}
