.derby-setup,.derby-match,.derby-controls{ display:grid; gap:10px; }
.derby-shell h2,.derby-shell p{ margin:0; }
.derby-lineup li button{ margin-left:auto; min-height:34px; padding:3px 8px; }
.derby-lineup small,.derby-live small,.derby-ranks small{ display:block; color:#e2d4fa; font-size:11px; }
.derby-top{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.derby-distance{ color:#ffe5a6; white-space:nowrap; }
.derby-scene{
  position:relative; overflow:hidden; border:1px solid #9c83c8; border-radius:16px;
  background:linear-gradient(#514782 0%,#b08eb8 54%,#4a5d49 55%,#382a49);
}
.derby-mainView{ position:relative; height:clamp(170px,32vh,345px); }
.derby-scene canvas{ position:absolute; inset:0; display:none; width:100%; height:100%; pointer-events:none; }
.derby-scene.has-scene canvas{ display:block; }
.derby-scene.has-scene .derby-fallback{ display:none; }
.derby-insets{
  position:relative; z-index:1; display:grid; gap:6px; padding:6px;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr));
}
.derby-inset{
  position:relative; height:clamp(65px,11vh,100px); border:1px solid #ddba85;
  border-radius:8px; overflow:hidden;
}
.derby-inset b{
  position:absolute; bottom:0; left:0; right:0; padding:3px 6px;
  background:#1d1534ee; color:#fff3d5; font-size:13px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
.derby-fallback{ position:absolute; inset:8px; display:grid; gap:4px; }
.derby-fallback div{ position:relative; border-bottom:1px dashed #f6e3a0; background:#60395466; }
.derby-fallback span{ position:absolute; font-size:20px; transition:left .15s linear; }
.derby-live{ grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.derby-feed{ display:grid; gap:4px; padding:0; margin:0; list-style:none; }
.derby-feed li{ padding:4px 8px; background:#281b43; border-radius:8px; color:#eedfff; font-size:14px; }
.derby-progress{ width:100%; accent-color:#ffc76b; }
.derby-position{ color:#ffe1a0; font-weight:800; }
.derby-tip{ min-height:42px; padding:7px 10px; border:1px solid #9d8ad1; border-radius:10px; background:#302451; }
.derby-drive{
  min-height:clamp(104px,23vh,220px); padding:8px; border:2px solid #fff3cb; border-radius:24px;
  background:linear-gradient(140deg,#ffce75,#f7809f); color:#2b1537; font:inherit;
  font-size:clamp(24px,8vw,45px); font-weight:900; touch-action:manipulation; user-select:none; cursor:pointer;
}
.derby-drive:active{ transform:translateY(2px); }
.derby-drive:disabled{ opacity:.55; }
.derby-motionStatus:empty{ display:none; }
