:root{font-optical-sizing:auto;font-synthesis:none;color:#e7eaf0;text-rendering:optimizelegibility;background:#10131a;font-family:Inter,system-ui,sans-serif;line-height:1.5}*{box-sizing:border-box}body{min-width:320px;margin:0}.workbench{width:min(100% - 32px,960px);margin:0 auto;padding:40px 0}.page-header{margin-bottom:28px}.page-header h1{letter-spacing:-.04em;margin:0 0 8px;font-size:clamp(2rem,5vw,3rem)}.page-header p,.hint,.empty-state{color:#9ba5b5}.panel{background:#191e28;border:1px solid #303744;border-radius:14px;margin-bottom:20px;padding:24px}.panel h2{margin-top:0;font-size:1.1rem}label{margin-bottom:10px;font-weight:600;display:block}textarea{width:100%;font:inherit;color:inherit;resize:vertical;background:#10131a;border:1px solid #414b5d;border-radius:8px;padding:14px;font-family:ui-monospace,monospace;display:block}textarea:focus{outline-offset:2px;outline:2px solid #7c8cff}.actions{flex-wrap:wrap;gap:10px;margin-top:14px;display:flex}button{color:#10131a;cursor:pointer;background:#9ba7ff;border:0;border-radius:8px;padding:11px 18px;font-weight:700}button:hover{filter:brightness(1.08)}button.secondary{color:#e7eaf0;background:0 0;border:1px solid #414b5d}.expression{color:#b9c5ff;overflow-wrap:anywhere;white-space:pre-wrap;background:#10131a;border-radius:8px;margin:0;padding:14px;font:1rem/1.7 ui-monospace,monospace}.error{color:#ff9292}#history li{margin:12px 0}.step-rule{color:#9ba7ff;margin-bottom:4px;font-weight:700;display:block}@media (width<=600px){.workbench{padding-top:24px}.panel{padding:16px}}.tree{--tree-bg:#111620;--node-bg:#202838;--node-border:#3b475c;--operator-bg:#252d49;--operator-border:#8190ff;--operator-color:#c5ccff;--variable-bg:#18352f;--variable-border:#3a8f76;--variable-color:#9ce8cf;--connector:#536079;--tree-text:#e7eaf0;scrollbar-color:#46516a transparent;scrollbar-width:thin;background:radial-gradient(circle,#303b50 1px,#0000 1.2px);background-color:var(--tree-bg);background-size:22px 22px;border:1px solid #2d3748;border-radius:12px;width:100%;min-height:160px;padding:32px 24px;display:block;overflow:auto}.tree-branch{flex-direction:column;flex:none;align-items:center;width:max-content;min-width:48px;padding:0;display:flex;position:relative}.tree-node{z-index:1;min-width:52px;min-height:42px;color:var(--tree-text);letter-spacing:.02em;white-space:nowrap;background:linear-gradient(145deg, #252e3e, var(--node-bg));border:1px solid var(--node-border);border-radius:10px;justify-content:center;align-items:center;padding:9px 16px;font-family:SFMono-Regular,Consolas,monospace;font-size:14px;font-weight:650;transition:border-color .16s,background .16s,transform .16s,box-shadow .16s;display:inline-flex;position:relative;box-shadow:0 3px 8px #0000002e,inset 0 1px #ffffff0a}.tree-node.operator{color:var(--operator-color);background:linear-gradient(145deg, #303b61, var(--operator-bg));border-color:var(--operator-border);box-shadow:0 3px 12px #5e6fff1f,inset 0 1px #ffffff12}.tree-node:not(.operator){color:var(--variable-color);background:linear-gradient(145deg, #20483e, var(--variable-bg));border-color:var(--variable-border)}.tree-children{justify-content:center;align-items:flex-start;gap:32px;padding-top:34px;display:flex;position:relative}.tree-branch>.tree-children:before{content:"";border-left:1.5px solid var(--connector);height:17px;position:absolute;top:0;left:50%;transform:translate(-50%)}.tree-children>.tree-branch:before{content:"";border-left:1.5px solid var(--connector);height:17px;position:absolute;top:-17px;left:50%}.tree-children:has(>.tree-branch:nth-child(2)):after{content:"";width:0;height:0;position:absolute;top:16px;left:calc(50% - 1px)}.tree-children:has(>.tree-branch:nth-child(2))>.tree-branch:first-child:after{content:"";background:var(--connector);height:1.5px;position:absolute;top:-18px}.tree-children:has(>.tree-branch:nth-child(2))>.tree-branch:last-child:after{content:"";background:var(--connector);height:1.5px;position:absolute;top:-18px}.tree-children:has(>.tree-branch:nth-child(2))>.tree-branch:first-child:after{left:50%;right:-16px}.tree-children:has(>.tree-branch:nth-child(2))>.tree-branch:last-child:after{left:-16px;right:50%}.tree-children:not(:has(>.tree-branch:nth-child(2))){gap:0}.tree-node:hover{border-color:#a5b0ff;transform:translateY(-2px);box-shadow:0 6px 16px #00000038}.tree-node.operator:hover{background:linear-gradient(145deg,#394773,#292f50)}.tree-node:focus-visible{outline-offset:4px;outline:2px solid #a5b0ff}@media (width<=600px){.tree{padding:28px 18px}.tree-children{gap:22px;padding-top:30px}.tree-node{min-width:44px;min-height:38px;padding:8px 12px;font-size:13px}}@media (prefers-reduced-motion:reduce){.tree-node{transition:none}}.structure-header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px;display:flex}.structure-header h2{margin-bottom:6px}.structure-header p{margin:0}.status-pill{color:#b9c5ff;background:#202838;border:1px solid #3b475c;border-radius:999px;flex-shrink:0;padding:5px 10px;font-size:12px;font-weight:700}.expression-comparison{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px;display:grid}.expression-side{background:#111620;border:1px solid #303b50;border-radius:12px;min-width:0;overflow:hidden}.side-heading{background:#191e28;border-bottom:1px solid #303b50;align-items:center;gap:9px;padding:14px 16px;display:flex}.side-heading h3{margin:0;font-size:13px;font-weight:700}.side-indicator{border-radius:50%;width:8px;height:8px}.start-indicator{background:#9ba7ff;box-shadow:0 0 12px #7c8cff66}.end-indicator{background:#5dd6a3;box-shadow:0 0 12px #5dd6a366}.comparison-divider{color:#8190ff;justify-content:center;align-items:center;font-size:24px;display:flex;transform:rotate(90deg)}.animation-tree{background-color:#111620;background-image:radial-gradient(circle,#303b50 1px,#0000 1.2px);background-size:20px 20px;border:0;border-radius:0;justify-content:center;align-items:flex-start;height:100%;min-height:220px;padding:26px 18px;display:flex;overflow:auto}#start-tree .tree-branch{animation:.35s cubic-bezier(.2,.8,.2,1) both tree-enter}#start-tree .tree-node{transition:border-color .22s,background .22s,box-shadow .22s,transform .22s}#start-tree .tree-node.is-changing{background:#394773;border-color:#a5b0ff;transform:scale(1.06);box-shadow:0 0 0 4px #8190ff22,0 0 22px #8190ff22}#start-tree .tree-node.is-settled{border-color:#5dd6a3;box-shadow:0 0 0 3px #5dd6a31a}#end-tree .tree-branch,#end-tree .tree-node{transition:none!important;animation:none!important;transform:none!important}#end-tree .tree-node.operator{color:#9ce8cf;background:linear-gradient(145deg,#20483e,#18352f);border-color:#4c9f80}.playback-panel{background:#141923;border:1px solid #303744;border-radius:12px;margin-bottom:16px;padding:18px}.playback-rule{gap:6px;margin-bottom:20px;display:grid}.playback-rule .hint{letter-spacing:.1em;margin:0;font-size:10px;font-weight:800}.playback-rule strong{color:#c5ccff;font-size:15px}.playback-rule p{color:#9ba5b5;overflow-wrap:anywhere;margin:0;font-size:13px}.playback-progress{color:#9ba5b5;gap:9px;margin-bottom:18px;font-size:12px;display:grid}.progress-track{background:#303744;border-radius:99px;height:5px;overflow:hidden}.progress-fill{border-radius:inherit;background:linear-gradient(90deg,#8190ff,#5dd6a3);width:0;height:100%;transition:width .25s}.playback-controls{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.playback-controls button{min-height:40px}.playback-controls button:disabled{cursor:not-allowed;opacity:.35;filter:none}#play-button{min-width:100px}.speed-control{color:#9ba5b5;align-items:center;gap:8px;margin-left:auto;font-size:12px;display:flex}.speed-control select{max-width:110px;font:inherit;color:#e7eaf0;background:#10131a;border:1px solid #414b5d;border-radius:7px;padding:8px}@keyframes tree-enter{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@media (width<=700px){.expression-comparison{grid-template-columns:minmax(0,1fr)}.comparison-divider{height:28px;transform:rotate(90deg)}.animation-tree{min-height:160px}.speed-control{width:100%;margin:4px 0 0}}@media (prefers-reduced-motion:reduce){#start-tree .tree-branch,#start-tree .tree-node,.progress-fill{transition:none!important;animation:none!important}}
