*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}#root{height:100vh;overflow:hidden}.app{height:100vh;display:flex;flex-direction:column}.content{flex:1;display:flex;flex-direction:row;overflow:hidden}.header{padding:2rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;text-align:center}.header h1{margin:0;font-size:2.5rem;font-weight:700}.subtitle{margin:.5rem 0 0;font-size:1.1rem;opacity:.9}.status-bar{padding:.75rem 1.5rem;background-color:#f8f9fa;border-bottom:1px solid #dee2e6;font-size:.9rem;color:#495057}.status-text{font-weight:500}.main-content{flex:1;padding:2rem;overflow-y:auto;background-color:#fff}.empty-state{display:flex;align-items:center;justify-content:center;height:100%;color:#6c757d;font-size:1.1rem}.file-list{width:100%;max-width:100%;margin:0 auto}.file-list h2{color:#333;margin-bottom:1rem;font-size:1.5rem;border-bottom:2px solid #667eea;padding-bottom:.5rem}.textgrid-item{background:#f8f9fa;border:1px solid #dee2e6;border-radius:8px;padding:1.5rem;margin-bottom:1.5rem}.textgrid-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.textgrid-item h3{margin:0;color:#495057;font-size:1.3rem}.save-textgrid-button{background-color:#667eea;color:#fff;border:none;padding:.5rem 1rem;border-radius:4px;font-size:.9rem;font-weight:600;cursor:pointer;transition:background-color .2s}.save-textgrid-button:hover{background-color:#5568d3}.file-name{color:#667eea;font-weight:600;font-size:1.1rem}.file-list ul{list-style:none;padding:0}.file-list li{background:#f8f9fa;border:1px solid #dee2e6;border-radius:8px;padding:1rem;margin-bottom:.75rem;transition:box-shadow .2s}.file-list li:hover{box-shadow:0 2px 8px #0000001a}.file-info{display:flex;gap:1.5rem;margin-top:.5rem;font-size:.9rem;color:#6c757d}.merged-info{margin-top:2rem;padding-top:2rem;border-top:3px solid #28a745;background:#f0f8f4;padding:2rem;border-radius:8px}.merged-info h2{color:#28a745;margin:0 0 1rem;font-size:1.5rem;border-bottom:2px solid #28a745;padding-bottom:.5rem}.merged-info .tier-detail{background:#fff;border:2px solid #28a745}.merged-info .tier-detail h4{color:#28a745;background:#e8f5e9;margin:-1rem -1rem 1rem;padding:.75rem 1rem;border-bottom:2px solid #28a745}.tier-list{margin-top:1rem}.tier-list h3{color:#333;font-size:1.2rem;margin-bottom:.75rem}.tier-list ul{list-style:disc;padding-left:2rem}.tier-list li{background:none;border:none;padding:.25rem 0;margin-bottom:.25rem;border-radius:0}.tier-list li:hover{box-shadow:none}.tiers-section{margin-top:1.5rem}.tier-detail{background:#fff;border:1px solid #dee2e6;border-radius:6px;padding:1rem;margin-bottom:1rem}.tier-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid #e9ecef}.tier-header h4{margin:0;color:#667eea;font-size:1.1rem}.csv-export-button{background-color:#28a745;color:#fff;border:none;padding:.4rem .8rem;border-radius:4px;font-size:.85rem;font-weight:600;cursor:pointer;transition:background-color .2s}.csv-export-button:hover{background-color:#218838}.tier-detail h4{margin:0 0 1rem;color:#667eea;font-size:1.1rem;padding-bottom:.5rem;border-bottom:1px solid #e9ecef}.annotations-list{margin-top:.75rem}.annotations-table{width:100%;border-collapse:collapse;font-size:.9rem;background:#fff}.annotations-table thead{background:#f8f9fa;border-bottom:2px solid #dee2e6}.annotations-table th{padding:.75rem .5rem;text-align:left;font-weight:600;color:#495057}.annotations-table th:first-child{width:50px;text-align:center}.annotations-table th:nth-child(2),.annotations-table th:nth-child(3){width:90px}.annotations-table td{padding:.5rem;border-bottom:1px solid #e9ecef;vertical-align:top}.annotations-table td:first-child{text-align:center;color:#6c757d;font-weight:500}.annotations-table tr:hover{background:#f8f9fa}.annotations-table tr.empty-annotation{opacity:.5}.annotation-text{font-family:Courier New,monospace;white-space:pre-wrap;word-break:break-word}.annotation-text em{color:#6c757d;font-style:italic}.annotation-summary{margin-top:.75rem;padding:.5rem;background:#e7f3ff;border-radius:4px;font-size:.85rem;color:#0056b3;text-align:center}.menu-bar{display:flex;background-color:#f5f5f5;border-bottom:1px solid #ddd;padding:0;-webkit-user-select:none;user-select:none;align-items:center}.menu-title{font-weight:700;font-size:16px;color:#333;padding:8px 16px;margin-right:8px}.menu-item{position:relative}.menu-button{background:none;border:none;padding:8px 16px;cursor:pointer;font-size:14px;color:#333;transition:background-color .2s}.menu-button:hover{background-color:#e0e0e0}.menu-dropdown{position:absolute;top:100%;left:0;background-color:#fff;border:1px solid #ddd;box-shadow:0 2px 8px #00000026;min-width:200px;z-index:1000}.menu-dropdown-item{display:block;width:100%;background:none;border:none;padding:8px 16px;text-align:left;cursor:pointer;font-size:14px;color:#333;transition:background-color .2s}.menu-dropdown-item:hover:not(:disabled){background-color:#e8f4ff}.menu-dropdown-item:disabled{color:#999;cursor:not-allowed}.menu-divider{height:1px;background-color:#ddd;margin:4px 0}.menu-spacer{flex:1}.github-link{display:flex;align-items:center;padding:8px 12px;color:#333;text-decoration:none;transition:background-color .2s,color .2s;border-radius:4px}.github-link:hover{background-color:#e0e0e0;color:#000}.github-link svg{display:block}.language-button{background:none;border:none;padding:8px 16px;cursor:pointer;font-size:14px;font-weight:600;color:#333;transition:background-color .2s}.language-button:hover{background-color:#e0e0e0}.modal-content{background:#fff;border-radius:8px;max-width:800px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 4px 20px #00000026}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #e0e0e0;position:sticky;top:0;background:#fff;z-index:1}.modal-header h2{margin:0;font-size:24px;color:#333}.close-button{background:none;border:none;font-size:32px;color:#666;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s}.close-button:hover{background-color:#f0f0f0;color:#333}.help-section{margin-bottom:32px}.help-section:last-child{margin-bottom:0}.help-section h3{font-size:18px;color:#1976d2;margin-top:0;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #e3f2fd}.help-steps{list-style:none;counter-reset:step-counter;padding-left:0}.help-steps li{counter-increment:step-counter;margin-bottom:20px;padding-left:40px;position:relative}.help-steps li:before{content:counter(step-counter);position:absolute;left:0;top:0;width:28px;height:28px;background-color:#1976d2;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px}.help-steps li strong{display:block;margin-bottom:6px;color:#333;font-size:15px}.help-steps li p{margin:0;color:#666;line-height:1.6}.help-list{padding-left:20px;margin:0}.help-list li{margin-bottom:12px;color:#666;line-height:1.6}.help-list li strong{color:#333}.modal-content::-webkit-scrollbar{width:8px}.modal-content::-webkit-scrollbar-track{background:#f1f1f1}.modal-content::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.modal-content::-webkit-scrollbar-thumb:hover{background:#555}.merge-policy-example{margin-top:20px;padding:20px;background:#f8f9fa;border-radius:8px;border:1px solid #e0e0e0}.merge-policy-example svg{display:block;margin:0 auto;background:#fff;border-radius:4px}.policy-descriptions{margin-top:20px;padding:16px;background:#fff;border-radius:4px;border:1px solid #e0e0e0}.policy-desc-item{margin-bottom:12px;font-size:13px;line-height:1.6;color:#333}.policy-desc-item:last-child{margin-bottom:0}.policy-desc-item strong{color:#1976d2;font-weight:600}.example-legend{display:flex;justify-content:center;gap:24px;margin-top:16px;padding-top:16px;border-top:1px solid #e0e0e0}.legend-item{display:flex;align-items:center;gap:8px}.legend-color{width:30px;height:20px;border-radius:3px}.legend-item span{font-size:13px;color:#333}.modal-overlay{position:fixed;inset:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000;padding:20px}.merge-tiers-modal{background:#fff;border-radius:8px;width:600px;max-width:90%;max-height:85vh;box-shadow:0 4px 20px #00000026;overflow-y:auto}.modal-close{background:none;border:none;font-size:32px;color:#666;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s}.modal-close:hover{background-color:#f0f0f0;color:#333}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid #e0e0e0;background:#fff}.modal-header h2{margin:0;font-size:20px;color:#333}.modal-body{padding:24px}.merge-tiers-section{margin-bottom:24px}.merge-tiers-section h3{margin:0 0 12px;font-size:14px;font-weight:600;color:#333}.tier-list{max-height:200px;overflow-y:auto;border:1px solid #ddd;border-radius:4px;padding:8px}.tier-checkbox-item{display:flex;align-items:center;padding:8px;cursor:pointer;border-radius:4px;transition:background-color .2s}.tier-checkbox-item:hover{background-color:#f5f5f5}.tier-checkbox-item input[type=checkbox]{margin-right:8px;cursor:pointer}.tier-name{font-weight:500;margin-right:8px}.tier-info{color:#666;font-size:12px}.no-tiers{color:#999;font-style:italic;text-align:center;padding:20px}.tier-name-input{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;font-family:inherit}.tier-name-input:focus{outline:none;border-color:#4caf50}.keep-original-checkbox{display:flex;align-items:center;cursor:pointer}.keep-original-checkbox input[type=checkbox]{margin-right:8px;cursor:pointer}.keep-original-checkbox span{font-size:14px}.modal-footer{display:flex;justify-content:center;gap:12px;padding:20px 24px;border-top:1px solid #e0e0e0;background:#f8f9fa}.modal-button{padding:10px 24px;font-size:14px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .2s;min-width:100px}.modal-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 2px 8px #00000026}.modal-button:active:not(:disabled){transform:translateY(0)}.modal-button:not(.modal-button-primary){background-color:#fff;color:#333;border:1px solid #ddd}.modal-button:not(.modal-button-primary):hover:not(:disabled){background-color:#f5f5f5;border-color:#bbb}.modal-button-primary{background-color:#4caf50;color:#fff}.modal-button-primary:hover:not(:disabled){background-color:#45a049}.modal-button:disabled{opacity:.5;cursor:not-allowed}.merge-policy-options{display:flex;flex-direction:column;gap:12px}.merge-policy-option{display:flex;align-items:flex-start;padding:12px;border:2px solid #e0e0e0;border-radius:6px;cursor:pointer;transition:all .2s}.merge-policy-option:hover{background-color:#f5f5f5;border-color:#bbb}.merge-policy-option input[type=radio]{margin-right:12px;margin-top:4px;cursor:pointer;flex-shrink:0}.merge-policy-option input[type=radio]:checked+.merge-policy-label{color:#4caf50}.merge-policy-option:has(input[type=radio]:checked){background-color:#e8f5e9;border-color:#4caf50}.merge-policy-label{display:flex;flex-direction:column;gap:4px;flex:1}.merge-policy-label strong{font-size:14px;color:#333}.merge-policy-desc{font-size:12px;color:#666;line-height:1.4}.file-list-panel{min-width:200px;max-width:600px;background:#f8f9fa;border-right:1px solid #dee2e6;display:flex;flex-direction:column;overflow:hidden;position:relative}.panel-header{padding:.75rem;background:#fff;border-bottom:2px solid #667eea;display:flex;justify-content:space-between;align-items:center}.panel-header h3{margin:0;font-size:1rem;color:#333}.sort-buttons{display:flex;gap:.5rem}.sort-button{background:#e9ecef;border:1px solid #ced4da;border-radius:3px;padding:.3rem .5rem;cursor:pointer;font-size:.9rem;transition:all .2s}.sort-button:hover{background:#dee2e6}.sort-button.active{background:#667eea;border-color:#667eea;color:#fff}.file-list{flex:1;overflow-y:auto;padding:.5rem}.file-item{background:#fff;border:1px solid #dee2e6;border-radius:4px;padding:.4rem .5rem;margin-bottom:.25rem;cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.4rem}.file-item:hover{border-color:#667eea;box-shadow:0 2px 6px #667eea33}.file-item.selected{background:#e7f3ff;border-color:#667eea;box-shadow:0 1px 4px #667eea4d}.file-item.dragging{opacity:.4}.file-item.drag-over{border-top:3px solid #667eea;padding-top:calc(.4rem - 2px)}.file-item input[type=checkbox]{cursor:pointer;width:14px;height:14px;flex-shrink:0}.file-info-row{flex:1;display:grid;grid-template-columns:auto 1fr auto auto;gap:.5rem;align-items:center;cursor:pointer;min-width:0}.file-number-col{font-size:.7rem;color:#6c757d;font-weight:600;white-space:nowrap}.file-name-col{font-size:.85rem;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tier-count-col{font-size:.75rem;color:#6c757d;font-weight:500;white-space:nowrap}.time-range-col{font-size:.7rem;color:#6c757d;font-family:Courier New,monospace;white-space:nowrap}.drop-zone-bottom{min-height:20px;margin-top:.5rem;border-radius:4px;transition:all .2s}.drop-zone-bottom.drag-over{border-top:3px solid #667eea;background:#e7f3ff}.drag-handle{cursor:grab;color:#adb5bd;font-size:1rem;line-height:1;-webkit-user-select:none;user-select:none;flex-shrink:0}.drag-handle:active{cursor:grabbing}.resize-handle{position:absolute;top:0;right:0;width:4px;height:100%;cursor:col-resize;background:transparent;transition:background .2s}.resize-handle:hover{background:#667eea}.resize-handle:active{background:#5568d3}.band-view{width:100%;overflow-x:auto;background:#fff;border:1px solid #ddd;border-radius:4px;margin:20px 0;padding:0;position:relative}.band-view-controls{position:sticky;left:0;top:0;display:flex;align-items:center;gap:8px;padding:10px;background:#f8f9fa;border-bottom:1px solid #ddd;z-index:10}.band-view-controls button{padding:4px 12px;background:#fff;border:1px solid #ccc;border-radius:4px;cursor:pointer;font-size:14px;font-weight:600;transition:all .2s}.band-view-controls button:hover:not(:disabled){background:#e9ecef;border-color:#999}.band-view-controls button:disabled{opacity:.4;cursor:not-allowed}.band-view-controls .zoom-level{min-width:50px;text-align:center;font-size:13px;font-weight:500;color:#495057}.band-view svg{display:block}.band-view text{-webkit-user-select:none;user-select:none}.band-view .interval-text{pointer-events:none}.band-view .interval-rect:hover{fill:#6496fa40;stroke:#6496fa80;cursor:pointer}.band-view .point-line:hover{stroke-width:3;cursor:pointer}.band-view .point-mark{font-weight:500}
