:root { --red: #8c1219; --red-light: #f8e8e9; }
body { background: #f5f5f5; }
.navbar { background: var(--red) !important; }
.navbar-brand { font-weight: 700; letter-spacing: .02em; }
.nav-pills .nav-link.active { background: var(--red); }
.nav-pills .nav-link { color: #333; }
.card { border: none; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.card-header { background: var(--red); color: #fff; font-weight: 600; font-size: .9rem; }
.badge-cat { font-size: .72rem; background: #e9ecef; color: #444; border-radius: 4px; padding: 2px 6px; }
.row-qualify { background: #d4edda !important; }
.row-extra   { background: #fff3cd !important; }
.row-lose    { background: #dc3545 !important; color: #fff !important; }
.q-marker    { color: #1a6ba0; font-weight: 700; }
.score-num   { font-variant-numeric: tabular-nums; }
table        { font-size: .85rem; }
th           { font-size: .78rem; white-space: nowrap; }
.upload-area {
  border: 2px dashed #ccc; border-radius: 8px; padding: 2rem;
  text-align: center; cursor: pointer; transition: border-color .2s;
}
.upload-area.dragover { border-color: var(--red); background: var(--red-light); }
.spinner-border { width: 1.2rem; height: 1.2rem; }
#toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; }
.team-row { cursor: pointer; transition: background .1s; }
.team-row:hover { background: #f0f0f0; }
.team-row.selected { background: var(--red-light) !important; }
.year-pill { display: inline-block; font-size: .7rem; background: #dee2e6; border-radius: 10px; padding: 1px 7px; margin: 1px; }
#loginOverlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.85); z-index: 10000;
  align-items: center; justify-content: center;
}

/* Fire Cup KO bracket — an SVG overlay (drawn by drawBracketConnectors() in
   firecup.js, positions measured after layout) draws elbow connector lines
   between rounds, so it's visually clear which heats feed into which
   next-round heat (same idea as the graphical bracket in the original
   upload PDFs, without embedding an SVG bracket-tree renderer).

   The horizontal-scroll responsibility lives on .ko-scroll-x, a plain outer
   wrapper with NO height of its own (just wraps snugly around whatever
   .ko-bracket-wrap turns out to be). Per the CSS overflow spec, declaring
   overflow-x: auto forces the SAME element's overflow-y to compute as auto
   too (there's no way to have one axis scroll and the other stay truly
   "visible" on one element) — so if that declaration sat directly on
   .ko-bracket-wrap, a 1-2px sub-pixel rounding mismatch inside the
   align-items:stretch/space-around layout below was enough to trigger a
   spurious vertical scrollbar that clipped content. Keeping .ko-bracket-wrap
   itself overflow-free (truly visible on both axes) means that mismatch
   just harmlessly grows its box by a couple pixels instead of clipping. */
.ko-scroll-x { overflow-x: auto; padding-bottom: .5rem; }
.ko-bracket-wrap { position: relative; }
.ko-connectors { position: absolute; top: 0; left: 0; pointer-events: none; }
.ko-bracket { display: flex; align-items: stretch; gap: 36px; position: relative; }
/* Height is set explicitly in px by drawBracketConnectors() (matching the
   tallest round), not via align-items:stretch + height:100% — that combo
   has a circular-sizing bug in Chromium where the flex row's own auto-height
   doesn't fully account for its stretched children, leaving a real gap that
   was triggering .ko-scroll-x's overflow-y scrollbar. */
.ko-round { display: flex; flex-direction: column; justify-content: space-around; }
.ko-heat { position: relative; }

.edit-pencil { color: #6c757d; text-decoration: none; margin-left: .3rem; }
.edit-pencil:hover { color: #495057; }
.row-lose .edit-pencil { color: #fff; }
.row-lose .edit-pencil:hover { color: #f8d7da; }
