:root{font-size:16px;--green:#164e46;--ink:#193631;--muted:#687b75;--line:#dce5df;--paper:#fff;--bg:#f3f5ef;--accent:#dceb91;--size:16px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;font-size:var(--size);line-height:1.65}button,input,select,textarea{font:inherit}button{border:1px solid var(--line);border-radius:10px;padding:10px 16px;background:#fff;color:var(--green);cursor:pointer;min-height:44px;font-weight:600}button:hover{background:#edf3e8}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#216457}.quiet{background:transparent}.danger{color:#a13d2a}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}[hidden]{display:none!important}header{padding: max(12px, env(safe-area-inset-top, 12px)) 5vw 12px;display:flex;align-items:center;justify-content:space-between;background:var(--green);color:#fff;gap:10px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;font-weight:700}.brand small{display:block;font-size:.72em;font-weight:400;opacity:.7}.brand-icon{display:grid;place-items:center;border:1px solid #77978d;border-radius:12px;width:42px;height:42px;font-size:24px}.header-actions{display:flex;gap:8px;align-items:center}header button{color:#fff;border-color:#567c6e;min-height:36px;padding:5px 10px}.status{font-size:.78em;padding:4px 9px;border-radius:20px;background:#326459}.status.offline{background:#ad7b36}main{max-width:1180px;margin:auto;padding:32px 24px 100px}.intro{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}.eyebrow{font-size:.72em;font-weight:750;letter-spacing:.13em;color:var(--muted);margin:0 0 8px}h1{font-size:clamp(1.7rem,4vw,2.4rem);line-height:1.3;margin:0 0 10px;letter-spacing:-.03em}h2{font-size:1.35em;margin:0}h3{font-size:1.08em;margin:24px 0 12px}p{margin:8px 0 16px}.subtle{color:var(--muted);font-size:.9em}.intro-actions{display:flex;gap:10px;align-items:center;flex-shrink:0}.font-control{display:flex;gap:6px;align-items:center;font-size:.85em}.font-control select{width:76px}.notice{padding:12px 16px;border-left:3px solid #89a050;background:#edf1df;font-size:.88em;margin:12px 0 22px}.tabs{display:flex;border-bottom:1px solid var(--line);gap:25px;margin:24px 0}.tabs button{border:0;background:none;border-radius:0;color:var(--muted);padding:12px 3px}.tabs button.active{border-bottom:3px solid var(--green);color:var(--green)}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:24px 0 18px;gap:12px}.stepper{display:flex;overflow-x:auto;gap:8px;padding:0 0 14px}.stepper button{white-space:nowrap;font-size:.82em;min-height:36px;padding:6px 11px;border-radius:24px}.stepper button.active{background:var(--accent);border-color:var(--accent);color:var(--green)}.card{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:26px;margin:14px 0}.card-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;margin-bottom:20px}label{display:block;font-size:.9em;font-weight:600;min-width:0}input,select,textarea{display:block;width:100%;min-height:46px;margin-top:7px;padding:10px 12px;border:1px solid #cddbd2;border-radius:8px;background:#fff;color:var(--ink);font-size:max(16px,var(--size));outline:none}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #164e4614}input[readonly]{background:#f1f5ef;color:#536a61}textarea{resize:vertical;line-height:1.55;min-height:85px;overflow:hidden}.wide-field{grid-column:1/-1}input[type=date],input[type=datetime-local]{-webkit-appearance:none;appearance:none;min-height:46px;text-align:left}input::-webkit-date-and-time-value{text-align:left}input[type=checkbox]{display:inline;width:20px;height:20px;min-height:20px;vertical-align:middle;margin:0}.helper{font-size:.8em;font-weight:400;color:var(--muted);display:block;margin-top:5px}.entry-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 0;position:sticky;bottom:0;background:var(--bg);padding-bottom:max(18px,env(safe-area-inset-bottom));z-index:3}#saveStatus{font-size:.82em;color:var(--muted)}#pendingStatus{display:block;font-size:.75em}.errors{background:#fff1ed;color:#923e2d;border:1px solid #edc1b2;padding:14px 18px;border-radius:10px;margin:15px 0}.errors ul{margin:0;padding-left:20px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.metric{padding:18px;background:#edf3e8;border-radius:12px}.metric small{display:block;color:var(--muted);font-size:.72em}.metric strong{display:block;font-size:1.55em;line-height:1.5}.metric span{font-size:.72em;color:var(--muted)}.tool-line{background:#f7f9f3;border:1px solid var(--line);padding:16px;border-radius:12px;margin-bottom:12px}.tool-line .field-grid{margin-bottom:12px}.table-scroll{overflow:auto;max-width:100%;margin:16px 0}table{border-collapse:collapse;width:100%;font-size:.85em}th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{color:var(--muted);background:#f4f7ef;font-weight:600}.matrix input[type=text]{width:140px}.matrix th,.matrix td{padding:8px}.record-card{display:flex;justify-content:space-between;gap:18px;padding:20px;background:white;border:1px solid var(--line);border-radius:12px;margin:10px 0}.record-card .record-main{min-width:0}.record-card h3{margin:3px 0;font-size:1.06em}.record-card p{font-size:.86em;color:var(--muted);margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}.record-card .tag{font-size:.7em;background:#edf3e8;padding:3px 7px;border-radius:6px;margin-right:8px}.record-card .tag.conflict{background:#ffe5d9}.empty{padding:45px;text-align:center;color:var(--muted);background:#fff;border:1px dashed var(--line);border-radius:12px}.bar-row{display:grid;grid-template-columns:140px 1fr 80px;gap:14px;align-items:center;font-size:.86em;margin:12px 0}.bar{height:10px;background:#eef2e8;border-radius:5px;overflow:hidden}.bar i{display:block;background:var(--green);height:100%}.divider{height:1px;background:var(--line);margin:25px 0}dialog{border:0;border-radius:18px;width:min(580px,94vw);max-height:90dvh;padding:0;color:var(--ink);box-shadow:0 20px 100px #082b3455}dialog.wide{width:min(980px,96vw)}dialog::backdrop{background:#102b2866}.dialog-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}.dialog-heading button{font-size:22px;padding:0 12px}.dialog-content{padding:24px}.dialog-content>label{margin-bottom:18px}.dialog-footer{padding:18px 24px;border-top:1px solid var(--line);background:white;position:sticky;bottom:0}.sticky-actions{padding-top:20px}.dictionary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.dictionary-grid textarea{min-height:115px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.85em}.definition{display:grid;grid-template-columns:1fr 2fr;gap:8px 20px;font-size:.9em}.definition dt{color:var(--muted)}.definition dd{margin:0;overflow-wrap:anywhere}.review-note{font-size:.9em;color:var(--muted)}footer{text-align:center;padding:22px;font-size:.72em;color:var(--muted);padding-bottom:calc(22px + env(safe-area-inset-bottom))}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#193631;color:#fff;border-radius:10px;max-width:90vw;z-index:50;font-size:.9em}.danger:disabled{opacity:.4}
@media(max-width:700px){header{padding-left:16px;padding-right:16px}.brand{gap:8px;font-size:.9em}.brand-icon{width:34px;height:36px}.brand small{font-size:.65em}.header-actions{gap:5px}header button{font-size:.75em;padding:4px 8px}.status{font-size:.65em}.intro{display:block}.intro-actions{margin-top:20px}main{padding:24px 15px 40px}.card{padding:20px 16px}.field-grid{gap:16px 12px}.entry-footer{align-items:start;flex-direction:column;gap:8px}.entry-footer .actions{width:100%;justify-content:flex-end}.entry-footer button{flex:1}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:14px}.record-card{flex-direction:column;gap:8px}.record-card .actions{justify-content:flex-end}.dialog-content{padding:18px}.dictionary-grid{grid-template-columns:1fr}.bar-row{grid-template-columns:100px 1fr 60px;gap:8px}.section-heading{align-items:start}h1{font-size:1.85em}.definition{grid-template-columns:1fr 1.5fr}}
@media(max-width:800px){body[data-font=large] .field-grid,body[data-font=large] .dictionary-grid{grid-template-columns:1fr}body[data-font=large] .wide-field{grid-column:auto}body[data-font=large] .header-actions .status{display:none}}
@media(max-width:400px){.field-grid{grid-template-columns:1fr}.wide-field{grid-column:auto}.tabs{gap:20px}.brand small{display:none}}
progress.bar{width:100%;border:0;appearance:none;accent-color:var(--green)}progress.bar::-webkit-progress-bar{background:#edf2e6;border-radius:8px}progress.bar::-webkit-progress-value{background:var(--green);border-radius:8px}progress.bar::-moz-progress-bar{background:var(--green);border-radius:8px}fieldset{border:0;margin:0;padding:0;min-width:0}.entry-footer{border-top:1px solid var(--line);box-shadow:0 -10px 20px var(--bg)}input,select,textarea{scroll-margin-bottom:180px}
.choice-field{display:flex;gap:8px;align-items:stretch}.choice-field input{min-width:0;flex:1}.choice-field button{margin-top:7px;white-space:nowrap;padding:8px 12px}.choice-options{display:flex;flex-direction:column;gap:10px}.choice-options button{text-align:left}.construction-scroll{max-height:520px}.construction-table th{position:sticky;top:0;z-index:1}.construction-table tr[role=button]{cursor:pointer}.construction-table tr[role=button]:hover,.construction-table tr[role=button]:focus{background:#edf3e8;outline:2px solid var(--green);outline-offset:-2px}#constructionDialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}#expandedConstruction .construction-scroll{height:calc(100dvh - 90px);max-height:none;margin:0}#constructionDialog:fullscreen{background:#fff}

label.field-error{color:#b42318!important;font-weight:700}label.field-error input,label.field-error select,label.field-error textarea{border-color:#b42318;box-shadow:0 0 0 1px #b42318;color:var(--text,#243f3a)}.bore-table tfoot{background:#edf3e8;font-weight:700}.bore-well{margin:24px 0}.bore-table td,.bore-table th{white-space:nowrap}

.submission-bar{margin:18px 0;padding:16px;border:1px solid #e8b367;border-radius:14px;background:#fff4e3}.submission-bar p{margin:0 0 12px}#submitReport{background:#c95012;color:white;border-color:#c95012;font-weight:800;font-size:1.1em;min-height:48px}#submitReport:disabled{background:#86908b;border-color:#86908b}

/* Equal native picker geometry, including iOS time controls. */
.field-grid input:not([type=checkbox]),.field-grid select{height:calc(1.65 * max(16px,var(--size)) + 22px);min-height:46px;min-width:0;max-width:100%;line-height:1.65}
input[type=time]{-webkit-appearance:none;appearance:none;text-align:left;min-width:0;width:100%}
input[type=time]::-webkit-date-and-time-value{text-align:left;min-height:1.65em;margin:0}
input[type=time]::-webkit-datetime-edit{padding:0}
#scheduleNotice{margin:12px 0}#scheduleNotice:empty{display:none}

.login-screen{min-height:100dvh;display:grid;place-items:center;padding: max(20px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom))}.login-card{width:min(100%,410px);background:white;border:1px solid var(--line);padding:32px;border-radius:20px}.login-card .brand-icon{background:var(--green);color:white;margin-bottom:24px}.login-card h1{font-size:1.8rem}.login-card label{margin:18px 0}.login-card button{width:100%}.login-error{color:#b42318}.remember{font-weight:400}.dictionary-table input:not([type=checkbox]){min-width:140px}.dictionary-table td{vertical-align:top}.dictionary-table label{white-space:normal;min-width:190px}.dictionary-section{border-top:1px solid var(--line);margin-top:24px}#accountName{font-size:.8em}.header-actions{flex-wrap:wrap}
.dictionary-table select{min-width:130px}

.account-error{color:#b42318;font-weight:600} [data-user][aria-invalid="true"]{border:2px solid #b42318}

.photo-grid{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.photo-grid>div{max-width:160px}.photo-grid img{width:130px;height:110px;object-fit:cover;border-radius:8px}.photo-dialog{max-width:94vw;max-height:94vh}.photo-dialog img{display:block;max-width:85vw;max-height:78vh;object-fit:contain}
