.btn-marathon {
  height: 43px; border: 0; border-radius: 8px; background: #397f8c; color: #fff;
  font: 16px "pixel-ttf", sans-serif; letter-spacing: 1px; cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn-marathon:hover { transform: scale(1.05); background: #2d6873; }
.btn-marathon:disabled { opacity: .6; cursor: wait; }
.marathon-overlay {
  position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center;
  justify-content: center; background: #0e071b; color: #fff; overflow-y: auto;
  font-family: "pixel-ttf", sans-serif; padding: 24px; box-sizing: border-box;
}
.marathon-overlay[hidden], .marathon-live[hidden] { display: none !important; }
.marathon-box { width: min(620px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.marathon-heading { font-size: clamp(17px, 4vw, 24px); line-height: 1.5; margin: 0; color: #f6bc57; outline: none; }
.marathon-box p { margin: 0; line-height: 1.7; }
.marathon-counter { font-size: 18px; }
.marathon-next { color: #b1a3c8; font-size: 13px; }
.marathon-overlay.marathon-progress { cursor: default; }
.marathon-progress .lsi-track-wrapper { --lsi-track-bottom: 72px; }
.marathon-records { position: absolute; top: 24px; width: 90px; max-height: 48px; overflow-y: auto; overflow-wrap: anywhere; transform: translateX(-50%); font-size: 10px; color: #b1a3c8; line-height: 1.6; text-align: center; cursor: default; }
.marathon-status { color: #c9b9d9; font-size: 11px; min-height: 19px; }
.marathon-continue { background: #84994f; color: white; border: 0; border-radius: 8px; font: 13px "pixel-ttf", sans-serif; padding: 15px 24px; cursor: pointer; }
.marathon-continue:disabled { opacity: .45; cursor: wait; }
.marathon-exit { color: #aaa1bb; border: 0; background: none; font: 12px "pixel-ttf", sans-serif; cursor: pointer; padding: 10px; }
.marathon-live { pointer-events: auto; max-width: 280px; }
.marathon-live-list { max-height: 35vh; overflow-y: auto; }
.marathon-live .cube-lb-row { gap: 12px; font-size: 20px; }
.marathon-live .marathon-self { color: #f6bc57; }
.marathon-live .nick { max-width: 145px; }
#finally.marathon-result .finally-content > .finally-box {
  transition: opacity .3s ease, transform .3s ease;
}
#finally.marathon-result-animating .finally-content > .finally-box {
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.marathon-finish-track { width: 100%; display: flex; justify-content: center; }
.marathon-finish-track .lsi-track-wrapper {
  flex: none;
  width: calc(115% + var(--lsi-track-gutter) + var(--lsi-track-gutter));
  max-width: calc(520px + var(--lsi-track-gutter) + var(--lsi-track-gutter));
}
.marathon-finish-track .lsi-track-viewport { padding-bottom: 52px; }
.marathon-finish-track .marathon-records { max-height: 28px; }
.marathon-finish-track .lsi-label { font-size: 14px; }
.marathon-finish-track .lsi-icon.marathon-uter-dead { animation: marathon-uter-death .7s ease-in-out forwards; }
@keyframes marathon-uter-death {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  45% { transform: translate(-50%, -95%) rotate(-95deg); }
  100% { transform: translate(-50%, -50%) rotate(-180deg); }
}
@media (max-width: 768px) {
  .marathon-live { top: 64px; right: 8px; min-width: 140px; max-width: 180px; padding: 10px; }
  .marathon-live .cube-lb-title { font-size: 15px; }
  .marathon-live .cube-lb-row { font-size: 17px; }
  .marathon-records { font-size: 8px; width: 62px; }
  .lb-switch { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  #finally.marathon-result .finally-content { max-width: calc(100vw - 68px); }
  .marathon-finish-track .lsi-track-wrapper { width: calc(120% + var(--lsi-track-gutter) + var(--lsi-track-gutter)); }
  .marathon-finish-track .lsi-label { font-size: 12px; }
}
