/* 老年友好：大字号、高对比、大按钮。基准字号 17px，按钮不低于 52px 高 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #EDEFF2;
  color: #17222B;
  font-size: 17px;
  line-height: 1.65;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; }
.view { padding: 0 0 40px; }
.hidden { display: none !important; }

/* ---- 顶栏 ---- */
.org-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
}
.org-name { font-size: 14px; color: #5B6B78; font-weight: 600; }
.ai-badge {
  font-size: 11px; color: #8A5A00; background: #FFF3D6;
  border: 1px solid #F0DCA8; border-radius: 999px; padding: 2px 10px;
}

/* ---- 进入页 ---- */
.hero { text-align: center; padding: 8px 20px 20px; }
.avatar-ring {
  position: relative; width: 148px; height: 148px; margin: 6px auto 14px;
  border-radius: 50%; padding: 5px;
  background: linear-gradient(135deg, #0E9F8A, #12836F);
}
.avatar-ring img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid #fff;
}
.ring-dot {
  position: absolute; right: 6px; bottom: 8px; width: 16px; height: 16px;
  background: #22C55E; border: 3px solid #fff; border-radius: 50%;
}
.hero h1 { font-size: 26px; margin: 0 0 6px; }
.hero .sub { margin: 0; color: #5B6B78; font-size: 15px; }

.plan-card {
  background: #fff; border-radius: 14px; margin: 0 16px 14px; padding: 6px 18px;
  box-shadow: 0 1px 4px rgba(15,40,60,.06);
}
.plan-card .row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid #F2F5F7; font-size: 15px;
}
.plan-card .row:last-child { border-bottom: 0; }
.plan-card .k { color: #8195A3; flex: none; }
.plan-card .v { font-weight: 600; text-align: right; }

.device-check { margin: 0 16px 16px; background: #fff; border-radius: 14px; padding: 14px 18px; }
.dc-title { font-size: 13px; color: #8195A3; font-weight: 600; margin-bottom: 8px; }
.dc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: #F1F5F7; color: #5B6B78;
}
.chip.ok { background: #E5F6F0; color: #0B7A5E; }
.chip.bad { background: #FDECEC; color: #B42323; }
.chip.checking { background: #FFF3D6; color: #8A5A00; }

.btn-main {
  display: block; width: calc(100% - 32px); margin: 18px 16px 0;
  height: 56px; border: 0; border-radius: 14px;
  background: #0E9F8A; color: #fff; font-size: 19px; font-weight: 700;
}
.btn-main:disabled { background: #B9C6CD; }
.btn-sub {
  display: block; width: calc(100% - 32px); margin: 12px 16px 0;
  height: 48px; border: 1.5px solid #0E9F8A; border-radius: 14px;
  background: #fff; color: #0E9F8A; font-size: 16px; font-weight: 600;
}
.foot-note { text-align: center; color: #93A5B1; font-size: 12px; padding: 14px 24px 0; margin: 0; }

/* ---- 知情同意 ---- */
.consent-card { background: #fff; border-radius: 14px; margin: 4px 16px 16px; padding: 20px 20px 8px; }
.consent-card h2 { font-size: 20px; margin: 0 0 12px; }
.c-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid #F2F5F7; font-size: 15.5px;
}
.c-item:last-child { border-bottom: 0; }
.c-item input { width: 22px; height: 22px; margin-top: 2px; accent-color: #0E9F8A; flex: none; }

/* ---- 通话页 ---- */
.view-call { min-height: 100vh; display: flex; flex-direction: column; background: #101B22; }
.call-top {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; color: #E7EEF2; font-size: 14px;
}
.rec-dot { width: 9px; height: 9px; background: #EF4444; border-radius: 50%; display: inline-block; }
.call-top .ai-badge { margin-left: auto; color: #FFD98A; background: rgba(255,255,255,.08); border-color: rgba(255,217,138,.35); }

.stage { position: relative; flex: 1; min-height: 340px; overflow: hidden; }
#avatar {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: filter .3s;
}
#avatar.muted-face { filter: grayscale(.35) brightness(.85); }
.wave {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 5px; align-items: flex-end; height: 26px;
}
.wave i { width: 5px; background: rgba(255,255,255,.85); border-radius: 3px; animation: wv 1s infinite ease-in-out; }
.wave i:nth-child(1){height:10px;animation-delay:0s}
.wave i:nth-child(2){height:18px;animation-delay:.12s}
.wave i:nth-child(3){height:26px;animation-delay:.24s}
.wave i:nth-child(4){height:18px;animation-delay:.36s}
.wave i:nth-child(5){height:10px;animation-delay:.48s}
@keyframes wv { 0%,100%{transform:scaleY(.5)} 50%{transform:scaleY(1)} }
.wave.hidden { display: none; }

.local-wrap {
  position: absolute; right: 14px; top: 14px; width: 96px; height: 128px;
  border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,.5);
  background: #000;
}
#local-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.local-label {
  position: absolute; left: 6px; bottom: 4px; font-size: 11px; color: #fff;
  background: rgba(0,0,0,.45); border-radius: 4px; padding: 0 6px;
}
.net-tip {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px;
  border-radius: 999px; padding: 5px 14px; white-space: nowrap;
}

.subtitle-panel {
  background: #fff; padding: 16px 18px 18px; border-radius: 18px 18px 0 0;
  margin-top: -18px; position: relative; z-index: 2; max-height: 44vh; overflow-y: auto;
}
.subtitle { font-size: 19px; line-height: 1.6; min-height: 60px; font-weight: 500; }

#answer-area { margin-top: 14px; }
.opt-grid { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  height: 52px; border: 1.5px solid #C8D6DC; border-radius: 12px;
  background: #F7FAFB; font-size: 17px; color: #17222B; font-weight: 600;
}
.opt-btn:active { background: #E3F1ED; border-color: #0E9F8A; }
.text-row { display: flex; gap: 10px; }
.text-input {
  flex: 1; height: 52px; border: 1.5px solid #C8D6DC; border-radius: 12px;
  font-size: 17px; padding: 0 14px; background: #fff;
}
.photo-actions { display: flex; gap: 10px; }
.skip-link { margin-top: 10px; font-size: 14px; color: #5B6B78; text-decoration: underline; text-align: center; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 6px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #E0E8EC; }

.call-ctrl {
  display: flex; justify-content: center; gap: 18px;
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  background: #fff;
}
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 76px; height: 60px; border: 0; border-radius: 14px;
  background: #F1F5F7; color: #33424D; font-size: 11px;
}
.ctrl-btn .ctrl-ico { font-size: 21px; position: relative; display: inline-block; line-height: 1; }
.ctrl-btn.off { background: #FDECEC; color: #B42323; }
.ctrl-btn.hangup { background: #E02D2D; color: #fff; width: 88px; }

/* 麦克风电平：说话时上下跳，让「麦克风在工作」这件事看得见 */
.mic-level {
  position: absolute; right: -7px; bottom: 0;
  width: 4px; height: 13px; border-radius: 2px;
  background: #16A36B; transform-origin: bottom center;
  transform: scaleY(0.08); opacity: .3;
  transition: transform .09s linear, opacity .18s;
}
.ctrl-btn.off .mic-level { background: #B42323; }

/* 拍照引导 + 重拍 */
.photo-tip { font-size: 14px; color: #5B6B78; line-height: 1.55; margin-bottom: 9px; }
.thumbs { align-items: center; }
.thumbs .retake { font-size: 13px; color: #5B6B78; text-decoration: underline; margin-left: 6px; }
.thumbs .shot-ok { font-size: 13px; color: #0E9F8A; font-weight: 600; margin-left: 2px; }
.voice-note { font-size: 12.5px; color: #8A9AA6; margin-top: 6px; line-height: 1.45; }

/* 轻提示：只说一句就消失，不打断通话 */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  max-width: 84vw; padding: 10px 16px; border-radius: 10px;
  background: rgba(23, 38, 47, .92); color: #fff;
  font-size: 13.5px; line-height: 1.5; text-align: center;
  opacity: 0; animation: toast-in .22s ease forwards; z-index: 80;
}
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }

/* ---- 小结页 ---- */
.sum-card { background: #fff; border-radius: 14px; margin: 4px 16px 14px; padding: 18px 20px; }
.sum-card h3 { margin: 0 0 10px; font-size: 16px; color: #5B6B78; font-weight: 600; }
.sum-meta { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pill { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #F1F5F7; color: #47586A; }
.pill.red { background: #FDECEC; color: #B42323; font-weight: 700; }
.pill.yellow { background: #FFF3D6; color: #8A5A00; font-weight: 700; }
.pill.green { background: #E5F6F0; color: #0B7A5E; font-weight: 700; }
.card-item { border-left: 4px solid #ccc; padding: 10px 14px; margin: 10px 0; background: #FAFCFD; border-radius: 0 10px 10px 0; }
.card-item.red { border-color: #E02D2D; }
.card-item.yellow { border-color: #E8A400; }
.card-item.green { border-color: #0E9F8A; }
.card-item .t { font-weight: 700; font-size: 15.5px; }
.card-item.red .t { color: #B42323; }
.card-item.yellow .t { color: #8A5A00; }
.card-item.green .t { color: #0B7A5E; }
.card-item .d { font-size: 14px; color: #5B6B78; margin: 2px 0; }
.card-item .a { font-size: 14px; margin-top: 4px; }
.card-item .a b { color: #0E9F8A; }
.obs-list { margin: 0; padding-left: 18px; font-size: 14.5px; color: #33424D; }
.obs-list li { margin: 4px 0; }
.frame-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.frame-grid img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; border: 1px solid #E0E8EC; }
.sum-note { font-size: 12px; color: #93A5B1; padding: 0 20px; }

.warn-box { background: #fff; border-radius: 14px; margin: 4px 16px 16px; padding: 20px; }
.warn-box h2 { font-size: 20px; margin: 0 0 10px; }
.warn-box p { font-size: 15px; color: #47586A; margin: 8px 0; }
.unsup-alt { background: #F7FAFB; border-radius: 10px; padding: 12px 14px; }
