*{box-sizing:border-box}html,body{min-height:100%;margin:0;padding:0;overflow-x:hidden}body{color:#111827;background:#f8fafc;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.app{flex-direction:column;gap:14px;width:min(1040px,100%);max-width:1040px;margin:0 auto;padding:14px 12px 28px;display:flex}.app-header{grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:44px;display:grid}.header-left{justify-self:start;align-items:center;gap:10px;min-width:0;display:flex}.header-left h1{letter-spacing:-.02em;color:#111827;white-space:nowrap;margin:0;font-size:1.05rem;font-weight:700}.status-pill{color:#374151;white-space:nowrap;background:#fff;border:1px solid #e5e7eb;border-radius:999px;align-items:center;gap:6px;padding:4px 10px;font-size:.78rem;font-weight:500;display:inline-flex}.status-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.status-pill.running .status-dot{background:#22c55e}.status-pill.idle .status-dot{background:#9ca3af}.status-pill.collision .status-dot{background:#ef4444}.status-pill.won .status-dot{background:#2563eb}.header-metrics{font-variant-numeric:tabular-nums;white-space:nowrap;justify-self:center;align-items:center;gap:18px;display:flex}.metric{align-items:baseline;gap:6px;min-width:0;display:inline-flex}.metric.score{min-width:72px}.metric.step{min-width:64px}.metric.latency{min-width:110px}.metric-label{color:#6b7280;font-size:.78rem;font-weight:500}.metric-value{color:#111827;font-variant-numeric:tabular-nums;font-size:.9rem;font-weight:600}.header-right{justify-self:end;align-items:center;gap:8px;display:flex}.btn{cursor:pointer;touch-action:manipulation;border:none;border-radius:10px;padding:8px 16px;font-size:.875rem;font-weight:600;line-height:1.2;transition:background 80ms,opacity 80ms}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{color:#fff;background:#2563eb;min-width:78px}.btn-primary:hover:not(:disabled){background:#1d4ed8}.btn-outline{color:#111827;background:#fff;border:1px solid #e5e7eb;min-width:72px}.btn-outline:hover:not(:disabled){background:#f9fafb}.btn-gear{color:#6b7280;background:#fff;border:1px solid #e5e7eb;border-radius:10px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;font-size:1rem;display:inline-flex;position:relative}.btn-gear:hover{color:#111827;background:#f9fafb}.btn-gear.on{color:#2563eb;background:#eff6ff;border-color:#93c5fd}.btn-gear-wrap{position:relative}.gear-menu{z-index:20;background:#fff;border:1px solid #e5e7eb;border-radius:10px;flex-direction:column;gap:8px;min-width:180px;padding:10px 12px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 8px 24px #0f172a14}.gear-menu label{color:#374151;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;font-size:.8rem;display:flex}.gear-menu input[type=checkbox]{accent-color:#2563eb}.gear-menu input[type=number]{border:1px solid #e5e7eb;border-radius:6px;width:64px;margin-left:4px;padding:2px 6px}.error-banner{color:#991b1b;background:#fef2f2;border:1px solid #fecaca;border-radius:10px;padding:10px 12px;font-size:.82rem;font-weight:500}.main{grid-template-columns:minmax(0,540px) minmax(0,1fr);align-items:start;gap:16px;width:100%;display:grid}.panel{contain:layout style;background:#fff;border:1px solid #e5e7eb;border-radius:12px;min-width:0;overflow:hidden;box-shadow:0 1px 2px #0f172a0a}.board-panel{justify-content:center;align-items:center;width:100%;max-width:540px;padding:16px;display:flex}.board{--cols:12;--rows:12;--cell:clamp(22px, calc((100vw - 56px) / var(--cols)), 40px);--gap:1px;gap:var(--gap);width:calc(var(--cols) * var(--cell) + (var(--cols) - 1) * var(--gap));height:calc(var(--rows) * var(--cell) + (var(--rows) - 1) * var(--gap));background:#e5e7eb;border:1px solid #e5e7eb;border-radius:8px;max-width:100%;display:grid;overflow:hidden}.cell{width:var(--cell);height:var(--cell);background:#fff;position:relative}.cell-empty,.cell-body,.cell-head{background:#fff}.cell-body:before,.cell-head:before{content:"";background:#3b82f6;border-radius:8px;position:absolute;inset:3px}.cell-head:before{background:#2563eb}.cell-head{z-index:1;position:relative}.cell-food-wrap{background:#fff;justify-content:center;align-items:center;display:flex}.food-dot{width:calc(var(--cell) * .45);height:calc(var(--cell) * .45);background:#22c55e;border-radius:50%}.eye{z-index:2;width:max(4px, calc(var(--cell) * .125));height:max(4px, calc(var(--cell) * .125));pointer-events:none;background:#fff;border-radius:50%;position:absolute}.cell-head.dir-right .eye-a{top:20%;right:18%}.cell-head.dir-right .eye-b{bottom:20%;right:18%}.cell-head.dir-left .eye-a{top:20%;left:18%}.cell-head.dir-left .eye-b{bottom:20%;left:18%}.cell-head.dir-up .eye-a{top:18%;left:20%}.cell-head.dir-up .eye-b{top:18%;right:20%}.cell-head.dir-down .eye-a{bottom:18%;left:20%}.cell-head.dir-down .eye-b{bottom:18%;right:20%}.probs-panel{flex-direction:column;width:100%;max-width:420px;height:auto;min-height:0;padding:14px 16px;display:flex}@media (min-width:900px){.probs-panel{height:540px;max-height:540px}}.panel-head{flex-wrap:wrap;flex-shrink:0;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:14px;display:flex}.panel-title{color:#111827;margin:0;font-size:.92rem;font-weight:650}.panel-meta{color:#6b7280;font-variant-numeric:tabular-nums;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem}.held-indicator{color:#2563eb;margin-right:10px;font-weight:650;display:inline-block}.prob-list{flex-direction:column;flex:1;justify-content:flex-start;gap:14px;padding-top:4px;display:flex}.prob-row{grid-template-columns:72px minmax(0,1fr) 52px 44px;align-items:center;gap:10px;min-height:28px;display:grid}.prob-label{color:#374151;align-items:center;gap:6px;font-size:.82rem;font-weight:500;display:inline-flex}.prob-label .arrow{text-align:center;color:#6b7280;width:14px;font-size:.85rem}.prob-row.chosen .prob-label{color:#2563eb;font-weight:650}.prob-row.chosen .prob-label .arrow{color:#2563eb}.prob-track{background:#f3f4f6;border-radius:4px;justify-self:stretch;width:100%;max-width:180px;height:8px;overflow:hidden}.prob-fill{background:#cbd5e1;border-radius:4px;width:0;height:100%;transition:width .1s linear}.prob-row.chosen .prob-fill{background:#2563eb}.prob-pct{font-variant-numeric:tabular-nums;color:#6b7280;text-align:right;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.78rem}.prob-tag{text-align:right;font-variant-numeric:tabular-nums;font-size:.75rem;font-weight:600}.prob-tag.safe{color:#22c55e}.prob-tag.neck,.prob-tag.body{color:#ef4444}.json-panel{flex-direction:column;width:100%;min-height:200px;padding:14px 16px 16px;display:flex}.json-panel .panel-head{margin-bottom:10px}.json-body{color:#111827;white-space:pre;font-variant-numeric:tabular-nums;-webkit-overflow-scrolling:touch;background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;flex:1;min-height:180px;max-height:320px;margin:0;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.78rem;line-height:1.55;overflow:auto}.json-body .jk{color:#2563eb}.json-body .js{color:#b45309}.json-body .jn{color:#c2410c}.json-body .jb{color:#7c3aed}.json-body .jnul{color:#9ca3af}.json-body .jp{color:#6b7280}.json-empty{color:#9ca3af;font-style:normal}.muted{color:#6b7280;font-size:.75rem}@media (max-width:899px){.app{gap:12px;padding:12px 10px 24px}.app-header{grid-template-columns:1fr;gap:10px}.header-left{justify-content:space-between;width:100%}.header-metrics{background:#fff;border:1px solid #e5e7eb;border-radius:10px;justify-content:space-between;justify-self:stretch;gap:8px;width:100%;padding:8px 10px}.metric.score,.metric.step,.metric.latency{min-width:0}.header-right{grid-template-columns:1fr 1fr auto;justify-self:stretch;gap:8px;width:100%;display:grid}.header-right .btn{width:100%;min-height:44px}.header-right .btn-primary,.header-right .btn-outline{min-width:0}.btn-gear{width:44px;height:44px}.main{grid-template-columns:1fr;gap:12px}.board-panel{max-width:none;padding:12px}.board{--cell:clamp(20px, calc((100vw - 48px) / var(--cols)), 36px)}.probs-panel{max-width:none}.panel-meta{white-space:normal}.prob-row{grid-template-columns:64px minmax(0,1fr) 48px 40px;gap:8px}.prob-track{max-width:none}}@media (max-width:420px){.header-left h1{font-size:.95rem}.metric-label{font-size:.7rem}.metric-value{font-size:.82rem}.prob-row{grid-template-columns:56px minmax(0,1fr) 44px 36px}}
