:root{--navy: #0b3d6d;--navy-dark: #082c50;--navy-ink: #0b2c5f;--yellow: #ffcc00;--yellow-dark: #e0b000;--page: #eef3fb;--card: #ffffff;--line: #dce6f5;--muted: #5b6b82;--console: #0f1e33;--shadow: 0 1px 2px rgba(11, 61, 109, .06), 0 6px 18px rgba(11, 61, 109, .08);--radius: 14px}*{box-sizing:border-box}body{margin:0;font-family:Nunito,system-ui,-apple-system,sans-serif;background:var(--page);color:#1a2233}button,input,select{font-family:inherit}header{padding:14px 24px;background:linear-gradient(120deg,var(--navy-dark),var(--navy) 60%,#13528f);color:#fff;border-bottom:4px solid var(--yellow)}.header-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:44px;height:44px;flex:0 0 auto;background:#ffffff1a;border-radius:12px;padding:4px}header h1{margin:0;font-size:28px;font-weight:800;letter-spacing:-.01em;line-height:1.1}header h1 span{color:var(--yellow)}.tagline{margin:2px 0 0;font-size:14px;color:#ffffffc7}.mode-toggle{display:flex;padding:3px;background:#ffffff1f;border-radius:999px}.mode-toggle button{padding:6px 16px;background:transparent;color:#fff;border:none;border-radius:999px;cursor:pointer;font-size:13px;font-weight:700}.mode-toggle button.active{background:var(--yellow);color:var(--navy-ink)}.mode-toggle button:hover:not(.active){background:#ffffff1f}main{display:flex;gap:18px;padding:18px;align-items:flex-start}.canvas-section{flex:2;min-width:0;display:flex;flex-direction:column;gap:12px}.block-canvas-wrap{position:relative;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);border:1px solid var(--line);background:#f7f9fc}.block-canvas{height:560px;width:100%}.canvas-hint{position:absolute;left:58%;top:42%;transform:translate(-50%,-50%);max-width:300px;padding:16px 18px;background:#fff;border:2px dashed #b8c6dc;border-radius:var(--radius);color:var(--muted);font-size:14px;line-height:1.5;text-align:center;pointer-events:none}.canvas-hint strong{display:block;margin-bottom:4px;color:var(--navy);font-size:17px}.canvas-actions{display:flex;gap:10px}.canvas-section button{padding:10px 24px;background:var(--navy);color:#fff;border:none;border-radius:999px;cursor:pointer;font-size:15px;font-weight:700}.canvas-section button:hover{background:var(--navy-dark)}.canvas-section button:disabled{opacity:.6;cursor:default}.canvas-section button.run-button{padding:11px 32px;background:var(--yellow);color:var(--navy-ink);font-size:16px;font-weight:800;box-shadow:0 3px 0 var(--yellow-dark)}.canvas-section button.run-button:hover:not(:disabled){background:#ffd633}.canvas-section button.run-button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 var(--yellow-dark)}.canvas-section button.secondary{background:#fff;color:var(--navy);border:2px solid var(--navy)}.canvas-section button.secondary:hover{background:var(--page)}.side-panels{flex:1;min-width:0;display:flex;flex-direction:column;gap:16px}.code-panel,.output-panel{background:var(--console);color:#d6e2f5;padding:14px 16px;border-radius:var(--radius);box-shadow:var(--shadow)}.output-panel{min-height:160px}.plot-panel,.predict-form,.comparison-panel,.classification-report-panel{background:var(--card);border:1px solid var(--line);padding:14px 16px;border-radius:var(--radius);box-shadow:var(--shadow)}.code-panel h3,.output-panel h3{margin-top:0;color:var(--yellow);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.plot-panel h3,.predict-form h3,.comparison-panel h3,.classification-report-panel h3{margin-top:0;color:var(--navy);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.blocklyToolboxDiv{padding-top:8px}.blocklyTreeRow{height:38px;line-height:38px;margin:2px 8px 2px 0;padding-right:12px;border-radius:0 999px 999px 0}.blocklyTreeRow:not(.blocklyTreeSelected):hover{background:#ffffff1a}.blocklyTreeLabel{font-family:Nunito,system-ui,sans-serif;font-size:15px;font-weight:700;color:#fff}.cat-icon{display:inline-block;width:26px;margin:0 4px 0 6px;text-align:center;font-size:16px;vertical-align:middle;height:auto;background:none!important;visibility:visible!important}.cat-data:before{content:"📊"}.cat-preprocess:before{content:"🧹"}.cat-setup:before{content:"🎯"}.cat-split:before{content:"✂️"}.cat-model:before{content:"🧠"}.cat-evaluate:before{content:"📈"}.cat-predict:before{content:"🔮"}.cat-export:before{content:"💾"}@media (max-width: 900px){main{flex-direction:column}.canvas-section,.side-panels{width:100%}}.code-panel-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;background:none;border:none;padding:0;margin:0;color:var(--yellow);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-family:inherit;cursor:pointer}.code-panel-toggle:hover{color:#fff}.code-panel-chevron{font-size:11px}.code-panel pre{margin-top:10px}.predict-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:12px}.predict-field{display:flex;flex-direction:column;font-size:12px;gap:4px}.predict-field span{color:#4b5563;font-weight:600}.predict-field input,.predict-field select{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px}.predict-form button{padding:8px 22px;background:var(--navy);color:#fff;border:none;border-radius:999px;font-weight:700;cursor:pointer;font-size:14px}.predict-form button:hover{background:var(--navy-dark)}.predict-form button:disabled{opacity:.6;cursor:default}.predict-result{margin-top:12px;font-size:14px}.comparison-table,.classification-report-table{width:100%;border-collapse:collapse;font-size:13px}.comparison-table th,.comparison-table td,.classification-report-table th,.classification-report-table td{text-align:left;padding:6px 10px;border-bottom:1px solid #e5e7eb}.comparison-table th,.classification-report-table th{color:#4b5563;font-weight:600}.comparison-best{background:#fff4cc;font-weight:600}.classification-report-avg{color:#6b7280;font-style:italic}.code-panel pre,.output-panel pre{white-space:pre-wrap;word-break:break-word;font-family:Fira Code,monospace;font-size:13px;margin:0}.output-error{color:#f87171;white-space:pre-wrap;word-break:break-word;font-family:inherit;margin:0}.error-block{margin-top:8px;border-left:3px solid #f87171;padding-left:10px}.error-details{margin-top:6px}.error-details summary{cursor:pointer;color:#9ca3af;font-size:12px}.error-details summary:hover{color:#d4d4d4}.output-error-raw{color:#9ca3af;font-size:12px;margin-top:6px}.status{color:#93c5fd;font-size:13px;display:flex;align-items:center;gap:8px}.spinner{display:inline-block;width:12px;height:12px;border:2px solid rgba(147,197,253,.35);border-top-color:#93c5fd;border-radius:50%;animation:blockml-spin .7s linear infinite}@keyframes blockml-spin{to{transform:rotate(360deg)}}.header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.header-button{padding:7px 16px;background:#ffffff14;color:#fff;border:1.5px solid rgba(255,255,255,.55);border-radius:999px;cursor:pointer;font-size:13px;font-weight:700}.header-button:hover{background:#ffffff2e;border-color:#fff}a.header-button{text-decoration:none;display:inline-block}.header-button{font-family:inherit;line-height:1.4}.dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background:#0f172a73;display:flex;align-items:flex-start;justify-content:center;padding:32px 16px;overflow-y:auto}.dialog{width:100%;max-width:680px;background:#fff;border-radius:10px;box-shadow:0 20px 50px #00000040;outline:none}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid #e0e0e0}.dialog-header h2{margin:0;font-size:18px}.dialog-close{width:32px;height:32px;border:none;border-radius:6px;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:#555}.dialog-close:hover:not(:disabled){background:#f1f5f9}.dialog-body{padding:16px 20px;display:flex;flex-direction:column;gap:16px}.dialog-body h3{margin:0;font-size:14px}.dialog button,.dialog .file-button,.dialog .primary-button{padding:8px 16px;background:var(--navy);color:#fff;border:1px solid var(--navy);border-radius:6px;cursor:pointer;font-size:14px;font-family:inherit;text-decoration:none;display:inline-block}.dialog button:hover:not(:disabled),.dialog .primary-button:hover{background:var(--navy-dark)}.dialog button:disabled{opacity:.5;cursor:default}.dialog button.secondary,.dialog .file-button.secondary{background:#fff;color:var(--navy)}.dialog button.secondary:hover:not(:disabled),.dialog .file-button.secondary:hover{background:var(--page)}.dialog button.dialog-close{background:transparent;border:none;color:#555;padding:0}.dialog button.link-button{background:none;border:none;color:var(--navy);padding:0;text-decoration:underline;font-size:13px}.dialog button.link-button:hover:not(:disabled){background:none}.dialog button.icon-button{width:30px;height:30px;padding:0;background:#fff;color:#334155;border:1px solid #cbd5e1}.dialog button.icon-button:hover:not(:disabled){background:#f1f5f9}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}.export-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.export-games{border:2px dashed transparent;border-radius:8px;margin:-6px;padding:6px}.export-games.dragging{border-color:var(--navy);background:var(--page)}.export-empty{margin:0;padding:24px 16px;text-align:center;color:#64748b;background:#f8fafc;border-radius:8px;font-size:14px}.export-game-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.export-game-list li{display:flex;align-items:flex-start;gap:12px;padding:8px;border:1px solid #e0e0e0;border-radius:8px}.export-game-list li.has-error{background:#fef2f2;border-color:#fecaca}.export-thumb{position:relative;flex:0 0 auto;width:96px;height:72px;border-radius:6px;overflow:hidden;background:#e2e8f0}.export-thumb img{width:100%;height:100%;object-fit:cover;display:block}.export-thumb-busy{position:absolute;right:6px;bottom:6px;width:16px;height:16px;border:2px solid rgba(255,255,255,.9);border-top-color:var(--navy);border-radius:50%;animation:export-spin .8s linear infinite}@keyframes export-spin{to{transform:rotate(360deg)}}.export-game-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.export-game-title{width:100%;padding:6px 8px;border:1px solid #cbd5e1;border-radius:6px;font-size:14px;font-weight:600;font-family:inherit}.export-game-name{font-weight:600;font-size:14px;word-break:break-all}.export-game-meta{font-size:12px;color:#64748b;word-break:break-all}.export-game-warning,.export-game-error{font-size:12px;padding:2px 6px;border-radius:4px}.export-game-warning{background:#fef9c3;color:#713f12}.export-game-error{color:#b91c1c}.export-game-buttons{display:flex;gap:4px}.export-app-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px}.export-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.export-field>input{padding:8px 10px;border:1px solid #cbd5e1;border-radius:6px;font-size:14px;font-family:inherit;font-weight:400}.export-icon-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-weight:400}.export-icon-preview{width:48px;height:48px;border-radius:10px;overflow:hidden;background:#e2e8f0;flex:0 0 auto}.export-icon-preview img{width:100%;height:100%;object-fit:cover}.export-size{margin:0;font-size:13px;color:#475569}.export-size.too-big{color:#b45309}.export-progress ol{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:13px;color:#94a3b8}.export-progress li.done{color:#15803d}.export-progress li.done:before{content:"✓ "}.export-progress li.active{color:#1a1a1a;font-weight:600}.export-progress-bar{height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden}.export-progress-bar div{height:100%;background:var(--navy);transition:width .2s}.export-build-error{margin:0;padding:8px 12px;background:#fef2f2;color:#b91c1c;border-radius:6px;font-size:14px}.export-done-title{margin:0;font-size:18px;font-weight:600;color:#15803d}.export-steps-list{margin:0;padding-left:20px;font-size:14px;line-height:1.6}.export-note{margin:0;font-size:13px;color:#475569;line-height:1.5}.export-key{padding:12px 20px 16px;border-top:1px solid #e0e0e0;font-size:13px;color:#475569}.export-key summary{cursor:pointer;font-weight:600;color:#334155}.export-key p{line-height:1.5}.export-key-buttons{display:flex;gap:8px;flex-wrap:wrap}@media (max-width: 560px){.export-app-settings{grid-template-columns:1fr}.export-game-list li{flex-wrap:wrap}.export-game-buttons{width:100%;justify-content:flex-end}}.export-credits{margin:0;padding:0 20px 14px;font-size:11px;color:#94a3b8;line-height:1.5}.export-credits a{color:inherit}.dialog{border-radius:18px;overflow:hidden}.dialog-header.export-hero{align-items:center;gap:14px;padding:18px 20px;background:linear-gradient(120deg,var(--navy-dark),var(--navy) 60%,#13528f);color:#fff;border-bottom:4px solid var(--yellow)}.export-hero-icon{width:46px;height:46px;flex:0 0 auto;display:grid;place-items:center;font-size:24px;background:#ffffff1f;border-radius:12px}.export-hero-text{flex:1;min-width:0}.export-hero h2{font-size:19px;font-weight:800}.export-hero p{margin:2px 0 0;font-size:13px;color:#ffffffc7}.dialog .export-hero button.dialog-close{color:#fff;align-self:flex-start}.dialog .export-hero button.dialog-close:hover:not(:disabled){background:#ffffff26}.dialog-body{padding:18px 20px}.dialog-body h3,.export-step-title{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;font-weight:800;color:var(--navy-ink)}.export-step-title{margin-bottom:-6px}.export-step{width:24px;height:24px;flex:0 0 auto;display:inline-grid;place-items:center;border-radius:50%;background:var(--yellow);color:var(--navy-ink);font-size:13px;font-weight:800}.dialog button,.dialog .file-button,.dialog .primary-button{border-radius:999px;font-weight:700}.dialog button.secondary,.dialog .file-button.secondary{border-width:2px}.dialog button.icon-button{border-radius:8px}.dialog button.export-make,.dialog .primary-button.export-download{padding:11px 26px;background:var(--yellow);border-color:var(--yellow);color:var(--navy-ink);font-size:15px;font-weight:800;box-shadow:0 3px 0 var(--yellow-dark)}.dialog button.export-make:hover:not(:disabled),.dialog .primary-button.export-download:hover{background:#ffd633}.dialog button.export-make:disabled{background:#e5eaf2;border-color:#e5eaf2;color:#8a99b0;box-shadow:none;opacity:1}.dialog button.export-empty{width:100%;display:flex;flex-direction:column;align-items:center;gap:4px;padding:26px 16px;background:#f7f9fc;border:2px dashed #b8c6dc;border-radius:14px;color:var(--muted);font-weight:400;font-size:14px;text-align:center;cursor:pointer}.dialog button.export-empty:hover:not(:disabled){background:#eef3fb;border-color:var(--navy)}.export-empty strong{color:var(--navy-ink);font-size:16px}.export-empty-icon{font-size:34px;line-height:1.2}.export-games.dragging{background:#fff8db;border-color:var(--yellow-dark)}.export-game-list li{padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 1px 3px #0b3d6d0f}.export-thumb{width:112px;height:84px;border-radius:10px}.export-thumb-number{position:absolute;left:6px;top:6px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:var(--navy);color:#fff;font-size:12px;font-weight:800}.export-game-title{border-radius:8px}.export-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}.export-chip{padding:2px 10px;border-radius:999px;background:#e8f0fc;color:var(--navy-ink);font-size:12px;font-weight:700}.export-chip.note{background:#fff4cc;color:#7a5200}.export-game-warning{border-radius:8px;padding:3px 8px}.export-app-settings{padding:14px;background:#f7f9fc;border:1px solid var(--line);border-radius:14px}.export-field>input{border-radius:10px;border-width:2px;border-color:var(--line)}.export-field>input:focus{outline:none;border-color:var(--navy)}.export-home-preview{width:76px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--navy-ink);text-align:center;word-break:break-word}.export-icon-preview{width:56px;height:56px;border-radius:16px;box-shadow:0 2px 6px #0b3d6d40}.export-progress{padding:14px;background:#f7f9fc;border-radius:14px}.export-progress li.active{color:var(--navy-ink)}.export-progress-bar{height:10px;border-radius:999px}.export-progress-bar div{background:linear-gradient(90deg,var(--yellow),#ffab19)}.export-done{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px;background:linear-gradient(180deg,#fff8db,#fff);border-radius:14px;text-align:center}.export-done-badge{font-size:44px;line-height:1}.export-done-title{color:var(--navy-ink);font-size:22px;font-weight:800}.export-steps-list{list-style:none;padding:0;counter-reset:step;display:flex;flex-direction:column;gap:8px}.export-steps-list li{counter-increment:step;position:relative;padding-left:34px}.export-steps-list li:before{content:counter(step);position:absolute;left:0;top:0;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--navy);color:#fff;font-size:12px;font-weight:800}.export-key{background:#fbfcfe}.image-dataset-panel,.image-mistakes-panel{background:var(--card);border:1px solid var(--line);padding:14px 16px;border-radius:var(--radius);box-shadow:var(--shadow)}.image-dataset-panel h3,.image-mistakes-panel h3{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 10px;color:var(--navy);font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.image-dataset-total{color:var(--muted);font-size:12px;font-weight:700;text-transform:none;letter-spacing:0}.image-dataset-progress p{margin:0 0 8px;font-size:13px;color:var(--muted)}.image-progress-bar{height:10px;background:#e2e8f0;border-radius:999px;overflow:hidden}.image-progress-bar div{height:100%;background:linear-gradient(90deg,var(--yellow),#ffab19);transition:width .2s}.image-dataset-error{margin:0;padding:8px 12px;background:#fef2f2;color:#b91c1c;border-radius:10px;font-size:13px}.image-classes{display:flex;flex-direction:column;gap:10px}.image-class-head{display:flex;justify-content:space-between;font-size:13px;margin-bottom:4px}.image-class-head strong{color:var(--navy-ink)}.image-class-head span{color:var(--muted)}.image-thumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}.image-thumbs img,.image-mistake img,.image-missing{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;background:#e2e8f0;display:block}.image-dataset-warnings{margin:10px 0 0;padding-left:18px;font-size:12px;color:#7a5200}.image-mistakes{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px}.image-mistake{margin:0}.image-mistake figcaption{display:flex;flex-direction:column;margin-top:3px;font-size:11px;line-height:1.3}.image-mistake-actual{color:#15803d;font-weight:700}.image-mistake-predicted{color:#b91c1c}.image-mistakes-none,.image-mistakes-more{margin:8px 0 0;font-size:13px;color:var(--muted)}.predict-photo{display:flex;gap:14px;align-items:center}.predict-photo-pick{width:120px;height:120px;flex:0 0 auto;display:grid;place-items:center;border:2px dashed #b8c6dc;border-radius:14px;background:#f7f9fc;color:var(--navy);font-size:13px;font-weight:700;text-align:center;cursor:pointer;overflow:hidden}.predict-photo-pick:hover{border-color:var(--navy)}.predict-photo-pick span{line-height:1.6}.predict-photo-pick img{width:100%;height:100%;object-fit:cover}.predict-photo-result .status{color:var(--navy)}.predict-photo-hint{margin:0;font-size:13px;color:var(--muted)}
