/* Balap Sepeda Matematika: lintasan di atas, dua panel Benar/Salah di bawah */
.sp .arena { display: flex; flex-direction: column; min-height: 0; }
.sp .lanes { flex: 0 0 auto; display: flex; flex-direction: column; background: linear-gradient(180deg, #bae6fd, #e0f2fe); border-bottom: 3px solid #fff; padding: 4px 0 0; }
.lane { --bh: clamp(34px, 8.5vh, 70px); --p: 0; position: relative; display: flex; align-items: flex-end; height: calc(var(--bh) + 14px); padding: 0 10px 0 clamp(54px, 9vw, 110px); }
.lane .who { position: absolute; left: 8px; bottom: 8px; font-weight: 800; font-size: clamp(12px, 1.5vw, 18px); max-width: clamp(44px, 8vw, 100px); line-height: 1.1; }
.lane.a .who { color: var(--team-a); } .lane.b .who { color: var(--team-b); }
.lane .road { position: relative; flex: 1; height: 100%; border-bottom: 8px solid #475569; background: linear-gradient(180deg, transparent 80%, rgba(0,0,0,.05)); }
.lane .road::before { content: ""; position: absolute; left: 0; top: 0; bottom: -8px; width: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.lane .marks i { position: absolute; bottom: -8px; height: 8px; width: 3px; left: calc(var(--f) * (100% - var(--bh) * 1.45) + var(--bh) * .72); background: #fbbf24; }
.lane .finish { position: absolute; right: 0; bottom: 0; width: 14px; height: calc(var(--bh) + 14px); background: repeating-conic-gradient(#0f172a 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 3px 0 0 0; }
.bike { position: absolute; bottom: -2px; height: var(--bh); width: calc(var(--bh) * 1.45); left: calc(var(--p) * (100% - var(--bh) * 1.45)); transition: left .6s cubic-bezier(.3, 1.2, .5, 1); }
.lane.back .bike, .bike.back { transition-duration: .9s; }
.bike img { display: block; width: 100%; height: 100%; }
.bike.go img { animation: sp-go .5s; }
.bike.back img { animation: sp-back .6s; }
.bike.stay img { animation: sp-shake .35s; }
@keyframes sp-go { 40% { transform: translateX(6px) rotate(-5deg); } }
@keyframes sp-back { 30% { transform: translateX(-8px) rotate(6deg); } }
@keyframes sp-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.lane.won .bike { animation: sp-win .5s ease-in-out 3; }
@keyframes sp-win { 50% { transform: translateY(-10px) scale(1.1); } }

.sp .panels { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.sp .team { gap: clamp(6px, 1.4vh, 16px); justify-content: center; }
.sp .qbox {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0;
  background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 6px 10px; text-align: center;
  font-family: var(--font); font-weight: 800; color: var(--ink); line-height: 1.15; font-size: clamp(24px, 4.4vw, 68px);
}
.sp .team.a .qbox { border-color: var(--team-a); } .sp .team.b .qbox { border-color: var(--team-b); }
.tf { flex: 0 0 38%; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 1.4vw, 16px); min-height: 0; }
.tf-btn {
  border: 0; border-radius: 22px; font-family: var(--font); font-weight: 800; font-size: clamp(20px, 3vw, 44px); color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0;
  box-shadow: 0 6px 0 rgba(0,0,0,.2); transition: transform .08s ease, filter .12s ease;
}
.tf-btn svg { width: clamp(22px, 3vw, 44px); height: auto; }
.tf-btn.benar { background: var(--ok); } .tf-btn.salah { background: #ea580c; }
.tf-btn:active { transform: translateY(3px) scale(.97); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.tf-btn:focus-visible { outline: 4px solid var(--amber); outline-offset: 2px; }
.team.locked .tf-btn, .team.bot .tf-btn { filter: grayscale(.6) brightness(.9); pointer-events: none; }

@media (max-width: 700px) and (orientation: portrait) {
  .sp .panels { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .sp .team.a { border-right: 0; border-bottom: 3px solid #fff; }
  .sp .qbox { font-size: clamp(22px, 7vw, 40px); }
  .tf { flex-basis: 44%; }
}
@media (max-height: 520px) {
  .lane { --bh: clamp(28px, 11vh, 44px); height: calc(var(--bh) + 10px); }
  .lane .who { font-size: 11px; bottom: 4px; }
  .sp .qbox { border-width: 3px; border-radius: 14px; font-size: clamp(20px, 9vh, 38px); }
  .tf-btn { flex-direction: row; font-size: clamp(16px, 8vh, 28px); border-radius: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
  .tf-btn svg { width: 22px; }
  .tf { flex-basis: 42%; }
}
@media (prefers-reduced-motion: reduce) { .bike { transition: none; } .bike img, .lane.won .bike { animation: none; } }
