* { box-sizing: border-box; }
:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #1a312a; background: #f6f7f2; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.wrap { width: min(1136px, calc(100% - 72px)); margin-inline: auto; }
.top { border-bottom: 1px solid #d8ddd3; background: #fbfcf8; }
.brandbar { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 700; letter-spacing: -1px; }
.brand-icon { width: 33px; height: 33px; background: #174d3f; border-radius: 9px; position: relative; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; border: 2px solid #f7faf6; width: 10px; height: 14px; border-radius: 2px; left: 12px; top: 7px; }
.brand-icon::after { width: 8px; height: 11px; left: 8px; top: 12px; border-top: 0; border-right: 0; }
.local { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #445e4e; }
.local i { width: 8px; height: 8px; background: #46825c; border-radius: 100%; }
main { padding-block: clamp(34px, 5vw, 66px); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 4.5vw, 57px); line-height: 1.06; font-weight: 650; letter-spacing: -.052em; }
.intro { color: #516057; line-height: 1.6; font-size: 16px; margin: 12px 0 30px; }
.panels { display: grid; grid-template-columns: 1.13fr 1fr; gap: 18px; }
.face-bar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.mode-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; }
.mode-control label { font-size: 14px; font-weight: 600; }
.mode-control select { font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 8px; border: 1px solid #bdcdbf; color: #234735; background: white; max-width: 100%; }
#bi-fields { padding: 5px 18px 16px; max-height: 570px; overflow: auto; }
#bi-fields h3 { margin: 15px 0 6px; font-size: 15px; color: #23583f; }
#bi-fields dl { margin: 0; }
.field-row { display: grid; grid-template-columns: minmax(110px, 0.85fr) minmax(100px, 1.2fr); gap: 8px; border-bottom: 1px solid #e1e7df; padding: 8px 0; font-size: 13px; }
.field-row dt { color: #4e6253; }
.field-row dd { margin: 0; padding-right: 38px; min-height: 32px; position: relative; font-weight: 600; overflow-wrap: anywhere; }
.field-copy { position: absolute; right: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; color: #466653; background: transparent; border: 1px solid transparent; border-radius: 6px; }
.field-copy:hover:enabled, .field-copy:focus-visible { background: #edf4ed; border-color: #c6d5c8; }
.field-copy:disabled { cursor: default; opacity: .3; }
.copy-icon { display: inline-block; position: relative; width: 17px; height: 18px; flex: none; }
.copy-icon::before, .copy-icon::after { position: absolute; content: ""; width: 9px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; }
.copy-icon::before { top: 1px; left: 1px; clip-path: polygon(0 0,100% 0,100% 24%,32% 24%,32% 100%,0 100%); }
.copy-icon::after { top: 5px; left: 5px; }
.copy-ok .copy-icon::before { display: none; }
.copy-ok .copy-icon::after { left: 5px; top: 1px; width: 6px; height: 12px; border: solid #23764b; border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#manual-copy { width: min(420px, 90vw); color: inherit; border: 1px solid #c6d5c8; border-radius: 12px; padding: 20px; }
#manual-copy::backdrop { background: #18281f66; }
#manual-hint { margin: 10px 0; font-size: 14px; }
#manual-text { width: 100%; padding: 8px; font: inherit; }
.field-row small { display: block; color: #7b4d16; font-weight: 500; }
.field-row dd.missing { font-weight: 400; color: #77664d; }
.field-row small.checked { color: #285b44; }
#review-form { padding: 16px 18px; min-width: 0; }
#review-inputs { max-height: min(45vh, 420px); overflow: auto; padding: 0 5px 5px; }
#review-title { margin: 0 0 5px; font-size: 16px; }
#review-form p, #export-hint { font-size: 13px; line-height: 1.5; color: #516057; }
#export-hint { margin-top: 8px; }
.review-field { display: grid; gap: 4px; margin-top: 12px; }
.review-field label { font-size: 13px; font-weight: 600; }
.review-field input, .review-field textarea { width: 100%; min-width: 0; border: 1px solid #aabdaf; border-radius: 6px; padding: 8px 10px; background: white; color: inherit; font: inherit; font-size: 16px; }
.review-field textarea { resize: vertical; line-height: 1.5; }
.review-field :focus-visible { outline: 2px solid #368060; outline-offset: 1px; }
.review-field [aria-invalid="true"] { border-color: #a03825; }
.review-field small { color: #903921; }
#review-form .family-reference { margin-top: 12px; overflow-wrap: anywhere; }
.faces { display: inline-flex; padding: 4px; gap: 4px; background: #e9eee6; border: 1px solid #d5ddd3; border-radius: 12px; }
.faces button { display: grid; text-align: left; gap: 2px; min-width: 106px; padding: 7px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #405a49; }
.faces button[aria-pressed="true"] { color: #164d39; background: #fff; border-color: #c2d2c3; box-shadow: 0 1px 3px #18382412; }
.faces strong { font-size: 15px; }
.faces span { font-size: 12px; }
.bottom-row { flex-wrap: wrap; }
.card { min-width: 0; padding: 22px; background: #fff; border: 1px solid #dce1d9; border-radius: 16px; }
.card-head, .bottom-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head { min-height: 28px; margin-bottom: 17px; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.meta { color: #52665a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer { height: clamp(220px, 25vw, 294px); position: relative; border: 1px dashed #abbbae; border-radius: 10px; overflow: hidden; background-color: #edf2ea; background-image: radial-gradient(#c8d3c9 1px, transparent 1px); background-size: 14px 14px; }
.viewer.has-media { background: #19251f; border-style: solid; border-color: #19251f; }
.viewer img, .viewer video { width: 100%; height: 100%; object-fit: contain; display: block; }
.empty { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; text-align: center; color: #657167; padding: 16px; font-size: 13px; }
.empty strong { color: #344b3f; font-weight: 600; font-size: 16px; }
.reticle { position: relative; width: 84px; height: 76px; margin: 0 0 12px; }
.reticle::before,.reticle::after,.reticle i,.reticle b { position: absolute; width: 16px; height: 16px; content: ""; border: 2px solid #518066; }
.reticle::before { top: 0; left: 0; border-width: 2px 0 0 2px; border-radius: 5px 0 0; }
.reticle::after { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 5px 0 0; }
.reticle i { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 5px; }
.reticle b { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-radius: 0 0 5px; }
.paper { position: absolute; width: 37px; height: 45px; background: #fff; border: 1.5px solid #809b83; border-radius: 4px; top: 15px; left: 23px; transform: rotate(-7deg); box-shadow: 3px 4px #cedbce; }
.paper::before,.paper::after,.paper em { position: absolute; content: ""; left: 7px; height: 2px; width: 20px; background: #8aab95; top: 12px; }
.paper::after { top: 19px; }.paper em { top: 26px; width: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
.actions button { min-height: 43px; border-radius: 8px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 600; }
.primary { border: 1px solid #175741; color: #fff; background: #175741; }
.primary:hover { background: #104732; }
.secondary { border: 1px solid #cbd5cc; background: white; color: #273c30; }
.secondary:hover { background: #eff4ee; }
button:focus-visible, pre:focus-visible { outline: 3px solid #409a76; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
.camera-icon,.upload-icon,.lock { display: inline-block; position: relative; }
.camera-icon { width: 17px; height: 12px; border: 1.6px solid currentColor; border-radius: 3px; }
.camera-icon::before { content: ""; position: absolute; width: 6px; height: 3px; border-radius: 2px 2px 0 0; background: currentColor; left: 1px; top: -4px; }
.camera-icon::after { content: ""; position: absolute; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; left: 5px; top: 2px; }
.upload-icon { width: 16px; height: 12px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.upload-icon::after { content: "↑"; position: absolute; left: 2px; top: -9px; font-size: 16px; }
.bottom-row { margin-top: 11px; min-height: 31px; }
.link { color: #236449; border: 0; background: transparent; padding: 5px 0; font-size: 13px; font-weight: 600; text-underline-offset: 3px; }
.link:hover { text-decoration: underline; }.muted { color: #56645c; }
.output { display: flex; flex-direction: column; }
.text-area { flex: 1; min-height: 216px; border: 1px solid #e2e6df; border-radius: 9px; background: #fafbf8; overflow: auto; display: grid; }
.lines-icon { width: 38px; height: 32px; margin-bottom: 9px; position: relative; opacity: .7; }
.lines-icon::before,.lines-icon::after,.lines-icon i { content: ""; position: absolute; left: 0; border-radius: 2px; background: #8c9d8e; height: 3px; width: 34px; top: 5px; }
.lines-icon i { top: 14px; width: 26px; }.lines-icon::after { top: 23px; width: 30px; }
pre { margin: 0; padding: 18px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.65 ui-monospace, Consolas, monospace; max-height: 460px; }
.status { font-size: 13px; color: #56665a; padding-top: 14px; min-height: 32px; }
.status.problem { color: #963f22; }
progress { width: 100%; height: 5px; margin: 14px 0 0; accent-color: #267450; }
.privacy { display: flex; align-items: baseline; gap: 10px; margin-top: 19px; font-size: 13px; color: #526458; line-height: 1.6; }
.lock { width: 11px; height: 9px; flex: none; border: 1.5px solid currentColor; border-radius: 2px; }
.lock::before { content: ""; width: 5px; height: 5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; position: absolute; top: -6px; left: 1px; }
@media (max-width: 740px) { .wrap { width: min(100% - 32px, 560px); } .brandbar { height: 60px; }.panels { grid-template-columns: 1fr; }.card { padding: 16px; }.intro { margin-bottom: 22px; } .viewer { height: 242px; }.text-area { min-height: 170px; } }
@media (max-width: 380px) { .actions button { flex: 1; padding: 9px; } .local { font-size: 11px; } }
