:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#ffffffde;background-color:#242424;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;min-width:320px;min-height:100vh}#root{width:100%}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:none}[data-theme=light]{color:#213547;background-color:#fff}[data-theme=light] a:hover{color:#747bff}[data-theme=light] button{background-color:#f0f0f0;color:#213547}.app{max-width:1200px;margin:0 auto;padding:1.5rem}h1{text-align:center;font-size:1.8em}.groups-input{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}.group-input-card{border:1px solid #333;border-radius:8px;padding:.75rem;background:#1e1e1e}.group-input-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.group-input-title{font-weight:600;font-size:.9em}.group-menu-wrap{position:relative}.group-menu-btn{background:transparent;border:1px solid #444;color:#aaa;font-size:1em;padding:.1em .45em;border-radius:4px;cursor:pointer;line-height:1}.group-menu-btn:hover{border-color:#646cff;color:#646cff}.group-dropdown{position:absolute;right:0;top:100%;margin-top:4px;min-width:170px;background:#2a2a2a;border:1px solid #444;border-radius:8px;padding:.35rem 0;z-index:100;box-shadow:0 4px 16px #0006}.dropdown-item{display:block;width:100%;text-align:left;background:none;border:none;color:#ddd;padding:.45em .85em;font-size:.85em;cursor:pointer;border-radius:0}.dropdown-item:hover:not(:disabled){background:#646cff26;border-color:transparent}.dropdown-item:disabled{color:#555;cursor:default}.dropdown-divider{height:1px;background:#444;margin:.25rem 0}.dropdown-empty{padding:.45em .85em;font-size:.8em;color:#666}.saved-lists-bar{margin-bottom:1.5rem}.manage-lists-btn{background:transparent;border:1px solid #444;color:#aaa;padding:.4em 1em;font-size:.85em;border-radius:6px;cursor:pointer}.manage-lists-btn:hover{border-color:#646cff;color:#646cff}.saved-lists-grid{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.saved-list-chip{display:flex;align-items:center;gap:.4em;background:#2a2a2a;border:1px solid #444;border-radius:6px;padding:.35em .6em;font-size:.82em}.chip-name{color:#ddd}.chip-count{color:#888;font-size:.9em}.chip-delete{background:none;border:none;color:#666;cursor:pointer;padding:0 .2em;font-size:.9em;line-height:1}.chip-delete:hover{color:#ff6b6b}.modal-overlay{position:fixed;inset:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:200}.modal{background:#2a2a2a;border:1px solid #444;border-radius:12px;padding:1.5rem;min-width:320px;max-width:90vw}.modal h3{margin:0 0 .5rem;font-size:1.1em}.modal-desc{color:#888;font-size:.85em;margin:0 0 1rem}.modal-input{width:100%;box-sizing:border-box;padding:.55em .75em;border-radius:6px;border:1px solid #555;background:#1a1a1a;color:inherit;font-size:.95em;font-family:inherit;margin-bottom:1rem}.modal-input:focus{outline:none;border-color:#646cff}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem}.modal-cancel,.modal-confirm{padding:.45em 1.2em;font-size:.9em;border-radius:6px;border:none;cursor:pointer;font-weight:500}.modal-cancel{background:#444;color:#ccc}.modal-cancel:hover{background:#555;border-color:transparent}.modal-confirm{background:#4361ee;color:#fff}.modal-confirm:hover:not(:disabled){background:#3a56d4;border-color:transparent}.modal-confirm:disabled{opacity:.4;cursor:default}.group-input-card textarea{width:100%;box-sizing:border-box;padding:.5em;border-radius:6px;border:1px solid #444;background:#2a2a2a;color:inherit;font-family:inherit;font-size:.85em;resize:vertical;line-height:1.5}.group-input-card textarea:focus{outline:none;border-color:#646cff}.main-layout{display:grid;grid-template-columns:1fr 340px;gap:1.5rem;align-items:start}.rules-panel{border:1px solid #333;border-radius:10px;padding:1.25rem;background:#1a1a1a}.rules-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:1rem}.rules-header h2{font-size:1.1em;margin:0}.rules-header-actions{display:flex;gap:.5rem}.select-all-btn,.deselect-all-btn{padding:.45em 1em;font-size:.85em;font-weight:600;border-radius:6px;border:none;cursor:pointer}.select-all-btn{background:#4361ee;color:#fff}.select-all-btn:hover{background:#3a56d4;border-color:transparent}.deselect-all-btn{background:#e9ecef;color:#333}.deselect-all-btn:hover{background:#ddd;border-color:transparent}.btn-icon{margin-right:.25em}.rules-section{border:2px dashed #3a3a3a;border-radius:8px;padding:.75rem;margin-bottom:.75rem}.rules-section:last-child{margin-bottom:0}.rules-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:.25rem .5rem}.rule-item{display:flex;align-items:center;gap:.4em;padding:.3em .2em;font-size:.88em;cursor:pointer;white-space:nowrap;border-radius:4px}.rule-item:hover{background:#646cff14}.rule-item input[type=checkbox]{accent-color:#888;width:15px;height:15px;cursor:pointer}.results-panel{border:1px solid #333;border-radius:10px;padding:1.25rem;background:#1a1a1a;position:sticky;top:1rem}.results-title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.results-title-row h2{font-size:1.1em;margin:0}.clear-btn{padding:.3em .8em;font-size:.8em;border-radius:6px;border:1px solid #555;background:transparent;color:#aaa;cursor:pointer}.clear-btn:hover:not(:disabled){border-color:#ff6b6b;color:#ff6b6b;background:#ff6b6b1a}.clear-btn:disabled{opacity:.4;cursor:default}.space-toggle{display:flex;align-items:center;gap:.5em;font-size:.9em;cursor:pointer;margin-bottom:.75rem}.space-toggle input[type=checkbox]{accent-color:#646cff;width:15px;height:15px;cursor:pointer}.results-box{border:1px solid #333;border-radius:6px;background:#222;min-height:200px;max-height:350px;overflow-y:auto;padding:.75rem;margin-bottom:.75rem}.results-placeholder{color:#666;font-size:.9em;margin:0}.result-line{font-size:.85em;padding:.15em 0;font-family:Courier New,Courier,monospace;word-break:break-all}.results-info{font-size:.85em;color:#888;text-align:right;margin:0 0 1rem}.results-info strong{color:inherit}.combine-btn,.download-btn{width:100%;padding:.75em;font-size:1em;font-weight:600;border:none;border-radius:8px;cursor:pointer;margin-bottom:.5rem}.combine-btn{background:#4361ee;color:#fff}.combine-btn:hover{background:#3a56d4;border-color:transparent}.download-btn{background:#2ec4b6;color:#fff;margin-bottom:0}.download-btn:hover{background:#26a89c;border-color:transparent}.app-header{display:flex;align-items:center;position:relative;margin-bottom:1.5rem}.header-logo{position:absolute;left:0;top:50%;transform:translateY(-30%);height:1.2em;object-fit:contain}.app-header h1{margin:0;flex:1;text-align:center}.header-actions{position:absolute;right:0;display:flex;gap:.4rem;align-items:center}.theme-toggle,.manager-toggle{background:#2a2a2a;border:1px solid #444;color:#ddd;padding:.35em .7em;font-size:1.1em;border-radius:8px;cursor:pointer;line-height:1;transition:background .2s,border-color .2s}.theme-toggle:hover,.manager-toggle:hover{border-color:#646cff;background:#333}.manager-toggle{font-weight:700;font-size:.95em;padding:.4em .65em}.manager-toggle.active{background:#4361ee;border-color:#4361ee;color:#fff}.manager-bar{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding:.6rem 1rem;border:1px solid #4361ee44;border-radius:8px;background:#4361ee11;margin-bottom:1rem}.manager-badge{font-weight:700;font-size:.8em;color:#4361ee;background:#4361ee22;padding:.25em .6em;border-radius:4px}.mgr-action-btn{padding:.35em .8em;font-size:.8em;background:transparent;border:1px solid #555;color:#aaa;border-radius:6px;cursor:pointer}.mgr-action-btn:hover{border-color:#ff6b6b;color:#ff6b6b}.mgr-limit{display:flex;align-items:center;gap:.4em;margin-left:auto;font-size:.82em;color:#aaa}.mgr-limit input{width:80px;padding:.3em .5em;border:1px solid #444;border-radius:4px;background:#2a2a2a;color:inherit;font-size:1em;font-family:inherit}.mgr-limit input:focus{outline:none;border-color:#646cff}.group-csv-btn{background:transparent;border:1px solid #444;color:#aaa;font-size:.72em;padding:.15em .45em;border-radius:4px;cursor:pointer;font-weight:600;line-height:1}.group-csv-btn:hover{border-color:#2ec4b6;color:#2ec4b6}.preset-save-btn{padding:.45em .8em;font-size:.8em;font-weight:600;border-radius:6px;border:1px solid #4361ee;background:transparent;color:#4361ee;cursor:pointer}.preset-save-btn:hover:not(:disabled){background:#4361ee22;border-color:#4361ee}.preset-save-btn:disabled{opacity:.4;cursor:default}.presets-bar{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.75rem}.preset-chip{display:flex;align-items:center;border:1px solid #444;border-radius:6px;overflow:hidden}.preset-load{background:transparent;border:none;color:#ddd;padding:.3em .6em;font-size:.8em;cursor:pointer;border-radius:0}.preset-load:hover{background:#4361ee22;border-color:transparent}.preset-delete{background:transparent;border:none;border-left:1px solid #444;color:#666;padding:.3em .45em;font-size:.75em;cursor:pointer;border-radius:0}.preset-delete:hover{color:#ff6b6b;background:#ff6b6b1a}.filter-input{width:100%;box-sizing:border-box;padding:.45em .7em;border:1px solid #444;border-radius:6px;background:#2a2a2a;color:inherit;font-size:.85em;font-family:inherit;margin-bottom:.5rem}.filter-input:focus{outline:none;border-color:#646cff}.csv-export-btn{width:100%;padding:.75em;font-size:1em;font-weight:600;border:none;border-radius:8px;cursor:pointer;margin-top:.5rem;background:#e67e22;color:#fff}.csv-export-btn:hover:not(:disabled){background:#cf6d17;border-color:transparent}.csv-export-btn:disabled{opacity:.4;cursor:default}.history-section{margin-top:1rem;border-top:1px solid #333;padding-top:.75rem}.history-toggle-btn{background:transparent;border:1px solid #444;color:#aaa;padding:.4em .8em;font-size:.82em;border-radius:6px;cursor:pointer;width:100%}.history-toggle-btn:hover{border-color:#646cff;color:#646cff}.history-list{margin-top:.5rem;max-height:250px;overflow-y:auto}.history-empty{font-size:.82em;color:#666;text-align:center;padding:.5em}.history-clear{display:block;width:100%;background:transparent;border:none;color:#ff6b6b;font-size:.78em;padding:.3em;cursor:pointer;text-align:right;border-radius:0;margin-bottom:.3rem}.history-clear:hover{text-decoration:underline;border-color:transparent}.history-item{border:1px solid #333;border-radius:6px;padding:.5em .6em;margin-bottom:.4rem;font-size:.8em}.history-meta{display:flex;justify-content:space-between;margin-bottom:.25em}.history-time{color:#888;font-size:.9em}.history-count{color:#4361ee;font-weight:600}.history-preview{color:#999;font-size:.9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.3em}.history-restore{background:transparent;border:1px solid #444;color:#aaa;padding:.2em .6em;font-size:.85em;border-radius:4px;cursor:pointer}.history-restore:hover{border-color:#4361ee;color:#4361ee}[data-theme=light] .group-input-card{background:#f5f5f5;border-color:#ddd}[data-theme=light] .group-input-card textarea{background:#fff;border-color:#ccc}[data-theme=light] .group-menu-btn{border-color:#ccc;color:#888}[data-theme=light] .rules-panel,[data-theme=light] .results-panel{background:#fff;border-color:#ddd}[data-theme=light] .rules-section{border-color:#ccc}[data-theme=light] .results-box{background:#fafafa;border-color:#ddd}[data-theme=light] .deselect-all-btn{background:#e9ecef;color:#333}[data-theme=light] .group-dropdown{background:#fff;border-color:#ddd;box-shadow:0 4px 16px #0000001f}[data-theme=light] .dropdown-item{color:#333}[data-theme=light] .dropdown-divider{background:#eee}[data-theme=light] .saved-list-chip{background:#f0f0f0;border-color:#ddd}[data-theme=light] .chip-name{color:#333}[data-theme=light] .modal{background:#fff;border-color:#ddd}[data-theme=light] .modal-input{background:#f9f9f9;border-color:#ccc}[data-theme=light] .modal-cancel{background:#e9ecef;color:#333}[data-theme=light] .clear-btn,[data-theme=light] .manage-lists-btn{border-color:#ccc;color:#888}[data-theme=light] .theme-toggle{background:#f0f0f0;border-color:#ccc;color:#333}[data-theme=light] .theme-toggle:hover,[data-theme=light] .manager-toggle:hover{background:#e0e0e0;border-color:#646cff}[data-theme=light] .theme-toggle,[data-theme=light] .manager-toggle{background:#f0f0f0;border-color:#ccc;color:#333}[data-theme=light] .manager-toggle.active{background:#4361ee;border-color:#4361ee;color:#fff}[data-theme=light] .manager-bar{border-color:#4361ee44;background:#4361ee08}[data-theme=light] .mgr-action-btn{border-color:#ccc;color:#666}[data-theme=light] .mgr-limit{color:#666}[data-theme=light] .mgr-limit input{background:#fff;border-color:#ccc;color:#333}[data-theme=light] .group-csv-btn{border-color:#ccc;color:#888}[data-theme=light] .preset-load{color:#333}[data-theme=light] .preset-chip,[data-theme=light] .preset-delete{border-color:#ddd}[data-theme=light] .filter-input{background:#fff;border-color:#ccc;color:#333}[data-theme=light] .csv-export-btn{background:#e67e22;color:#fff}[data-theme=light] .history-section{border-color:#ddd}[data-theme=light] .history-toggle-btn{border-color:#ccc;color:#888}[data-theme=light] .history-item{border-color:#ddd}[data-theme=light] .history-restore{border-color:#ccc;color:#888}[data-theme=light] .rule-item input[type=checkbox]{accent-color:#4361ee}[data-theme=light] .space-toggle{color:#333}[data-theme=light] .results-placeholder{color:#999}[data-theme=light] .results-info{color:#666}[data-theme=light] .results-box{border-color:#ddd}[data-theme=light] .chip-count{color:#666}[data-theme=light] .chip-delete,[data-theme=light] .dropdown-empty{color:#999}[data-theme=light] .dropdown-item:disabled{color:#bbb}[data-theme=light] .select-all-btn,[data-theme=light] .combine-btn{background:#4361ee;color:#fff}[data-theme=light] .download-btn{background:#2ec4b6;color:#fff}[data-theme=light] .group-input-title,[data-theme=light] .rules-header h2,[data-theme=light] .results-title-row h2{color:#213547}[data-theme=light] .rule-item span{color:#333}[data-theme=light] .result-line{color:#213547}[data-theme=light] .clear-btn:hover:not(:disabled){border-color:#ff6b6b;color:#ff6b6b}[data-theme=light] .manage-lists-btn:hover,[data-theme=light] .group-menu-btn:hover{border-color:#646cff;color:#646cff}@media(max-width:900px){.groups-input{grid-template-columns:repeat(2,1fr)}.main-layout{grid-template-columns:1fr}.rules-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:500px){.groups-input{grid-template-columns:1fr}.rules-grid{grid-template-columns:repeat(2,1fr)}}
