/* Look of whstats.com (Tourney-stats template/style.css): dark by default, light by the OS setting.
   The LED displays are dark in the dark theme and pale in the light one (block at the end). Generated from design/wh.css – edit this file from now on. */
:root {
  --bg: #161618; --panel: #202022; --panel-edge: #303034; --well: #070809;
  --ink: #ececee; --ink-2: #a3a3aa; --muted: #85858d;
  --led: #3ee6f2; --led-dim: #0f2a2d;
  --c1: #2fa85a; --c2: #4a90e0; --c3: #d27a2c; --c4: #c95fd6; --c5: #e25c5c; --c-gold: #ad8c1c;
  --link: #3ee6f2; --accent: #3ee6f2; --row-alt: rgba(255, 255, 255, .025); --seg-base: #000;
  --grid-line: rgba(255, 255, 255, .06); --radius: 14px;
  --tint: #a3123f; --tint-amount: 11%;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --page: color-mix(in srgb, var(--tint) var(--tint-amount), var(--bg));
  color-scheme: dark;
}
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f2f4; --panel: #ffffff; --panel-edge: #dcdce1; --ink: #1c1c1f; --ink-2: #55555c; --muted: #6a6a72;
    --c1: #1f8a47; --c2: #2f74c8; --c3: #c0661a; --c4: #a944b8; --c5: #cf3f3f; --c-gold: #9a7a10;
    --link: #0a7a89; --accent: #0a9fb2; --row-alt: rgba(0, 0, 0, .025); --seg-base: #ffffff;
    --grid-line: rgba(0, 0, 0, .08); --tint-amount: 10%; color-scheme: light;
  }
}
* { box-sizing: border-box; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.top { padding: 18px 28px 0; border-bottom: 1px solid var(--panel-edge); background: var(--page); }
.title-row { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; }
.top h1 { margin: 0; font-weight: 300; font-size: 40px; letter-spacing: .5px; line-height: 1.15; }
.subtitle { color: var(--ink-2); font-size: 15px; order: 2; flex-basis: 100%; margin-top: -4px; }
.title-row .sample, .title-row .live, .title-row .ext { order: 1; }
.sample { border: 1px dashed var(--c3); color: var(--c3); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; align-self: center; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel-edge); border-top-color: var(--accent);
  animation: wh-spin 1s linear infinite; }
@keyframes wh-spin { to { transform: rotate(360deg); } }
/* link to the long-term statistics, in the place of whstats.com's Excel button */
.ext { align-self: center; color: var(--ink); border: 1px solid var(--panel-edge); padding: 4px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ext:hover { border-color: var(--accent); text-decoration: none; }
.ext svg { width: 11px; height: 11px; }
.tabs { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: var(--ink-2); font-size: 15px; padding: 8px 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.pills { display: flex; gap: 6px; align-items: center; padding: 8px 0; color: var(--ink-2); font-size: 14px; flex-wrap: wrap; }
.pills a { border: 1px solid var(--panel-edge); color: var(--ink-2); border-radius: 999px; padding: 3px 11px; font-size: 13px; }
.pills a:hover { color: var(--ink); text-decoration: none; }
.pills a.on { color: var(--ink); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
main { padding: 18px 28px 8px; max-width: 1700px; margin: 0 auto; }

/* ---------- LED: panel titles and the round clock (stay dark in the light theme) ---------- */
.led { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--well); border: 1px solid #000; border-radius: 6px; padding: 5px 12px; margin-bottom: 12px;
  font: 700 19px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 3px; color: var(--led);
  text-shadow: 0 0 6px rgba(62, 230, 242, .55);
  background-image: repeating-linear-gradient(90deg, transparent 0 15px, var(--led-dim) 15px 17px); }
.led { word-spacing: -.25em; }   /* spaces inside the LED texts a third narrower: the gap between title and count stands out */
.led span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led b { white-space: nowrap; }
.clock { display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 20px;
  background: var(--well); border: 1px solid #000; border-radius: var(--radius); color: var(--led);
  background-image: repeating-linear-gradient(90deg, transparent 0 15px, var(--led-dim) 15px 17px); }
.clock .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clock .lbl { font: 700 15px/1.2 var(--mono); letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 0 6px rgba(62, 230, 242, .55); }
.clock .lbl2 { font: 600 13px/1.2 var(--mono); letter-spacing: 1px; color: #8fbfc3; }
.clock .time { font: 700 46px/1 var(--mono); letter-spacing: 4px; text-shadow: 0 0 12px rgba(62, 230, 242, .6); }
.clock .time small { font-size: 15px; letter-spacing: 2px; margin-right: 10px; vertical-align: middle; }
.rounds { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rsegs { display: flex; gap: 4px; }
.rsegs i { flex: 1; height: 18px; border-radius: 2px; background: #0d2224; }
.rsegs i.gap { flex: 0 0 10px; background: none; }
.rsegs i.done { background: var(--led); box-shadow: 0 0 6px rgba(62, 230, 242, .6); }
.rsegs i.now { background: rgba(62, 230, 242, .45); animation: wh-pulse 1.6s ease-in-out infinite; }
@keyframes wh-pulse { 50% { background: rgba(62, 230, 242, .18); } }
.rlabels { display: flex; justify-content: space-between; font: 600 12px var(--mono); letter-spacing: 1px; color: #8fbfc3; text-transform: uppercase; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (min-width: 1201px) { .tiles.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }   /* bracket days: no group-of-death tile */
.tile { border-radius: var(--radius); padding: 12px 16px 14px; border: 1px solid; min-width: 0;
  background: color-mix(in srgb, var(--tc) 9%, var(--panel)); border-color: color-mix(in srgb, var(--tc) 45%, var(--panel-edge)); }
.tile .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
/* a long name wraps (two lines) instead of being cut beside a wide value */
.tile .row { align-items: flex-start; }
.tile .name { font-size: 16px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.tile .val { font: 700 22px var(--mono); white-space: nowrap; }
.tile .sub { color: var(--ink-2); font-size: 12.5px; margin: 4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segs { display: flex; gap: 3px; height: 16px; }
.segs i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--tc) 16%, var(--seg-base)); }
.segs i.on { background: var(--tc); box-shadow: 0 0 6px color-mix(in srgb, var(--tc) 60%, transparent); }

/* ---------- panels and grids ---------- */
.panel { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; align-items: start; }
.g-ov1 { grid-template-columns: 1.45fr 1fr; }
.g-2 { grid-template-columns: 1fr 1fr; }
.note { color: var(--ink-2); font-size: 12.5px; margin: 10px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--panel-edge); border-radius: 999px; overflow: hidden; }
.seg a { color: var(--ink-2); font-size: 13px; padding: 4px 12px; }
.seg a + a { border-left: 1px solid var(--panel-edge); }
.seg a:hover { color: var(--ink); text-decoration: none; }
.seg a.on { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.controls { display: flex; gap: 10px 20px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; color: var(--ink-2); font-size: 13px; }

/* ---------- div tables ("process list" style) ---------- */
.tscroll { overflow-x: auto; }
.tbl { min-width: 100%; font-size: 14px; }
.tr { display: grid; align-items: center; gap: 10px; padding: 6px 2px; }
.tr.head { color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--panel-edge); white-space: nowrap; }
.tr.alt { background: var(--row-alt); }
.tr.cut { border-top: 1px dashed var(--accent); position: relative; margin-top: 16px; }
.tr.cut::before { content: attr(data-cut); position: absolute; right: 2px; top: -17px; font-size: 11.5px; color: var(--accent); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.cc { display: inline-block; font: 600 10.5px/1 var(--mono); color: var(--ink-2); border: 1px solid var(--panel-edge);
  border-radius: 4px; padding: 2px 4px; margin-left: 6px; vertical-align: 1px; }
.tier { font: 700 12px var(--mono); text-align: center; border-radius: 4px; padding: 2px 0; width: 22px;
  background: color-mix(in srgb, var(--tc) 22%, transparent); color: var(--ink); }
.pbar { display: flex; align-items: center; gap: 8px; }
.pbar span { flex: 1; height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--c1) 14%, var(--seg-base)); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--c1); border-radius: 2px; }
.pbar b { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.good { color: var(--c1); }
.bad { color: var(--c5); }
.dim { color: var(--ink-2); }

/* ---------- matches ---------- */
.match { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px minmax(0, 1fr) 58px; gap: 10px; align-items: center; padding: 7px 2px; }
.match.alt { background: var(--row-alt); }
.match .tno { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.pl { min-width: 0; display: flex; flex-direction: column; }
.pl b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl small { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl.r { text-align: right; }
.pl.win b { color: var(--c1); }
.duel { display: flex; flex-direction: column; gap: 3px; }
.duel .bars { display: flex; height: 8px; border-radius: 2px; overflow: hidden; gap: 2px; }
.duel .a { background: var(--c2); }
.duel .b { background: var(--c3); }
.duel .pc { display: flex; justify-content: space-between; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.res { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font: 700 14px var(--mono); }
.res svg { width: 16px; height: 16px; flex: none; }
.res.live { font: 600 11px var(--mono); color: var(--accent); letter-spacing: 1px; }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend svg { width: 14px; height: 14px; }

/* ---------- charts (inline SVG) ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--ink-2); font-size: 12px; }
.chart .grid-l { stroke: var(--grid-line); stroke-width: 1; }
.chart .future { fill: color-mix(in srgb, var(--ink) 4%, transparent); }

/* ---------- group strength ---------- */
.gs { display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 6px 14px; align-items: center; padding: 8px 2px; }
.gs.alt { background: var(--row-alt); }
.gs .bar2 { height: 14px; border-radius: 2px; background: var(--c4); }
.gs small { display: block; color: var(--ink-2); font-size: 12px; }

/* ---------- bracket ---------- */
.bracket { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 14px; }
.bcol { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.bhead { font: 600 12px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.bm { border: 1px solid var(--panel-edge); border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--ink) 2%, var(--panel)); }
.bm.playing { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.bp { display: grid; grid-template-columns: 22px minmax(0, 1fr) 34px; gap: 6px; align-items: center; padding: 4px 8px; font-size: 13px; }
.bp + .bp { border-top: 1px solid var(--panel-edge); }
.bp .sd { color: var(--ink-2); font: 600 11px var(--mono); }
.bp .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp .sc { text-align: right; font: 700 12px var(--mono); color: var(--ink-2); }
.bp.w .nm { font-weight: 700; }
.bp.w .sc { color: var(--c1); }
.bp.l .nm { color: var(--ink-2); }
.bp.p .sc { color: var(--accent); font-weight: 600; }

/* ---------- four groups side by side (Thu–Fri overview) ---------- */
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; align-items: start; }
.g4 .panel { padding: 12px; }
.g4r { grid-template-columns: 18px minmax(0, 1fr) 22px 44px 46px; gap: 6px; padding: 4px 2px; font-size: 13px; }
.g4r.head span:nth-child(2) { white-space: normal; }   /* 'Hráč · warbanda' wraps in a narrow panel (iPad) */
.g4r .pct { white-space: nowrap; }
.g4r .pct.tight { word-spacing: -.05em; padding-left: 1px; padding-right: 2px; }
.g4r .pl b { font-weight: 500; }
.g4r .pl small { font-size: 11.5px; }
.ginfo { color: var(--ink-2); font-size: 12px; margin: -4px 0 8px; }
.ginfo.nowins .wins { display: none; }
.pct { text-align: right; font-variant-numeric: tabular-nums; border-radius: 4px; padding: 1px 4px; font-weight: 600; }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g4 { grid-template-columns: 1fr; } }

/* ---------- tables of the round: a card per table, the board in the middle ---------- */
.ghead { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 8px; font: 600 12px var(--mono);
  letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.ghead:first-of-type { margin-top: 4px; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr); align-items: center;
  gap: 4px 10px; padding: 10px 10px 8px; border: 1px solid var(--panel-edge); border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 2%, var(--panel)); }
.tcard.playing { border-color: color-mix(in srgb, var(--accent) 55%, var(--panel-edge)); }
.board { height: 58px; border-radius: 8px; border: 1px solid #000; background-color: var(--well); color: var(--led);
  background-image: repeating-linear-gradient(90deg, transparent 0 9px, var(--led-dim) 9px 10px),
    repeating-linear-gradient(0deg, transparent 0 9px, var(--led-dim) 9px 10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-shadow: 0 0 6px rgba(62, 230, 242, .55); }
.board .tno { font: 700 22px/1 var(--mono); }
.board .st { font: 600 10px/1.2 var(--mono); letter-spacing: 1px; color: #8fbfc3; margin-top: 4px; text-transform: uppercase; }
.tcard.done .board { color: var(--c1); text-shadow: 0 0 6px color-mix(in srgb, var(--c1) 55%, transparent); }
.tcard.done .board .st { color: var(--c1); }
/* glory score of a finished table: a third, small and dim line on the board */
.board .gl { font: 500 9px/1 var(--mono); letter-spacing: .5px; margin-top: 3px; opacity: .6; }
.board .gl:empty { display: none; }
.tcard.playing .board .st { color: var(--led); animation: wh-blink 1.6s ease-in-out infinite; }
@keyframes wh-blink { 50% { opacity: .45; } }
/* light theme: the black boards stood out too much – pale display with dark digits, greenish once finished */
@media (prefers-color-scheme: light) {
  .board { border-color: #b3d5db; background-color: #e4f2f4; color: #08606c; text-shadow: none;
    background-image: repeating-linear-gradient(90deg, transparent 0 9px, #d0e6ea 9px 10px),
      repeating-linear-gradient(0deg, transparent 0 9px, #d0e6ea 9px 10px); }
  .board .st, .tcard.playing .board .st { color: #08606c; }
  .tcard.done .board { border-color: #bcdcc6; background-color: #e7f3ea; color: #176433; text-shadow: none;
    background-image: repeating-linear-gradient(90deg, transparent 0 9px, #d5e9db 9px 10px),
      repeating-linear-gradient(0deg, transparent 0 9px, #d5e9db 9px 10px); }
  .tcard.done .board .st { color: #176433; }
  .board .gl { opacity: .8; }
}
.seat { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.seat.b { align-items: flex-end; text-align: right; }
/* the warband name is what gets truncated, never the colour swatch next to it */
.seat small { display: flex; align-items: center; }
.seat.b small { justify-content: flex-end; }
.seat small .wbn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.seat small .sw { flex: none; }
.seat b { font-size: 13.5px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat small { font-size: 11.5px; color: var(--ink-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .pp { font: 700 13px var(--mono); }
.seat.a .pp { color: var(--c2); }
.seat.b .pp { color: var(--c3); }
.seat.win b { color: var(--c1); }
.seat.lose b, .seat.lose .pp, .seat.lose small { opacity: .5; }
.tcard .foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 2px; padding: 0 5px; }   /* room for the corner badge */
.tcard .split { flex: 1; display: flex; gap: 2px; height: 4px; border-radius: 2px; overflow: hidden; }
.tcard .split .a { background: var(--c2); }
.tcard .split .b { background: var(--c3); }
.tmark { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; }
.umark { position: absolute; bottom: -5px; right: -7px; width: 20px; height: 20px; }   /* the visitor's own pick */
.mk svg { display: block; width: 100%; height: 100%; }
.mk { cursor: help; border-radius: 50%; }
.mk::after { content: attr(data-hint); position: absolute; right: 0; z-index: 8; width: max-content; max-width: 230px;
  padding: 6px 9px; border-radius: 8px; border: 1px solid var(--panel-edge); background: var(--panel); color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); font: 500 12px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left; display: none; pointer-events: none; }
.bracket2 .umark { bottom: -3px; }   /* the matches sit closer: keep clear of the next card's badge */
.tmark::after { top: calc(100% + 4px); }
.umark::after { bottom: calc(100% + 4px); }
.mk:hover::after, .mk:focus::after { display: block; }
/* stars for the visitor's pick: the button is larger than the star (touch), negative margins keep the card low */
.tip { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 16px; height: 16px; }
.tip svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linejoin: round; }
.tip.on svg { fill: #ffcc1f; stroke: #d99a00; }
button.tip { box-sizing: content-box; padding: 7px; margin: -7px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.tip:hover:not(.on) svg { stroke: #d99a00; }
button.tip:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 8px; }

/* ---------- footer ---------- */
footer { color: var(--ink-2); font-size: 12.5px; padding: 6px 28px 28px; max-width: 1700px; margin: 0 auto; }

/* ---------- responsive (same breakpoints as Tourney-stats) ---------- */
@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .led { font-size: 16px; letter-spacing: 2px; }
}
@media (max-width: 1000px) { .g-ov1, .g-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .top { padding: 12px 14px 0; }
  .top h1 { font-size: 26px; }
  .subtitle { font-size: 13px; }
  main { padding: 12px 14px 4px; }
  footer { padding: 4px 14px 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 10px 12px 12px; }
  .tile .name { font-size: 14px; }
  .tile .val { font-size: 18px; }
  .panel { padding: 12px; }
  .led { font-size: 14px; letter-spacing: 1.5px; }
  .clock { padding: 12px 14px; gap: 10px 16px; }
  .clock .time { font-size: 34px; letter-spacing: 2px; }
  .tabs a { padding: 8px 10px; }
}

/* ======== from the approved artboards (design/*.dc.html helmets) and the live page ======== */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--page) 94%, transparent); }
.live .spin { display: none; }
.live.loading .spin { display: inline-block; }
.live.stale { color: var(--c5); }
section[hidden] { display: none !important; }
.empty { color: var(--ink-2); padding: 18px 4px; }
.wh-note { color: var(--ink-2); font-size: 12.5px; }
.tab { display: grid; gap: 0; }

/* stats */
.acc { display: grid; grid-template-columns: 64px minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 6px 2px; }
.acc .ab { height: 12px; border-radius: 2px; background: color-mix(in srgb, var(--c1) 14%, var(--seg-base)); overflow: hidden; }
.acc .ab i { display: block; height: 100%; background: var(--c1); }
.acc .ab i.part { background: color-mix(in srgb, var(--c1) 55%, transparent); }
.brier { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--panel-edge); }
.brier div { display: flex; flex-direction: column; }
.brier b { font: 700 20px var(--mono); }
.brier small { color: var(--ink-2); font-size: 12px; }
.goto .led { cursor: pointer; }
.goto .led::after { content: ""; flex: 0 0 auto; width: .72em; height: .72em; margin-left: 8px; background: var(--led);
  filter: drop-shadow(0 0 3px rgba(62, 230, 242, .55));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13 13 3M5.5 3H13v7.5' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 13 13 3M5.5 3H13v7.5' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.goto .led b { margin-left: auto; }
.tt { grid-template-columns: 24px minmax(130px, 1.4fr) minmax(130px, 1.3fr) 62px 62px 66px; }
.wt { grid-template-columns: minmax(170px, 1.6fr) 52px 76px 80px 84px 60px; }
.ct { grid-template-columns: minmax(120px, 1.4fr) 52px 76px 80px 84px; }
.pt { grid-template-columns: minmax(140px, 1.3fr) minmax(140px, 1.3fr) 62px 84px 60px; }

/* warbands and countries */
.wft { grid-template-columns: minmax(190px, 1.6fr) 54px 80px minmax(140px, 1fr) 84px 64px 64px minmax(150px, 1.2fr); }
.cft { grid-template-columns: minmax(150px, 1.3fr) 54px 80px minmax(140px, 1fr) 84px 64px 76px 64px minmax(170px, 1.3fr); }
.wbar { display: flex; align-items: center; gap: 8px; }
.wbar span { flex: 1; height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--tc, var(--c1)) 14%, var(--seg-base)); overflow: hidden; }
.wbar i { display: block; height: 100%; background: var(--tc, var(--c1)); }
.wbar b { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.tr.open { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tr.click { cursor: pointer; }
.tr.click:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.sub-rows { padding: 2px 0 10px 22px; border-bottom: 1px solid var(--panel-edge); }
.srow { display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(150px, 1.3fr) 80px 80px 90px; gap: 10px; padding: 4px 2px;
  font-size: 13px; color: var(--ink-2); }
.srow b { color: var(--ink); font-weight: 500; }
.mx { display: grid; grid-template-columns: 150px repeat(6, minmax(0, 1fr)); gap: 3px; font-size: 12.5px; }
.mx .h { color: var(--ink-2); font-weight: 600; text-align: center; padding: 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx .rh { display: flex; align-items: center; min-width: 0; }
.mx .rh span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx .c { text-align: center; padding: 8px 2px; border-radius: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.mx .c small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11px; }
.mx .self { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--row-alt) 4px 8px); color: var(--muted); }
.wcp { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 10px; align-items: center; padding: 5px 2px; }
.wcp .stack { display: flex; height: 18px; gap: 2px; }
.wcp .stack i { height: 100%; border-radius: 2px; }
.rgt { grid-template-columns: minmax(150px, 1.4fr) 54px 80px minmax(120px, 1fr) 64px; }

/* players */
.plt { grid-template-columns: 34px minmax(150px, 1.4fr) minmax(150px, 1.3fr) 56px 70px 54px 70px 58px; }
.tr.sel { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.tr.head .sort { cursor: pointer; user-select: none; }
.tr.head .sort.on { color: var(--ink); }
.search { background: var(--well); color: var(--ink); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 6px 10px;
  font: inherit; width: 240px; max-width: 100%; }
@media (prefers-color-scheme: light) { .search { background: #fff; } }
.prof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.prof div { border: 1px solid var(--panel-edge); border-radius: 10px; padding: 8px 10px; }
.prof b { display: block; font: 700 20px var(--mono); }
.prof small { color: var(--ink-2); font-size: 12px; }
.pname { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.pname h2 { margin: 0; font-size: 22px; font-weight: 400; }
.psub { color: var(--ink-2); font-size: 13px; margin-bottom: 12px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.mt { grid-template-columns: 34px minmax(120px, 1.4fr) minmax(110px, 1.2fr) 44px 52px 26px; }
.ht { grid-template-columns: minmax(120px, 1.3fr) 64px minmax(120px, 1.4fr); }
.mark { width: 16px; height: 16px; }
a.pn, .pn { color: inherit; cursor: pointer; }
a.pn:hover { color: var(--accent); text-decoration: none; }

/* bracket (approved: cards in columns, connector lines; scrolls sideways when it does not fit) */
.bwrap { position: relative; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; padding: 8px 2px 10px; }
.bracket2 { display: grid; grid-template-columns: repeat(5, 270px); gap: 24px; width: max-content; --line: color-mix(in srgb, var(--ink) 28%, transparent); }
.bcol2 { display: flex; flex-direction: column; }
.bcol2 .bhead { text-align: center; padding: 4px 0 6px; border-bottom: 2px solid transparent; margin-bottom: 8px; font: 600 12px var(--mono);
  letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.bcol2.now .bhead { color: var(--accent); border-bottom-color: var(--accent); }
.bbody { flex: 1; display: flex; flex-direction: column; }
.bpair { flex: 1; display: flex; flex-direction: column; position: relative; }
.bslot { flex: 1; display: flex; align-items: center; position: relative; padding: 5px 0; }
.bslot > .tcard { width: 100%; }
.bracket2 .tcard { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 4px 8px; }
.bracket2 .board { height: 52px; }
.bracket2 .board .tno { font-size: 19px; }
.bcol2.lines:not(.last) .bslot::after { content: ""; position: absolute; left: 100%; top: 50%; width: 12px; border-top: 2px solid var(--line); }
.bcol2.lines:not(.last) .bpair::after { content: ""; position: absolute; left: calc(100% + 12px); top: 25%; height: calc(50% + 2px);
  border-left: 2px solid var(--line); margin-top: -1px; }
.bcol2.fed .bslot::before { content: ""; position: absolute; right: 100%; top: 50%; width: 12px; border-top: 2px solid var(--line); }
.tcard.tbd .seat b { color: var(--ink-2); font-weight: 400; font-style: italic; }
.tcard.tbd .board .tno { opacity: .35; }

/* the round clock: the countdown exactly in the middle (label left, rounds right); stacked on phones */
.clock { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.clock .time { justify-self: center; text-align: center; }
.clock .rounds { justify-self: stretch; }
@media (max-width: 900px) {
  .clock { grid-template-columns: 1fr; }
  .clock .what, .clock .time { justify-self: center; text-align: center; }
}
.clock .lbl2 .nw { white-space: nowrap; }

/* Tables panel (Thu–Fri): switching groups off; one line on phones */
.gtoggle { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; margin-bottom: 10px; color: var(--ink-2); font-size: 13px; }
.gtoggle .gt-lbl { white-space: nowrap; }
.seg button { font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 0; padding: 4px 12px; cursor: pointer; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--panel-edge); }
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
@media (max-width: 480px) { .gtoggle .gt-lbl { display: none; } .seg button { padding: 4px 10px; } }

/* four groups side by side: a panel too narrow for the full title (app.js fitGroupTitles, iPad landscape) shows "Sk. 1" */
.g4 .led .short { display: none; }
.g4 .panel.narrow .led .long { display: none; }
.g4 .panel.narrow .led .short { display: inline; }

/* iPad portrait and narrow windows: the title has its own line, the subtitle shares the next one with the update
   indicator and the statistics button (on wide screens they sit beside the title, the subtitle below) */
@media (min-width: 641px) and (max-width: 1100px) {
  .top h1 { flex-basis: 100%; }
  .title-row { align-items: center; }
  .subtitle { order: 1; flex: 0 1 auto; margin-top: 0; }
  .title-row .live { order: 2; }
  .title-row .ext { order: 3; }
}

/* phones (as Tourney-stats): the subtitle right under the title, the update indicator and the statistics button
   below it; the header scrolls away with the page; the tabs wrap and look like buttons */
@media (max-width: 640px) {
  .top { position: relative; padding-bottom: 14px; }
  .title-row { row-gap: 8px; align-items: center; }
  .subtitle { order: 1; flex-basis: 100%; margin-top: 0; }
  .title-row .live { order: 2; margin-left: 0; }
  .title-row .ext { order: 3; margin-left: auto; }
  .tabs { flex-wrap: wrap; gap: 10px; overflow: visible; }
  .tabs a { padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center;
    border: 1px solid var(--panel-edge); border-radius: 8px; }
  .tabs a.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
}

/* browsing the rounds: < > in the Tables panel, "Group tables" in the Bracket panel */
.rnav { margin-left: auto; display: inline-flex; gap: 6px; }
.rbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 34px; height: 30px; padding: 0;
  border: 1px solid var(--panel-edge); border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.rbtn:hover:not(:disabled) { border-color: var(--accent); }
.rbtn:disabled { opacity: .35; cursor: default; }
.rbtn svg { width: 14px; height: 14px; flex: none; }
.rbtn.wide { width: auto; padding: 0 12px 0 8px; margin-left: auto; white-space: nowrap; }

/* round clock colours (like the BCP-clock display): green = BCP timer before the start, yellow = last 10 minutes,
   red = overtime, blinking magenta = paused by the TO; default = the LED cyan */
.clock .time.green { color: #3dff8a; text-shadow: 0 0 12px rgba(61, 255, 138, .6); }
.clock .time.yellow { color: #ffd23f; text-shadow: 0 0 12px rgba(255, 210, 63, .6); }
.clock .time.red { color: #ff4d4d; text-shadow: 0 0 12px rgba(255, 77, 77, .6); }
.clock .time.magenta { color: #ff4de6; text-shadow: 0 0 12px rgba(255, 77, 230, .6); animation: clockblink 1s steps(2, start) infinite; }
@keyframes clockblink { 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .clock .time.magenta { animation: none; } }

/* search fields in the Tables, Bracket and lower panels; the match marks of the bracket (specific state classes) */
.sr { position: absolute; left: -9999px; width: 1px; overflow: hidden; }
.qrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; color: var(--ink-2); font-size: 13px; }
.qrow .search { width: 280px; max-width: 100%; }
.qrow .rbtn.wide { margin-left: auto; }
.qinfo { color: var(--ink-2); font-size: 13px; }
.qline { margin: -2px 0 8px; }
.qempty { padding: 12px 0; }
.gtoggle .qlabel { flex: 0 1 280px; min-width: 0; }
.gtoggle .qlabel .search { width: 100%; box-sizing: border-box; }
.tcard.qhit { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.tcard.qdim { opacity: .28; }
@media (max-width: 640px) {
  .gtoggle { flex-wrap: wrap; }
  .gtoggle .qlabel, .qrow .qlabel { flex: 1 1 100%; }
  .qrow .search { width: 100%; box-sizing: border-box; }
  .legend .nophone { display: none; }
}
.subtitle a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.subtitle a:hover { color: var(--ink); }

/* touch devices: a clearly visible, easy-to-hit clear (x) button in every search field (drawn as SVG, not a glyph) */
@media (pointer: coarse) {
  .search { padding-right: 6px; }
  .search::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin: 0 0 0 4px; cursor: pointer;
    background-color: var(--ink-2);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8 8l12 12m0-12L8 20' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8 8l12 12m0-12L8 20' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* the compact clock and finished tables in the sticky header (shown by app.js after scrolling, if they fit) */
@media (min-width: 700px) {
  .navrow { display: flex; align-items: flex-end; gap: 16px; }
  .navrow .tabs { flex: 0 1 auto; min-width: 0; }
}
.mini { margin: 0 0 5px auto; flex: none; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; background: var(--well);
  border: 1px solid #000; border-radius: 6px; padding: 3px 10px; color: var(--led); font: 600 12px/1.4 var(--mono); }
.mini[hidden] { display: none; }
.mini .t { font-size: 17px; font-weight: 700; }
.mini .t small { font-size: 11px; font-weight: 600; margin-right: 6px; color: #8fbfc3; }
.mini .n { color: #8fbfc3; }
.mini .t.green { color: #3dff8a; } .mini .t.yellow { color: #ffd23f; } .mini .t.red { color: #ff4d4d; }
.mini .t.magenta { color: #ff4de6; animation: clockblink 1s steps(2, start) infinite; }
@media (prefers-reduced-motion: reduce) { .mini .t.magenta { animation: none; } }

/* more air between the countdown and the round indicators (they get narrower, the countdown stays centred) */
@media (min-width: 901px) { .clock .rounds { margin-left: clamp(16px, 3.5vw, 56px); } }

/* tables marked by the visitor; after .qhit so that the mark wins */
.tcard[data-card] { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.tcard.marked { border-color: var(--c-gold); box-shadow: 0 0 0 2px var(--c-gold);
  background: color-mix(in srgb, var(--c-gold) 16%, var(--panel)); }
.the.off { display: none; }

/* light theme: the other LED displays (panel heads, round clock, compact header clock) pale like the table boards;
   kept at the end so that it wins over the dark rules above */
@media (prefers-color-scheme: light) {
  .led, .clock, .mini { background-color: #e4f2f4; border-color: #b3d5db; color: #08606c; text-shadow: none; }
  .led, .clock { background-image: repeating-linear-gradient(90deg, transparent 0 15px, #d0e6ea 15px 17px); }
  .goto .led::after { background: #08606c; filter: none; }
  .clock .lbl, .clock .time { text-shadow: none; }
  .clock .lbl2, .rlabels, .mini .t small, .mini .n { color: #2d6f79; }
  .rsegs i { background: #c3dde2; }
  .rsegs i.gap { background: none; }
  .rsegs i.done { background: #0f8695; box-shadow: none; }
  .rsegs i.now { background: #5aaab5; animation-name: wh-pulse-light; }
  .clock .time.green, .mini .t.green { color: #12702f; text-shadow: none; }
  .clock .time.yellow, .mini .t.yellow { color: #8a5d00; text-shadow: none; }
  .clock .time.red, .mini .t.red { color: #c32222; text-shadow: none; }
  .clock .time.magenta, .mini .t.magenta { color: #a8128f; text-shadow: none; }
}
@keyframes wh-pulse-light { 50% { background: #a9d2d9; } }
