:root{--navy:#193b5a;--mineral:#356d9c;--cream:#fbf8f2;--sand:#e9d7b9;--ink:#1f374b;--muted:#61788a;--line:#dfE5e9;--green:#20745b;--yellow:#af7425}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:Inter,'Segoe UI',Roboto,Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.mast{background:var(--navy);color:#fff}.mast-inner{max-width:1320px;padding:16px 30px;display:flex;align-items:center;justify-content:space-between;margin:auto;gap:12px}.brand{display:flex;gap:12px;align-items:center}.logo{width:44px;height:44px;border-radius:12px;background:var(--sand);color:var(--navy);display:grid;place-items:center;font-weight:900;font-size:24px}.brand b{font-size:22px;letter-spacing:-.7px}.brand small{display:block;font-size:11px;color:#b1c6d8;letter-spacing:.05em}.mast-pill{border:1px solid #46637b;border-radius:99px;padding:9px 13px;font-size:12px;color:#d4e1ed;white-space:nowrap}.pulse{display:inline-block;border-radius:50%;width:8px;height:8px;margin-right:6px;background:#77d9b9}.layout{max-width:1320px;padding:28px 30px 55px;margin:auto}.intro{display:flex;justify-content:space-between;gap:25px;align-items:center;margin:12px 0 25px}.eyebrow{font-size:11px;letter-spacing:.13em;font-weight:800;color:var(--mineral)}h1{font-size:clamp(29px,3.7vw,43px);letter-spacing:-1.5px;margin:7px 0 9px;color:var(--navy)}h1 .vs{color:#b29a74;font-size:.65em;margin:0 9px}p{line-height:1.65}.intro p{color:var(--muted);font-size:14px;max-width:720px;margin:0}.kpi{min-width:190px;display:flex;gap:13px;align-items:center;background:#fff;border:1px solid #e9e5dc;padding:20px;border-radius:16px}.kpi>span{font-size:48px;line-height:1;color:var(--navy);font-weight:900}.kpi div{font-size:10px;color:var(--muted);letter-spacing:.06em}.kpi b{display:block;letter-spacing:0;margin-top:4px;font-size:12px;color:var(--ink)}.setup,.results{background:#fff;border:1px solid #e7e5e1;border-radius:20px;box-shadow:0 6px 26px #193b5a09;padding:20px;margin-bottom:22px}.drop{border:1.5px dashed #b3c3d0;border-radius:14px;background:#f6f9fa;padding:21px;display:flex;align-items:center;gap:16px;cursor:pointer}.drop:focus-visible,.drop.drag{outline:2px solid var(--mineral);outline-offset:2px}.drop-icon{font-size:35px;color:var(--mineral);background:#e9f0f6;width:56px;height:56px;border-radius:12px;display:grid;place-items:center;flex-shrink:0}.drop strong{display:block;font-size:16px}.drop span{display:block;color:var(--muted);font-size:12px;margin-top:7px}.picker{margin-left:auto;white-space:nowrap;padding:12px 17px;border-radius:10px;background:var(--navy);color:white;font-size:12px;font-weight:800;cursor:pointer}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.options{display:grid;grid-template-columns:1fr 1fr 1fr auto;align-items:end;gap:12px;margin-top:19px}.field label{display:block;font-size:11px;color:#5a7185;font-weight:800;margin-bottom:7px}.field select{width:100%;padding:12px 9px;border:1px solid #d3e0e8;border-radius:10px;background:#fff;color:var(--ink);font-size:12px;min-height:43px}.buttons{display:flex;gap:8px}.primary,.quiet,.action-links button{border-radius:10px;padding:12px 16px;border:1px solid var(--navy);font-weight:800;font-size:12px;white-space:nowrap}.primary{background:var(--navy);color:white}.quiet{background:white;color:var(--navy)}.status{font-size:12px;color:#5b7080;background:#f3f4f4;border-radius:10px;padding:10px 12px;margin-top:16px;line-height:1.5}.status.error{background:#fff0ea;color:#9a4232}.status.success{background:#ecf7f1;color:#1e7055}.progress{background:#e9eef3;height:5px;border-radius:8px;overflow:hidden;margin:12px 0 0}.progress>div{width:0;height:100%;background:var(--mineral);transition:width .2s}.section-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px}.section-top h2{font-size:20px;color:var(--navy);margin:0;letter-spacing:-.4px}.count{font-size:12px;background:#ebf0f5;border-radius:8px;padding:5px 8px;margin-left:3px}.action-links{display:flex;gap:7px}.action-links button{border:1px solid #d8e1e8;background:white;color:var(--mineral);padding:9px 11px}.workarea{display:grid;grid-template-columns:270px minmax(0,1fr);border:1px solid #e3e9ee;overflow:hidden;border-radius:14px;min-height:480px}.filelist{background:#f8fafb;border-right:1px solid #e3e9ee;padding:11px;max-height:980px;overflow:auto}.emptyfiles{font-size:12px;color:#78909f;padding:24px 15px}.fileitem{display:flex;gap:10px;padding:11px;border:1px solid transparent;border-bottom-color:#e7ecef;cursor:pointer;background:none;border-radius:10px;width:100%;text-align:left;align-items:center;overflow:hidden;color:var(--ink)}.fileitem.active{background:#e9f0f6;border-color:#cedde8}.fileitem img{width:46px;height:62px;object-fit:cover;background:#fff;border-radius:6px;border:1px solid #e4e8eb}.fileitem span{min-width:0;flex:1}.fileitem b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.fileitem small{font-size:10px;color:#778c9b;display:block;margin-top:6px}.pill{display:inline-block;padding:4px 7px;border-radius:8px;font-size:10px;font-weight:800;background:#f5eadb;color:#936121}.pill.done{background:#e3f2ea;color:#226f54}.pill.error{background:#ffe8e0;color:#a3493a}.detail{padding:20px;min-width:0}.placeholder{display:grid;place-content:center;text-align:center;min-height:430px;color:#6e8392}.placeholder-icon{font-size:55px;color:#b6c9d7}.detail-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;margin-bottom:16px}.detail-top h3{margin:0 0 5px;color:var(--navy);font-size:18px}.detail-top p{color:var(--muted);font-size:12px;margin:0}.detail-top .dim{font-size:11px;font-weight:800;background:#edf3f6;border-radius:9px;padding:9px}.comparison{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:17px;align-items:start}.visual{border:1px solid #e2e9ec;border-radius:13px;overflow:hidden;background:#f3f5f4}.visual-header{padding:10px 12px;font-size:11px;font-weight:800;background:#eaf0f4;color:#3d637d}.preview{position:relative;margin:12px auto;width:fit-content;max-width:calc(100% - 24px);line-height:0}.preview img{display:block;max-width:100%;height:auto;max-height:570px;object-fit:contain}.preview canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.visual-footer{font-size:10px;color:#667b89;line-height:1.6;padding:10px 12px;background:#fbfcfc}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}.field-card{border:1px solid #dee8ed;border-radius:11px;padding:12px;background:#fafcfd}.field-card .key{display:block;font-size:10px;letter-spacing:.04em;font-weight:800;color:#688091;margin-bottom:7px}.field-card .val{font-size:15px;font-weight:800;color:#193b5a;overflow-wrap:anywhere}.engine-card{border:1px solid #e3e8ed;border-radius:12px;overflow:hidden;margin-top:12px}.engine-head{padding:12px;background:#eef3f6;display:flex;justify-content:space-between;gap:12px;align-items:center}.engine-head strong{color:#254e70}.engine-head small{color:#58738c;font-size:11px}.engine-body{padding:12px}.engine-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.engine-meta span{font-size:10px;background:#f5f6f6;padding:6px 8px;border-radius:7px;color:#4f6e83}.engine-meta span.warn{color:#a34031;background:#fff0e9}.engine-body pre{font-size:11px;line-height:1.5;background:#f8f9fa;border-radius:8px;padding:12px;overflow:auto;max-height:310px;white-space:pre-wrap;color:#2b4357}.engine-body p{font-size:11px;color:#668092;margin:8px 0}.side-by-side{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check{font-size:11px;padding:9px 10px;border-radius:10px;background:#eff5f8;color:#49687e;margin-bottom:8px}.check.conflict{background:#fff0e2;color:#94621f}.check.good{background:#eaf5ed;color:#276d51}.check strong{display:block;font-size:10px;margin-bottom:5px}.check em{font-style:normal;font-weight:800;font-size:13px;overflow-wrap:anywhere}.privacy{font-size:11px;color:#687d8d;line-height:1.7;padding:0 6px}.hidden{display:none!important}@media(max-width:1120px){.options{grid-template-columns:1fr 1fr}.buttons{justify-self:start}.comparison{grid-template-columns:1fr}.preview img{max-height:550px}}@media(max-width:730px){.mast-inner{padding:14px}.mast-pill{font-size:9px;padding:8px}.layout{padding:20px 12px 35px}.intro{align-items:flex-start}.intro h1{font-size:29px}.intro p{font-size:12px}.kpi{display:none}.setup,.results{padding:12px;border-radius:14px}.drop{padding:13px;flex-wrap:wrap}.drop-icon{width:40px;height:40px;font-size:25px}.drop>div:nth-child(2){flex:1}.drop strong{font-size:13px}.drop span{font-size:11px}.picker{margin:7px 0 0;width:100%;text-align:center}.options{grid-template-columns:1fr}.buttons{width:100%}.buttons button{flex:1}.workarea{grid-template-columns:1fr}.filelist{display:flex;gap:6px;min-height:110px;max-height:126px;padding:8px;overflow:auto;border-right:0;border-bottom:1px solid #e3e9ee}.fileitem{min-width:180px;max-width:210px;border:1px solid #e8edf0}.fileitem img{height:54px;width:40px}.detail{padding:13px}.fields{grid-template-columns:1fr 1fr}.side-by-side{grid-template-columns:1fr}.section-top{flex-wrap:wrap}.action-links{width:100%}.action-links button{flex:1}}

/* Diagnostic V3.1 */
.diagnostics{margin:14px 0;padding:14px 16px;background:#132c42;color:#e7f3fc;border:1px solid #355f7d;border-radius:12px;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:310px;overflow:auto}
