:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f4f7fb;--panel:#fff;--panel-border:#d6deea;--text:#162031;--muted:#5c6b80;--primary:#2563eb;--primary-hover:#1d4ed8;--success-bg:#e8f7ef;--success-text:#146c43;--failed-bg:#fff3e8;--failed-text:#b45309;--error-bg:#fdecec;--error-text:#b42318;--tag-bg:#eef3ff;--tag-text:#28427b;--shadow:0 16px 40px #14203114}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}body.modal-open{overflow:hidden}code{font-family:SFMono-Regular,Consolas,Liberation Mono,monospace}.page{width:min(1120px,100% - 32px);margin:32px auto 48px}.hero,.panel{background:var(--panel);border:1px solid var(--panel-border);box-shadow:var(--shadow);border-radius:8px}.hero{margin-bottom:20px;padding:28px}.eyebrow{color:var(--primary);margin:0 0 8px;font-size:13px;font-weight:600}h1,h2,h3{margin:0}h1{font-size:30px;line-height:1.2}.intro{color:var(--muted);margin:12px 0 0;line-height:1.6}.panel{margin-bottom:20px;padding:24px}.form{gap:24px;display:grid}.field-group{gap:12px;display:grid}.scheme-input-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.scheme-input-card{align-content:start;gap:8px;display:grid}.scheme-input-card-required,.scheme-input-card-optional{border:1px solid var(--panel-border);background:linear-gradient(#fff 0%,#fbfdff 100%);border-radius:14px;padding:14px}.scheme-input-card-required{box-shadow:inset 0 1px #ffffffbf}.scheme-input-card-optional{background:linear-gradient(#fffef9 0%,#fffdf5 100%)}.scheme-card-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.scheme-card-actions{flex-wrap:wrap;align-items:center;gap:8px;display:inline-flex}.scheme-count-badge{color:#31538f;background:#edf4ff;border-radius:999px;align-items:center;min-height:24px;padding:2px 9px;font-size:11px;font-weight:700;display:inline-flex}.scheme-count-badge-optional{color:#8a5a00;background:#fff3cf}.scheme-clear-button{color:#5f77a8;min-height:24px;font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-size:12px;font-weight:600}.scheme-clear-button:hover{color:#274889}.scheme-clear-button-optional{color:#9a6a07}.scheme-clear-button-optional:hover{color:#7d5400}.template-card-header{gap:8px;display:grid}.template-toolbar{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.template-select-wrap{flex:220px;min-width:220px;position:relative}.template-text-input{border:1px solid var(--panel-border);min-height:42px;color:var(--text);font:inherit;background:#fff;border-radius:8px;padding:0 12px}.template-select-trigger{border:1px solid var(--panel-border);width:100%;min-height:42px;color:var(--text);font:inherit;text-align:left;cursor:pointer;background:linear-gradient(#fff 0%,#f8fbff 100%);border-radius:8px;padding:0 42px 0 14px;position:relative;box-shadow:inset 0 1px #ffffffbf}.template-select-trigger:after{content:"";border-bottom:1.5px solid #5c6b80;border-right:1.5px solid #5c6b80;width:8px;height:8px;position:absolute;top:50%;right:16px;transform:translateY(-70%)rotate(45deg)}.template-select-trigger:hover,.template-text-input:hover{border-color:#b7c8e6}.template-select-trigger[aria-expanded=true]{border-color:#98b4e4;box-shadow:0 0 0 3px #2563eb1f}.template-select-menu{z-index:10;background:#fff;border:1px solid #c8d6ec;border-radius:12px;gap:10px;padding:12px;display:grid;position:absolute;top:calc(100% + 8px);left:0;right:0;box-shadow:0 18px 40px #16203129}.template-menu-group{gap:6px;display:grid}.template-menu-group-label{color:var(--muted);margin:0;font-size:12px;font-weight:700}.template-menu-option{width:100%;color:var(--text);text-align:left;cursor:pointer;background:#f8fbff;border:1px solid #0000;border-radius:10px;gap:2px;padding:10px 12px;display:grid}.template-menu-option:hover{background:#f1f6ff;border-color:#b7c8e6}.template-menu-option-selected{background:#edf4ff;border-color:#9ab8ea}.template-menu-option-name{font-size:14px;font-weight:700}.template-menu-option-meta{color:var(--muted);font-size:12px}.template-toolbar-button{justify-content:center;align-items:center;min-width:96px;display:inline-flex}.field-label-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.field-label{font-size:15px;font-weight:600}.field-hint{color:var(--muted);margin:0;font-size:13px}.scheme-source-input{display:none}.scheme-tag-panel{cursor:text;background:#f8fbff;border:1px solid #cad7eb;border-radius:12px;flex-wrap:wrap;align-content:flex-start;gap:8px;min-height:104px;padding:10px;display:flex;position:relative}.scheme-tag-panel:hover{border-color:#a9c0e6}.scheme-tag-panel:focus{outline-offset:2px;outline:3px solid #2563eb2e}.scheme-tag-panel-optional{background:#fffdf3;border-color:#ead9ab}.scheme-tag-panel-optional:hover{border-color:#e0c77f}.scheme-tag-panel-empty{align-items:center}.scheme-tag-panel-has-hidden:after{content:"";pointer-events:none;background:linear-gradient(135deg,#f8fbff00 0%,#f8fbffeb 68%,#f8fbff 100%);border-bottom-right-radius:12px;width:120px;height:54px;position:absolute;bottom:0;right:0}.scheme-tag-panel-optional.scheme-tag-panel-has-hidden:after{background:linear-gradient(135deg,#fffdf300 0%,#fffdf3eb 68%,#fffdf3 100%)}.scheme-tag-empty{color:var(--muted);margin:0;font-size:13px;line-height:1.6}.scheme-tag{color:#1f3461;background:#eef4ff;border:1px solid #bfd0ea;border-radius:999px;align-items:center;gap:6px;max-width:100%;min-height:30px;padding:4px 7px 4px 10px;display:inline-flex}.scheme-tag-optional{color:#7a5000;background:#fff4d1;border-color:#ead08d}.scheme-tag-hidden-hint{z-index:1;cursor:pointer;background:#ffffffeb;border-style:dashed;position:relative}.scheme-tag-hidden-hint:hover{background:#fff}.scheme-tag-hidden-hint-required{color:#31538f;border-color:#a8c0eb}.scheme-tag-hidden-hint-optional{color:#8a5a00;border-color:#e1c36f}.scheme-tag-text{overflow-wrap:anywhere;min-width:0;font-size:12px;font-weight:600;line-height:1.25}.scheme-tag-remove{width:18px;height:18px;color:inherit;font:inherit;cursor:pointer;background:#ffffffe0;border:0;border-radius:999px;padding:0;font-size:13px;line-height:1}.scheme-tag-remove:hover{background:#fff}.scheme-entry-row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.scheme-entry-input{min-height:38px;color:var(--text);font:inherit;background:#fff;border:1px solid #cad7eb;border-radius:10px;flex:280px;padding:0 12px;font-size:14px}.scheme-entry-input-optional{background:#fffef8;border-color:#ead9ab}.scheme-entry-input:hover{border-color:#a9c0e6}.scheme-entry-input-optional:hover{border-color:#e0c77f}.scheme-toggle-button{flex:none;min-width:102px;min-height:38px;padding:0 10px}.schemes-input{border:1px solid var(--panel-border);resize:vertical;width:100%;min-height:180px;font:inherit;color:var(--text);background:#fff;border-radius:8px;padding:14px 16px}.schemes-input:focus,.scheme-entry-input:focus,.template-select-trigger:focus,.template-text-input:focus,.drop-zone:focus,.primary-button:focus,.secondary-button:focus{outline-offset:2px;outline:3px solid #2563eb2e}.drop-zone{text-align:center;cursor:pointer;background:#f8fbff;border:1.5px dashed #91a4c3;border-radius:8px;padding:28px 20px;transition:border-color .15s,background .15s,transform .15s}.drop-zone:hover,.drop-zone.dragging{border-color:var(--primary);background:#eef4ff}.drop-zone.dragging{transform:translateY(-1px)}.drop-zone-title{margin:0;font-size:16px;font-weight:600}.drop-zone-subtitle{color:var(--muted);margin:8px 0 0;font-size:13px}.file-input{display:none}.selected-files{gap:8px;margin:0;padding:0;list-style:none;display:grid}.selected-files li{border:1px solid var(--panel-border);background:#fbfcfe;border-radius:8px;padding:12px 14px;font-size:14px}.selected-files.empty li{color:var(--muted)}.actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.primary-button,.secondary-button{height:42px;font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:0 16px;font-weight:600}.primary-button{background:var(--primary);color:#fff}.primary-button:hover{background:var(--primary-hover)}.primary-button:disabled{cursor:not-allowed;background:#9db7ef}.secondary-button{color:var(--primary);background:linear-gradient(#fff 0%,#f4f8ff 100%);border-color:#b7c8e6;box-shadow:inset 0 1px #ffffffb3}.secondary-button:hover{background:linear-gradient(#fff 0%,#edf4ff 100%);border-color:#98b4e4}.loading-text{min-height:20px;color:var(--muted);font-size:14px}.toast-region{z-index:20;pointer-events:none;justify-items:center;gap:6px;width:min(340px,100% - 56px);display:grid;position:fixed;top:86px;left:50%;transform:translate(-50%)}.toast-card{border:1px solid var(--panel-border);width:100%;color:var(--text);pointer-events:auto;background:#fffffff5;border-radius:10px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;animation:.18s ease-out toast-in;display:flex;box-shadow:0 10px 22px #1420311f}.toast-card-success{background:#f4fdf7f7;border-color:#b8e2c8}.toast-card-error{background:#fff7f7fa;border-color:#efc2c2}.toast-card-info{background:#fcfdfff7;border-color:#c9d7eb}.toast-content{flex:auto;min-width:0}.toast-line{white-space:nowrap;align-items:baseline;gap:0;min-width:0;display:flex;overflow:hidden}.toast-title{flex:none;font-size:12px;font-weight:700;line-height:1.25}.toast-message{text-overflow:ellipsis;min-width:0;color:var(--muted);font-size:12px;line-height:1.25;overflow:hidden}.toast-actions{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.toast-action-button{background:#fff;border-radius:999px;min-height:24px;padding:0 8px;font-size:11px}.toast-dismiss-button{width:22px;height:22px;color:var(--muted);font:inherit;cursor:pointer;background:#ffffffe6;border:1px solid #d5dfef;border-radius:999px;padding:0;font-size:12px;line-height:1}.toast-dismiss-button:hover{color:var(--text);background:#fff}.form-message{min-height:22px;color:var(--error-text);margin:0;font-size:14px}.form-message.success{color:var(--success-text)}.form-message-action{vertical-align:middle;min-height:28px;margin-left:10px;padding:0 10px}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes toast-in{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.hidden{display:none}.modal-shell{z-index:30;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.modal-shell.hidden{display:none}.modal-backdrop{background:#0c14228f;position:absolute;inset:0}.modal-panel{z-index:1;border:1px solid var(--panel-border);background:#fff;border-radius:12px;width:min(680px,100%);max-height:calc(100vh - 40px);padding:22px;position:relative;overflow:auto;box-shadow:0 28px 70px #0c142247}.modal-panel-wide{width:min(1040px,100%)}.modal-panel-manage{flex-direction:column;width:min(860px,100%);max-height:calc(100vh - 40px);display:flex;overflow:auto}.modal-panel-editor{width:min(760px,100%)}.modal-panel-detail{width:min(840px,100%)}.modal-panel-compact{width:min(520px,100%)}.modal-header,.template-library-header,.template-preview-header,.template-form-actions{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.modal-eyebrow{color:var(--primary);margin:0 0 6px;font-size:12px;font-weight:700}.modal-title{margin:0;font-size:22px}.modal-close-button{min-height:36px;color:var(--text);font:inherit;cursor:pointer;background:#fff;border:1px solid #b7c8e6;border-radius:8px;padding:0 12px;font-size:13px;font-weight:600}.modal-layout{grid-template-columns:minmax(260px,320px) minmax(0,1fr);align-items:start;gap:18px;margin-top:20px;display:grid}.template-library-section,.template-detail-card,.template-form,.template-preview-card{border:1px solid var(--panel-border);background:#fbfcfe;border-radius:10px}.template-library-section,.template-editor-section{gap:16px;display:grid}.template-library-section,.template-form{padding:16px}.template-library-section{align-self:start}.template-library-section-full{flex-direction:column;align-self:stretch;width:100%;max-height:min(560px,100vh - 220px);margin-top:20px;display:flex}.template-library-list{max-height:inherit;overscroll-behavior:contain;flex-direction:column;gap:10px;padding-bottom:4px;padding-right:8px;display:flex;overflow:auto}.template-list-item{border:1px solid var(--panel-border);background:#fff;border-radius:10px;flex:none;transition:border-color .15s,box-shadow .15s,transform .15s;overflow:hidden}.template-list-item-active{border-color:#7fa9ec;box-shadow:0 0 0 2px #7fa9ec42}.template-list-main{text-align:left;cursor:pointer;background:0 0;border:0;gap:6px;width:100%;padding:12px 14px 10px;display:grid}.template-list-item:hover{border-color:#b7c8e6}.template-list-main:hover{background:#fff}.template-list-name{color:var(--text);font-size:14px;font-weight:700}.template-list-meta{color:var(--muted);font-size:12px}.template-list-actions{flex-wrap:wrap;align-items:center;gap:8px;padding:0 14px 12px;display:flex}.template-action-button{min-width:60px}.template-detail-content{gap:12px;display:grid}.modal-panel-detail .template-detail-card{padding:18px 18px 20px}.modal-panel-detail .template-library-header{padding-right:12px}.template-detail-meta{gap:4px;display:grid}.template-detail-name{margin:0;font-size:16px;font-weight:700}.template-detail-subtitle{color:var(--muted);margin:0;font-size:12px}.template-detail-list,.template-preview{border:1px solid var(--panel-border);color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border-radius:8px;margin:0;padding:14px;font:13px/1.6 SFMono-Regular,Consolas,Liberation Mono,monospace}.template-form{gap:10px;display:grid}.template-form-standalone{margin-top:20px}.template-editor-input{min-height:200px}.apply-modal-content{gap:16px;margin-top:18px;display:grid}.template-preview-card{gap:12px;padding:16px;display:grid}.apply-modal-actions{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.confirm-modal-content{gap:16px;margin-top:18px;display:grid}.confirm-modal-actions{flex-wrap:wrap;justify-content:flex-end;gap:10px;display:flex}.section-header{margin-bottom:16px}.summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;display:grid}.summary-card{border:1px solid var(--panel-border);background:#fbfcff;border-radius:8px;padding:16px}.summary-card-label{color:var(--muted);margin:0 0 8px;font-size:13px}.summary-card-value{margin:0;font-size:28px;font-weight:700}.results-list{gap:16px;display:grid}.result-card{border:1px solid var(--panel-border);background:#fff;border-radius:8px;overflow:hidden}.result-card-header{border-bottom:1px solid var(--panel-border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px;display:flex}.result-file-name{word-break:break-all;font-size:16px;font-weight:600}.status-badge{border-radius:999px;justify-content:center;align-items:center;min-width:76px;height:30px;padding:0 12px;font-size:13px;font-weight:700;display:inline-flex}.status-passed{background:var(--success-bg);color:var(--success-text)}.status-failed{background:var(--failed-bg);color:var(--failed-text)}.status-error{background:var(--error-bg);color:var(--error-text)}.result-card-body{gap:16px;padding:18px;display:grid}.result-message{color:var(--muted);margin:0;line-height:1.5}.result-section-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.result-section{gap:10px;display:grid}.result-section-title{margin:0;font-size:14px;font-weight:600}.result-section-note{color:var(--muted);font-size:12px}.tag-list{flex-wrap:wrap;gap:8px;display:flex}.tag{background:var(--tag-bg);min-height:30px;color:var(--tag-text);word-break:break-all;border-radius:999px;align-items:center;padding:6px 10px;font-size:13px;line-height:1.3;display:inline-flex}.tag.tag-missing{color:#9a3412;background:#fff0e5}.tag.tag-optional{color:#9a6700;background:#fff7db}.inline-action-button{min-height:32px;color:var(--primary);font:inherit;cursor:pointer;background:#fff;border:1px solid #b7c8e6;border-radius:8px;padding:0 12px;font-size:13px;font-weight:600}.inline-action-button:hover{background:#f5f8ff}.ordered-scheme-list{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;margin:0;padding:0;list-style:none;display:grid}.ordered-scheme-groups{border:1px solid var(--panel-border);background:#fbfcfe;border-radius:10px;gap:0;display:grid;overflow:hidden}.ordered-scheme-group{gap:10px;padding:14px;display:grid}.ordered-scheme-group+.ordered-scheme-group{border-top:1px solid var(--panel-border)}.ordered-scheme-group-header{gap:6px;display:grid}.ordered-scheme-group-title{margin:0;font-size:14px;font-weight:700}.ordered-scheme-group-note{color:var(--muted);margin:0;font-size:12px;line-height:1.5}.ordered-scheme-item{border:1px solid var(--panel-border);background:#fbfcff;border-radius:8px;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:40px;padding:8px 10px;display:grid}.ordered-scheme-item-matched{background:#f3fcf7;border-color:#8cc8aa}.ordered-scheme-item-optional{background:#fff9e8;border-color:#e7c75a}.scheme-order{background:var(--tag-bg);height:24px;color:var(--tag-text);border-radius:999px;justify-content:center;align-items:center;font-size:12px;font-weight:700;display:inline-flex}.scheme-value{overflow-wrap:anywhere;min-width:0;font-size:13px;line-height:1.4}.scheme-match-badge,.scheme-match-placeholder{min-width:42px;height:24px}.scheme-match-badge{background:var(--success-bg);color:var(--success-text);border-radius:999px;justify-content:center;align-items:center;padding:0 8px;font-size:12px;font-weight:700;display:inline-flex}.scheme-match-badge-optional{color:#8a5a00;background:#fff0b8}.scheme-match-placeholder{display:block}.empty-state{color:var(--muted);font-size:14px}@media (width<=760px){.toast-region{width:min(320px,100% - 24px);top:74px}.page{width:min(100% - 20px,1120px);margin:20px auto 32px}.hero,.panel{padding:18px}h1{font-size:24px}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scheme-input-grid,.ordered-scheme-list,.modal-layout{grid-template-columns:1fr}.template-library-section-full{max-height:calc(100vh - 180px)}}@media (width<=480px){.toast-card{flex-direction:column;align-items:stretch;padding:9px 10px}.toast-actions{justify-content:flex-end;width:100%}.summary-grid{grid-template-columns:1fr}.actions,.field-label-row,.result-card-header{align-items:stretch}.primary-button,.secondary-button,.scheme-entry-input,.template-select-wrap,.modal-close-button{width:100%}.template-toolbar,.template-list-actions,.apply-modal-actions,.confirm-modal-actions,.scheme-entry-row,.scheme-card-heading{align-items:stretch}}
