/* The jump height (public/sprunghoehe.js), in the app and on the website: both define the colours used here
   (--card, --field, --line, --ink, --muted, --brand). */
.sh { display: grid; gap: 10px; }
.sh > *, .sh-main > * { min-width: 0; }
.sh p { margin: 0; }
.sh [hidden] { display: none !important; }
.sh h3 { margin: 6px 0 4px; }
.sh-hint { color: var(--muted); font-size: .9rem; }
.sh-msg:empty, .sh-hint:empty, .sh-ov:empty, .sh-none:empty { display: none; }
.sh-msg { font-weight: 600; }
.sh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sh-center { justify-content: center; }
.sh-file { position: relative; cursor: pointer; }
.sh-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-chip { min-height: 38px; padding: 4px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; box-shadow: none; }
.sh-chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.sh-names { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--field); }
.sh-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; }
.sh-source select { flex: 1 1 12rem; width: auto; min-height: 40px; padding: 6px 36px 6px 10px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--card); color: var(--ink); font: inherit; }
.sh-roster summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.sh-roster label { display: grid; gap: 6px; margin-top: 8px; }
.sh-roster textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; }

.sh-table { width: 100%; border-collapse: collapse; }
.sh-table th, .sh-table td { padding: 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-variant-numeric: tabular-nums; }
.sh-t { font-weight: 700; white-space: nowrap; }
.sh-muted { color: var(--muted); }
/* the measuring view over the whole screen, like a jump app: the video, the height big at the top left, a ruler at
   the right; below the jog dial, the frame buttons and a bar with three icons */
.sh-main { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; background: #000; color: #fff;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.sh-stage { position: relative; overflow: hidden; background: #000; }
.sh-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sh-ruler { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sh-big { position: absolute; left: 14px; top: 10px; color: #fff; font-size: clamp(2rem, 10vmin, 3.6rem); font-weight: 300; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); pointer-events: none; }
.sh-x { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: none; }
.sh-ov { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .95rem; font-weight: 600; pointer-events: none; }
.sh-ov.sh-warn { bottom: auto; top: 70px; background: rgba(198, 40, 40, .9); }
.sh-stage.sh-boxing { touch-action: none; cursor: crosshair; }
/* when the jump was not found: besides drawing a box, setting it by hand */
.sh-fallback { position: absolute; left: 0; right: 0; top: 70px; display: flex; justify-content: center; z-index: 2; }
.sh-fallback[hidden] { display: none; }
.sh-fallback .btn { background: rgba(0, 0, 0, .7); color: #fff; border-color: rgba(255, 255, 255, .5); cursor: pointer; }
.sh-box { position: absolute; border: 2px dashed #ffd60a; border-bottom: 3px solid #ffd60a; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none; }
.sh-busy { position: absolute; left: 12px; right: 12px; top: 50%; display: flex; gap: 8px; align-items: center; transform: translateY(-50%); }
.sh-progress { position: relative; flex: 1; min-height: 40px; border-radius: 10px; background: rgba(0, 0, 0, .75); overflow: hidden; display: flex; align-items: center; }
.sh-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(52, 199, 89, .45); }
.sh-progress b { position: relative; padding: 0 12px; }
.sh-busy .btn { background: rgba(0, 0, 0, .75); color: #fff; border-color: rgba(255, 255, 255, .5); }

.sh-jog { position: relative; height: 48px; background: #111; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.sh-jog-ticks { position: absolute; inset: 7px 0 10px; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 18px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .25) 0 1px, transparent 1px 9px); }
.sh-jog-bar { position: absolute; left: 0; bottom: 3px; height: 4px; width: 0; background: #e53935; }
.sh-jog-mark { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; }
.sh-take { background: #34c759; }
.sh-land { background: #ffd60a; }
.sh-jog:focus-visible { outline: 3px solid #34c759; outline-offset: -3px; }
.sh-ctrl { display: flex; gap: 6px; padding: 8px 10px 4px; justify-content: center; }
.sh-ctrl button { min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: #2d3532; color: #fff; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: none; }
.sh-ctrl .sh-mark-btn { flex: 1; max-width: 9.5rem; font-size: .95rem; white-space: nowrap; }
/* take-off and landing by hand: only after "Set by hand" (the jump is found by itself) */
.sh-main:not(.sh-hand) .sh-ctrl .sh-mark-btn { display: none; }
.sh-mt.on { box-shadow: inset 0 -3px 0 #34c759; }
.sh-ml.on { box-shadow: inset 0 -3px 0 #ffd60a; }
.sh-ctrl button:disabled, .sh-tb button:disabled { opacity: .4; }
.sh-tb { display: flex; justify-content: space-around; padding: 6px 8px 10px; }
.sh-tb button { display: grid; justify-items: center; gap: 2px; min-width: 76px; min-height: 0; padding: 4px; border: 0; background: none; color: #fff; font: inherit; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; box-shadow: none; }
.sh-tb svg { width: 34px; height: 34px; }

/* the sheets over the measuring view: settings, and the results on blue with "Fertig" at the top */
.sh-sheet { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--card); color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.sh-sheet header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 8px; background: var(--card); color: var(--brand); border-bottom: 1px solid var(--line); }
.sh-sheet header b { font-size: 1.15rem; }
.sh-sheet header button { justify-self: start; min-height: 40px; padding: 4px 8px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 1.05rem; font-weight: 600; text-transform: uppercase; cursor: pointer; box-shadow: none; }
.sh-sheet-body { display: grid; align-content: start; gap: 10px; padding: 16px; overflow-y: auto; }
.sh-res .sh-sheet-body { background: var(--grad); color: #fff; }
.sh-graph { display: block; width: 100%; }
.sh-none { font-weight: 600; }
.sh-stats { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 1.1rem; }
.sh-stats dt { opacity: .85; }
.sh-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sh-thumbs figure { margin: 0; display: grid; gap: 4px; }
.sh-thumbs canvas { width: 100%; height: auto; border-radius: 6px; background: #000; }
.sh-thumbs figcaption { font-size: .72rem; line-height: 1.2; opacity: .9; }
.sh-nudge { grid-column: span 2; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; font-weight: 700; font-size: .9rem; }
.sh-nudge .btn { min-width: 38px; padding: 0 8px; background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .4); }
.sh-for { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.sh-for select { flex: 1; min-height: 42px; padding: 6px 10px; border: 0; border-radius: 10px; background: #fff; color: #111; font: inherit; }
.sh-save { justify-self: end; background: #1b8a5a; border-color: #1b8a5a; }
.sh .sh-sheet [hidden], .sh-main[hidden], .sh-sheet[hidden] { display: none !important; }
/* live: the camera's picture, below who jumps next, "Undo" and "Check"; each jump is saved by itself, so the results
   sheet has no name and no save button there */
.sh-toclass { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line, #ddd); }
.sh-toclass-msg a { font-weight: 700; }
.sh-livebar { display: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 12px; }
.sh-live .sh-livebar { display: flex; }
.sh-live .sh-jog, .sh-live .sh-ctrl, .sh-live .sh-tb, .sh-live .sh-for, .sh-live .sh-save { display: none; }
.sh-livewho { display: flex; flex: 1 1 12rem; align-items: center; gap: 8px; font-weight: 600; }
.sh-livewho select { flex: 1; min-width: 0; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 10px; background: #fff; color: #111; font: inherit; font-weight: 600; }
.sh-livebar button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: #2d3532; color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: none; }
.sh-livebar button:disabled { opacity: .4; cursor: default; }
/* "Messen": big and red; while it records, a red frame around the picture */
.sh-livebar .sh-rec { flex: 1 1 100%; min-height: 56px; font-size: 1.15rem; background: #dc2626; }
.sh-recording .sh-livebar .sh-rec { background: #2d3532; }
.sh-recording .sh-stage::after { content: ""; position: absolute; inset: 0; border: 5px solid #dc2626; pointer-events: none; }
.sh-livetag { display: none; position: absolute; right: 12px; top: 64px; white-space: nowrap; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; font-weight: 600; pointer-events: none; }
.sh-livetag:empty { display: none !important; }
.sh-live .sh-livetag { display: block; }
.sh-livetag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #22c55e; vertical-align: 1px; }
@media (max-height: 500px) { .sh-jog { height: 34px; } .sh-ctrl { padding-top: 4px; } .sh-tb svg { width: 24px; height: 24px; } .sh-tb { padding: 2px 8px 4px; } }
@media print { .sh-main, .sh-names, .sh .sh-bar, .sh-slows { display: none !important; } }
