*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #f5f6f8;--surface: #ffffff;--border: #e2e4e9;--text: #1a1a2e;--text-muted: #6b7280;--accent: #2563eb;--accent-light: #eff4ff;--radius: 8px;--error: #dc2626;--green: #16a34a}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100vh}.app{max-width:720px;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;min-height:100vh}header{text-align:center;margin-bottom:2rem;position:relative}header h1{font-size:1.8rem;font-weight:700;color:var(--accent)}header p{color:var(--text-muted);font-size:.9rem;margin-top:.2rem}.connection{position:absolute;top:0;right:0;font-size:.7rem;padding:.2rem .5rem;border-radius:999px;font-weight:500}.connection.on{color:var(--green);background:#f0fdf4}.connection.off{color:var(--error);background:#fef2f2}main{display:flex;flex-direction:column;gap:1rem;flex:1}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}.card h2{font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);margin-bottom:.75rem}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);padding:1.5rem;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;display:flex;flex-direction:column;align-items:center;gap:.3rem;color:var(--text-muted);font-size:.9rem}.dropzone:hover,.dropzone.drag{border-color:var(--accent);background:var(--accent-light)}.dropzone.has-file{border-style:solid;border-color:var(--accent)}.drop-icon{font-size:1.5rem;font-weight:300;color:var(--accent);width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:2px solid var(--accent);border-radius:50%;margin-bottom:.25rem}.file-name{font-weight:600;color:var(--accent);font-size:.95rem}.file-size{font-size:.8rem}.form-row{display:flex;gap:.75rem;margin-bottom:.75rem}.form-row label{flex:1}label{display:flex;flex-direction:column;gap:.3rem}label span{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}label.full{margin-bottom:.75rem}select,input[type=text],input[type=password],input[type=number],textarea{width:100%;padding:.55rem .7rem;border:1px solid var(--border);border-radius:6px;font-size:.88rem;font-family:inherit;color:var(--text);background:var(--bg);outline:none;transition:border-color .15s}select:focus,input[type=text]:focus,input[type=password]:focus,input[type=number]:focus,textarea:focus{border-color:var(--accent)}textarea{resize:vertical;min-height:60px}.btn{width:100%;padding:.7rem;border:none;border-radius:6px;font-size:.9rem;font-weight:600;font-family:inherit;cursor:pointer;background:var(--accent);color:#fff;transition:opacity .15s}.btn:hover:not(:disabled){opacity:.9}.btn:disabled{opacity:.4;cursor:not-allowed}.btn.running{background:var(--text-muted)}.output-card{display:flex;flex-direction:column}.status-bar{display:flex;align-items:center;gap:.4rem;font-size:.8rem;color:var(--text-muted);margin-bottom:.5rem}.spinner{width:12px;height:12px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.thinking-block{margin-bottom:.5rem;border:1px solid var(--border);border-radius:6px;overflow:hidden}.thinking-block summary{padding:.5rem .75rem;font-size:.8rem;font-weight:600;color:var(--text-muted);background:#fefce8;cursor:pointer;-webkit-user-select:none;user-select:none}.thinking-block[open] summary{border-bottom:1px solid var(--border)}.thinking-output{background:#fffef5;padding:.75rem;max-height:40vh;overflow-y:auto;font-size:.8rem;line-height:1.55;white-space:pre-wrap;word-wrap:break-word;font-family:inherit;color:var(--text-muted)}.output{background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:1rem;min-height:150px;max-height:60vh;overflow-y:auto;font-size:.85rem;line-height:1.65;white-space:pre-wrap;word-wrap:break-word;font-family:inherit}.stats{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem;padding:.6rem .75rem;background:var(--bg);border:1px solid var(--border);border-radius:6px}.stat{display:flex;flex-direction:column;min-width:70px}.stat-label{font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}.stat-value{font-size:.85rem;font-weight:500;color:var(--text)}.toolbar{display:flex;gap:.4rem;margin-top:.6rem}.toolbar button{padding:.35rem .75rem;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text-muted);font-size:.75rem;font-family:inherit;cursor:pointer;transition:border-color .15s,color .15s}.toolbar button:hover{border-color:var(--accent);color:var(--text)}.params-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.6rem;margin-bottom:.75rem}.params-grid label{margin-bottom:0}.params-grid input[type=number]{padding:.4rem .5rem;font-size:.82rem}.hint{font-size:.8rem;color:var(--text-muted);margin-bottom:.75rem}.file-upload-row{display:flex;align-items:center;gap:.75rem}.file-upload-row input[type=file]{font-size:.82rem;color:var(--text-muted)}.file-tag{font-size:.78rem;color:var(--accent);font-weight:500}.upload-status{margin-top:.5rem;font-size:.8rem;color:var(--green);font-weight:500}footer{text-align:center;padding:1.5rem 0 .5rem;color:var(--text-muted);font-size:.75rem}
