:root{font-family:system-ui,-apple-system,sans-serif;color:#193c37;background:#f4f6f1;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header{padding:22px max(24px,calc((100vw - 1000px)/2));border-bottom:1px solid #dce3da;display:flex;justify-content:space-between;align-items:center;background:#fff}.brand{font-size:26px;font-weight:750;letter-spacing:-1px}.brand span{font-size:20px}.local{font-size:12px;color:#487261}main{max-width:1000px;margin:48px auto;padding:0 24px}.eyebrow{letter-spacing:2px;font-size:12px;font-weight:750;color:#6b806a}h1{font-size:clamp(32px,5vw,48px);letter-spacing:-2px;margin:12px 0}h2{font-size:24px}h3{font-size:18px}.intro{color:#657669;margin-bottom:38px}button,input,select{font:inherit}button{border:1px solid #cbd7cd;background:white;border-radius:10px;padding:11px 16px;color:#193c37;cursor:pointer;min-height:44px}button:hover{background:#edf2e9}.primary{background:#164f48;color:#fff;border-color:#164f48}.primary:hover{background:#226359}button:disabled{opacity:.5;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a0ba63;outline-offset:2px}input:not([type=checkbox]),select{padding:12px;border:1px solid #cad6cb;border-radius:8px;background:#fff;max-width:100%;min-height:44px}input[type=checkbox]{width:19px;height:19px;accent-color:#164f48}label{display:block;margin:14px 0;font-size:14px}label>input:not([type=checkbox]),label>select{display:block;width:100%;margin-top:7px}.toolbar,.actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.searchbox{background:#fff;border:1px solid #d8e1d6;border-radius:16px;padding:22px;margin-top:24px;box-shadow:0 8px 25px #213e2710}.searchbox span{font-size:12px;font-weight:650;color:#697e69}.searchbox input{font-size:20px!important;border:0!important;padding:15px 0!important;outline-offset:5px}.empty{text-align:center;border:1px dashed #c8d5c5;border-radius:16px;padding:48px 24px;color:#6c7b6d;margin-top:20px}.empty b{display:block;color:#254e44;font-size:21px;margin-bottom:8px}.result{display:flex;width:100%;text-align:left;justify-content:space-between;gap:14px;margin:9px 0;padding:20px;border-color:#e0e6dc}.result small{color:#748570}.count{font-size:13px;color:#71816e;margin:22px 0 12px}.panel{background:white;padding:24px;border:1px solid #d9e2d7;border-radius:16px;margin:18px 0}.steps{display:flex;gap:10px;color:#687e6b;font-size:13px}.steps b{color:#164f48}.table-wrap{overflow:auto;max-height:300px;border:1px solid #dfe6dc}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;padding:10px;border-bottom:1px solid #e4e9e1;white-space:nowrap;max-width:250px;overflow:hidden;text-overflow:ellipsis}th{background:#edf2e7}.field{display:grid;grid-template-columns:28px 28px minmax(110px,1fr) minmax(90px,1fr) 110px 90px;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #e6ebe3}.field input{width:100%;min-width:0}.field select{width:100%;min-width:0}.field .actions{gap:2px}.field button{padding:4px 8px}.hint{font-size:13px;color:#6b7e6d;line-height:1.6}.error{background:#fff1e8;border-left:3px solid #b05832;padding:14px;margin:12px 0;color:#813b22}#status:empty{display:none}#status{padding:12px 0;line-height:1.6}dialog{border:1px solid #d1ddce;border-radius:18px;padding:26px;max-width:680px;width:calc(100% - 24px);max-height:90vh;overflow:auto}dialog::backdrop{background:#173d3655;backdrop-filter:blur(3px)}dl{margin:24px 0}dl div{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:16px 0;border-bottom:1px solid #e3e9df}dt{color:#657968;font-size:14px}dd{margin:0;font-weight:650;text-align:right;overflow-wrap:anywhere;min-width:0}footer{margin-top:64px;padding-top:22px;border-top:1px solid #dce3d7;color:#7c8a79;font-size:12px}footer p{max-width:650px;line-height:1.6}details{margin:18px 0}summary{cursor:pointer;padding:10px 0}.danger{color:#a2422c}.member-list{max-height:250px;overflow:auto}.member-list label{display:flex;align-items:center;gap:10px}.step-nav{display:flex;justify-content:space-between;gap:12px;margin:25px 0}.badge{font-size:11px;padding:4px 7px;background:#edf1e4;border-radius:5px}#dialog-content form{margin-bottom:24px}@media(max-width:600px){main{margin:28px auto;padding:0 16px}header{padding:18px 16px}.local{font-size:10px}.toolbar{align-items:stretch}.toolbar>div{width:100%}.actions button{flex:1}.field{grid-template-columns:24px 24px 1fr 85px;gap:6px}.field>span{grid-column:3/5}.field>input{grid-column:3}.field>select{grid-column:4}.field>.actions{grid-column:3/5}.panel{padding:16px}.searchbox{padding:16px}dl div{grid-template-columns:1fr;gap:8px}dd{text-align:left}.steps{font-size:11px;justify-content:space-between}h1{letter-spacing:-1px}}
/* Dialogs must shrink to the viewport even with long file/field names. */
dialog{inset:0;margin:auto;min-width:0;width:min(680px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:22px;overflow-x:hidden;overscroll-behavior:contain}#dialog-content,#dialog-content>*{min-width:0;max-width:100%;overflow-wrap:anywhere}dialog .actions>*{min-width:0;max-width:100%;flex:1 1 160px}dialog button{white-space:normal;overflow-wrap:anywhere}dialog input,dialog select{min-width:0;max-width:100%;width:100%;text-overflow:ellipsis}dialog input[type=checkbox]{width:19px;min-width:19px;flex:0 0 19px}dialog .field>*{min-width:0}.field{grid-template-columns:24px 24px minmax(0,1fr) minmax(0,1fr) minmax(0,110px) 88px}.field>span{overflow-wrap:anywhere}.field input[type=checkbox]{width:19px}.member-list{overflow-x:hidden}.member-list label{overflow-wrap:anywhere}.member-list input{flex-shrink:0}#group-fields label{display:flex;align-items:center;gap:10px}#dialog-status:empty{display:none}#dialog-status{padding:12px;margin:12px 0;background:#edf4e8;border-radius:8px;overflow-wrap:anywhere}#dialog-status[data-error=true]{background:#fff1e8;color:#813b22}.saved-item{padding:14px 0;border-bottom:1px solid #dce3d7}.saved-item .actions{margin-top:10px}.selected-count{position:sticky;bottom:0;background:#fff;padding:10px 0;font-weight:650}.term{display:grid;grid-template-columns:130px minmax(0,1fr) auto;gap:8px;margin:10px 0}.field-head{display:flex;gap:14px}.preview-list{max-height:180px;overflow:auto}.update-notice{position:fixed;bottom:16px;right:16px;z-index:5;max-width:calc(100vw - 32px);box-shadow:0 5px 30px #163d3644;background:#164f48;color:white}
@media(max-width:600px){dialog{padding:16px;border-radius:14px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}dialog h2{font-size:22px}dialog .actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}dialog .actions>*{width:100%}.field{grid-template-columns:24px 24px minmax(0,1fr);gap:8px;padding:16px 0}.field>input[type=checkbox]{grid-column:auto;grid-row:1}.field>span{grid-column:3;grid-row:1}.field>input[data-label]{grid-column:1/-1;grid-row:2}.field>select{grid-column:1/-1;grid-row:3}.field>.actions{grid-column:1/-1;grid-row:4;display:flex}.field>.actions button{width:auto;flex:1}.term{grid-template-columns:minmax(0,1fr)}dialog dt,dialog dd{overflow-wrap:anywhere}dialog select{font-size:16px}#database h2{overflow-wrap:anywhere}}
