#bigj-derby-root{font:14px system-ui,-apple-system,Segoe UI,sans-serif;color:#fff}
#bigj-derby-root [hidden]{display:none!important}
.derby-open,.derby-start,.derby-stop,.derby-yes,.derby-no,.derby-restore{border:0;border-radius:12px;padding:10px 14px;font:700 14px system-ui;cursor:pointer}
.derby-open{background:#7c3aed;color:#fff;margin:4px}
.derby-seller{position:fixed;right:14px;bottom:18px;z-index:12000;width:min(360px,calc(100vw - 28px));padding:18px;background:#101827;border:2px solid #a78bfa;border-radius:18px;box-shadow:0 18px 55px #0009;box-sizing:border-box}
.derby-seller-head,.derby-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.derby-seller-head strong{font-size:20px}.derby-seller-head button,.derby-head button{background:#334155;border:0;border-radius:8px;color:#fff;font-size:22px;cursor:pointer}.derby-seller-head .derby-sound{font-size:12px;padding:6px;white-space:nowrap}
.derby-seller p{line-height:1.35;color:#cbd5e1}.derby-seller label{display:block;margin:10px 0;font-weight:700}.derby-seller input{display:block;box-sizing:border-box;width:100%;font:700 18px system-ui;padding:9px;border-radius:8px;border:1px solid #94a3b8;margin-top:5px}
.derby-start{background:#16a34a;color:white}.derby-stop{background:#7f1d1d;color:white;margin-left:6px}.derby-seller-status{margin-top:12px;font-weight:700}.derby-seller-tip{margin-top:8px;color:#fca5a5}
.derby-invite{position:fixed;left:50%;top:24%;transform:translateX(-50%);z-index:12000;width:min(350px,calc(100vw - 28px));background:#111827;border:2px solid #a78bfa;border-radius:18px;box-shadow:0 18px 55px #000b;padding:18px;text-align:center;box-sizing:border-box}
.derby-invite strong{font-size:22px}.derby-invite p{line-height:1.4}.derby-yes{background:#16a34a;color:#fff}.derby-no{background:#475569;color:#fff;margin-left:8px}
.derby-arena{position:fixed;z-index:11000;width:280px;height:280px;background:transparent;border:2px dashed rgba(239,68,68,.85);border-radius:12px;overflow:visible;pointer-events:none;box-sizing:border-box}
.derby-head{position:absolute;left:0;right:0;top:-35px;min-height:29px;padding:3px 7px;border-radius:9px;background:rgba(15,23,42,.88);font-size:12px;pointer-events:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:4px 5px}.derby-head.has-health{top:-62px}.derby-head strong{font-size:13px}.derby-head>span{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.derby-head button{line-height:1}.derby-head .derby-sound{font-size:11px;padding:4px;background:#475569;white-space:nowrap}
.derby-health{grid-column:1/-1;display:flex;align-items:center;gap:6px;font-size:11px;font-weight:800;white-space:nowrap}.derby-health-label{flex:none}.derby-health-track{display:block;flex:1;height:9px;border-radius:99px;background:#475569;overflow:hidden}.derby-health-fill{display:block;width:100%;height:100%;border-radius:99px;background:#22c55e;transition:width 180ms linear}.derby-health-value{flex:none;min-width:32px;text-align:right}
.derby-result{position:fixed;z-index:12001;top:17%;left:50%;transform:translateX(-50%);width:min(350px,calc(100vw - 28px));box-sizing:border-box;padding:12px 16px;border:2px solid #facc15;border-radius:14px;background:rgba(15,23,42,.94);color:#fff;text-align:center;font:800 16px system-ui;box-shadow:0 10px 30px #000a;pointer-events:none}
.derby-canvas{display:block;width:100%;height:100%;background:transparent;pointer-events:none}
.derby-joystick{position:absolute;left:8px;bottom:8px;width:72px;height:72px;border-radius:50%;border:2px solid rgba(226,232,240,.8);background:rgba(100,116,139,.42);box-shadow:0 2px 12px #0008;touch-action:none;pointer-events:auto;box-sizing:border-box;cursor:grab}
.derby-joystick:active{cursor:grabbing}
.derby-joystick-thumb{position:absolute;left:50%;top:50%;width:29px;height:29px;translate:-50% -50%;border-radius:50%;border:2px solid #f8fafc;background:#94a3b8;box-shadow:0 2px 7px #000a;pointer-events:none;box-sizing:border-box}
.derby-restore{position:fixed;z-index:11000;background:#7c3aed;color:#fff}
.derby-desktop-field{flex:0 1 45%;min-height:140px;max-height:400px;padding:7px;box-sizing:border-box;border-top:2px solid #a78bfa;display:flex;flex-direction:column;align-items:center;font:700 13px system-ui;color:#172033;overflow:hidden}
.derby-desktop-field[hidden]{display:none!important}
.derby-desktop-field-title{width:100%;text-align:center;margin-bottom:3px}
.derby-seller-canvas{display:block;min-height:0;max-width:100%;height:calc(100% - 22px);aspect-ratio:1;background:transparent;border:2px dashed #ef4444;border-radius:9px;box-sizing:border-box}
@media(max-width:650px){.derby-joystick{width:62px;height:62px}.derby-joystick-thumb{width:25px;height:25px}.derby-head{top:-32px}}
