/* The run's proof viewer (/proof-viewer.js), shared by the leaderboards and My runs */
/* the run's screenshot: a camera next to the name, and the viewer */
.lb-proof { display: inline-grid; width: 1.4rem; height: 1.4rem; place-items: center; margin-left: 4px; padding: 0; border: 0;
  background: none; color: var(--ink-soft); vertical-align: middle; cursor: pointer; }
.lb-proof:hover { color: var(--teal); }
.lb-proof:focus-visible { color: var(--teal); outline: 2px solid var(--teal); outline-offset: 1px; border-radius: 4px; }
.lb-proof svg { width: 0.95rem; height: 0.95rem; }
.lb-proof-dialog { width: min(1280px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: rgb(var(--panel-rgb)); color: var(--ink); box-shadow: var(--shadow); }
.lb-proof-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.lb-proof-dialog form { position: absolute; top: 6px; right: 6px; margin: 0; }
.lb-proof-close { width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lb-proof-body { display: grid; min-height: 120px; place-items: center; }
.lb-proof-image { display: block; width: 100%; height: auto; border-radius: 14px; }

/* what each player went in with, under the pictures (and in an expanded row) */
.lb-proof-party { padding: 4px 12px 12px; font-size: 0.88rem; }
/* a grid: Player | Main Aniimo | With | Avg DPS, a header over it; each row stacks with its labels on a phone */
.lb-party-grid { display: grid; grid-template-columns: minmax(7rem, 1.1fr) minmax(9rem, 1.3fr) minmax(8rem, 2fr); }
.lb-party-grid.has-dps { grid-template-columns: minmax(7rem, 1.1fr) minmax(9rem, 1.3fr) minmax(8rem, 2fr) minmax(6.5rem, auto); }
.lb-party-row { display: contents; }
.lb-party-row > * { padding: 6px 10px 6px 0; border-top: 1px solid var(--line); min-width: 0; }
.lb-party-head > * { padding-top: 0; padding-bottom: 4px; border-top: 0; color: var(--ink-soft); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; }
.lb-party-grid.has-dps .lb-party-row > :last-child { padding-right: 0; text-align: right; }
.lb-party-cell { display: flex; align-items: center; overflow-wrap: anywhere; }
.lb-party-value { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.lb-party-grid.has-dps .lb-party-cell:last-child { justify-content: flex-end; }
.lb-party-name { color: var(--ink); font-weight: 400; }
.lb-party-lead { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; max-width: 100%; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--teal) 9%, transparent); }
.lb-party-lead-name { color: var(--ink); font-weight: 650; }
.lb-party-lead-facts { color: var(--ink-soft); font-size: 0.8em; white-space: nowrap; }
/* a renamed Aniimo: the player's own name for it, after its species */
.lb-party-lead-nick { color: var(--ink-soft); font-size: 0.85em; font-style: italic; white-space: nowrap; }
.lb-party-team, .lb-party-none, .lb-party-summary { color: var(--ink-soft); }
.lb-party-none { font-style: italic; font-size: 0.92em; }
.lb-party-dps { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
/* team DPS and buffs side by side, apart by a gap (a "·" between them started the second line once it wrapped) */
.lb-party-summary { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.lb-party-sum-label { color: var(--ink); font-weight: 650; }
/* a phone: no header, each player a block of labelled lines */
@media (max-width: 640px) {
  .lb-party-grid, .lb-party-grid.has-dps { display: block; }
  .lb-party-row.lb-party-head { display: none; }
  .lb-party-row { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
  .lb-party-row > * { padding: 0; border-top: 0; }
  .lb-party-grid.has-dps .lb-party-row > :last-child { text-align: left; }
  .lb-party-grid.has-dps .lb-party-cell:last-child { justify-content: flex-start; }
  .lb-party-cell { align-items: baseline; gap: 10px; }
  .lb-party-cell::before { content: attr(data-label); flex: none; width: 6.5rem; color: var(--ink-soft); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase; }
}
.lb-proof-dialog { width: auto; max-width: min(1280px, 96vw); }
.lb-proof-image { max-height: 78vh; width: auto; max-width: 100%; }
/* Holo-Battle Sim's gizmo list merged into one tall picture: full width, scrolled inside the window */
.lb-gizmo-scroll { max-height: 78vh; overflow-y: auto; border-radius: 14px; }
.lb-gizmo-merged { display: block; width: 100%; height: auto; }
.lb-gizmo-scroll .lb-gizmo-merged + .lb-gizmo-merged { margin-top: 6px; }
.lb-gizmo-toggle { margin-top: 8px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; }

.lb-proof-tabs { display: flex; gap: 6px; padding: 8px 52px 8px 10px; }
.lb-proof-tabs button { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.lb-proof-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); }

/* The run check's badge: Verified (read again and agrees) or Pending (waiting for that check) */
.lb-check { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-left: 6px; border-radius: 999px; font-size: 0.72em;
  font-weight: 900; line-height: 1; vertical-align: middle; cursor: help; white-space: nowrap; }
.lb-check.is-verified { background: color-mix(in srgb, #3ddc84 20%, transparent); color: color-mix(in srgb, #3ddc84 75%, var(--text)); }
.lb-check.is-pending { background: color-mix(in srgb, #f2c230 22%, transparent); color: color-mix(in srgb, #f2c230 80%, var(--text)); font-family: Georgia, serif; font-style: italic; }
.lb-check.is-pending, .lb-check.is-invalid { box-shadow: inset 0 0 0 1.5px currentColor; }   /* a drawn circle round the i and the x */
.lb-check.is-invalid { background: color-mix(in srgb, #ef5350 22%, transparent); color: color-mix(in srgb, #ef5350 80%, var(--text)); }
.lb-check-legend .lb-check { margin: 0 2px 0 0; }
/* the line over the pictures: which fight the run is (mode chip, the fight in bold, its facts); wraps on a phone */
.lb-proof-fight { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; padding: 0 52px 8px 12px; color: var(--ink-soft); font-size: 0.88rem; }
.lb-proof-fight strong { color: var(--ink); font-weight: 750; }
.lb-proof-mode { align-self: center; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--teal);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.lb-proof-fact { white-space: nowrap; }
.lb-proof-fact::before { content: "· "; }
@media (max-width: 560px) { .lb-proof-fight { padding: 0 12px 8px; font-size: 0.82rem; } }
/* a line over the pictures: whose row a trophy is on a whole-party screen */
.lb-proof-note { margin: 0; padding: 0 52px 8px 12px; color: var(--ink-soft); font-size: 0.86rem; }
/* the run check's badge sits right after the last tab (the link button keeps the right side) */
.lb-proof-tabs .lb-check { align-self: center; margin-left: 2px; font-size: 0.8rem; }
.lb-proof-dialog .lb-empty { padding: 1.2rem; text-align: center; opacity: 0.7; }
.lb-proof-party .lb-ai { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 0.75em; font-weight: 700; opacity: 0.8; }
/* the Fight tab (staff only): a note, then each picture of the fight full width with its time into the fight in a corner;
   one opens full size on a click, with a way back */
.lb-proof-tabs { flex-wrap: wrap; }
.lb-fight-count { margin-left: 5px; opacity: 0.75; font-size: 0.85em; }
.lb-fight { width: min(1278px, calc(96vw - 2px)); }
.lb-fight-note { margin: 0; padding: 0 12px 10px; color: var(--ink-soft); font-size: 0.86rem; }
.lb-fight-strip { display: grid; gap: 6px; padding: 0 8px 10px; }
.lb-fight-shot { position: relative; display: block; min-height: 3rem; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #000; cursor: zoom-in; }
.lb-fight-shot:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.lb-fight-shot img { display: block; width: 100%; height: auto; }
.lb-fight-shot .lb-empty { display: block; color: #fff; }
.lb-fight-time { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.66); color: #fff;
  font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-fight-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; padding: 0 12px 10px; color: var(--ink-soft); font-size: 0.86rem; }
.lb-fight-back { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.lb-fight-back:hover, .lb-fight-back:focus-visible { border-color: var(--accent); color: var(--accent); }
.lb-fight > .lb-proof-image { margin: 0 auto; }
/* the fight log under the pictures (or alone): label / value pairs in a grid, a note, the download */
.lb-fight-log { margin: 0 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.86rem; }
.lb-fight-log-title { margin: 0 0 8px; color: var(--ink); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.lb-fight-log-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 8px 16px; margin: 0; }
.lb-fight-log-figure { min-width: 0; }
.lb-fight-log-figure dt { color: var(--ink-soft); font-size: 0.76rem; }
.lb-fight-log-figure dd { margin: 1px 0 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lb-fight-log-note { margin: 10px 0 0; color: var(--ink-soft); }
.lb-fight-download { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--teal); font: inherit; text-decoration: underline; cursor: pointer; }
.lb-fight-download:disabled { opacity: 0.6; cursor: progress; }
.lb-proof-record-list { margin: 8px 0 0; padding-left: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-proof-record-list li { margin: 2px 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .lb-fight-log-figures { grid-template-columns: 1fr 1fr; } }
/* the owner and administrators: delete the run, under its pictures */
.lb-proof-actions { display: flex; justify-content: flex-end; padding: 0 12px 12px; }
