:root{color:#26212a;background:#faf8f5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans SC,sans-serif}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}button{cursor:pointer}.lab{padding:18px}.lab-head{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:15px;display:flex}h1{color:#651d32;margin:0;font-size:19px;line-height:1.3}h2{color:#391f2b;margin:0 0 8px;font-size:15px}p{margin:0}.sub{color:#675d63;margin-top:5px;font-size:12px;line-height:1.5}.pill{color:#6d3242;white-space:nowrap;background:#fff;border:1px solid #dcced0;border-radius:100px;padding:5px 9px;font-size:11px}.controls{background:#fff;border:1px solid #e4dad8;border-radius:10px;flex-wrap:wrap;align-items:end;gap:10px 16px;margin-bottom:14px;padding:11px 13px;display:flex}.controls label{color:#554a50;gap:4px;font-size:12px;display:grid}.controls label span{font-variant-numeric:tabular-nums;color:#651d32;font-weight:700}.controls input[type=range]{accent-color:#8b273f;width:135px}.controls select{background:#fff;border:1px solid #bcaeb3;border-radius:6px;padding:6px 8px}.button{color:#fff;background:#762841;border:1px solid #762841;border-radius:7px;padding:7px 11px;font-size:12px;font-weight:650}.button:disabled{opacity:.5;cursor:not-allowed}.button.secondary{color:#762841;background:#fff}.button:hover:not(:disabled){filter:brightness(.93)}.grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.panel{background:#fff;border:1px solid #e4dad8;border-radius:10px;min-width:0;padding:12px}.section-head{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.muted{color:#766d72;font-size:11px}.matrix-sets{flex-wrap:wrap;gap:12px;display:flex}.matrix-label{color:#4b3a42;margin:0 0 5px;font-size:12px;font-weight:700}.tiles{grid-template-columns:repeat(2,minmax(53px,1fr));gap:5px;display:grid}.tile{color:#264758;user-select:none;touch-action:none;background:#eaf4f8;border:1px solid #b8cad5;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;min-height:42px;font-size:12px;display:flex}.tile strong{font-size:13px}.tile small{color:#536773;font-size:10px}.tile[data-kind=B]{color:#745321;background:#fff4df;border-color:#e1c996}.tile[data-kind=C]{color:#75354b;background:#f8edf2;border-color:#d8b9c5}.tile{cursor:grab}.tile:disabled{opacity:.46;cursor:default}.tile.dragging{opacity:.48}.drag-ghost{z-index:1000;pointer-events:none;width:74px;min-height:44px;position:fixed;transform:translate(-50%,-50%);box-shadow:0 8px 22px #37202933}.tile:focus-visible,.slot:focus-visible,.button:focus-visible{outline-offset:2px;outline:3px solid #4479aa}.cache-title{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.slots{grid-template-columns:repeat(auto-fit,minmax(82px,1fr));gap:8px;margin-top:10px;display:grid}.slot{text-align:center;background:#fcf9f7;border:1px dashed #bcb0b1;border-radius:8px;min-height:83px;padding:5px}.slot.over,.evict.over{background:#f8e8ee;border-color:#762841}.slot-no{color:#887b80;margin-bottom:4px;font-size:10px;display:block}.slot .tile{min-height:44px}.evict{color:#6c6265;background:#faf8f6;border:1px dashed #aa9ca0;border-radius:7px;justify-content:center;align-items:center;min-height:35px;margin-top:9px;font-size:12px;display:flex}.slot-action{color:#8b273f;background:0 0;border:0;padding:3px;font-size:10px;text-decoration:underline}.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px;display:grid}.product{text-align:left;color:#4b3e44;background:#fff;border:1px solid #d8cdd0;border-radius:6px;min-height:39px;padding:6px 8px;font-size:11px;line-height:1.35}.product.ready{background:#edf8ef;border-color:#91c59f}.product.done{color:#80767a;background:#f3f1ef;text-decoration:line-through}.product:disabled{cursor:default}.status{background:#fcf7eb;border-left:3px solid #9b6a3b;min-height:30px;margin:10px 0;padding:7px 9px;font-size:12px;line-height:1.4}.metrics{grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px;display:grid}.metric{text-align:center;background:#f6f2ee;border-radius:7px;padding:8px 5px}.metric strong{font-variant-numeric:tabular-nums;color:#651d32;font-size:16px;display:block}.metric span{color:#685d61;font-size:10px}.game-footer{flex-wrap:wrap;justify-content:space-between;gap:7px;margin-top:11px;display:flex}.note{color:#6d6368;margin-top:10px;font-size:11px;line-height:1.5}.hierarchy{grid-template-columns:1fr 64px 1fr 64px 1fr;align-items:center;gap:5px;margin:12px 0;display:grid}.level{background:#f8f4f2;border:1px solid #dfd4d2;border-radius:8px;min-height:110px;padding:9px}.level h2{margin-bottom:3px}.level small{color:#75676b;font-size:10px;display:block}.level-keys{flex-wrap:wrap;gap:3px;margin-top:7px;display:flex}.key{color:#294d5e;font-variant-numeric:tabular-nums;background:#e3edf1;border-radius:3px;padding:2px 4px;font-size:10px}.key.b{color:#785821;background:#f8e9c5}.key.c{color:#6e2942;background:#efcfdb}.key.dirty{outline:1px solid #a23855}.boundary{text-align:center;color:#8b273f;font-size:18px}.boundary small{color:#6d6266;font-size:10px;line-height:1.2;display:block}.trace{color:#f3ecee;background:#29242a;border-radius:7px;max-height:100px;padding:8px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1.5;overflow:auto}.trace p{margin:0}.bar-row{grid-template-columns:100px 1fr 50px;align-items:center;gap:7px;margin:8px 0;font-size:11px;display:grid}.bar-track{background:#eee7e4;border-radius:10px;height:13px;overflow:hidden}.bar-fill{background:#a33f5c;border-radius:10px;height:100%}.bar-fill.secondary{background:#d49a4e}.bar-row strong{text-align:right;font-variant-numeric:tabular-nums}.formula{color:#651d32;text-align:center;margin:13px 0 8px;font-family:Georgia,serif;font-size:18px}.curve-layout{grid-template-columns:minmax(0,1.4fr) minmax(200px,1fr);gap:14px;display:grid}.curve-plot{background:#fff;border:1px solid #e7dcda;border-radius:7px;width:100%;height:auto;display:block}.curve-legend{gap:8px;font-size:12px;display:grid}.curve-legend span:before{content:"";vertical-align:middle;background:var(--line);width:12px;height:3px;margin-right:6px;display:inline-block}[hidden]{display:none!important}@media (width<=650px){.lab{padding:12px}.grid,.curve-layout,.hierarchy{grid-template-columns:1fr}.boundary{height:26px;transform:rotate(90deg)}.boundary small{display:none}.metrics{grid-template-columns:repeat(2,1fr)}}
