:root{color:#e6e6e6;background:#0f0f1a;font-family:system-ui,-apple-system,Segoe UI,Roboto,PingFang SC,Microsoft YaHei,sans-serif}*{box-sizing:border-box}html,body,#root{min-height:100vh;margin:0;padding:0}body{background:#0f0f1a}button{cursor:pointer;font-family:inherit}input,select{font-family:inherit}a{color:#6ab0ff}.setup-page{max-width:820px;margin:0 auto;padding:24px 20px 60px}.setup-page h1{margin:0 0 4px;font-size:26px}.setup-page .subtitle{color:#9aa0b0;margin:0 0 24px}.form-section{background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;margin-bottom:16px;padding:16px 18px}.form-section h2{color:#c8cbe0;border-left:3px solid #6ab0ff;margin:0 0 14px;padding-left:8px;font-size:16px}.form-row{flex-wrap:wrap;gap:16px;display:flex}.form-row label{color:#9aa0b0;flex-direction:column;gap:6px;min-width:130px;font-size:13px;display:flex}.form-row label.grow{flex:1;min-width:240px}.form-row label.checkbox{flex-direction:row;align-items:center;gap:8px;min-width:auto}.form-row input[type=number],.form-row input[type=text],.form-row select{color:#e6e6e6;background:#0f0f1a;border:1px solid #33334d;border-radius:4px;width:100%;min-width:0;padding:7px 9px;font-size:14px}.element-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;display:grid}.element-input{color:#c8cbe0;align-items:center;gap:8px;font-size:14px;display:flex}.element-input .color-dot{border:1px solid #444;border-radius:50%;flex-shrink:0;width:12px;height:12px}.element-input input{color:#e6e6e6;background:#0f0f1a;border:1px solid #33334d;border-radius:4px;width:70px;margin-left:auto;padding:5px 7px;font-size:14px}.capacity{color:#9aa0b0;margin:12px 0 0;font-size:13px}.capacity.over{color:#ff6b6b;font-weight:600}.error-box{color:#ffb3b3;background:#3a1515;border:1px solid #ff6b6b;border-radius:6px;margin-bottom:16px;padding:10px 14px;font-size:14px}.actions{justify-content:flex-end;gap:12px;display:flex}.actions button{color:#e6e6e6;background:#2a2a44;border:1px solid #444;border-radius:6px;padding:9px 20px;font-size:14px}.actions button.primary{color:#fff;background:#2d6cdf;border-color:#2d6cdf}.actions button:disabled{opacity:.5;cursor:not-allowed}.hint{color:#9aa0b0;margin:0 0 12px;font-size:13px}.saved-states-list{flex-direction:column;gap:8px;max-height:300px;display:flex;overflow-y:auto}.saved-state-item{cursor:pointer;background:#0f0f1a;border:1px solid #33334d;border-radius:6px;justify-content:space-between;align-items:center;padding:10px 12px;transition:all .2s;display:flex}.saved-state-item:hover{border-color:#6ab0ff}.saved-state-item.selected{background:#1a2538;border-color:#6ab0ff}.saved-state-item .info{flex:1}.saved-state-item strong{color:#e6e6e6;font-size:14px;display:block}.saved-state-item .meta{color:#9aa0b0;margin-top:2px;font-size:12px;display:block}.saved-state-item .desc{color:#7a8090;margin:4px 0 0;font-size:12px}.delete-btn{color:#ff6b6b;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;width:28px;height:28px;padding:0;font-size:16px;line-height:1;display:flex}.delete-btn:hover{color:#fff;background:#ff6b6b}.control-panel{background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;flex-direction:column;gap:16px;padding:14px;display:flex}.ctrl-group{flex-direction:column;gap:8px;display:flex}.ctrl-group>label{color:#9aa0b0;font-size:12px}.ctrl-group button{color:#e6e6e6;background:#2a2a44;border:1px solid #3a3a55;border-radius:5px;padding:8px 10px;font-size:14px}.ctrl-group button:hover:not(:disabled){background:#353563}.ctrl-group button:disabled{opacity:.4;cursor:not-allowed}.ctrl-group button.danger{color:#ff8b8b;border-color:#5a2a2a}.ctrl-group button.danger:hover:not(:disabled){background:#3a1515}.ctrl-group button.active{color:#fff;background:#2d6cdf;border-color:#2d6cdf}.speed-row{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.speed-row button{padding:6px 4px;font-size:13px}.confirm-overlay{z-index:100;background:#0009;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.confirm-box{background:#1a1a2e;border:1px solid #3a3a55;border-radius:8px;max-width:360px;padding:22px 26px}.confirm-box p{margin:0 0 18px}.confirm-actions{justify-content:flex-end;gap:10px;display:flex}.confirm-actions button{color:#e6e6e6;background:#2a2a44;border:1px solid #444;border-radius:5px;padding:7px 18px}.confirm-actions button.primary{color:#fff;background:#2d6cdf;border-color:#2d6cdf}.save-form{flex-direction:column;gap:12px;margin-bottom:16px;display:flex}.save-form label{color:#9aa0b0;flex-direction:column;gap:4px;font-size:13px;display:flex}.save-form input,.save-form textarea{color:#e6e6e6;background:#0f0f1a;border:1px solid #33334d;border-radius:4px;padding:7px 9px;font-size:14px}.save-form textarea{resize:vertical;min-height:60px}.info-panel{background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;flex-direction:column;min-height:0;padding:12px 14px;display:flex;overflow:hidden}.info-panel h3{color:#c8cbe0;border-left:3px solid #6ab0ff;margin:0 0 10px;padding-left:8px;font-size:14px}.color-dot{border:1px solid #444;border-radius:50%;flex-shrink:0;width:10px;height:10px;display:inline-block}.count-list{flex-direction:column;gap:6px;display:flex}.count-row{align-items:center;gap:8px;font-size:13px;display:flex}.count-row .name{width:42px}.count-row .num{text-align:right;color:#e6e6e6;width:44px}.count-row .bar{background:#0f0f1a;border-radius:3px;flex:1;height:6px;overflow:hidden}.count-row .bar-fill{height:100%;transition:width .2s;display:block}.chj-list{flex-direction:column;gap:5px;display:flex;overflow-y:auto}.chj-row{align-items:center;gap:8px;font-size:12px;display:flex}.chj-id{color:#6ab0ff;width:28px}.chj-pos{color:#9aa0b0;width:70px}.chj-attach{color:#e6e6e6}.chj-idle{color:#6c6c80;font-style:italic}.chj-timer{background:#0f0f1a;border-radius:3px;width:40px;height:5px;margin-left:auto;display:inline-block;overflow:hidden}.timer-bar{background:#6ab0ff;height:100%;display:block}.boundary-summary{border-bottom:1px dashed #2a2a44;margin-bottom:8px;padding-bottom:8px}.bs-row{justify-content:space-between;margin-bottom:3px;font-size:12px;display:flex}.bs-label{color:#9aa0b0}.bs-val{color:#ffd36b;font-weight:600}.log-list{flex-direction:column;flex:1;gap:2px;font-size:12px;display:flex;overflow-y:auto}.log-empty{color:#6c6c80;font-style:italic}.log-entry{color:#c8cbe0}.log-entry.boundary{color:#ffd36b}.log-step{color:#6c6c80}.chart-panel{background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;padding:12px 14px;overflow:hidden}.chart-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.chart-header h3{color:#c8cbe0;border-left:3px solid #6ab0ff;margin:0;padding-left:8px;font-size:14px}.chart-filters{flex-wrap:wrap;gap:10px;display:flex}.chart-filters label{color:#9aa0b0;cursor:pointer;align-items:center;gap:4px;font-size:12px;display:flex}.chart-filters input{margin:0}.chart-filters .color-dot{width:9px;height:9px}.sim-page{max-width:1400px;margin:0 auto;padding:12px 16px 24px}.sim-header{background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;flex-wrap:wrap;align-items:center;gap:18px;margin-bottom:12px;padding:8px 12px;display:flex}.sim-header .title{font-size:18px;font-weight:600}.sim-header .step{color:#ffd36b;font-size:15px}.sim-header .status{color:#9aa0b0;align-items:center;gap:6px;margin-left:auto;font-size:13px;display:flex}.sim-header .dot{background:#555;border-radius:50%;width:9px;height:9px}.sim-header .dot.on{background:#4dd97a;box-shadow:0 0 6px #4dd97a}.sim-header .err{color:#ff6b6b;font-size:13px}.sim-main{grid-template-columns:1fr 260px;gap:12px;margin-bottom:12px;display:grid}.matrix-area{aspect-ratio:1;background:#1a1a2e;border:1px solid #2a2a44;border-radius:8px;justify-content:center;align-items:center;max-height:70vh;padding:10px;display:flex}.matrix-canvas{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.matrix-canvas canvas{max-width:100%;max-height:100%;image-rendering:pixelated}.loading{color:#6c6c80}.control-area{display:flex}.sim-panels{grid-template-columns:1fr 1fr 1.4fr;gap:12px;height:280px;margin-bottom:12px;display:grid;overflow:hidden}.sim-charts{grid-template-columns:1fr 1fr;gap:12px;display:grid}@media (width<=1000px){.sim-main,.sim-panels,.sim-charts{grid-template-columns:1fr}}
