
:root{--ink:#163b3b;--muted:#607878;--teal:#1d7a73;--paper:#f7f4ea;--line:rgba(23,68,67,.13)}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif;background:#0e2d38;color:var(--ink)}
.screen{display:none;min-height:100dvh;position:relative;padding:env(safe-area-inset-top) 18px env(safe-area-inset-bottom)}.screen{display:none;min-height:100dvh;position:relative;padding:env(safe-area-inset-top) 18px env(safe-area-inset-bottom)}
.screen.active{display:block;animation:screenIn .55s ease both}
@keyframes screenIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
/* 首页元素依次进场 */
.screen.active .hero>*{animation:heroIn .7s ease both}
.screen.active .hero>*:nth-child(1){animation-delay:.05s}
.screen.active .hero>*:nth-child(2){animation-delay:.16s}
.screen.active .hero>*:nth-child(3){animation-delay:.27s}
.screen.active .hero>*:nth-child(4){animation-delay:.38s}
.screen.active .hero>*:nth-child(5){animation-delay:.49s}
.screen.active .hero>*:nth-child(6){animation-delay:.60s}
.screen.active .hero>*:nth-child(7){animation-delay:.71s}
@keyframes heroIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.screen.active,.screen.active .hero>*{animation:none}}
#home{overflow:hidden;padding:0;color:var(--ink);background:linear-gradient(180deg,#fbf8ef 0%,var(--paper) 42%,#efe8d6 100%)}
.sky{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 74% 16%,rgba(240,196,140,.32),transparent 32%),radial-gradient(ellipse at 50% 92%,rgba(205,216,199,.30),transparent 44%)}
.hero{position:relative;z-index:1;max-width:620px;margin:auto;padding:56px 26px 48px;min-height:100dvh;display:flex;flex-direction:column;justify-content:flex-start}
.brand{font-size:20px;letter-spacing:.32em;margin-bottom:40px;color:var(--teal)}.eyebrow{font-size:13px;letter-spacing:.12em;color:var(--muted);margin-bottom:16px}.hero h1{font-family:"Songti SC","STSong",serif;font-size:36px;line-height:1.42;font-weight:500;margin:0 0 16px}
header{max-width:720px;margin:0 auto;padding:22px 4px 18px;color:#eef7f2;letter-spacing:.12em}header span{float:right;opacity:.55}
#coach{background:linear-gradient(180deg,#163d4d 0%,#315f63 32%,#d6ddd1 100%)}
#input{background:linear-gradient(180deg,#fbf8ef 0%,var(--paper) 30%,#e9e3d0 100%)}
#input header{color:var(--ink)}
.paper,.report-card{max-width:720px;margin:8px auto 30px;background:rgba(250,248,239,.94);border:1px solid rgba(255,255,255,.45);border-radius:26px;padding:28px 22px;box-shadow:0 24px 60px rgba(4,28,36,.18);backdrop-filter:blur(12px)}
.kicker,.mirror-label,.question-label{font-size:12px;letter-spacing:.14em;color:#66827f;text-transform:uppercase}.paper h2{font-family:"Songti SC","STSong",serif;font-size:27px;line-height:1.55;font-weight:500}
textarea{width:100%;min-height:210px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.58);padding:18px;font:inherit;font-size:16px;line-height:1.8;color:var(--ink);outline:none;resize:vertical}textarea:focus{border-color:rgba(29,122,115,.5);box-shadow:0 0 0 3px rgba(29,122,115,.08)}
.hint{font-size:12px;line-height:1.7;color:var(--muted)}button{font:inherit}.primary{width:100%;border:0;border-radius:16px;padding:16px 18px;background:var(--teal);color:white;font-weight:600;letter-spacing:.06em;margin-top:18px}.primary:disabled{opacity:.45}
.mirror{font-family:"Songti SC","STSong",serif;font-size:22px;line-height:1.75;padding:20px 0 26px;border-bottom:1px solid var(--line);white-space:pre-wrap}.question-label{margin-top:26px}.calibration{padding:20px 0;border-bottom:1px solid var(--line)}.hidden{display:none}.chips{display:flex;gap:8px;flex-wrap:wrap}.chips button{border:1px solid rgba(29,122,115,.25);background:#edf4ef;color:#315f5b;border-radius:999px;padding:10px 13px}
#answer{min-height:150px}.question-label+h2{font-size:22px}
#report{background:linear-gradient(180deg,#456f70 0%,#b8c8b8 34%,#e9e7dc 100%)}.report-card{background:#f8f5eb}.core{background:linear-gradient(145deg,#e1eee5,#f5f0df);border-radius:22px;padding:24px;margin-bottom:12px}.core span{font-size:12px;letter-spacing:.12em;color:#557772}.core h2{font-family:"Songti SC","STSong",serif;font-size:25px;line-height:1.65;font-weight:500;margin-bottom:0}
.section{padding:24px 4px;border-bottom:1px solid var(--line)}.section b{display:block;font-size:13px;letter-spacing:.08em;margin-bottom:10px}.section p{font-size:17px;line-height:1.9;margin:0;color:#355453}.section.action{margin:14px -2px;background:#e1eee5;border:1.5px solid rgba(29,122,115,.4);border-radius:18px;padding:22px 20px}.section.action b{color:#1d7a73;font-size:14px}
#toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);background:#173f42;color:white;padding:11px 16px;border-radius:12px;display:none;z-index:9;max-width:88%;text-align:center}
#auth,#history{background:linear-gradient(180deg,#163d4d 0%,#315f63 32%,#d6ddd1 100%)}
.account-bar{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:22px 0 4px}
.account-hint{font-size:13px;opacity:.82}
.link-btn{background:none;border:1px solid rgba(248,251,247,.38);color:inherit;border-radius:999px;padding:8px 14px;font-size:13px;letter-spacing:.04em;cursor:pointer}
.link-btn.center{display:block;margin:16px auto 0;color:var(--teal);border-color:rgba(29,122,115,.3)}
.auth-tabs{display:flex;gap:8px;margin-bottom:20px}
.auth-tab{flex:1;border:1px solid var(--line);background:#edf4ef;color:#315f5b;border-radius:12px;padding:11px;font-weight:600;cursor:pointer}
.auth-tab.active{background:var(--teal);color:white;border-color:var(--teal)}
.auth-form input{width:100%;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.58);padding:15px 16px;font:inherit;font-size:16px;color:var(--ink);outline:none;margin-bottom:12px}
.auth-form input:focus{border-color:rgba(29,122,115,.5);box-shadow:0 0 0 3px rgba(29,122,115,.08)}
.auth-hint{margin-top:14px;text-align:center}
.history-list{display:flex;flex-direction:column;gap:12px}
.history-item{border:1px solid var(--line);border-radius:16px;padding:16px 18px;cursor:pointer;background:rgba(255,255,255,.5);transition:border-color .15s}
.history-item:hover{border-color:rgba(29,122,115,.45)}
.history-time{font-size:12px;color:var(--muted);margin-bottom:8px}
.history-insight{font-family:"Songti SC","STSong",serif;font-size:18px;line-height:1.6;color:#355453;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.history-empty{text-align:center;color:var(--muted);line-height:1.9;padding:40px 10px}
#calibrationFollowup{padding:20px 0;border-bottom:1px solid var(--line)}
#followupPrompt{font-size:16px;line-height:1.7;color:#355453}
#followupAnswer{min-height:120px}
#reportLoading{padding:40px 0;text-align:center;border-bottom:1px solid var(--line)}
#reportLoadingText{font-size:16px;line-height:1.7;color:#355453;margin:0}
#reportLoadingText.error{color:#b0423a}
#turnLoading{padding:34px 0;text-align:center;border-bottom:1px solid var(--line)}
#turnLoadingText{font-size:15px;line-height:1.7;color:#355453;margin:0}
#turnLoading .spinner{margin-top:16px}

.spinner{width:34px;height:34px;margin:22px auto 0;border:3px solid rgba(29,122,115,.18);border-top-color:var(--teal);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#reportRetry{margin-top:8px}
@media(min-width:800px){.hero h1{font-size:46px}.paper,.report-card{padding:38px}}

/* 首页：一句话入口 + 场景引导chips + 了解更多 */
.hero .home-value{font-size:16px;line-height:1.9;color:#4a6361;margin:0 0 24px}
.scene-chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.scene-chip{border:1px solid rgba(29,122,115,.28);background:#fff;color:var(--teal);border-radius:999px;padding:10px 15px;font-size:16px;letter-spacing:.02em;cursor:pointer;min-height:44px}
.scene-chip:hover{background:#eef5f0}
.scene-chip:active{background:#e1eee5}
.hero .scene-guide{min-height:26px;margin:0 0 12px;font-size:16px;line-height:1.7;color:var(--teal);font-weight:600}
.home-entry{margin:0 0 4px}
.entry-label{display:block;font-size:16px;font-weight:600;color:var(--ink);letter-spacing:.02em;margin-bottom:10px}
#homeSituation{min-height:96px;font-size:16px;background:#fff;border-color:rgba(29,122,115,.25)}
.guide-me{display:block;margin:14px auto 0;border:0;background:none;color:var(--teal);font-size:16px;text-decoration:underline;text-underline-offset:3px;padding:10px 14px;min-height:44px;cursor:pointer}
.hero .home-disclaimer{font-size:14px;line-height:1.8;color:var(--muted);text-align:center;margin:22px 0 4px}
#home .link-btn{border-color:rgba(29,122,115,.3);color:var(--teal)}
.learn-more{margin:0 0 18px;padding:14px 16px;border:1px solid rgba(29,122,115,.16);border-radius:14px;background:rgba(255,255,255,.5)}
.learn-more p{font-size:13px;line-height:1.8;color:#4a6361;margin:0}
button:focus-visible{outline:3px solid rgba(29,122,115,.5);outline-offset:2px}
/* 开始前说明：三件事 */
.safety-notes{margin:18px 0 6px;padding:14px 16px;border-radius:14px;background:rgba(29,122,115,.07);border:1px solid rgba(29,122,115,.14)}
.safety-notes p{margin:6px 0;font-size:14px;color:#4a6b66;line-height:1.6}
.safety-notes p::before{content:"✓ ";color:#1d7a73;font-weight:600}

/* 澄清轮用户控制栏 */
.clarify-controls{display:flex;gap:10px;margin-top:12px}
.ghost-btn{flex:1;background:none;border:1px solid rgba(29,122,115,.3);color:#315f5b;border-radius:999px;padding:11px 6px;font-size:13px;letter-spacing:.02em;cursor:pointer}
.ghost-btn.accent{background:#e1eee5;border-color:rgba(29,122,115,.5);color:#1d7a73;font-weight:600}

/* 报告后反馈 + 研究授权 */
.feedback-box{margin-top:20px;padding:18px;border-radius:16px;background:rgba(29,122,115,.05);border:1px solid rgba(29,122,115,.14)}
.fb-title{font-size:15px;font-weight:600;color:#163b3b;margin:0 0 10px}
.fb-score{display:flex;gap:8px}
.fb-score button{flex:1;border:1px solid rgba(29,122,115,.25);background:#fff;color:#315f5b;border-radius:10px;padding:9px 0;font-size:15px;cursor:pointer}
.fb-score button.on{background:var(--teal);color:#fff;border-color:var(--teal)}
.fb-labels{display:flex;justify-content:space-between;font-size:11px;color:#607878;margin:4px 0 12px}
.feedback-box textarea{min-height:60px;margin-bottom:10px}
.fb-reuse-label{font-size:13px;color:#355453;margin:0 0 6px}
.fb-reuse{display:flex;gap:8px;margin-bottom:12px}
.fb-reuse button{flex:1;border:1px solid rgba(29,122,115,.25);background:#fff;color:#315f5b;border-radius:10px;padding:8px 0;font-size:13px;cursor:pointer}
.fb-reuse button.on{background:#e1eee5;border-color:rgba(29,122,115,.5);color:#1d7a73;font-weight:600}
.consent{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.6;color:#607878;margin:8px 0 4px}
.consent input{margin-top:2px;flex-shrink:0}
.fb-thanks{text-align:center;color:#1d7a73;font-size:14px;font-weight:600;margin:10px 0 0}
.feedback-box.submitted{opacity:.88}
