/* 宠物就医收费分析 — 正式产品样式（v8 视觉，移动优先 + 桌面响应式） */
:root{
  --paper:#f6f3ea;--card:#fffef9;--ink:#123b34;--muted:#6e7f7a;
  --green:#087f65;--green2:#10a47d;--mint:#dff3ec;--orange:#cf6b35;
  --orange2:#fff0e3;--red:#b94850;--red2:#fdebed;--blue:#467883;
  --shadow:0 24px 72px rgba(0,0,0,.35)
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
body{background:var(--paper);color:var(--ink)}
button,input{font:inherit}
button{cursor:pointer}

/* ---------- 屏幕骨架 ---------- */
.screen{display:none;min-height:100vh;background:var(--paper);flex-direction:column}
.screen.active{display:flex}
.appbar{height:49px;flex:0 0 49px;padding:0 13px;display:flex;align-items:center;border-bottom:1px solid rgba(18,59,52,.09)}
.appbar h1{flex:1;margin:0;text-align:center;font-size:16px}
.appbar button{border:0;background:transparent;color:var(--green);font-weight:900}
.appbar .back{width:42px;font-size:25px}
.appbar .right{width:55px;font-size:12px}
.appbar .space{width:42px}
.content{flex:1;min-height:0;overflow:auto;padding:17px 17px 22px}
.content.no-pad{padding:0}
.dock{flex:0 0 auto;padding:10px 17px 12px;background:linear-gradient(180deg,rgba(246,243,234,0),var(--paper) 25%)}

/* ---------- 一级导航 tabbar（JS 注入，每屏底部；桌面转顶部） ---------- */
.tabbar{height:61px;flex:0 0 61px;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #d8e1dd;background:#fffdfa;padding:4px 18px 5px}
.tabbar button{border:0;background:transparent;color:#87938f;font-size:10px;font-weight:800}
.tabbar button b{display:block;margin-bottom:2px;font-size:19px;line-height:1}
.tabbar button.active{color:var(--green)}

/* ---------- 文案体系 ---------- */
.eyebrow{color:var(--green);font-size:11px;font-weight:900;letter-spacing:.08em}
.display{margin:6px 0 0;font-size:29px;line-height:1.14;letter-spacing:-.035em}

/* ---------- 按钮 ---------- */
.primary,.secondary,.ghost{width:100%;border-radius:15px;font-weight:900}
.primary{height:50px;border:0;background:var(--green);color:#fff;font-size:15px;box-shadow:0 10px 24px rgba(8,127,101,.2)}
.secondary{height:45px;border:1px solid #bdd0ca;background:#fff;color:var(--ink);font-size:13px}
.ghost{height:38px;border:0;background:transparent;color:var(--green);font-size:12px}
.primary:disabled{background:#aebbb7;box-shadow:none;cursor:not-allowed}
.row{display:flex;gap:8px}.row>*{flex:1}
.stack{display:grid;gap:8px;margin-top:12px}

/* ---------- 首页 A1 ---------- */
.scanner{height:318px;margin-top:13px;border:1px solid #cbded7;border-radius:27px;background:linear-gradient(150deg,#e4f0eb,#fffaf2);position:relative;overflow:hidden;box-shadow:inset 0 0 0 7px rgba(255,255,255,.52)}
.scanner:before,.scanner:after{content:"";position:absolute;width:33px;height:33px;border-color:var(--green);opacity:.55}
.scanner:before{left:17px;top:17px;border-left:3px solid;border-top:3px solid;border-radius:11px 0 0}
.scanner:after{right:17px;bottom:17px;border-right:3px solid;border-bottom:3px solid;border-radius:0 0 11px}
.scan-paper{position:absolute;left:26px;top:58px;width:111px;height:204px;padding:26px 12px;background:#fff;border-radius:8px;transform:rotate(-5deg);box-shadow:0 15px 30px rgba(36,73,64,.17)}
.scan-line{height:7px;margin:9px 0;border-radius:4px;background:#dae6e1}
.scan-line.short{width:62%}
.case-card{position:absolute;right:16px;width:213px;padding:10px 11px;border-radius:12px;background:#fff;box-shadow:0 9px 22px rgba(29,67,58,.14);font-size:10px;line-height:1.38;font-weight:900}
.case-card:before{content:"发现";display:inline-block;margin-right:5px;padding:2px 5px;border-radius:5px;background:var(--orange2);color:var(--orange);font-size:8px}
.case-card.one{top:37px}
.case-card.two{top:124px}
.case-card.three{top:211px}
.scan-beam{position:absolute;left:20px;right:20px;height:2px;background:linear-gradient(90deg,transparent,#14b88a,transparent);box-shadow:0 0 14px #14b88a;animation:scan 2.8s ease-in-out infinite}
@keyframes scan{0%,100%{top:28px;opacity:.25}50%{top:348px;opacity:1}}
@media (min-width:720px){@keyframes scan{0%,100%{top:28px;opacity:.25}50%{top:348px;opacity:1}}}
.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px}
.home-actions button{height:47px;border-radius:14px;font-weight:900}
.camera{border:0;background:var(--green);color:#fff}
.album{border:1px solid #bed1cb;background:#fff;color:var(--ink)}

/* ---------- 已选内容 A2 / 草稿 R3 ---------- */
.selection-head{display:flex;justify-content:space-between;align-items:flex-end}
.selection-head h2{margin:0;font-size:25px}
.selection-head span{color:var(--muted);font-size:11px}
.thumb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px}
.thumb{height:109px;position:relative;padding:7px;border:1px solid #d9e3df;border-radius:12px;background:#fff}
.thumb .page{height:73px;border-radius:4px;background:repeating-linear-gradient(#dfe8e4 0 4px,transparent 4px 10px)}
.thumb small{display:block;margin-top:5px;color:#687873;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thumb .remove{position:absolute;right:4px;top:4px;width:20px;height:20px;border:0;border-radius:50%;background:rgba(18,59,52,.82);color:#fff}
.thumb.add{display:flex;align-items:center;justify-content:center;border:2px dashed #b6cac4;background:transparent;color:var(--green);font-size:12px;font-weight:900}

/* ---------- 分析中 A3 ---------- */
.process{flex:1;display:flex;flex-direction:column;align-items:center;padding:48px 25px 22px}
.machine{width:216px;height:220px;position:relative;overflow:hidden;border:1px solid #cbdcd6;border-radius:31px;background:linear-gradient(145deg,#dfede7,#fff);box-shadow:0 18px 38px rgba(34,76,65,.12)}
.machine .doc{position:absolute;left:52px;top:34px;width:111px;height:151px;border-radius:8px;background:repeating-linear-gradient(#fff 0 19px,#dfe8e4 19px 25px);box-shadow:0 10px 22px rgba(30,69,58,.15);transform:rotate(-3deg)}
.machine .beam{position:absolute;left:18px;right:18px;top:28px;height:3px;background:#10b88b;box-shadow:0 0 16px #10b88b;animation:process 2s ease-in-out infinite}
@keyframes process{0%,100%{transform:translateY(0)}50%{transform:translateY(168px)}}
.process h2{margin:25px 0 5px;font-size:21px}
.process p{margin:0;color:var(--muted);font-size:11px}
.steps{width:100%;display:grid;gap:9px;margin-top:24px}
.step{display:flex;align-items:center;gap:8px;color:#72817d;font-size:11px}
.step b{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#dce5e1;font-size:9px}
.step.done{color:var(--green);font-weight:900}
.step.done b{background:var(--green);color:#fff}
.step.active{color:var(--ink);font-weight:900}
.step.active b{background:var(--orange2);color:var(--orange)}

/* ---------- 结果 hero / 问题 ---------- */
.hero{border-radius:22px;padding:18px;background:linear-gradient(140deg,#173f37,#0b705a);color:#fff;box-shadow:0 13px 30px rgba(15,77,63,.16)}
.hero.warn{background:linear-gradient(140deg,#833a36,#b94f56)}
.hero.soft{background:linear-gradient(140deg,#3b6871,#4b838d)}
.hero small{opacity:.76;font-weight:800}
.hero h2{margin:7px 0 3px;font-size:26px;line-height:1.18}
.hero p{margin:6px 0 0;font-size:11px;opacity:.84}
.issue-list{display:grid;gap:9px;margin-top:11px}
.issue{width:100%;padding:14px;border:1px solid #e3d0c3;border-radius:16px;background:#fff;color:var(--ink);text-align:left}
.issue .top{display:flex;justify-content:space-between;gap:8px}
.badge{display:inline-block;padding:3px 6px;border-radius:7px;background:var(--orange2);color:var(--orange);font-size:9px;font-weight:900}
.badge.new{background:var(--red2);color:var(--red)}
.badge.keep{background:#e8f0f1;color:var(--blue)}
.badge.done{background:var(--mint);color:var(--green)}
.issue h3{margin:8px 0 4px;font-size:14px;line-height:1.42}
.issue p{margin:0;color:#89604f;font-size:10px;line-height:1.45}
.issue .arrow{color:var(--green);font-size:19px;font-weight:900}
.coverage{display:grid;gap:8px;margin-top:11px}
.check{display:flex;gap:9px;padding:11px 12px;border:1px solid #dce5e1;border-radius:13px;background:#fff;font-size:11px;line-height:1.45}
.check b{color:var(--green)}
.check.wait b{color:var(--blue)}
.check.bad b{color:var(--red)}

/* ---------- 依据 A5 ---------- */
.compare{display:grid;grid-template-columns:1fr 26px 1fr;margin-top:12px}
.source{padding:11px;border:1px solid #dce4e0;border-radius:13px;background:#fff}
.source small{color:var(--muted);font-size:8px}
.source h3{margin:7px 0;font-size:13px}
.source .line{height:6px;margin:6px 0;border-radius:3px;background:#dfe7e4}
.source .line.hot{background:#efb087}
.vs{display:grid;place-items:center;color:var(--orange);font-weight:900}
.finding{margin-top:11px;padding:13px;border-left:4px solid var(--orange);border-radius:13px;background:var(--orange2);color:#69402e;font-size:11px;line-height:1.55}
.finding strong{display:block;color:#8d451f;margin-bottom:3px}

/* ---------- 沟通信息 A7/A8 ---------- */
.message{padding:14px;border:1px solid #d7e2de;border-radius:17px;background:#fff}
.message h2{margin:0 0 10px;font-size:16px}
.context-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:11px}
.context{padding:8px;border-radius:9px;background:#edf4f1;font-size:9px}
.context b{display:block;margin-top:3px;font-size:10px}
.message p{margin:7px 0;color:#314b44;font-size:10px;line-height:1.65}
.message .quote{padding:10px;border-radius:10px;background:#f5f3ec}

/* A7 可编辑沟通信息：四要素 + 大编辑框 + 提示，贴合产品设计语言 */
#a7-context{gap:9px;margin-bottom:12px}
#a7-context .context{padding:11px 13px;border-radius:12px;font-size:11px}
#a7-context .context b{margin-top:4px;font-size:13px;color:var(--ink)}
textarea.message-edit{
  display:block;width:100%;min-height:290px;box-sizing:border-box;
  padding:15px 16px;border:1px solid #d7e2de;border-radius:15px;background:#fff;
  font:inherit;font-size:13px;line-height:1.8;color:#314b44;
  resize:vertical;outline:none;
}
textarea.message-edit:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(8,127,101,.12)}
.edit-hint{margin:9px 3px 0;color:#7a908a;font-size:11px;line-height:1.6}
.missing{padding:12px;border:1px solid #efd1be;border-radius:13px;background:#fff7ef}
.missing h3{margin:0 0 8px;color:#93451e;font-size:14px}
.field{margin-top:8px}
.field label{display:block;margin-bottom:4px;color:#667772;font-size:10px}
.field input{width:100%;height:39px;padding:0 10px;border:1px solid #cad7d3;border-radius:10px;background:#fff;color:var(--ink);font-size:12px}

/* ---------- 补充重析 A10 ---------- */
.change-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.change-summary div{padding:9px 5px;border-radius:11px;background:#fff;text-align:center;border:1px solid #dce5e1}
.change-summary b{display:block;font-size:19px}
.change-summary span{font-size:9px;color:var(--muted)}
.resolved{margin-top:9px;padding:11px 12px;border:1px solid #cfe2db;border-radius:13px;background:#f4fbf8;font-size:10px;color:#557069}
.resolved b{display:block;color:var(--green);margin-bottom:3px}

/* ---------- 记录 R1/R2/R3 ---------- */
.record-list{display:grid;gap:9px}
.record{width:100%;padding:13px;border:1px solid #dbe4e0;border-radius:15px;background:#fff;color:var(--ink);text-align:left}
.record-head{display:flex;justify-content:space-between}
.record h3{margin:0;font-size:13px}
.record time{color:var(--muted);font-size:8px}
.record p{margin:6px 0 0;color:#657773;font-size:10px}
.record .state{display:inline-block;margin-top:7px;padding:4px 7px;border-radius:7px;background:var(--orange2);color:var(--orange);font-size:8px;font-weight:900}
.record .state.clear{background:var(--mint);color:var(--green)}
.record .state.draft{background:#e9eff0;color:var(--blue)}
.timeline{display:grid;gap:0;margin-top:12px}
.version{position:relative;padding:0 0 15px 24px;border-left:2px solid #cbdad5}
.version:last-child{border-left-color:transparent}
.version:before{content:"";position:absolute;left:-6px;top:2px;width:10px;height:10px;border-radius:50%;background:var(--green)}
.version h3{margin:0;font-size:12px}
.version p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.45}

/* ---------- 我的 M1/M2/M3 ---------- */
.setting{width:100%;display:flex;align-items:center;gap:11px;padding:13px 2px;border:0;border-bottom:1px solid #dde5e2;background:transparent;color:var(--ink);text-align:left}
.setting .icon{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:var(--mint);color:var(--green);font-size:18px}
.setting div:nth-child(2){flex:1}
.setting h3{margin:0;font-size:13px}
.setting p{margin:3px 0 0;color:var(--muted);font-size:9px}
.setting .go{color:var(--green);font-weight:900}
.data-summary{padding:14px;border:1px solid #d6e2de;border-radius:17px;background:#fff}
.data-summary h2{margin:0 0 5px;font-size:17px}
.data-summary>p{margin:0;color:var(--muted);font-size:10px;line-height:1.5}
.data-rows{display:grid;gap:8px;margin-top:12px}
.data-row{display:flex;align-items:center;justify-content:space-between;padding:11px;border-radius:12px;background:#f0f5f2}
.data-row span{font-size:10px;color:#62746f}
.data-row b{font-size:13px}
.privacy-note{margin-top:10px;padding:11px 12px;border-radius:13px;background:#edf4f1;color:#526c65;font-size:10px;line-height:1.55}
.privacy-note strong{display:block;margin-bottom:3px;color:var(--green)}
.consent-hero{padding:15px;border-radius:17px;background:linear-gradient(145deg,#e0f3ed,#f8fbf9)}
.consent-hero h2{margin:0;font-size:19px}
.consent-hero p{margin:6px 0 0;color:#58716a;font-size:10px;line-height:1.55}
.choice{display:flex;gap:10px;margin-top:10px;padding:13px;border:1px solid #d8e3df;border-radius:15px;background:#fff}
.choice input{width:20px;height:20px;flex:0 0 auto;accent-color:var(--green)}
.choice h3{margin:0;font-size:13px}
.choice p{margin:5px 0 0;color:var(--muted);font-size:9px;line-height:1.5}
.choice.disabled{opacity:.48}
.privacy-boundary{margin-top:11px;padding:12px;border:1px solid #e1e7e4;border-radius:14px;background:#fff}
.privacy-boundary h3{margin:0 0 7px;font-size:12px}
.privacy-boundary p{margin:5px 0;color:#62736f;font-size:9px;line-height:1.5}
.privacy-boundary p:before{content:"✓";margin-right:6px;color:var(--green);font-weight:900}

/* ---------- 登录/注册屏（auth）—— 标准手机验证码登录样式 ---------- */
.screen[data-module="auth"]{background:#fff}
.auth-head{display:flex;align-items:center;gap:8px;padding:14px 16px 0;position:relative}
.auth-head h1{flex:1;text-align:center;font-size:17px;color:var(--ink);margin:0}
.auth-head .back{width:34px;height:34px;border:0;background:transparent;color:var(--ink);font-size:20px;cursor:pointer}
.auth-content{padding:10px 28px 40px}
.auth-sub{margin:34px 0 26px;color:var(--muted);font-size:13px;line-height:1.6}
.auth-form{width:100%}
/* 标准表单：下划线式输入框，行内右侧放验证码按钮 */
.field{margin-bottom:8px}
.field>span{display:block;margin:14px 0 6px;color:#999;font-size:13px}
.phone-row{display:flex;align-items:center;border-bottom:1px solid #e5e5e5;padding:10px 0}
.phone-row:focus-within{border-bottom-color:var(--green)}
.phone-prefix{color:#333;font-size:16px;margin-right:8px;white-space:nowrap}
.phone-row input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:17px;color:var(--ink);padding:0}
.phone-row input::placeholder{color:#c2c2c2}
.code-row{display:flex;align-items:center;border-bottom:1px solid #e5e5e5;padding:10px 0}
.code-row:focus-within{border-bottom-color:var(--green)}
.code-row input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:17px;color:var(--ink);padding:0;letter-spacing:2px}
.code-row input::placeholder{color:#c2c2c2}
.code-btn{flex:0 0 auto;border:0;background:transparent;color:var(--green);font-size:14px;font-weight:600;padding:0 0 0 12px;cursor:pointer;white-space:nowrap}
.code-btn:disabled{color:#c2c2c2}
.auth-submit{margin-top:36px;height:50px;border-radius:25px;font-size:16px;background:var(--green);color:#fff;border:0;width:100%;font-weight:600;cursor:pointer}
.auth-submit:disabled{background:#c8d6d1;cursor:not-allowed}
.auth-tip{margin:20px 0 0;color:#b0b0b0;font-size:11px;line-height:1.6;text-align:center}

/* ---------- 我的页账号区（M1） ---------- */
.me-account{display:flex;align-items:center;gap:13px;padding:16px 2px;margin-bottom:6px}
.me-avatar{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:var(--green);color:#fff;font-size:22px;font-weight:900;box-shadow:0 10px 22px rgba(8,127,101,.2)}
.me-account-text b{font-size:15px;color:var(--ink)}
.me-account-text .me-desc{margin:4px 0 0;color:var(--muted);font-size:10px}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:75px;z-index:30;transform:translateX(-50%) translateY(12px);padding:9px 14px;border-radius:999px;background:#173d35;color:#fff;font-size:10px;opacity:0;pointer-events:none;transition:.2s}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}


/* ---------- 桌面响应式（≥720px）：tabbar 转顶部导航、宽屏内容、多列 ---------- */
@media (min-width:720px){
  body{background:#efece3}
  .screen{max-width:960px;margin:0 auto;min-height:100vh;box-shadow:0 0 44px rgba(18,59,52,.12)}
  .tabbar{order:-2;position:sticky;top:0;z-index:6;height:56px;flex:0 0 56px;border-top:0;border-bottom:1px solid #d8e1dd}
  .appbar{order:-1;position:sticky;top:56px;z-index:5;background:rgba(246,243,234,.96);backdrop-filter:blur(6px)}
  .thumb-grid{grid-template-columns:repeat(4,1fr)}
  .record-list{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  .issue-list{grid-template-columns:repeat(2,1fr)}
  .content{padding:22px 26px 30px}
  .dock{max-width:960px;margin:0 auto;width:100%}

  /* 首页 A1：放大案例卡与文案（mobile-only 字号在宽屏上几乎看不清） */
  .eyebrow{font-size:12px}
  .display{font-size:34px;line-height:1.12}
  .scanner{height:380px}
  .scan-paper{top:62px;height:240px}
  .case-card{right:28px;width:340px;padding:14px 16px;font-size:13px;line-height:1.5}
  .case-card:before{font-size:10px;padding:3px 6px}
  .case-card.one{top:64px}
  .case-card.two{top:172px}
  .case-card.three{top:280px}
  .home-actions{margin-top:18px}
  .home-actions button{height:52px;font-size:15px}

  /* A7 沟通信息：宽屏下编辑框与四要素放大，与整体密度一致 */
  #a7-context{gap:11px;max-width:640px}
  #a7-context .context{padding:13px 15px;font-size:12px}
  #a7-context .context b{font-size:15px}
  textarea.message-edit{min-height:380px;font-size:15px;line-height:1.85}
  .edit-hint{font-size:12px;max-width:640px}
  #screen-A7 .dock .row{max-width:640px;margin:0 auto}
}

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