/* The desktop stylesheet owns all competition typography, colors and geometry.
   These rules only bridge static values, local navigation and browser dialogs. */
.lm-viewer .workspace-zoom-shell {
  max-height: calc(100dvh - 124px);
  overflow: auto;
  overscroll-behavior: contain;
}
.lm-viewer .viewer-local { color: #aaa; font-size: 11px; white-space: nowrap; }
.lm-viewer .viewer-session-open {
  border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; padding: 0; width: 100%; cursor: pointer;
}
.lm-viewer .viewer-zoom {
  border: 0; background: transparent; color: inherit; font: inherit;
  width: 70px; height: 30px; text-align: center;
}
.lm-viewer .viewer-zoom option { color: #111; }
.lm-viewer .v-capture { font-size: 10px; color: #666; }
.lm-viewer .viewer-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 5px 0; font-size: 10px; color: #555; }
.lm-viewer .viewer-empty { padding: 8px; color: #666; }
.lm-viewer .viewer-message { padding: 30px 56px; color: white; }
.lm-viewer .viewer-message .btn { margin-right: 8px; }
.lm-viewer .viewer-value { display: block; white-space: nowrap; }
.lm-viewer .qual-layout .viewer-value {
  min-height: var(--q-input-height); line-height: var(--q-input-height);
  padding: 0 4px; font-size: var(--q-font-size);
}
.lm-viewer .qual-layout .time-display { text-align: right; font-variant-numeric: tabular-nums; }
.lm-viewer .qual-layout :is(.time-inc, .time-dq, .time-empty) { text-align: center; }
.lm-viewer .viewer-run { display: inline-flex; align-items: center; justify-content: center; }
.lm-viewer .groups-shell .group-obstacle-cell .viewer-value,
.lm-viewer .groups-shell .group-time-cell .viewer-value {
  height: 25px; line-height: 25px; font-size: 11.4px; padding: 0 3px;
}
.lm-viewer .groups-shell .group-static-result { overflow: auto; scrollbar-width: none; }
.lm-viewer .groups-shell .viewer-group-label { display: flex; align-items: center; cursor: inherit; border-color: transparent; background: transparent; }
.lm-viewer .groups-shell .group-focus-card-group .viewer-value { height: 32px; line-height: 32px; font-size: 13px; }
.lm-viewer .groups-shell .group-time-cell .time-display { text-align: right; }
.lm-viewer .group-time-cell .time-inc, .lm-viewer .group-time-cell .time-dq { text-align: center; }
.lm-viewer .viewer-name-overflow { overflow-x: auto !important; scrollbar-width: none; }
.lm-viewer .viewer-match-focus {
  border: 0; background: transparent; padding: 0; margin: 0; color: inherit;
  font: inherit; text-transform: inherit; cursor: zoom-in;
}
.lm-viewer .finals-layout .viewer-value { font-size: 8.2px; line-height: 16px; height: 16px; padding: 0 1px; }
.lm-viewer .finals-layout .finals-obstacle-cell .viewer-value { overflow: auto; scrollbar-width: none; }
.lm-viewer .finals-layout .finals-time-cell .viewer-value { text-align: center; font-variant-numeric: tabular-nums; }
.lm-viewer .viewer-pending { margin-top: 4px; }
.lm-viewer .viewer-finishers summary { display: flex; justify-content: center; align-items: center; cursor: pointer; }
.lm-viewer .viewer-finishers .group-summary-table { table-layout: auto; }
.lm-viewer dialog.viewer-dialog {
  position: fixed; inset: 0; margin: auto; color: #111; box-sizing: border-box;
}
.lm-viewer dialog.viewer-dialog:not([open]) { display: none; }
.lm-viewer dialog.viewer-dialog::backdrop { background: rgba(255,255,255,.74); }
.lm-viewer dialog.threeway-focus-card { padding: 0; }
.lm-viewer .groups-shell dialog.viewer-dialog { border: 0; background: transparent; padding: 0; }
.lm-viewer dialog.finals-focus-panel::backdrop { background: rgba(3,7,18,.62); }
.lm-viewer .finals-focus-layout .viewer-value { height: 26px; font-size: 12px; line-height: 26px; padding: 0 6px; }
.lm-viewer .viewer-dialog.group-focus-card-group { width: min(806px, calc(100vw - 80px)); max-height: calc(100dvh - 96px); transform: none; }
.lm-viewer dialog.group-focus-card-group::backdrop { background: rgba(255,255,255,.16); }
.lm-viewer .viewer-dialog .group-worksheet-block { width: 100%; max-width: 100%; }
.lm-viewer .viewer-dialog.finals-focus-panel { max-height: calc(100dvh - 48px); }
/* Keep desktop table proportions on narrow viewers and scroll the workspace.
   This never changes the original editor's media rules. */
.lm-viewer .qualifying-shell .workspace { min-width: 1500px; }
.lm-viewer .threeway-shell .workspace { min-width: 1500px; }
.lm-viewer :is(.qualifying-shell, .threeway-shell) .workspace-head {
  max-width: calc((100vw - 48px) / var(--dashboard-zoom, 1) - 36px);
}
@media (max-width: 1180px) {
  .lm-viewer .toolbar-session { display: none; }
  .lm-viewer .home-table { min-width: 800px; }
  .lm-viewer .session-table-wrap { overflow: auto; }
}
.lm-viewer .viewer-access { max-width: 560px; margin: 48px auto; color: #f4f4f4; }
.lm-viewer .viewer-access form { display: grid; gap: 12px; }
.lm-viewer .viewer-access input { width: 100%; padding: 10px; background: #191919; color: #fff; border: 1px solid #555; border-radius: 4px; }
.lm-viewer .viewer-access p { color: #ccc; line-height: 1.5; }
