/* 乡信链 · 农户端 H5 —— 面向县域中老年用户：大字号、高对比、少术语 */
:root{
  --green:#1B7F3B; --green-deep:#14622D; --green-soft:#E8F5EC;
  --orange:#E8890C; --orange-soft:#FDF3E3;
  --red:#D64545;
  --blue:#2B6CB0; --blue-soft:#EAF2FA;
  --ink:#1F2937; --muted:#5B6B5E; --line:#E3E8E0;
  --bg:#F4F7F1; --card:#FFFFFF;
  --mono:"JetBrains Mono","SFMono-Regular",Consolas,"Roboto Mono",monospace;
  --radius:14px;
  --ease-out:cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic:cubic-bezier(0.34, 1.56, 0.64, 1);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
/* hidden 必须盖过组件的 display，否则 display:flex 的元素藏不住 */
[hidden]{display:none !important}
html{font-size:17px}
body{
  font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  background:#DDE4D8; color:var(--ink); line-height:1.55;
}
#app{
  max-width:480px; margin:0 auto; min-height:100vh;
  background:var(--bg); display:flex; flex-direction:column;
  box-shadow:0 0 24px rgba(0,0,0,.08);
}

/* ---------- 顶栏 ---------- */
#topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; gap:10px;
  padding:calc(12px + env(safe-area-inset-top)) 16px 12px;
  background:var(--green); color:#fff;
}
.icon-btn{background:none;border:none;color:#fff;display:flex;align-items:center;cursor:pointer}
.brand{display:flex;align-items:center;gap:8px;flex:1}
.logo{
  width:34px;height:34px;border-radius:10px;background:#fff;color:var(--green);
  display:grid;place-items:center;font-weight:700;font-size:18px;
}
.brand-text{display:flex;flex-direction:column;line-height:1.2}
.brand-text b{font-size:17px}
.brand-text small{font-size:12px;opacity:.85}
.who{
  font-size:15px;opacity:.95;
  max-width:5.6em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  background:none;border:none;color:#fff;font-family:inherit;cursor:pointer;
  padding:6px 2px;text-decoration:underline;text-underline-offset:3px;
  text-decoration-color:rgba(255,255,255,.45);
}

/* ---------- 语音开关 ---------- */
.voice-toggle{
  display:flex;align-items:center;gap:4px;
  min-height:34px;padding:5px 10px;margin-right:2px;
  border:1.5px solid rgba(255,255,255,.55);border-radius:999px;
  background:transparent;color:#fff;font:inherit;font-size:13px;
  cursor:pointer;
}
.voice-toggle[aria-pressed="true"]{
  background:#fff;color:var(--green-deep);border-color:#fff;
}
html.voice-mode .voice-toggle{min-height:42px;font-size:15px;padding:6px 12px}

/* ---------- 页面切换 ---------- */
#pages{flex:1;padding:16px 16px 90px}
.page{display:none;animation:fade .18s ease}
.page.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- 通用卡片 ---------- */
.card{
  background:var(--card); border-radius:var(--radius);
  padding:18px 16px; margin-bottom:14px;
  box-shadow:0 1px 3px rgba(31,41,55,.06);
}
/* 级联入场：采用 stacked-data-cards 的 ease-out 与 stagger 节奏 */
html.js-anim .reveal{
  opacity:0; translate:0 12px;
  transition:opacity .3s ease, translate .38s var(--ease-out);
  transition-delay:calc(var(--i, 0) * 45ms);
}
html.js-anim .reveal.is-in{opacity:1; translate:0 0}
.muted{color:var(--muted)}
.small{font-size:14px}
.sec-title{font-size:16px;margin:18px 4px 8px;color:var(--green-deep)}
h2{font-size:18px;margin-bottom:6px}
.demo-tip{font-size:13px;color:var(--muted);text-align:center;margin-top:10px}

/* ---------- 首页 ---------- */
.hero{display:flex;align-items:center;justify-content:space-between}
.hero h1{font-size:20px}
.greet-badge{
  background:var(--green-soft);color:var(--green-deep);
  font-size:14px;font-weight:600;padding:6px 12px;border-radius:999px;white-space:nowrap;
}
html.js-anim .greet.is-in .greet-badge{animation:pop .5s var(--ease-elastic) .3s both}
@keyframes pop{from{opacity:0;transform:scale(.78)}to{opacity:1;transform:scale(1)}}
.score-card{display:flex;align-items:center;gap:16px}
.ring-wrap{position:relative;flex:0 0 auto;width:118px;height:118px}
.ring-wrap::after{
  content:"";position:absolute;inset:-7px;border-radius:50%;
  border:1px dashed rgba(27,127,59,.24);pointer-events:none;
}
#scoreNum,.ring-inner b,.score-line b,.count-up{font-family:var(--mono);letter-spacing:-.3px}
.gauge{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.gauge-track{fill:none;stroke:var(--line);stroke-width:9}
.gauge-progress{
  fill:none;stroke:url(#gaugeGrad);stroke-width:9;stroke-linecap:round;
  stroke-dasharray:326.7;stroke-dashoffset:var(--gauge-offset,71.9);
  transition:stroke-dashoffset 1.25s var(--ease-out) .25s;
}
html.js-anim .score-card .gauge-progress{stroke-dashoffset:326.7}
html.js-anim .score-card.is-in .gauge-progress{stroke-dashoffset:var(--gauge-offset,71.9)}
.ring-inner{
  position:absolute;inset:13px;border-radius:50%;background:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.ring-inner b{font-size:32px;color:var(--green-deep);line-height:1.1;font-variant-numeric:tabular-nums}
.ring-inner small{font-size:13px;color:var(--muted)}
.score-info{flex:1;min-width:0}
.score-line{
  display:flex;justify-content:space-between;align-items:baseline;gap:8px;
  font-size:14px;color:var(--muted);padding:2px 0;
}
.score-line b{font-size:18px;color:var(--green-deep);white-space:nowrap}
.score-note{font-size:13px;color:var(--muted);line-height:1.5;margin-top:4px}
.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.quick{
  border:none;text-align:left;cursor:pointer;font:inherit;color:var(--ink);
  display:flex;flex-direction:column;gap:2px;padding:14px;
}
.quick:active{transform:scale(.97)}
.q-ico{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  font-size:17px;margin-bottom:6px;
}
.q-ico.green{background:var(--green-soft);color:var(--green-deep)}
.q-ico.blue{background:var(--blue-soft);color:var(--blue)}
.q-ico.orange{background:var(--orange-soft);color:var(--orange)}
.q-ico.gray{background:#EFF1EE;color:var(--muted)}
.quick span:not(.q-ico){font-size:16px;font-weight:600}
.quick small{font-size:13px;color:var(--muted)}
.notice b{display:block;margin-bottom:4px;font-size:15px}
.notice p{font-size:14px}

/* ---------- 优势报告 ---------- */
.verdict h2{color:var(--green-deep)}
.verdict-text{font-size:17px;margin:6px 0 10px}
.verdict-text b{color:var(--green)}
.verdict-meta{
  display:grid;grid-template-columns:1fr 1fr;gap:8px 0;
  border-top:1px solid var(--line);margin-top:12px;padding-top:10px;
}
.verdict-meta div{padding:2px 12px;border-left:1px solid var(--line)}
.verdict-meta div:nth-child(odd){padding-left:0;border-left:none}
.verdict-meta div:nth-child(n+3){border-top:1px solid var(--line);padding-top:10px;margin-top:2px}
.verdict-meta span{display:block;font-size:13px;color:var(--muted)}
.verdict-meta b{font-size:17px;color:var(--green-deep);white-space:nowrap}
.list-card{padding:6px 16px}
.strengths,.improve,.msgs,.consents{list-style:none}
.strengths li,.improve li{padding:14px 0;border-bottom:1px solid var(--line)}
.strengths li:last-child,.improve li:last-child{border-bottom:none}
.st-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.st-head b{font-size:16px}
.plus{color:var(--green);font-weight:700;font-size:15px;white-space:nowrap}
.minus{color:var(--red);font-weight:700;font-size:15px;margin-left:8px}
.strengths p{font-size:14px;margin:4px 0 6px}
.evid{
  display:inline-block;font-size:13px;color:var(--green-deep);
  background:var(--green-soft);padding:3px 10px;border-radius:999px;
}
.improve li{padding:14px 0;border-bottom:1px solid var(--line);font-size:16px}
.improve p{margin-top:4px;font-size:14px}
.collapse-head{
  width:100%;min-height:44px;display:flex;justify-content:space-between;align-items:center;
  background:none;border:none;font:inherit;font-size:16px;cursor:pointer;color:var(--ink);
}
.chev{transition:transform .2s;font-size:18px;color:var(--muted)}
.collapse.open .chev{transform:rotate(180deg)}
.collapse-body{margin-top:12px}
.sc-table{width:100%;border-collapse:collapse;font-size:15px}
.sc-table td{padding:9px 4px;border-bottom:1px solid var(--line)}
.sc-table td:last-child{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.sc-table .total td{border-bottom:none;padding-top:12px;color:var(--green-deep)}
.sc-note{color:var(--muted);font-weight:400;font-size:13px;margin-left:6px}

/* ---------- 表单 ---------- */
.lead{margin-bottom:16px;font-size:15px}
.form .field-extra[hidden]{display:none}
.form .field-extra{animation:fade .2s ease}
.hint{display:block;margin-top:6px;font-size:13px;font-weight:400;color:var(--muted);line-height:1.45}
.form label,.form fieldset{display:block;margin-bottom:14px;font-size:15px;font-weight:600}

/* 省 / 市 / 区县 三级联动 */
.region{display:block;margin-bottom:14px;font-size:15px;font-weight:600}
.region-label{display:block;margin-bottom:6px}
.region-row{display:flex;gap:8px;margin-bottom:8px}
.region-row select{flex:1;min-width:0;width:auto;margin-top:0}
.region-row select:disabled{opacity:.5;background:#F2F4F1}
.region input[type=text]{margin-top:0}
.form input[type=number],.form input[type=text],.form input[type=tel],.form select{
  width:100%;margin-top:6px;padding:12px 14px;font-size:16px;font-weight:400;
  border:1.5px solid var(--line);border-radius:10px;background:#FBFCFA;color:var(--ink);
}
.form input:focus,.form select:focus{outline:none;border-color:var(--green)}
.form input[type=tel]{letter-spacing:.02em}
.form fieldset{border:none}
.form legend{font-size:15px;font-weight:600;margin-bottom:6px}
.radio{display:flex;align-items:center;gap:8px;font-weight:400;font-size:16px;margin:0;padding:8px 0;min-height:44px}
.radio input{width:20px;height:20px;accent-color:var(--green)}
.btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;min-height:48px;padding:14px;font-size:17px;font-weight:600;font-family:inherit;
  border-radius:12px;border:none;cursor:pointer;
}
.btn.primary{background:var(--green);color:#fff}
.btn.primary:active{background:var(--green-deep)}
.btn:disabled{opacity:.55;cursor:default}
.btn.primary.sm{font-size:15px;padding:10px;margin-top:10px}
.btn.dashed{
  background:#FBFCFA;border:2px dashed var(--green);color:var(--green-deep);
}
.upload-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.upload-actions .btn{padding:12px 8px;font-size:16px}
@media (max-width:340px){.upload-actions{grid-template-columns:1fr}}
.ocr{margin-top:14px;background:#FBFCFA;border:1px solid var(--line);border-radius:12px;padding:14px}
.ocr-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:6px}
.ocr-head b{font-size:16px}

/* 分析中 */
.ocr-loading{display:flex;align-items:center;gap:10px;padding:10px 0;color:var(--muted);font-size:15px}
.spinner{
  width:20px;height:20px;flex:0 0 auto;border-radius:50%;
  border:2.5px solid var(--line);border-top-color:var(--green);
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* 记录列表 */
.rec{padding:11px 0;border-bottom:1px dashed var(--line)}
.rec:first-child{padding-top:0}
.rec:last-of-type{border-bottom:none}
.rec-main{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.rec-main b{font-size:16px;font-weight:600}
.amt{font-size:16px;font-weight:700;color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.amt.in{color:var(--green-deep)}
.rec-sub{font-size:13px;color:var(--muted);margin-top:2px}
.chip{
  display:inline-block;font-size:12px;padding:1px 8px;border-radius:999px;
  background:#EFF1EE;color:var(--muted);margin-left:6px;vertical-align:1px;
}
.chip.debt{background:var(--orange-soft);color:var(--orange)}
.chip.done{background:var(--green-soft);color:var(--green-deep)}

/* 合计与结论 */
.ocr-total{
  display:flex;flex-wrap:wrap;gap:6px 16px;
  margin-top:10px;padding-top:10px;border-top:1px solid var(--line);
  font-size:14px;color:var(--muted);
}
.ocr-total span{white-space:nowrap}
.ocr-total b{color:var(--ink);font-variant-numeric:tabular-nums}
.ocr-summary{
  margin-top:12px;padding:10px 12px;border-radius:10px;
  background:var(--green-soft);color:var(--green-deep);font-size:14px;line-height:1.5;
}
.ocr-warn{
  margin-top:10px;padding:10px 12px;border-radius:10px;
  background:var(--orange-soft);color:#8A5A00;font-size:13.5px;line-height:1.5;
}
.ocr-warn ul{list-style:none;margin-top:4px}
.ocr-warn li{padding:2px 0 2px 14px;position:relative}
.ocr-warn li::before{content:"·";position:absolute;left:4px;font-weight:700}
.ocr-err{margin:8px 0 4px;color:var(--red);font-size:14.5px;line-height:1.5}
.ocr-actions{display:flex;align-items:center;gap:12px;margin-top:12px}
.ocr-actions .btn{flex:1}
.ocr-actions .btn.sm{margin-top:0}
.link-btn{
  background:none;border:none;padding:10px 0;font:inherit;font-size:15px;
  color:var(--green);text-decoration:underline;cursor:pointer;white-space:nowrap;
}
.link-btn:disabled{color:var(--muted);text-decoration:none;cursor:default}
.ocr-note{margin-top:8px;font-size:12.5px;color:var(--muted);line-height:1.5}

/* ---------- 标签 ---------- */
.tag{
  font-size:13px;font-weight:600;padding:3px 10px;border-radius:999px;
  background:#EFF1EE;color:var(--muted);white-space:nowrap;
}
.tag.good{background:var(--green-soft);color:var(--green-deep)}
.tag.warn{background:var(--orange-soft);color:var(--orange)}

/* ---------- 消息 ---------- */
.msgs{list-style:none}
.msg{padding:15px 0;border-bottom:1px solid var(--line)}
.msg:last-child{border-bottom:none}
.msg.unread b::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--red);margin-right:7px;vertical-align:middle}
.msg-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.msg time{font-size:13px;color:var(--muted)}
.msg b{font-size:16px}
.msg p{font-size:14px;margin-top:4px}
.msg a{color:var(--green);font-weight:600;text-decoration:none}
.msg.read{opacity:.6}

/* ---------- 授权 ---------- */
.consents li{
  display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;
  align-items:center;gap:2px 12px;
  padding:14px 0;border-bottom:1px solid var(--line);
}
.consents li:last-child{border-bottom:none}
.consents b{grid-column:1;grid-row:1;font-size:16px}
.consents .muted{grid-column:1;grid-row:2;font-size:13px;line-height:1.45;min-width:0}
.nowrap{white-space:nowrap}
.switch{position:relative;grid-column:2;grid-row:1 / span 2;width:52px;height:44px}
.switch input{
  position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:2;
}
.switch span{
  position:absolute;left:0;right:0;top:7px;height:30px;border-radius:999px;
  background:var(--green);transition:background .2s;
}
.switch span::before{
  content:"";position:absolute;width:24px;height:24px;border-radius:50%;
  background:#fff;top:3px;right:3px;transition:right .2s;box-shadow:0 1px 2px rgba(0,0,0,.2);
}
.switch input:not(:checked)+span{background:var(--line)}
.switch input:not(:checked)+span::before{right:25px}

/* ---------- 底部导航 ---------- */
#tabbar{
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);
  width:100%;max-width:480px;z-index:20;
  display:flex;background:#fff;border-top:1px solid var(--line);
  padding:6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tab{
  flex:1;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:none;border:none;cursor:pointer;color:var(--muted);
  font-size:14px;font-family:inherit;position:relative;padding:4px 0;
}
.tab svg{width:25px;height:25px}
.tab.active{color:var(--green)}
.dot{
  position:absolute;top:4px;right:calc(50% - 20px);
  width:9px;height:9px;border-radius:50%;background:var(--red);
}
.dot[hidden]{display:none}

/* ---------- 语音模式 ---------- */
#voiceBar{
  position:fixed;left:50%;transform:translateX(-50%);
  width:100%;max-width:480px;z-index:22;
  bottom:calc(64px + env(safe-area-inset-bottom));
  padding:0 16px 8px;pointer-events:none;
  display:flex;gap:8px;align-items:stretch;
}
html.voice-mode #voiceBar{bottom:calc(72px + env(safe-area-inset-bottom))}
#replayBtn{
  pointer-events:auto;flex:1;min-width:0;min-height:56px;
  display:flex;align-items:center;justify-content:center;gap:8px;
  border:none;border-radius:14px;cursor:pointer;
  background:var(--green-deep);color:#fff;
  font:inherit;font-size:18px;font-weight:700;
  box-shadow:0 6px 18px rgba(20,98,45,.28);
}
#voiceNext{
  pointer-events:auto;flex:0 0 auto;min-height:56px;padding:0 16px;
  border:1.5px solid var(--green-deep);border-radius:14px;
  background:#fff;color:var(--green-deep);
  font:inherit;font-size:15px;font-weight:600;cursor:pointer;
  box-shadow:0 6px 18px rgba(20,98,45,.14);
}
#replayBtn:active{background:#0E4A21}
#replayBtn.playing{background:var(--green)}
html.voice-mode #pages{padding-bottom:170px}

/* 文字放大：只放大正文与按钮，标题不失控 */
html.voice-mode .muted,
html.voice-mode .small,
html.voice-mode .score-note,
html.voice-mode .score-line,
html.voice-mode .quick small,
html.voice-mode .notice p,
html.voice-mode .strengths p,
html.voice-mode .improve p,
html.voice-mode .msg p,
html.voice-mode .rec-sub,
html.voice-mode .ocr-total,
html.voice-mode .ocr-summary,
html.voice-mode .consents .muted,
html.voice-mode .form input,
html.voice-mode .form select,
html.voice-mode .radio{font-size:16.5px;line-height:1.6}
html.voice-mode .evid,
html.voice-mode .chip,
html.voice-mode .hint,
html.voice-mode .ocr-note,
html.voice-mode .ocr-warn,
html.voice-mode .verdict-meta span,
html.voice-mode .msg time,
html.voice-mode .st-head b{font-size:15px}
html.voice-mode .verdict-meta b{font-size:19px}
html.voice-mode h2,
html.voice-mode .ocr-head b{font-size:21px}
html.voice-mode .sec-title{font-size:19px}
html.voice-mode .quick span:not(.q-ico){font-size:19px}
html.voice-mode .quick{padding:16px}
html.voice-mode .q-ico{width:40px;height:40px;border-radius:12px}
html.voice-mode .q-ico svg{width:24px;height:24px}
html.voice-mode .btn{font-size:19px;min-height:58px}
html.voice-mode .card{padding:22px 18px}
html.voice-mode .switch{width:60px;height:52px}
html.voice-mode .switch span{top:9px;height:34px}
html.voice-mode .switch span::before{width:28px;height:28px}
html.voice-mode .switch input:not(:checked)+span::before{right:29px}
html.voice-mode .tab{font-size:15px;min-height:56px}
html.voice-mode .tab svg{width:28px;height:28px}

/* 输入框旁的说话按钮 */
.input-row{position:relative}
.form .input-row > input{margin-top:6px;padding-right:78px}
.mic-btn{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  display:flex;align-items:center;gap:4px;
  min-height:40px;padding:0 10px;
  border:1.5px solid var(--green);border-radius:9px;
  background:var(--green-soft);color:var(--green-deep);
  font:inherit;font-size:14px;font-weight:600;cursor:pointer;
}
.mic-btn svg{width:17px;height:17px}
.mic-btn:disabled{opacity:.6;cursor:default}
.mic-btn.listening{
  background:var(--red);border-color:var(--red);color:#fff;
  animation:pulse 1.1s ease-in-out infinite;
}
@keyframes pulse{50%{opacity:.62}}
html.voice-mode .mic-btn{min-height:46px;font-size:15px;padding:0 12px}

/* ---------- AI 客服 ---------- */
.chat-head{display:flex;align-items:center;gap:12px}
.chat-avatar{
  width:44px;height:44px;flex:0 0 auto;border-radius:50%;
  background:var(--green);color:#fff;
  display:grid;place-items:center;font-size:19px;font-weight:700;
}
.chat-who{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.chat-who b{font-size:17px}
.chat-who small{font-size:13px;color:var(--muted)}

.chat-log{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.bubble{
  max-width:86%;padding:11px 14px;border-radius:14px;
  font-size:16px;line-height:1.6;white-space:pre-wrap;word-break:break-word;
}
.bubble.bot{
  align-self:flex-start;background:#fff;border:1px solid var(--line);
  border-bottom-left-radius:5px;
}
.bubble.me{
  align-self:flex-end;background:var(--green);color:#fff;
  border-bottom-right-radius:5px;
}
.bubble.typing{color:var(--muted)}
.bubble.err{
  background:var(--orange-soft);border-color:#EFD3A6;color:#8A5A00;
}

.chat-quick{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.chat-quick button{
  background:#fff;border:1.5px solid var(--line);border-radius:999px;
  padding:8px 14px;font:inherit;font-size:14px;color:var(--ink);cursor:pointer;
}
.chat-quick button:active{background:var(--green-soft);border-color:var(--green)}

.chat-input{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:6px 6px 6px 12px;margin-bottom:6px;
}
.chat-input input{
  flex:1;min-width:0;border:none;background:none;outline:none;
  font:inherit;font-size:16px;color:var(--ink);padding:10px 0;
}
.chat-input input::placeholder{color:var(--muted)}
.chat-send{
  flex:0 0 auto;min-height:44px;padding:0 18px;
  border:none;border-radius:10px;background:var(--green);color:#fff;
  font:inherit;font-size:16px;font-weight:600;cursor:pointer;
}
.chat-send:active{background:var(--green-deep)}
.chat-send:disabled{opacity:.5;cursor:default}
.chat-mic{position:static;right:auto;top:auto;transform:none;min-height:44px}

html.voice-mode .bubble{font-size:17.5px;max-width:92%}
html.voice-mode .chat-quick button{font-size:15.5px;padding:10px 16px}
html.voice-mode .chat-input input{font-size:17px}

/* ---------- Toast ---------- */
#toast{
  position:fixed;left:50%;bottom:110px;transform:translateX(-50%);z-index:80;
  background:rgba(31,41,55,.92);color:#fff;font-size:15px;
  padding:12px 20px;border-radius:999px;max-width:86%;text-align:center;
  animation:fade .2s ease;
}

/* ---------- 可见焦点与动效偏好 ---------- */
.q-ico svg{display:block}
:where(button,a,select,input):focus-visible{
  outline:3px solid #0B5A2B;outline-offset:2px;
}
#topbar :focus-visible{outline-color:#fff}
.form input:focus-visible,.form select:focus-visible{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(27,127,59,.18)}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  html.js-anim .reveal{opacity:1;translate:none;transition:none}
  html.js-anim .score-card .gauge-progress{stroke-dashoffset:var(--gauge-offset,71.9)}
  html.js-anim .greet.is-in .greet-badge{animation:none}
  .spinner{animation:none;border-top-color:var(--line);border-left-color:var(--green)}
}

/* ---------- 地块测量（全屏） ---------- */
.land-full{position:fixed;inset:0;z-index:70;background:#0C1710;display:flex;flex-direction:column}
.land-full[hidden]{display:none}
.lf-top{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top));color:#fff;
}
.lf-top b{font-size:16px;letter-spacing:.5px}
.lf-top button{
  background:rgba(255,255,255,.14);color:#fff;border:none;border-radius:999px;
  padding:8px 16px;font:inherit;font-size:14px;font-weight:600;
}
.lf-stage{flex:1;position:relative;min-height:0}
.lf-stage canvas{width:100%;height:100%;display:block;touch-action:none}
.lf-sheet{
  background:#fff;border-radius:18px 18px 0 0;padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -10px 30px rgba(0,0,0,.28);max-height:48vh;overflow:auto;
}
.lf-methods{
  display:grid;grid-template-columns:repeat(4,1fr);gap:5px;
  background:#EEF2EC;border-radius:10px;padding:4px;margin-bottom:10px;
}
.lf-methods button{
  border:none;background:transparent;color:var(--muted);font:inherit;
  font-size:13.5px;font-weight:600;padding:8px 2px;border-radius:8px;
}
.lf-methods button.active{background:#fff;color:var(--green-deep);box-shadow:0 1px 4px rgba(20,40,20,.08)}
.lf-panel[hidden]{display:none}
.lf-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.lf-row-gap{margin-top:8px}
.lf-row label{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}
.lf-row input{
  width:68px;height:38px;border:1px solid var(--line);border-radius:8px;
  padding:0 8px;font:inherit;font-size:15px;text-align:center;color:var(--ink);background:#fff;
}
.lf-btn{
  border:1.5px solid var(--line);background:#fff;color:var(--ink);
  border-radius:9px;padding:9px 12px;font:inherit;font-size:13.5px;font-weight:600;
}
.lf-btn.primary{background:var(--green);border-color:var(--green);color:#fff}
.lf-tip{margin-top:8px;font-size:11.5px;color:var(--muted);line-height:1.5}
.lf-note{
  margin-top:7px;font-size:10.8px;color:#7A6A45;line-height:1.55;
  background:#FBF6EA;border:1px solid #EFE3C8;border-radius:8px;padding:7px 9px;
}
.lf-perm{
  margin-top:10px;background:#FFF8E8;border:1px solid #EFD9AE;
  border-radius:10px;padding:10px;
}
.lf-perm[hidden]{display:none}
.lf-perm b{font-size:13px;color:#8A5A12}
.lf-perm p{margin:5px 0 8px;font-size:11.5px;color:#7A6A45;line-height:1.55}
.lf-gps-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}
.lf-auth{
  display:grid;grid-template-columns:auto 1fr;gap:3px 8px;align-items:baseline;
  background:#F6F9F4;border:1px solid #E2EBE2;border-radius:9px;
  padding:8px 10px;margin-bottom:9px;
}
.lf-auth span{font-size:10.5px;color:var(--muted)}
.lf-auth b{font-size:12.5px;color:var(--green-deep)}
.lf-auth small{grid-column:1/-1;font-size:10.5px;color:var(--muted);line-height:1.5}
.lf-gps-stats div{background:#F5F8F3;border-radius:9px;padding:8px}
.lf-gps-stats span{display:block;font-size:10.5px;color:var(--muted)}
.lf-gps-stats b{display:block;font-size:15px;margin-top:1px}
.lf-result{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-top:12px;padding-top:12px;border-top:1px solid var(--line);
}
.lf-result span{display:block;font-size:11px;color:var(--muted)}
.lf-result b{font-size:28px;line-height:1.1;color:var(--green-deep);font-variant-numeric:tabular-nums}
.lf-result small{font-size:13px;color:var(--green-deep);margin-left:3px}
.lf-use{
  border:none;border-radius:10px;background:var(--green);color:#fff;
  font:inherit;font-size:15px;font-weight:700;padding:12px 18px;
}
.lf-use:active{background:var(--green-deep)}

/* 触感反馈：按下有 1px 位移，避免只有 hover */
.btn:active{transform:translateY(1px)}
.quick:active,.tab:active,.land-tab:active,.lf-btn:active,.lf-methods button:active{transform:scale(.985)}

