/* 笛子姐® · 企业全球增长体检 —— 视觉语言移植自最终H5(2026-08-24 最终确认版，更新02 品牌与二维码) */
:root {
  --bg: #090d16;
  --panel: #111827;
  --panel2: #0f172a;
  --text: #f7f8fb;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, .10);
  --soft: rgba(255, 255, 255, .06);
  --accent: #f1c76a;
  --accent2: #9bd1ff;
  --danger: #ff6b6b;
  --warn: #ffc857;
  --good: #7be0b4;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: radial-gradient(circle at 10% 0%, #16223e 0%, var(--bg) 34%, #070a11 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  min-height: 100%;
}

body { min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: env(safe-area-inset-bottom); }
.screen { min-height: 100vh; padding: 22px 18px 28px; animation: fade .28s ease; display: flex; flex-direction: column; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.brand { font-size: 13px; letter-spacing: .08em; color: #d6d8df; text-transform: uppercase; }
/* 品牌行：V5A「金脉破环」mark + 文字（金色脉搏取 --accent，主环用亮白） */
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; flex: none; color: #e8ecf4; filter: drop-shadow(0 0 10px rgba(241, 199, 106, .18)); }
.hero { padding-top: 28px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; margin-bottom: 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(241, 199, 106, .8); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 40px; line-height: 1.14; letter-spacing: -.03em; }
h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 18px; line-height: 1.45; }
.sub { margin-top: 16px; color: #c9cdd6; line-height: 1.75; font-size: 16px; }
.pill-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.pill { border: 1px solid var(--line); background: rgba(255, 255, 255, .035); border-radius: 16px; padding: 14px 8px; text-align: center; font-size: 14px; color: #dfe3eb; }
.pill b { display: block; color: var(--text); font-size: 16px; margin-bottom: 5px; }

/* 封面形象照 */
#screen-home .hero { flex: 0 0 auto; justify-content: flex-start; padding-top: 22px; position: relative; z-index: 2; }
.home-portrait-wrap { position: relative; flex: none; width: auto; aspect-ratio: 1599/1607; height: auto; margin: -8px -18px 0; overflow: hidden; isolation: isolate; background: var(--panel); }
.home-portrait-wrap:before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, #090d16 0%, rgba(9, 13, 22, .84) 10%, rgba(9, 13, 22, .10) 42%, rgba(9, 13, 22, .26) 68%, #090d16 100%); pointer-events: none; }
.home-portrait-wrap:after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(9, 13, 22, .38), transparent 38%, rgba(9, 13, 22, .10)); pointer-events: none; }
.home-portrait { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center center; filter: saturate(.88) contrast(1.03) brightness(.92); pointer-events: none; }
#screen-home .home-cta { position: absolute; left: 24px; right: 24px; bottom: 8px; width: auto; z-index: 2; margin: 0; }
#screen-home .footer-note { position: relative; z-index: 2; }

.primary { border: 0; border-radius: 16px; padding: 16px 18px; background: linear-gradient(135deg, #f3d07d, #dcae4f); color: #111827; font-weight: 800; font-size: 16px; box-shadow: 0 12px 28px rgba(224, 177, 76, .22); min-height: 52px; }
.secondary { border: 1px solid var(--line); border-radius: 16px; padding: 15px 18px; background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 700; min-height: 48px; }
.ghost { border: 0; background: none; color: #cbd1dc; padding: 12px; font-weight: 650; min-height: 44px; }
.primary:disabled, .secondary:disabled { opacity: .45; cursor: not-allowed; }
.footer-note { margin-top: 16px; color: #777f8f; font-size: 12px; line-height: 1.6; text-align: center; }

/* 答题页 */
.topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; padding-top: env(safe-area-inset-top); z-index: 3; background: linear-gradient(180deg, rgba(9, 13, 22, .96), rgba(9, 13, 22, .78), transparent); }
.ip-portrait { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 1px solid rgba(241, 199, 106, .78); box-shadow: 0 0 0 4px rgba(241, 199, 106, .07), 0 10px 24px rgba(0, 0, 0, .28); background: var(--panel2); pointer-events: none; }
.identity-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.result-hero .identity-head { margin-bottom: 12px; }
.back { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: white; font-size: 18px; }
.progress-wrap { flex: 1; min-width: 0; }
.progress-meta { display: flex; justify-content: space-between; color: #9ca3af; font-size: 11px; margin-bottom: 7px; }
.bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .3s ease; }
.question { padding-top: 40px; }
.module { font-size: 13px; color: var(--accent2); margin-bottom: 10px; font-weight: 700; }
.qtitle { font-size: 27px; line-height: 1.35; letter-spacing: -.02em; margin-bottom: 22px; }
.hint { margin: -10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, .038); color: #eef1f6; border-radius: 16px; padding: 15px 16px; line-height: 1.45; transition: .16s ease; position: relative; min-height: 50px; }
.option:hover { border-color: rgba(241, 199, 106, .4); background: rgba(241, 199, 106, .06); }
.option.selected { border-color: rgba(241, 199, 106, .9); background: rgba(241, 199, 106, .12); }
.option.selected:after { content: "✓"; position: absolute; right: 14px; top: 14px; color: var(--accent); font-weight: 800; }
.text-input { width: 100%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: white; border-radius: 16px; padding: 16px; outline: none; font-size: 16px; }
.text-input:focus { border-color: rgba(155, 209, 255, .55); box-shadow: 0 0 0 3px rgba(155, 209, 255, .08); }
.bottom-action { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; flex-direction: column; }
.autosave { font-size: 12px; color: #777f8f; min-height: 18px; margin: 8px 0 0; }
.autosave.saving { color: var(--warn); }

/* 过渡卡 */
.transition-card { margin: auto 0; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); border-radius: 28px; padding: 28px 22px; box-shadow: var(--shadow); }
.transition-card .check { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(123, 224, 180, .12); color: var(--good); font-size: 24px; margin-bottom: 18px; border: 1px solid rgba(123, 224, 180, .2); }
.transition-card p { color: #bdc3cf; line-height: 1.7; margin-top: 12px; }

/* 加载扫描 */
.loading-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.scanner { width: 160px; height: 160px; border-radius: 50%; position: relative; border: 1px solid rgba(155, 209, 255, .25); box-shadow: inset 0 0 35px rgba(155, 209, 255, .08), 0 0 50px rgba(155, 209, 255, .05); margin-bottom: 30px; }
.scanner:before, .scanner:after { content: ""; position: absolute; inset: 18px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); }
.scanner:after { inset: 48px; }
.scan-line { position: absolute; left: 50%; top: 50%; width: 72px; height: 2px; transform-origin: left center; background: linear-gradient(90deg, rgba(241, 199, 106, .9), transparent); animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); left: 68%; top: 38%; box-shadow: 0 0 18px rgba(241, 199, 106, .9); }
.loading-step { color: #aab2bf; font-size: 14px; min-height: 22px; }

/* 预告（模糊） */
.preview-box { margin-top: 24px; border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: rgba(255, 255, 255, .035); }
.blurline { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); color: #cfd4dd; }
.blurline:last-child { border-bottom: 0; }
.blurred { filter: blur(6px); user-select: none; color: #fff; }

/* 留资表单 */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.field label { display: block; font-size: 13px; color: #aeb5c2; margin-bottom: 8px; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: #0e1523; color: white; border-radius: 14px; padding: 14px 14px; outline: none; min-height: 48px; }
.field select { appearance: none; }
.checkline { display: flex; gap: 10px; align-items: flex-start; color: #aeb5c2; font-size: 12px; line-height: 1.6; margin-top: 8px; }
.checkline input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; }
.err { color: var(--danger); font-size: 12px; min-height: 16px; margin: 0; }
input:focus-visible, .option:focus-visible, .primary:focus-visible, .secondary:focus-visible, .ghost:focus-visible, .back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 结果页 */
.result-shell { padding-bottom: 110px; }
.result-hero { padding: 26px 18px 8px; }
.type-card { margin-top: 18px; border: 1px solid rgba(241, 199, 106, .24); background: linear-gradient(160deg, rgba(241, 199, 106, .10), rgba(255, 255, 255, .025)); border-radius: 24px; padding: 20px; }
.type-label { color: #c8a75e; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.type-name { font-size: 30px; font-weight: 900; margin-top: 6px; }
.type-desc { color: #d0d5dd; line-height: 1.65; margin-top: 8px; }
.big-score { font-size: 78px; line-height: 1; font-weight: 950; letter-spacing: -.06em; margin-top: 18px; }
.grade { font-weight: 850; color: var(--accent); margin-left: 8px; font-size: 21px; }
.cards { padding: 0 14px; }
.card { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)); padding: 20px; margin-top: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .14); }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card-sub { color: #9da5b2; font-size: 13px; line-height: 1.6; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.metric { border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; background: rgba(255, 255, 255, .025); }
.metric small { display: block; color: #969fac; margin-bottom: 6px; }
.metric b { font-size: 17px; }
.gap-viz { position: relative; margin-top: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(155, 209, 255, .08), rgba(241, 199, 106, .06)); padding: 18px; border: 1px solid var(--line); }
.gap-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.gap-row strong { font-size: 24px; }
.gap-center { text-align: center; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 16px 0; margin: 8px 0; }
.gap-center span { display: block; color: #aeb6c3; font-size: 12px; }
.gap-center b { display: block; font-size: 42px; color: var(--accent); margin-top: 4px; }
.mini-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 10px; background: rgba(255, 255, 255, .025); }
.mini-card .tag { font-size: 11px; color: #b9c0cb; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.mini-card b { font-size: 16px; }
.mini-card p { font-size: 13px; color: #b7bec9; line-height: 1.6; margin-top: 6px; }
.risk.red { border-color: rgba(255, 107, 107, .30); background: rgba(255, 107, 107, .065); }
.risk.yellow { border-color: rgba(255, 200, 87, .28); background: rgba(255, 200, 87, .055); }
.risk-head { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #d9dde5; }
.radar-wrap { display: grid; place-items: center; margin-top: 14px; }
.radar { width: 100%; max-width: 330px; height: auto; }
.radar text { fill: #bcc3ce; font-size: 10px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); gap: 14px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: #969fac; }
.route-main { margin-top: 16px; border: 1px solid rgba(241, 199, 106, .28); background: rgba(241, 199, 106, .07); padding: 16px; border-radius: 18px; }
.route-main small { color: #c8a75e; font-weight: 800; }
.route-main h4 { font-size: 22px; margin: 6px 0 0; }
.first-action { margin-top: 16px; padding: 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(155, 209, 255, .08), rgba(241, 199, 106, .08)); border: 1px solid var(--line); }
.first-action small { color: #9da5b2; }
.first-action b { display: block; font-size: 20px; margin-top: 7px; line-height: 1.4; }

/* 吸底 CTA / 弹窗 / 轻提示 */
.sticky-cta { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(9, 13, 22, .96) 28%); z-index: 8; display: none; }
.sticky-cta.show { display: block; }
.cta-inner { display: grid; grid-template-columns: 1fr; gap: 8px; }
.share-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); display: none; z-index: 20; padding: 22px; align-items: center; justify-content: center; }
.share-modal.show { display: flex; }
.share-card { width: min(400px, 100%); border: 1px solid rgba(241, 199, 106, .3); background: linear-gradient(160deg, #111a2e, #0b1020 70%); border-radius: 26px; padding: 26px; box-shadow: var(--shadow); }
.share-card .s-type { font-size: 28px; font-weight: 900; margin: 8px 0 18px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-grid > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.share-grid small { color: #8f98a7; }
.share-grid b { display: block; font-size: 24px; margin-top: 4px; }
.share-actions { display: flex; gap: 10px; margin-top: 16px; }
.share-actions button { flex: 1; }
.wechat-card { text-align: center; width: min(380px, 100%); }
.wechat-card h3 { font-size: 24px; margin-top: 14px; }
.wechat-card .muted { margin-top: 10px; line-height: 1.7; }
.wechat-qr-wrap { width: min(270px, 76vw); margin: 20px auto 12px; padding: 12px; background: #fff; border-radius: 20px; box-shadow: 0 16px 38px rgba(0, 0, 0, .28); }
.wechat-qr { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 10px; }
.wechat-tip { color: #cfd4dd; font-size: 13px; line-height: 1.7; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #e9edf4; color: #111827; border-radius: 999px; padding: 9px 14px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 40; white-space: nowrap; }
.toast.show { opacity: 1; }

@media (min-width: 700px) {
  .app { margin: 20px auto; min-height: calc(100vh - 40px); border: 1px solid rgba(255, 255, 255, .06); border-radius: 32px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
  .screen { min-height: calc(100vh - 40px); }
  .sticky-cta { bottom: 20px; border-bottom-left-radius: 28px; border-bottom-right-radius: 28px; }
}

@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .topbar .ip-portrait { width: 40px; height: 40px; flex-basis: 40px; }
  .progress-meta span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .progress-meta span:last-child { flex: none; margin-left: 8px; }
}

@media (max-height: 720px) {
  #screen-home .hero { padding-top: 14px; }
  #screen-home .pill-row { margin-top: 18px; }
  #screen-home .home-cta { bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
