:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #223c34;
  background: #e7eee8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #223c34;
  --muted: #82928b;
  --green: #236c59;
  --green-dark: #164b3e;
  --green-light: #e5f2e9;
  --line: #e7ece6;
  --paper: #fffefa;
  --canvas: #f6f8f5;
  --warm: #f8f0e5;
  --orange: #bc794b;
  --shadow: 0 12px 32px rgba(28, 69, 49, .07);
}

.login-label { display:block; margin-top:28px; }
.list-card strong { display:block; margin-top:10px; }
.report-preview { margin:16px 0; padding:12px; background:var(--paper); border:1px solid var(--line); border-radius:18px; }
.report-preview img { display:block; width:100%; max-height:420px; object-fit:contain; background:white; }
.report-preview figcaption { margin-top:10px; font-size:11px; color:var(--muted); line-height:1.6; }
.report-notes { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.8; }
.form-subtitle { margin:22px 0 12px; font-size:14px; }
.results-editor { display:grid; gap:12px; margin-bottom:14px; }
.result-editor { min-width:0; display:grid; grid-template-columns:1fr 1fr; gap:12px; border:1px solid #dce6dc; border-radius:14px; padding:14px; background:white; }
.result-editor legend { color:var(--green); font-size:12px; padding:0 6px; }
.result-editor label { display:grid; gap:6px; font-size:11px; color:#6d8276; }
.result-editor .input { width:100%; min-width:0; }
.result-editor .text-btn { justify-self:start; }
.notes-input { min-height:145px; }
.confirm-check { display:flex; gap:9px; align-items:flex-start; font-size:12px; line-height:1.8; margin:22px 0 16px; color:#3d6553; }
.confirm-check input { flex-shrink:0; margin:5px 0 0; accent-color:var(--green); }
.review-actions { display:grid; gap:10px; }
.source-extraction { margin-top:20px; padding:16px; border:1px solid var(--line); border-radius:15px; background:#fff; font-size:12px; line-height:1.8; }
.source-extraction summary { cursor:pointer; color:var(--green); font-weight:700; }
.source-extraction p { overflow-wrap:anywhere; }
.record-actions, .settings-links { margin-top:20px; }
.error-notice { margin:6px 0 18px; background:#fbebe7; color:#934938; overflow-wrap:anywhere; }
.field-row .value { overflow-wrap:anywhere; }
.field-row small { display:block; margin-top:5px; }
.sheet-backdrop { position:absolute; inset:0; z-index:10; display:flex; align-items:flex-end; background:rgba(21,47,34,.24); }

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .53; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #8cc9b1; outline-offset: 2px; }
svg { flex: 0 0 auto; }

.studio { min-height: 100vh; display: flex; justify-content: center; align-items: center; gap: clamp(28px, 5vw, 88px); padding: 28px; background: radial-gradient(circle at 6% 15%, #f7f5e8 0, transparent 29%), radial-gradient(circle at 93% 87%, #d6e5dc 0, transparent 33%), #e7eee8; }
.studio-note { width: min(36vw, 350px); align-self: center; }
.studio-mark { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: var(--green-dark); border-radius: 18px; box-shadow: 0 12px 24px rgba(22, 75, 62, .15); }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.studio-note h1 { font-family: Georgia, "Songti SC", "SimSun", serif; color: #173e34; font-weight: 500; font-size: clamp(38px, 4vw, 57px); letter-spacing: -.05em; line-height: 1.32; margin: 26px 0 17px; }
.studio-note p { color: #61776b; font-size: 15px; line-height: 1.95; max-width: 310px; }
.studio-note .note-line { height: 1px; width: 80px; background: #a8c7b8; margin: 29px 0; }
.studio-note small { color: #8a9b8f; font-size: 12px; line-height: 1.8; display: block; }
.phone { position: relative; display: flex; flex-direction: column; width: min(100%, 430px); height: min(900px, calc(100vh - 56px)); min-height: 620px; overflow: hidden; border: 1px solid #dce6db; border-radius: 32px; background: var(--canvas); box-shadow: 0 35px 75px rgba(30, 65, 47, .17), 0 4px 15px rgba(30, 65, 47, .08); }
.demo-strip { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 3px 12px; background: #eaf0e8; color: #6f8175; font-size: 10px; font-weight: 650; letter-spacing: .03em; text-align: center; }
.demo-strip .dot { width: 5px; height: 5px; background: #8cae9a; border-radius: 50%; }
.topbar { display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 0 24px; background: var(--canvas); }
.brand-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--green-dark); }
.brand-name { font-size: 15px; color: #26483d; font-weight: 800; letter-spacing: .025em; }
.top-actions { margin-left: auto; display: flex; gap: 7px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; color: #395b4e; background: transparent; border: 0; border-radius: 12px; }
.icon-btn:hover, .icon-btn:focus-visible { background: #eaf0e9; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 4px 23px 105px; scrollbar-width: thin; scrollbar-color: #cddbd0 transparent; }
.screen.no-bottom { padding-bottom: 28px; }
.screen::-webkit-scrollbar { width: 4px; }
.screen::-webkit-scrollbar-thumb { background: #cddbd0; border-radius: 8px; }
.section-top { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.section-top .back { display: inline-flex; align-items: center; gap: 5px; margin-left: -11px; padding: 8px 10px; border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 13px; }
.section-top .screen-title { font-size: 15px; font-weight: 750; color: #324c40; }
.section-top .right { width: 34px; display: flex; justify-content: flex-end; }
.section-top .right button { width: 34px; height: 34px; }
.section-top .spacer { width: 34px; }
.mini-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 21px 0 17px; }
.page-heading h2 { font-family: Georgia, "Songti SC", "SimSun", serif; font-size: 26px; color: var(--green-dark); line-height: 1.35; font-weight: 650; letter-spacing: -.035em; margin: 5px 0 0; }
.page-heading p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 5px 0 0; }
.text-btn { color: var(--green); background: transparent; border: 0; font-size: 12px; font-weight: 750; white-space: nowrap; padding: 5px 0; }
.text-btn:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 100px; padding: 5px 10px; background: #ebf1eb; color: #64776a; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pill.good { background: #e1f1e7; color: #2e8066; }
.pill.warm { background: #f9eedf; color: #a56639; }
.pill.alert { background: #fbebe7; color: #ae6653; }
.subdued { color: var(--muted); }
.caption { color: #81938a; font-size: 11px; line-height: 1.6; }
.rule { height: 1px; background: var(--line); margin: 18px 0; }
.card { background: var(--paper); border: 1px solid #edf0e9; border-radius: 19px; box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.stack { display: grid; gap: 12px; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.member-card { position: relative; width: 100%; min-height: 88px; display: flex; align-items: center; gap: 14px; padding: 15px; text-align: left; border: 1px solid #dce9dc; border-radius: 19px; background: linear-gradient(110deg, #ecf4ec, #f8faf4 75%); color: var(--ink); }
.member-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 76px; height: 48px; border-radius: 50% 0 18px 0; background: rgba(175, 212, 187, .15); }
.avatar { display: grid; place-items: center; width: 47px; height: 47px; flex: 0 0 47px; border-radius: 16px; background: #d5eadb; color: #26654e; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 700; }
.avatar.plum { color: #7e678c; background: #ece5ee; }
.member-name { font-size: 17px; font-weight: 800; display: block; line-height: 1.4; }
.member-sub { color: #748b7c; font-size: 11px; display: block; margin-top: 2px; }
.member-card .chev { margin-left: auto; position: relative; z-index: 1; color: #567666; }
.pending-row { width: 100%; display: flex; align-items: center; justify-content: space-between; margin: 12px 0 0; padding: 11px 14px; border: 0; border-radius: 13px; background: #fbf4e9; color: #805c36; text-align: left; font-size: 12px; font-weight: 700; }
.pending-row .count { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; background: #eed7b5; font-size: 11px; }
.timeline-head { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 7px; }
.timeline-head h3 { color: #334f41; margin: 0; font-size: 13px; font-weight: 800; }
.timeline { position: relative; padding: 5px 0 0; }
.timeline::before { content: ""; position: absolute; left: 104px; top: 18px; bottom: 36px; width: 1px; background: #dbe7dc; }
.timeline-entry { width: 100%; display: grid; grid-template-columns: 85px 19px 1fr; gap: 10px; align-items: start; padding: 12px 0 0; border: 0; color: inherit; background: none; text-align: left; }
.timeline-date { padding-top: 8px; color: #415c4e; }
.timeline-date strong { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.03em; }
.timeline-date span { display: block; color: #91a399; font-size: 10px; margin-top: 3px; }
.timeline-point { width: 12px; height: 12px; margin: 10px auto 0; border: 3px solid var(--canvas); background: #43836a; box-shadow: 0 0 0 1px #72a98d; border-radius: 50%; position: relative; z-index: 1; }
.timeline-content { min-height: 85px; padding: 15px 14px 13px; background: var(--paper); border: 1px solid #edf1eb; border-radius: 16px; box-shadow: 0 6px 17px rgba(38, 74, 55, .045); }
.timeline-content strong { display: block; color: #304a3d; font-size: 13px; font-weight: 750; line-height: 1.55; }
.timeline-content .entry-arrow { color: #a5b7aa; margin-top: 9px; }
.timeline-entry:hover .timeline-content { border-color: #c5decb; transform: translateY(-1px); }
.gap-label { display: grid; grid-template-columns: 85px 19px 1fr; gap: 10px; align-items: center; min-height: 34px; font-size: 10px; color: #a2afa6; }
.gap-label span { grid-column: 3; display: inline-flex; justify-self: start; padding: 4px 8px; background: #eef2ed; border-radius: 8px; }
.timeline-end { margin: 22px 0 4px 114px; font-size: 11px; color: #a2afa6; }
.bottom-bar { position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; height: 88px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; padding: 11px 26px 20px; background: linear-gradient(to bottom, rgba(248,250,246,.96), #fbfcf9 38%); border-top: 1px solid #e4ebe4; }
.bottom-space { min-width: 0; }
.bottom-action { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; color: #5d7968; font-size: 10px; font-weight: 750; }
.bottom-action.ai { justify-self: end; }
.action-circle { display: grid; place-items: center; height: 38px; width: 38px; border-radius: 13px; background: #e7f0e8; color: var(--green-dark); }
.bottom-action.upload { justify-self: center; margin-top: -29px; }
.bottom-action.upload .action-circle { height: 52px; width: 52px; border-radius: 18px; background: var(--green-dark); color: white; box-shadow: 0 10px 23px rgba(21, 75, 60, .28); }

.detail-hero { padding: 18px; background: linear-gradient(135deg, #eaf3ea, #f8f5ea); border: 1px solid #dceadf; border-radius: 20px; }
.detail-hero h2 { color: var(--green-dark); font-family: Georgia, "Songti SC", "SimSun", serif; font-size: 23px; margin: 10px 0 8px; line-height: 1.35; }
.detail-hero .meta { color: #6b8274; font-size: 11px; }
.detail-hero .eyes { display: flex; gap: 7px; margin-top: 14px; }
.detail-hero .eyes button { border: 1px solid #d5e2d4; border-radius: 20px; padding: 6px 9px; background: #fffaf4a8; color: #668073; font-size: 10px; }
.detail-section { margin-top: 22px; }
.detail-section h3 { margin: 0 0 10px; font-size: 13px; color: #3c594a; }
.field-row { padding: 10px 0; display: flex; align-items: flex-start; gap: 9px; border-bottom: 1px solid #edf0ea; font-size: 12px; line-height: 1.55; }
.field-row:last-child { border-bottom: 0; }
.field-row .name { color: #829488; width: 62px; flex: 0 0 62px; }
.field-row .value { color: #365243; flex: 1; }
.field-row .pill { align-self: flex-start; }
.med-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.med-row:last-child { border: 0; }
.med-row strong { color: #2e483a; font-size: 12px; }
.med-row p { color: #859489; font-size: 11px; margin: 4px 0 8px; line-height: 1.55; }
.doc-row { width: 100%; display: flex; align-items: center; gap: 10px; color: #42614e; background: transparent; font-size: 12px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border: 0; }
.doc-icon { width: 31px; height: 34px; display: grid; place-items: center; background: #e9f2e9; color: #397a60; border-radius: 8px; }

.list-card { width: 100%; display: block; text-align: left; border: 1px solid #ecf0e9; background: var(--paper); border-radius: 16px; padding: 16px; color: var(--ink); box-shadow: var(--shadow); }
.list-card strong { font-size: 13px; display: block; line-height: 1.55; }
.list-card small { color: var(--muted); display: block; margin-top: 5px; line-height: 1.5; }
.list-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; color: var(--green); font-size: 11px; font-weight: 750; }
.progress { display: flex; gap: 5px; margin: 10px 0 17px; }
.progress span { height: 4px; flex: 1; border-radius: 9px; background: #dce9dc; }
.progress span.active { background: var(--green); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border-radius: 14px; background: #f9efe2; color: #875f3b; font-size: 11px; line-height: 1.65; }
.notice.green { background: #e9f3eb; color: #3e765b; }
.form-field { display: grid; gap: 7px; margin: 15px 0; }
.form-field label { color: #52695a; font-size: 11px; font-weight: 750; }
.input, .select, .textarea { width: 100%; border: 1px solid #dfe8df; border-radius: 11px; background: #fff; color: #294638; font-size: 13px; padding: 11px 12px; outline: 0; }
.input:focus, .select:focus, .textarea:focus { border-color: #7ab497; box-shadow: 0 0 0 3px rgba(92,161,121,.1); }
.textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 13px; min-height: 43px; padding: 10px 15px; font-size: 12px; font-weight: 800; }
.primary-btn { color: white; background: var(--green-dark); }
.primary-btn:hover:not(:disabled) { background: #246d58; }
.secondary-btn { color: var(--green-dark); background: #e8f1e9; }
.danger-btn { color: #9b5148; background: #faebe6; }
.full { width: 100%; }
.split-btns { display: flex; gap: 9px; }
.split-btns > * { flex: 1; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option { display: grid; justify-items: start; align-content: space-between; min-height: 106px; padding: 15px; border: 1px solid #e4ece3; border-radius: 16px; color: #315740; background: var(--paper); text-align: left; box-shadow: var(--shadow); }
.option strong { font-size: 12px; }
.option svg { color: #4e9a70; }
.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 13px; color: #72917a; }
.search-wrap svg { position: absolute; left: 12px; pointer-events: none; }
.search-wrap input { padding-left: 40px; }
.filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 16px; }
.filter-grid .form-field { margin: 0; }
.empty { display: grid; justify-items: center; align-content: center; min-height: 220px; text-align: center; color: #819389; }
.empty-mark { display: grid; place-items: center; width: 55px; height: 55px; border: 1px solid #e2eae2; border-radius: 19px; background: #eff4ee; color: #75a183; margin-bottom: 13px; }
.empty strong { color: #426251; font-size: 14px; }
.empty p { font-size: 11px; line-height: 1.75; max-width: 230px; }
.ai-screen { display: flex; flex-direction: column; height: 100%; padding-bottom: 0; }
.ai-blank { display: grid; flex: 1; place-items: center; }
.ai-compose { padding: 12px 0 21px; background: var(--canvas); }
.ai-compose .compose-box { display: flex; gap: 8px; align-items: end; background: #fff; border: 1px solid #e3ebe2; border-radius: 18px; padding: 8px; }
.ai-compose textarea { flex: 1; min-height: 36px; max-height: 100px; border: 0; padding: 7px; outline: 0; resize: none; font-size: 12px; background: transparent; }
.ai-compose button { min-height: 34px; padding: 6px 10px; border-radius: 10px; }
.settings-row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 15px 0; border: 0; border-bottom: 1px solid #edf0ea; background: transparent; text-align: left; color: #395645; }
.settings-row:last-child { border: 0; }
.settings-row .round { display: grid; place-items: center; width: 31px; height: 31px; background: #e9f2e9; border-radius: 10px; color: #3b8262; }
.settings-row .label { flex: 1; font-size: 12px; font-weight: 750; }
.settings-row small { display: block; font-size: 10px; font-weight: 400; color: #92a298; margin-top: 3px; }
.trend-bars { display: flex; justify-content: space-between; align-items: end; gap: 12px; height: 115px; padding: 15px 20px 0; border-bottom: 1px solid #dbe8de; }
.trend-bars > div { flex: 1; max-width: 50px; display: grid; justify-items: center; gap: 4px; }
.trend-bars .bar { width: 30px; border-radius: 8px 8px 0 0; background: linear-gradient(#7fbd91, #d2e7d3); }
.trend-bars small { color: #8ca095; font-size: 9px; white-space: nowrap; }
.trend-table { display: grid; gap: 8px; font-size: 11px; padding-top: 15px; }
.trend-table div { display: flex; justify-content: space-between; color: #456354; }
.trend-table span:last-child { color: #8a9a8f; }
.login-visual { display: grid; align-content: center; min-height: calc(100% - 60px); }
.login-visual .brand-icon { width: 54px; height: 54px; border-radius: 18px; }
.login-visual h2 { color: var(--green-dark); font-family: Georgia, "Songti SC", serif; font-weight: 600; font-size: 30px; margin: 24px 0 7px; }
.login-visual p { color: #84968a; font-size: 12px; line-height: 1.7; }

.scrim { position: absolute; z-index: 9; inset: 0; background: rgba(24, 48, 36, .28); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 84%; overflow-y: auto; background: #fffefa; border-radius: 24px 24px 0 0; box-shadow: 0 -15px 40px rgba(23,48,38,.15); padding: 22px 22px calc(26px + env(safe-area-inset-bottom)); }
.sheet-handle { width: 34px; height: 4px; margin: -9px auto 16px; border-radius: 8px; background: #d6e1d7; }
.sheet h3 { color: #284938; font-size: 16px; margin: 0 0 6px; }
.sheet p { color: #87978c; font-size: 11px; line-height: 1.7; margin: 0 0 14px; }
.sheet-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 4px; border: 0; border-bottom: 1px solid #edf0ea; background: transparent; color: #3d5949; text-align: left; font-size: 12px; font-weight: 750; }
.sheet-option:last-child { border: 0; }
.sheet-option .small-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #2f7257; background: #e0f0e3; }
.sheet-option .push { margin-left: auto; color: #8ca197; }
.toast { position: absolute; z-index: 12; bottom: 102px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 42px); background: #284a3c; color: white; border-radius: 12px; padding: 10px 14px; box-shadow: 0 14px 30px rgba(18,50,37,.18); font-size: 11px; line-height: 1.55; text-align: center; }

@media (max-width: 820px) {
  .studio { display: block; padding: 0; min-height: 100dvh; background: var(--canvas); }
  .studio-note { display: none; }
  .phone { width: 100%; height: 100dvh; min-height: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none; }
  .screen { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
  .bottom-bar { height: calc(88px + env(safe-area-inset-bottom)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .screen { padding-left: 17px; padding-right: 17px; }
  .topbar { padding-left: 17px; padding-right: 17px; }
  .timeline::before { left: 91px; }
  .timeline-entry, .gap-label { grid-template-columns: 72px 19px 1fr; }
  .timeline-date strong { font-size: 12px; }
  .timeline-end { margin-left: 100px; }
}
