.layout>*,.grid2>*{min-width:0}.nodewrap text{-webkit-user-select:none;user-select:none}@media (width<=900px){.layout,.grid2,.learngrid,.whenavoid{grid-template-columns:1fr}.top{flex-direction:column;align-items:flex-start}}*{box-sizing:border-box}body{color:#1f2937;background:#f6f4ef;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}#root{max-width:1200px;margin:0 auto;padding:16px}.app{flex-direction:column;gap:14px;display:flex}.top{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px;display:flex}.top h1{letter-spacing:-.5px;margin:0;font-size:30px}.top p{color:#6b7280;margin:4px 0 0}.topbtns{align-items:center;gap:10px;display:flex}button{cursor:pointer;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:7px 12px;font-size:14px}button:hover{background:#f3f4f6}button.primary{color:#fff;background:#111827;border-color:#111827}button.on{color:#fff;background:#7c3aed;border-color:#7c3aed}button:disabled{opacity:.5;cursor:not-allowed}.card{background:#fff;border:1px solid #ece7dd;border-radius:16px;padding:14px;box-shadow:0 8px 24px #0000000d}.tabs{flex-wrap:wrap;gap:12px;display:flex}.tabgroup{background:#fff;border:1px solid #ece7dd;border-radius:12px;align-items:center;gap:6px;padding:6px 8px;display:flex}.tabgroup.active{border-color:#7c3aed}.tablabel{color:#6b7280;margin-right:4px;font-size:13px}.algohead h2{margin:0}.algohead p{color:#4b5563;margin:6px 0;font-size:14px}.layout{grid-template-columns:320px 1fr;align-items:start;gap:14px;display:grid}.side{flex-direction:column;gap:14px;display:flex}.card h3{margin:0 0 8px;font-size:15px}.row{gap:6px;display:flex}.row input{border:1px solid #e5e7eb;border-radius:8px;flex:1;padding:7px}.row2{gap:8px;margin-top:8px;display:flex}.row2 label{flex-direction:column;flex:1;gap:4px;font-size:13px;display:flex}select,input[type=number]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:7px;font-size:14px}.chips{flex-wrap:wrap;gap:6px;margin-top:8px;display:flex}.chip{background:#f3f0e9;border-radius:999px;padding:4px 6px 4px 10px;font-size:13px}.chip button{background:0 0;border:0;padding:0 4px}.row3{grid-template-columns:1fr auto 1fr 64px auto;align-items:center;gap:6px;display:grid}.edges{margin:8px 0 0;padding:0;font-size:14px;list-style:none}.edges li{background:#faf9f6;border-radius:8px;justify-content:space-between;margin-bottom:4px;padding:5px 8px;display:flex}.edges button{background:0 0;border:0}.hint{color:#6b7280;font-size:12px}.heur{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.heur label{text-align:center;flex-direction:column;gap:2px;min-width:0;font-size:13px;font-weight:700;display:flex}.heur input{text-align:center;width:100%;min-width:0}.canvas{touch-action:none;background:#fbfaf7;border:1px solid #eee7d8;border-radius:12px;width:100%;height:auto;display:block}.layout>*,.grid2>*{min-width:0}.treescroll{overflow-x:auto}.treescroll .canvas{min-width:540px}.tbl td{overflow-wrap:anywhere}.node{stroke-width:2.5px;cursor:grab;transition:fill .35s,stroke .35s}.node.unvisited{fill:#fff;stroke:#9ca3af}.node.frontier{fill:#dbeafe;stroke:#2563eb}.node.processing{fill:#ede9fe;stroke:#7c3aed}.node.visited{fill:#dcfce7;stroke:#16a34a}.node.current{fill:#fef08a;stroke:#ca8a04}.node.goal{fill:#fee2e2;stroke:#dc2626}.node.solution{fill:#111827;stroke:#111827}.node.solution+.nlabel,.node.solution~.nlabel{fill:#fff}.nlabel{pointer-events:none;font-size:16px;font-weight:700}.nlabel.inv{fill:#fff}.startring{fill:none;stroke:#111827;stroke-dasharray:4 3}.tag{fill:#6b7280;font-size:10px;font-weight:700}.tag.goal{fill:#dc2626}.tag.cur{fill:#a16207}.edge{stroke:#9ca3af;stroke-width:2px;transition:stroke .35s,stroke-width .35s}.edge.hot{stroke:#111827;stroke-width:3.5px}.arr{fill:#9ca3af}.ecost{fill:#111827;background:#fff;font-size:13px;font-weight:700}.nodewrap text{-webkit-user-select:none;user-select:none}.controls{flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;display:flex}.steps{color:#6b7280;font-size:13px}.scrub{width:100%;margin-top:8px}.statepanel{flex-direction:column;gap:6px;margin-top:10px;display:flex}.kv{background:#faf9f6;border-radius:8px;grid-template-columns:130px 1fr;gap:8px;padding:6px 8px;font-size:14px;display:grid}.kv span{color:#6b7280}.action{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:8px;font-size:14px}.metrics{color:#4b5563;flex-wrap:wrap;gap:14px;margin-top:8px;font-size:13px;display:flex}.legend{color:#4b5563;flex-wrap:wrap;gap:12px;margin-top:10px;font-size:12px;display:flex}.dot{border:2px solid;border-radius:50%;width:12px;height:12px;margin-right:4px;display:inline-block}.dot.unvisited{border-color:#9ca3af}.dot.frontier{background:#dbeafe;border-color:#2563eb}.dot.processing{background:#ede9fe;border-color:#7c3aed}.dot.visited{background:#dcfce7;border-color:#16a34a}.dot.current{background:#fef08a;border-color:#ca8a04}.dot.goal{background:#fee2e2;border-color:#dc2626}.dot.solution{background:#111827;border-color:#111827}.err{color:#991b1b;background:#fef2f2;border:1px solid #fecaca;border-radius:10px;margin-bottom:8px;padding:8px;font-size:14px}.grid2{grid-template-columns:1fr 1fr;gap:14px;display:grid}.vizhead{align-items:baseline;gap:8px;margin-bottom:8px;display:flex}.vizhead span{color:#6b7280;font-size:13px}.comparerow{flex-wrap:wrap;align-items:end;gap:12px;display:flex}.presets{flex-wrap:wrap;gap:6px;margin-top:8px;display:flex}.tbl{border-collapse:collapse;width:100%;margin-top:8px;font-size:14px}.tbl th,.tbl td{text-align:left;border:1px solid #eee;padding:6px 8px}.tbl th{background:#faf9f6}.cmp{background:#fff;border:1px solid #ece7dd;border-radius:10px;align-items:center;gap:6px;padding:7px 10px;font-size:14px;display:flex}.viz{flex-direction:column;display:flex}footer{color:#6b7280;text-align:center;font-size:12px}.fchips{flex-wrap:wrap;gap:4px;display:inline-flex}.fchip{white-space:nowrap;background:#eef2ff;border:1px solid #c7d2fe;border-radius:6px;padding:1px 7px;font-size:13px;font-weight:600}.fchip.head{background:#dbeafe;border-color:#2563eb}.fchip em{color:#1d4ed8;text-transform:uppercase;letter-spacing:.4px;font-size:10px;font-style:normal;font-weight:700;display:block}.learn{margin-top:10px}.learngrid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.learn h4,.historywrap h4{margin:0 0 6px;font-size:14px}.learn ol{flex-direction:column;gap:4px;margin:0;padding-left:20px;font-size:14px;display:flex}.pseudo{color:#e5e7eb;background:#111827;border-radius:10px;margin:0;padding:10px 12px;font-family:ui-monospace,Consolas,monospace;font-size:13px;overflow-x:auto}.pline{white-space:pre;border-radius:6px;padding:2px 8px;transition:background .3s}.pline.on{color:#fff;background:#7c3aed;font-weight:700}.whenavoid{grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;font-size:13px;display:grid}.whenavoid div{background:#faf9f6;border-radius:8px;padding:6px 8px}.historywrap{margin-top:10px}.history{gap:4px;margin:0;padding:0 0 4px;list-style:none;display:flex;overflow-x:auto}.history li{flex:none}.history button{white-space:nowrap;border-radius:8px;padding:4px 8px;font-size:12px}.history button.on{color:#fff;background:#111827;border-color:#111827}.result{border-radius:10px;margin-top:10px;padding:9px 12px;font-size:14px}.result.ok{background:#f0fdf4;border:1px solid #86efac}.result.bad{background:#fef2f2;border:1px solid #fecaca}@media (width<=900px){.layout,.grid2,.learngrid,.whenavoid{grid-template-columns:1fr}.top{flex-direction:column;align-items:flex-start}}.tnode{stroke-width:2.5px;transition:fill .35s,stroke .35s,opacity .35s}.tnode.unvisited{fill:#fff;stroke:#9ca3af}.tnode.current{fill:#fef08a;stroke:#ca8a04}.tnode.evaluated{fill:#dcfce7;stroke:#16a34a}.tnode.solution{fill:#111827;stroke:#111827}.tnode.pruned{fill:#f3f4f6;stroke:#9ca3af;stroke-dasharray:5 4;opacity:.8}.tval{pointer-events:none;font-size:15px;font-weight:700}.tval.inv{fill:#fff}.ttag{fill:#6b7280;font-size:10px;font-weight:700}.tab{fill:#1d4ed8;font-size:11px;font-weight:700}.tedge{stroke:#9ca3af;stroke-width:2px;transition:stroke .35s}.tedge.hot{stroke:#111827;stroke-width:3.5px}.tedge.cut{stroke:#d1d5db;stroke-dasharray:5 4}.dot.pruned{background:repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 2px,#e5e7eb 2px 4px);border-color:#9ca3af}.cnode{stroke:#9ca3af;stroke-width:2px;transition:fill .35s,stroke .35s}.cnode.cset{stroke:#16a34a}.cnode.ccur{stroke:#111827;stroke-width:3.5px}.cnode.cconf{stroke:#dc2626;stroke-width:4px}.board{gap:3px;max-width:440px;margin:0 auto;display:grid}.qcell{aspect-ratio:1;border-radius:6px;justify-content:center;align-items:center;font-size:clamp(16px,4vw,26px);font-weight:900;display:flex}.qcell.light{background:#f0d9b5}.qcell.dark{background:#b58863}.qcell.try{outline-offset:-4px;outline:4px solid #ca8a04}.qcell.conflict{background:#f87171!important}.qcell.attacked:not(.queen):after{content:"";background:#00000047;border-radius:50%;width:20%;height:20%;position:absolute}.qcell{position:relative}.jugs{justify-content:center;align-items:flex-end;gap:28px;padding:10px 8px 0;display:flex}.jug{background:#eff6ff;border:3px solid #2563eb;border-top:none;border-radius:0 0 12px 12px;width:96px;position:relative}.jug .fill{background:#60a5fa;border-radius:0 0 8px 8px;transition:height .35s;position:absolute;bottom:0;left:0;right:0}.jug .jval{text-align:center;padding-top:8px;font-weight:700;position:relative}.jlabel{text-align:center;margin-top:4px;font-size:14px;font-weight:700}
