.baydock-btn.k-run { background: #a7f3ca; color: #123f36; white-space: nowrap; }
#bay-run[hidden] { display: none; }
#bay-run {
  position: fixed; inset: 0; z-index: 1090; isolation: isolate; pointer-events: none;
  --run-paper: #fff9eb; --run-ink: #183f39; --run-mint: #b7f3ce; --run-line: #dddcca;
  color: var(--run-ink); font-variant-numeric: tabular-nums;
}
.bay-run-open #ui, .bay-run-open .mpbar, .bay-run-open .baydock,
.bay-run-open .mpscene, .bay-run-open .mppeers, .bay-run-open .mpcard { visibility: hidden; }
#bay-run:not([hidden]):is([data-stage="lobby"], [data-stage="result"]) {
  display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(12, 39, 41, .3); pointer-events: auto;
}
.run-card {
  width: min(100%, 508px); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  padding: 22px; border-radius: 24px; border: 1px solid #f8f8e8;
  background: var(--run-paper); box-shadow: 0 18px 68px #102f4070;
}
#bay-run button {
  font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--run-line);
  background: #fffdf5; border-radius: 12px; padding: 8px 12px; font-weight: 750;
}
#bay-run button:focus-visible { outline: 2px solid #148967; outline-offset: 2px; }
#bay-run button:disabled { opacity: .48; cursor: default; }
.run-head, .run-hud header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.run-head small, .run-hud small { font-weight: 750; color: #376f5d; font-size: 12px; }
.run-head h2 { margin: 3px 0 0; font-size: clamp(24px, 5vw, 35px); line-height: 1.15; }
.run-head p { margin: 5px 0 0; font-size: 13px; color: #446559; }
#bay-run .run-close { width: 38px; height: 38px; padding: 0; flex: none; font-size: 23px; line-height: 1; }
.run-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
#bay-run .run-routes button { text-align: left; display: grid; align-content: start; gap: 5px; padding: 11px; min-height: 102px; }
.run-routes b { font-size: 17px; }
.run-routes small { color: #376f5d; }
.run-routes span { font-size: 12px; color: #355850; font-weight: 500; }
#bay-run button[aria-pressed="true"] { background: #e3f5de; border-color: #479a78; }
.run-lobby-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; }
.run-modes { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: #ebe9dc; }
#bay-run .run-modes button { font-size: 13px; padding: 6px 9px; }
#bay-run .run-primary { background: #16483d; color: #fcffed; border-color: #16483d; }
.run-wide { width: 100%; margin-top: 12px; }
.run-note { margin: 10px 0 0; color: #3c6153; font-size: 13px; }
.run-records { border-top: 1px solid var(--run-line); padding-top: 9px; display: flex; gap: 14px; flex-wrap: wrap; }
.run-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 5px; }
.run-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #edeedc; border-radius: 11px; padding: 8px 10px; min-width: 0; font-size: 13px; }
.run-list li > :first-child { overflow-wrap: anywhere; min-width: 0; }
.run-list li > :last-child { flex-shrink: 0; }
.run-list small { display: block; color: #426657; font-size: 11px; margin-top: 3px; }
.run-list i { display: inline-grid; place-items: center; border-radius: 50%; background: #cce8b9; font-style: normal; width: 22px; height: 22px; margin-right: 6px; }
.run-result-time { margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: #e2f4de; display: grid; }
.run-result-time b { font-size: 42px; font-weight: 850; }
.run-result-time span { font-size: 13px; }
.run-hud {
  position: absolute; top: max(13px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), 416px); pointer-events: auto; padding: 11px 13px; border-radius: 17px;
  background: var(--run-paper); border: 1px solid #f2ffed; box-shadow: 0 7px 24px #102f4060;
}
.run-hud header > div:first-child { display: grid; gap: 4px; }
.run-hud header > div:last-child { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.run-hud header b { font-size: 14px; }
.run-hud strong { font-size: 20px; white-space: nowrap; }
#bay-run .run-hud button { font-size: 12px; padding: 6px 8px; }
.run-hud footer { display: flex; justify-content: space-between; font-size: 11px; color: #446559; }
#bay-run progress { display: block; appearance: none; width: 100%; border: 0; border-radius: 9px; background: #cbd6c8; overflow: hidden; }
#bay-run progress::-webkit-progress-bar { background: #cbd6c8; }
#bay-run progress::-webkit-progress-value { background: #32856b; border-radius: 9px; }
#bay-run progress::-moz-progress-bar { background: #32856b; }
.run-hud progress { height: 5px; margin: 8px 0 5px; }
.run-cue {
  position: absolute; top: 35%; left: 50%; transform: translateX(-50%); min-width: 94px; text-align: center;
  background: #174438; color: #fff8cb; font-size: 38px; font-weight: 900; padding: 7px 14px;
  border: 1px solid #a1e8c3; border-radius: 22px; box-shadow: 0 8px 25px #112b3570;
}
.run-cue:empty { display: none; }
.run-controls {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right));
  display: flex; align-items: end; justify-content: space-between; gap: 8px;
}
.run-pad {
  width: clamp(92px, 19vw, 112px); aspect-ratio: 1; border-radius: 50%; position: relative;
  background: #153e39dd; border: 2px solid #d4f7d6; color: #dcf5da; pointer-events: auto; touch-action: none; cursor: grab;
}
.run-pad span { position: absolute; top: 7%; left: 50%; translate: -50% 0; font-size: 12px; }
.run-pad i { position: absolute; inset: 31%; border-radius: 50%; background: var(--run-mint); box-shadow: inset 0 1px 0 #eeffe9; pointer-events: none; }
.run-controls-hint { background: #173e38eb; color: #fffbed; border-radius: 12px; padding: 7px 11px; text-align: center; font-size: 12px; }
.run-controls-hint small { display: block; color: #cce5d5; margin-top: 3px; }
.run-pace { width: 79px; padding: 4px; display: grid; justify-items: center; gap: 4px; color: #fff8ec; }
#bay-run .run-sprint { width: 64px; height: 64px; border-radius: 50%; padding: 0; background: #ffdb8d; color: #4b351b; pointer-events: auto; touch-action: none; }
.run-sprint span { display: block; font-size: 19px; line-height: .95; }
#bay-run .run-sprint.pressed { background: #ffae56; transform: scale(.95); }
.run-pace progress { height: 5px; }
.run-pace small { border-radius: 10px; padding: 2px 6px; background: #173e38eb; font-size: 10px; }
@media (max-width: 460px) {
  .run-card { padding: 16px; }
  #bay-run .run-lobby-actions button { font-size: 12px; padding-inline: 8px; }
  .baydock { gap: 5px; }
  .baydock-btn { min-width: auto; padding-inline: 10px; }
}
@media (pointer: coarse) {
  .run-controls-hint b { font-size: 0; }
  .run-controls-hint b::after { content: "拖动方向 · 按住冲刺"; font-size: 11px; }
  .run-controls-hint small { display: none; }
}
