:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#1a1d21;--accent: #4dabf7;--border: rgba(255, 255, 255, .12);--panel: rgba(255, 255, 255, .04);--input-bg: rgba(255, 255, 255, .06);--subtitle: rgba(255, 255, 255, .6);--drop-hover: rgba(77, 171, 247, .06);--error: #ff6b6b;--error-bg: rgba(255, 107, 107, .12);--modal-overlay-opacity: .9;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;justify-content:center;align-items:center;min-width:320px;min-height:100vh}#root{width:100%;display:flex;justify-content:center;align-items:center}h1{font-size:1.5rem;line-height:1.25;font-weight:600}button{border-radius:6px;border:1px solid transparent;padding:.5rem .875rem;font-size:.875rem;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .2s,background-color .2s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#f5f6f8;--border: rgba(0, 0, 0, .12);--panel: rgba(255, 255, 255, .9);--input-bg: #fff;--subtitle: #64748b;--drop-hover: rgba(77, 171, 247, .08);--error: #dc2626;--error-bg: rgba(220, 38, 38, .1)}a:hover{color:#747bff}button{background-color:#f9f9f9}}.modal-overlay{position:fixed;inset:0;background:rgb(0 0 0 / var(--modal-overlay-opacity));display:flex;align-items:center;justify-content:center;z-index:200}.help-modal-overlay{z-index:1000;padding:1rem}.help-modal{background:var(--panel, #fff);border:1px solid var(--border, #ddd);border-radius:10px;max-width:520px;width:100%;max-height:85vh;display:flex;flex-direction:column;box-shadow:0 12px 40px #0003}.help-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid var(--border, #ddd);flex-shrink:0}.help-modal-header h2{margin:0;font-size:1.125rem;font-weight:600}.help-modal-close{width:28px;height:28px;padding:0;border-radius:6px;font-size:1.25rem;line-height:1}.help-modal-body{padding:1rem 1.25rem;overflow-y:auto;flex:1}.help-section{margin-bottom:1.25rem}.help-section:last-child{margin-bottom:0}.help-section h3{margin:0 0 .5rem;font-size:.875rem;font-weight:600;color:var(--subtitle, #666);text-transform:uppercase;letter-spacing:.03em}.help-item{margin-bottom:.75rem}.help-item dt{font-weight:600;font-size:.9375rem;margin-bottom:.2rem}.help-item dd{margin:0;font-size:.875rem;color:var(--subtitle, #555);line-height:1.5}.help-modal-footer{display:flex;justify-content:flex-end;padding:.75rem 1.25rem;border-top:1px solid var(--border, #ddd);flex-shrink:0}.help-link{display:inline-flex;align-items:center;gap:.35rem;background:none;border:none;cursor:pointer;font-size:inherit;font-family:inherit}.file-bar{display:flex;align-items:center;gap:1rem;padding:.75rem 1rem;background:var(--panel);border-radius:8px;border:1px solid var(--border)}.file-count{font-size:.9rem}.file-nav{display:flex;align-items:center;gap:.5rem}.file-nav button{padding:.35rem .6rem;font-size:.85rem}.crop-actions{display:flex;gap:.5rem}.preview-img-wrap{position:relative;display:inline-block;line-height:0}.crop-overlay{position:absolute;border:2px solid var(--accent);background:#4dabf726;pointer-events:none;box-sizing:border-box}.stacking-empty{text-align:center}.stacking-empty .header{position:relative}.header-with-help{display:flex;align-items:center;justify-content:center;position:relative;width:100%}.header-with-help h1{margin:0}.help-btn-header{position:absolute;right:0;top:50%;transform:translateY(-50%);padding:.5rem;border:none;background:transparent;color:var(--subtitle, #666);cursor:pointer;border-radius:6px}.help-btn-header:hover{color:var(--accent, #0066cc);background:var(--panel-hover, #f0f0f0)}.file-input-hidden{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.empty-actions{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center;margin-top:1rem}.empty-actions .empty-action-btn{width:11rem;min-height:3.25rem;padding:.65rem 1rem;box-sizing:border-box}.stacking-view{flex:1;display:flex;flex-direction:column;min-height:0}.stacking-drop-overlay{position:fixed;inset:0;background:#00000059;display:flex;align-items:center;justify-content:center;z-index:300;pointer-events:none}.stacking-drop-overlay-content{background:#fffffff2;color:#111;padding:1rem 1.5rem;border-radius:10px;border:2px dashed #4dabf7;font-weight:600;box-shadow:0 8px 24px #0003}@media(max-width:900px){.stacking-view{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.header-desktop,.stacking-controls-desktop{display:none!important}.mobile-tools-bar{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:.5rem 0;border-bottom:1px solid var(--border, #ddd);gap:1rem}.mobile-tools-bar .toolbar-row{flex:1}.mobile-tools-title{font-size:1.125rem;font-weight:700;margin:0;flex-shrink:0}.mobile-tools-title .header-ir{color:#e63946}.stacking-layout{flex:1;min-height:0;max-height:calc(100dvh - 4rem);overflow:hidden;display:flex}.stacking-main{display:flex;flex-direction:column;flex:1;min-height:0;margin-right:0;overflow:hidden}.stacking-canvas-wrap{flex:1;min-height:0;max-height:none;aspect-ratio:auto;overflow:auto;-webkit-overflow-scrolling:touch}.stacking-resize-handle{display:none}.stacking-sidebar{flex-shrink:0;align-self:stretch;min-width:140px;max-width:40%;max-height:100%}.reference-scale-bar{flex-shrink:0;padding:.35rem 0;font-size:.75rem}.reference-scale-bar .y-min-adjust{flex-wrap:wrap}.stacking-sidebar{overflow:hidden;display:flex;flex-direction:column;min-height:0}.spectra-list,.archive-list{touch-action:pan-y;overscroll-behavior-y:contain;overflow-y:scroll;-webkit-overflow-scrolling:touch}.sidebar-tabs{margin-bottom:.3rem}.sample-library-modal{max-height:90dvh;width:95vw;min-width:0}}@media(min-width:901px){.mobile-tools-bar{display:none!important}}.stacking-view .header{margin-bottom:.75rem;flex-shrink:0}.stacking-view .header h1{font-size:1.25rem;font-weight:700}.header .header-ir{color:#e63946}.stacking-view .subtitle{font-size:.8125rem}.stacking-layout{display:flex;flex:1;min-height:0;align-items:stretch}.stacking-main{flex:1;display:flex;flex-direction:column;gap:1rem;align-items:flex-start;min-height:0;margin-right:.5rem}.stacking-controls{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem;align-items:flex-end;width:100%}.stacking-controls .control-group{margin-bottom:0}.stacking-controls .control-group label{margin-bottom:.25rem}.stacking-controls .toolbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.stacking-controls .toolbar-row .tool-btn,.stacking-controls .toolbar-row .btn-with-icon{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .6rem}.stacking-controls .toolbar-row .tool-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.ref-calibrated{display:flex;flex-direction:column;gap:.35rem}.stacking-controls select{padding:.4rem .65rem;border-radius:6px;border:1px solid var(--border);background:var(--input-bg);color:inherit;font-size:.8125rem}.stacking-canvas-wrap{flex:0 0 auto;width:100%;aspect-ratio:800 / 475;max-height:70vh;overflow:auto;border-radius:8px;background:#fff}.touch-hint-overlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:.75rem 1.25rem;background:#000c;color:#fff;border-radius:8px;font-size:.9375rem;font-weight:500;pointer-events:none;z-index:55}.touch-region-adjust{position:absolute;bottom:12px;left:50%;transform:translate(-50%);display:flex;flex-direction:column;gap:.5rem;padding:.75rem 1rem;background:#000000e0;color:#fff;border-radius:10px;box-shadow:0 4px 16px #0000004d;z-index:60}.touch-region-adjust-row{display:flex;align-items:center;gap:.5rem}.touch-region-adjust-label{font-size:.875rem;font-weight:500;min-width:40px}.touch-region-adjust-btn{min-width:44px;min-height:44px;padding:0;border:1px solid rgba(255,255,255,.4);border-radius:8px;background:#ffffff1f;color:inherit;font-size:1.25rem;font-weight:600;cursor:pointer;transition:background .15s}.touch-region-adjust-btn:hover{background:#ffffff40}.touch-region-adjust-btn:active{background:#ffffff59}.touch-region-adjust-actions{display:flex;gap:.5rem;margin-top:.25rem}.touch-region-adjust-confirm,.touch-region-adjust-cancel{flex:1;min-height:44px;padding:.5rem 1rem;border-radius:8px;font-size:.9375rem;font-weight:600;cursor:pointer}.stacking-canvas,.spectrum-data-display{display:block;width:100%;height:100%}.stacking-resize-handle{flex-shrink:0;width:8px;cursor:col-resize}.stacking-sidebar{flex-shrink:0;align-self:flex-start;min-width:160px;max-width:500px;background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:.75rem;display:flex;flex-direction:column;gap:.5rem}.sidebar-header{font-weight:600;font-size:.875rem;margin-bottom:.4rem;letter-spacing:-.01em}.sidebar-tabs{display:flex;gap:.2rem;margin-bottom:.4rem}.sidebar-tabs button{flex:1;padding:.4rem .5rem;font-size:.8125rem}.archive-list,.spectra-list{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.archive-empty{padding:.625rem;font-size:.8125rem;color:var(--subtitle);line-height:1.4}.archive-item{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.archive-item .spectrum-toggle{flex:1;min-width:0;cursor:default}.spectrum-item{padding:.5rem .6rem;border-radius:6px;background:var(--input-bg);border:1px solid transparent}.spectrum-item.visible{border-color:var(--accent)}.spectrum-item.active-spectrum{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.peak-list{margin-top:.35rem;font-size:.8125rem;max-height:160px;overflow-y:auto}.peak-list-item{display:flex;align-items:center;gap:.3rem;padding:.3rem 0;border-bottom:1px solid var(--border)}.peak-list-item:last-child{border-bottom:none}.peak-wavenumber{flex-shrink:0;font-family:ui-monospace,monospace;font-size:.75rem;min-width:48px}.peak-label-input{flex:1;min-width:0;padding:.25rem .35rem;font-size:.8125rem;border:1px solid var(--border);border-radius:4px}.peak-list-empty{padding:.5rem;color:var(--subtitle);font-size:.8125rem;line-height:1.4}.peak-list-actions{padding:.35rem 0;border-bottom:1px solid var(--border);margin-bottom:.25rem}.peak-checkbox{flex-shrink:0;margin:0}.peak-group-block{border:1px solid var(--border);border-radius:6px;padding:.35rem;margin:.35rem 0;background:var(--panel)}.peak-group-header{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;margin-bottom:.25rem;padding-bottom:.25rem;border-bottom:1px solid var(--border)}.peak-group-block.collapsed .peak-group-header{margin-bottom:0;padding-bottom:0;border-bottom:none}.peak-group-toggle{flex-shrink:0;width:20px;padding:.15rem;font-size:.7rem}.peak-group-count{font-size:.75rem;color:var(--subtitle);margin-left:auto}.peak-group-header .peak-label-input{flex:1;min-width:80px}.peak-in-group .peak-label-input{display:none}.peak-list-regions{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--border)}.peak-list-regions-label{font-size:.75rem;font-weight:500;color:var(--subtitle);margin-bottom:.25rem}.region-item{border-left:3px solid var(--accent, #0d47a1)}.spectrum-toggle-row{display:flex;align-items:center;gap:.4rem;font-size:.8125rem}.spectrum-icon-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:4px;cursor:pointer;color:inherit}.spectrum-icon-btn:hover{background:var(--drop-hover)}.spectrum-icon-btn.muted{opacity:.4}.spectrum-icon-btn.muted:hover{opacity:.7}.spectrum-remove-btn:hover{color:var(--error)}.spectrum-active-check{flex-shrink:0;display:flex;align-items:center;cursor:pointer}.spectrum-active-check input{position:absolute;opacity:0;width:0;height:0}.spectrum-active-dot{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--border);transition:border-color .2s,background .2s}.spectrum-active-check input:checked+.spectrum-active-dot{border-color:var(--accent);background:var(--accent);box-shadow:inset 0 0 0 2px var(--input-bg)}.spectrum-active-check:hover .spectrum-active-dot{border-color:var(--accent)}.spectrum-color{width:12px;height:12px;border-radius:2px;flex-shrink:0;box-shadow:inset 0 0 0 1px #0000001f;pointer-events:none}.spectrum-color-picker{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;padding:3px;margin:-3px;border-radius:4px}.spectrum-color-picker:focus-within{outline:2px solid var(--accent);outline-offset:1px}.spectrum-color-input-hidden{position:absolute;opacity:0;width:100%;height:100%;inset:0;margin:0;padding:0;cursor:pointer;border:none}.spectrum-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:.25rem}.spectrum-name .cos-badge{background:#06c3;color:var(--subtitle, #666)}.spectrum-toggle{display:flex;align-items:center;gap:.45rem;cursor:pointer;font-size:.8125rem}.spectrum-toggle input{cursor:pointer;width:14px;height:14px}.spectrum-meta{margin-top:.25rem;margin-left:1.4rem;display:flex;flex-wrap:wrap;gap:.25rem .5rem;align-items:center}.spectrum-meta .hint{margin-bottom:0;margin-right:.15rem}.spectrum-meta .small,.spectrum-meta button.small{font-size:.75rem;padding:.25rem .45rem}.full{width:100%;margin-top:auto}.settings-modal{background:var(--panel, #fff);border:1px solid var(--border, #ddd);border-radius:10px;box-shadow:0 8px 32px #0003;min-width:320px;max-width:400px;display:flex;flex-direction:column;overflow:hidden}.settings-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--border, #ddd)}.settings-modal-header h3{margin:0;font-size:1rem;font-weight:600}.settings-modal-close{width:28px;height:28px;padding:0;font-size:1.25rem;line-height:1}.settings-modal-body{padding:1rem;display:flex;flex-direction:column;gap:.5rem}.settings-modal-option{margin-bottom:.75rem}.settings-modal-option label{display:block;font-size:.8125rem;font-weight:500;margin-bottom:.25rem}.settings-modal-checkbox{display:flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer}.settings-modal-checkbox input{margin:0}.settings-modal-hint{font-size:.8125rem;color:var(--subtitle, #666);margin-bottom:.25rem}.settings-modal-footer-link{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border, #eee)}.settings-footer-link{font-size:.875rem;color:var(--accent, #0066cc);text-decoration:none}.settings-footer-link:hover{text-decoration:underline}.settings-modal-footer{display:flex;justify-content:flex-end;padding:.75rem 1rem;border-top:1px solid var(--border, #ddd)}.spectrum-info-modal-body{max-height:60vh;overflow-y:auto}.spectrum-info-metadata-list{margin:0;padding:0;list-style:none}.spectrum-info-metadata-row{display:grid;grid-template-columns:10em 1fr;gap:.5rem 1rem;padding:.35rem 0;border-bottom:1px solid var(--border, #eee);font-size:.8125rem}.spectrum-info-metadata-row:last-child{border-bottom:none}.spectrum-info-metadata-row dt{margin:0;font-weight:500;color:var(--subtitle, #555);word-break:break-word}.spectrum-info-metadata-row dd{margin:0;white-space:pre-wrap;word-break:break-word}.reference-scale-bar{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;font-size:.8125rem;border-top:1px solid var(--border, #ddd);min-height:36px}.reference-scale-hint{color:var(--subtitle, #666)}.reference-scale-cal-hint{color:var(--subtitle, #666);margin-left:auto}.y-min-adjust{display:flex;align-items:center;gap:.35rem;margin-left:auto}.y-min-label{font-size:.8125rem;color:var(--subtitle, #666)}.y-min-value{font-size:.8125rem;font-family:ui-monospace,monospace;min-width:2.5rem;text-align:center}.y-min-btn{width:24px;height:24px;padding:0;font-size:1rem;line-height:1}.export-modal{background:var(--panel, #fff);border:1px solid var(--border, #ddd);border-radius:10px;box-shadow:0 8px 32px #0003;min-width:320px;max-width:min(520px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);display:flex;flex-direction:column;overflow:hidden}.export-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--border, #ddd)}.export-modal-header h3{margin:0;font-size:1rem;font-weight:600}.export-modal-close{width:28px;height:28px;padding:0;font-size:1.25rem;line-height:1}.export-modal-body{padding:1rem;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow-y:auto}.export-modal-row{display:flex;gap:.75rem;align-items:flex-end}.export-modal-filename{flex:1;min-width:0}.export-modal-format{flex-shrink:0;width:110px}.export-filename-input,.export-format-select{padding:.5rem .75rem;border-radius:6px;font-size:.875rem;width:100%;box-sizing:border-box}.export-modal-option label{display:block;font-size:.8125rem;font-weight:500;margin-bottom:.35rem}.export-modal-checkbox{display:flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer}.export-modal-checkbox input{margin:0}.export-modal-with-preview{max-width:min(520px,calc(100vw - 2rem))}.export-modal-preview-wrap{margin-top:.25rem}.export-modal-preview-label{display:block;font-size:.8125rem;font-weight:500;margin-bottom:.35rem;color:var(--subtitle, #666)}.export-modal-preview{border:1px solid var(--border, #ddd);border-radius:6px;background:#fff;overflow:auto;max-height:min(280px,calc(100vh - 320px))}.export-modal-preview-img{display:block;width:100%;height:auto;object-fit:contain;object-position:top left}.export-modal-footer{display:flex;justify-content:flex-end;gap:.5rem;padding:.75rem 1rem;border-top:1px solid var(--border, #ddd)}.sample-library-modal{background:#252930;border:1px solid rgba(255,255,255,.12);border-radius:10px;box-shadow:0 8px 32px #00000080;min-width:480px;max-width:680px;max-height:85vh;display:flex;flex-direction:column;overflow:hidden}.sample-library-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid rgba(255,255,255,.08)}.sample-library-header h3{margin:0;font-size:.9375rem;font-weight:600;color:#fff}.sample-library-close{width:26px;height:26px;padding:0;font-size:1.1rem;line-height:1}.sample-library-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;padding:.5rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);background:#ffffff08}.sample-library-search{flex:1;min-width:180px;padding:.4rem .75rem;font-size:.875rem;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff14;color:#fff}.sample-library-search::placeholder{color:#ffffff80}.sample-library-sort{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:#fffc}.sample-library-sort select{padding:.35rem .5rem;font-size:.8125rem;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff1a;color:#fff}.sample-library-modal .ghost{color:#ffffffd9}.sample-library-modal .ghost:hover{color:#fff}.sample-library-list{flex:1;overflow-y:auto;min-height:0;-webkit-overflow-scrolling:touch}.sample-library-list-header{display:grid;grid-template-columns:1fr minmax(100px,1fr) 100px 72px;gap:.75rem;padding:.5rem 1rem;font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#ffffffbf;background:#ffffff0d;border-bottom:1px solid rgba(255,255,255,.08)}.sample-library-row{display:grid;grid-template-columns:1fr minmax(100px,1fr) 100px 72px;gap:.75rem;align-items:center;padding:.5rem 1rem;font-size:.875rem;color:#fff;border-bottom:1px solid rgba(255,255,255,.06);cursor:pointer}.sample-library-row:hover{background:#ffffff0f}.sample-library-col-name{display:flex;align-items:center;gap:10px;min-width:0}.sample-library-icon{flex-shrink:0;font-size:1rem;opacity:.8}.cos-badge{display:inline-block;font-size:.6rem;font-weight:600;letter-spacing:.04em;padding:.1em .4em;border-radius:3px;background:#0066cc40;color:#fffffff2;flex-shrink:0;margin-left:.35em}.cos-badge--small{font-size:.55rem;padding:.08em .3em}.sample-library-col-fg{font-size:.8125rem;color:#ffffffd9}.sample-library-col-cas{font-family:ui-monospace,monospace;font-size:.8125rem;color:#ffffffe6}.sample-library-col-action{display:flex;justify-content:flex-end;position:relative}.sample-library-row-actions{display:flex;align-items:center;gap:.25rem}.sample-library-info-btn{padding:4px;color:#ffffffb3}.sample-library-info-btn:hover{color:#fffffff2}.sample-library-info-popover{min-width:220px;max-width:320px;max-height:200px;overflow-y:auto;padding:.75rem 1.5rem .75rem .75rem;background:#1a1d24;border:1px solid rgba(255,255,255,.15);border-radius:8px;box-shadow:0 4px 16px #0006;display:flex;flex-direction:column;gap:.5rem}.sample-library-info-popover:not(.sample-library-info-popover--portal){position:absolute;right:0}.sample-library-info-popover--below{top:100%;margin-top:4px}.sample-library-info-popover--above{bottom:100%;margin-bottom:4px}.sample-library-info-content{font-size:.75rem;line-height:1.4;color:#ffffffe6}.sample-library-info-content p{margin:0 0 .5rem}.sample-library-info-content p:last-child{margin-bottom:0}.sample-library-info-content strong{font-size:.6875rem;text-transform:uppercase;letter-spacing:.04em;color:#ffffffa6}.sample-library-info-empty{font-style:italic;color:#fff9}.sample-library-info-close{position:absolute;top:4px;right:4px;padding:2px 6px;font-size:1rem;line-height:1;color:#fff9}.sample-library-footer{display:flex;align-items:center;justify-content:space-between;padding:.6rem 1rem;border-top:1px solid rgba(255,255,255,.08);background:#ffffff08}.sample-library-hint{font-size:.8125rem;color:#ffffffa6}.calibration-modal-content{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:1.5rem;max-width:90vw;max-height:90vh;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:1rem}.calibration-bg-row{display:flex;align-items:center;gap:.5rem}.calibration-bg-row .color-picker{width:36px;height:32px}.calibration-img-wrap{padding:12px;border-radius:8px;display:inline-block}.calibration-canvas-wrap{position:relative}.calibration-zoom-box{position:absolute;border:2px dashed rgba(0,100,255,.8);pointer-events:none}.calibration-img{max-width:100%;max-height:60vh;cursor:crosshair;border-radius:4px;display:block}.spectrum-adjust{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--border);font-size:.8125rem}.spectrum-adjust label{display:block;margin-top:.4rem;margin-bottom:.2rem;font-size:.75rem}.nudge-row{display:flex;align-items:center;gap:.3rem}.nudge-row button{padding:.25rem .4rem;font-size:.8125rem}.nudge-row input[type=number]{font-size:.8125rem}.jcamp-editor{max-width:900px}.jcamp-editor--group-mode{--accent: #c43d3d;--accent-hover: #d65555;--accent-muted: rgba(196, 61, 61, .25)}.jcamp-editor--group-mode .primary,.jcamp-editor--group-mode button.primary{background:var(--accent)}.jcamp-editor--group-mode .primary:hover,.jcamp-editor--group-mode button.primary:hover{background:var(--accent-hover)}.jcamp-editor--group-mode .jcamp-metadata-section,.jcamp-editor--group-mode .jcamp-data-section{border-color:#c43d3d66}.jcamp-editor--group-mode .jcamp-mode-tab.active{background:var(--accent-muted);color:var(--accent)}.jcamp-editor-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1rem;margin-bottom:1rem}.jcamp-file-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem;flex:1;min-width:0}.jcamp-file-toolbar .primary{margin-left:auto}.jcamp-mode-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin-bottom:0}.jcamp-mode-tab{padding:.4rem .75rem;font-size:.875rem;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--subtitle)}.jcamp-mode-tab:hover{background:#ffffff0d;color:inherit}.jcamp-mode-tab.active{background:#3b82f633;color:var(--accent);border-color:var(--accent)}.jcamp-file-selector select,.jcamp-file-select{padding:.4rem .75rem;font-size:.875rem;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:inherit;max-width:min(100%,22rem)}.jcamp-apply-message{padding:.5rem .75rem;margin-bottom:1rem;background:#22c55e33;color:#22c55e;border-radius:6px;font-size:.875rem}@media(max-width:900px){.app.jcamp-editor{overflow:auto;height:auto;max-height:none}}.jcamp-editor-upload{margin-bottom:1.5rem}.jcamp-editor-workspace{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-bottom:1.5rem}@media(max-width:950px){.jcamp-editor-workspace{grid-template-columns:1fr}}.jcamp-metadata-section,.jcamp-data-section{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:1.25rem;min-width:0}.jcamp-metadata-section{overflow-x:auto}.jcamp-metadata-section h2,.jcamp-data-section h2{margin:0 0 1rem;font-size:1rem;font-weight:600}.jcamp-data-section{display:flex;flex-direction:column;min-height:0}.jcamp-entries{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.jcamp-entry{display:flex;align-items:center;gap:.5rem}.jcamp-entry-key{flex-shrink:0;font-size:.8125rem;font-family:monospace;color:var(--subtitle);min-width:10rem}.jcamp-entry-value{flex:1;padding:.35rem .5rem;font-size:.875rem;border:1px solid var(--border);border-radius:6px}.jcamp-entry-multiline{align-items:flex-start}.jcamp-entry-value-textarea{min-height:120px;resize:vertical;font-family:inherit}.jcamp-remove{flex-shrink:0;width:28px;height:28px;padding:0;font-size:1.25rem;line-height:1}.jcamp-raw-line{font-size:.8125rem;color:var(--subtitle);font-style:italic;padding:.25rem 0}.jcamp-audit-trail-section{margin-top:1.25rem;padding-top:1rem;border-top:1px solid var(--border)}.jcamp-audit-trail-section h3{margin:0 0 .35rem;font-size:.875rem;font-weight:600}.jcamp-audit-trail-hint{font-size:.8125rem;color:var(--subtitle);margin:0 0 .5rem}.jcamp-audit-trail-display{display:block;width:100%;min-height:120px;max-height:220px;resize:vertical;padding:.5rem .75rem;font-size:.8125rem;font-family:monospace;background:var(--bg);border:1px solid var(--border);border-radius:6px;overflow:auto;margin-bottom:.75rem;color:var(--subtitle)}.jcamp-audit-trail-add{display:flex;flex-direction:column;gap:.5rem}.jcamp-audit-trail-input{min-height:100px;resize:vertical;padding:.5rem .75rem;font-size:.875rem;font-family:inherit;border:1px solid var(--border);border-radius:6px}.jcamp-add-section h3{margin:0 0 .5rem;font-size:.875rem;font-weight:500}.jcamp-add-row{display:flex;gap:.5rem;flex-wrap:wrap}.jcamp-add-key,.jcamp-add-value{padding:.5rem .75rem;font-size:.875rem;border:1px solid var(--border);border-radius:6px}.jcamp-add-key{min-width:12rem}.jcamp-add-value{flex:1;min-width:8rem}.jcamp-format-guide{margin:.5rem 0 0;font-size:.8125rem;color:var(--subtitle);line-height:1.4}.jcamp-entry-key{cursor:help}.jcamp-data-preview{display:block;width:100%;min-height:120px;max-height:min(360px,45vh);flex:1 1 auto;box-sizing:border-box;font-size:.75rem;font-family:monospace;background:var(--bg);padding:.75rem;border:1px solid var(--border);border-radius:6px;resize:vertical;overflow:auto;margin:0 0 .5rem}.jcamp-data-hint{font-size:.8125rem;color:var(--subtitle);margin:0}.jcamp-editor-footer{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:flex-start}.app{display:flex;flex-direction:column;min-height:100vh;padding:1.25rem 1.5rem;max-width:1200px;margin:0 auto}@media(max-width:900px){.app{height:100dvh;max-height:100dvh;padding:.25rem .5rem;overflow:hidden;box-sizing:border-box}}.nav-links{display:flex;gap:.75rem;margin-bottom:.75rem;justify-content:center}.nav-link{color:var(--subtitle);text-decoration:none;font-size:.875rem}.nav-link:hover{color:var(--accent)}.nav-link.active{color:var(--accent);font-weight:500}.header{text-align:center;margin-bottom:2rem}.header h1{font-size:1.5rem;font-weight:700;margin:0 0 .4rem;letter-spacing:-.02em}.subtitle{color:var(--subtitle);font-size:.875rem;margin:0;line-height:1.5}.upload-zone{position:relative;margin-bottom:1.5rem}.file-input{position:absolute;opacity:0;width:0;height:0}.drop-area{border:2px dashed var(--border);border-radius:12px;padding:3rem 2rem;text-align:center;cursor:pointer;transition:border-color .2s,background .2s}.drop-area:hover{border-color:var(--accent);background:var(--drop-hover)}.drop-area span{display:block}.drop-area .formats{font-size:.85rem;color:var(--subtitle);margin-top:.25rem}.error{background:var(--error-bg);color:var(--error);padding:.75rem 1rem;border-radius:8px;margin-bottom:1rem;font-size:.9rem}.workspace{display:grid;grid-template-columns:280px 1fr;gap:2rem;align-items:start}@media(max-width:768px){.workspace{grid-template-columns:1fr}}.controls{background:var(--panel);border-radius:12px;padding:1.25rem;border:1px solid var(--border);position:sticky;top:1rem}.control-group{margin-bottom:1rem}.control-group:last-of-type{margin-bottom:1.5rem}.live-toggle-group{margin-bottom:1rem}.toggle-label{display:flex!important;align-items:center;gap:.5rem;cursor:pointer}.toggle-label input[type=checkbox]{width:1rem;height:1rem;cursor:pointer}.live-warning{display:block;font-size:.75rem;color:var(--error);margin-top:.35rem}.control-group label{display:block;font-size:.8125rem;font-weight:500;margin-bottom:.35rem}.color-row{display:flex;gap:.5rem;align-items:center}.hex-input{flex:1;min-width:0;padding:.5rem .75rem;border:1px solid var(--border);border-radius:6px;font-family:ui-monospace,monospace;font-size:.9rem;background:var(--input-bg);color:inherit}.color-picker{width:40px;height:36px;padding:2px;border:1px solid var(--border);border-radius:6px;cursor:pointer;background:var(--input-bg)}.eyedropper-btn{padding:.5rem .75rem;font-size:.85rem;white-space:nowrap}.eyedropper-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}.control-group input[type=range]{width:100%;margin-bottom:.25rem}.hint{font-size:.75rem;color:var(--subtitle);display:block;line-height:1.35}.actions{display:flex;flex-wrap:wrap;gap:.5rem}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.primary:hover{filter:brightness(1.05)}.secondary{border-color:var(--accent);color:var(--accent)}.ghost{color:var(--subtitle)}.ghost:hover{color:inherit}button.small{padding:.35rem .6rem;font-size:.8125rem}.full{width:100%}.preview-area{position:relative}.eyedropper-hint{position:absolute;top:-1.5rem;left:0;font-size:.8rem;color:var(--accent);font-weight:500}.preview-wrapper{background:repeating-conic-gradient(gray 0% 25%,silver 0% 50%) 50% / 16px 16px;border-radius:8px;padding:12px;display:inline-block;max-width:100%}.preview-bg-btn{padding:.4rem .6rem;font-size:1rem;line-height:1}.preview-bg-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}.zoom-lens{position:fixed;z-index:100;pointer-events:none;border-radius:6px;box-shadow:0 4px 20px #0006;overflow:hidden}.zoom-lens canvas{display:block;border-radius:6px}.preview-img{max-width:100%;max-height:70vh;display:block;border-radius:4px}.offscreen{position:absolute;left:-9999px;width:0;height:0}
