/* Gold Hub – graphics skin. Original design: gold on dark, 16:9 stage
   (1920x1080 design pixels) scaled to fit the window with letterboxing. */

:root {
  --bg: #0f0b05;
  --bg-2: #1c140a;
  --panel: rgba(255, 214, 120, 0.06);
  --panel-line: rgba(255, 205, 90, 0.28);
  --gold: #f6c544;
  --gold-hi: #ffe7a0;
  --gold-lo: #b9811a;
  --gold-deep: #7a4f0c;
  --ink: #fff8e8;
  --ink-dim: #d9c9a3;
  --ink-mute: #a8977a;
  --dsq: #ff4d4f;
  --dsq-deep: #8e1416;
  --ok: #7ee2a8;
  --steel: #b8c6d6;
  --steel-hi: #eef3f8;
  --steel-lo: #6c7f94;
  --steel-bg: rgba(150, 175, 200, 0.10);
  --gold-grad: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-lo) 100%);
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
}
html.transparent, html.transparent body { background: transparent; }
body.ui-idle { cursor: none; }
[hidden] { display: none !important; }

#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#stage {
  --scale: 1;
  position: absolute;
  left: 50%; top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--scale));
  transform-origin: center center;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 30% 40%, rgba(246, 197, 68, 0.10), transparent 70%),
    radial-gradient(900px 600px at 95% 100%, rgba(185, 129, 26, 0.12), transparent 70%),
    linear-gradient(160deg, var(--bg-2), var(--bg) 60%);
}
html.transparent #stage { background: transparent; }

/* faint gold-dust texture */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 220, 130, 0.18) 0 1.5px, transparent 2px),
    radial-gradient(circle at 67% 9%, rgba(255, 220, 130, 0.14) 0 1.5px, transparent 2px),
    radial-gradient(circle at 84% 62%, rgba(255, 220, 130, 0.12) 0 2px, transparent 2.5px),
    radial-gradient(circle at 38% 88%, rgba(255, 220, 130, 0.12) 0 1.5px, transparent 2px),
    radial-gradient(circle at 54% 47%, rgba(255, 220, 130, 0.08) 0 2px, transparent 2.5px);
}
html.transparent #stage::before { display: none; }

/* ------------------------------------------------------------------ top bar */
#topbar {
  position: absolute;
  left: 64px; right: 64px; top: 34px;
  display: none;
  height: 72px;
  align-items: center;
  justify-content: space-between;
}
/* Flow: idle = nothing; start = lower-third bar only; finish = results window. */
#stage.state-finish #topbar, #stage.state-dsq #topbar { display: flex; }
#stage:not(.state-finish):not(.state-dsq) :is(.run, .side, .next) { display: none !important; }
#stage:not(.state-start) .bar { display: none !important; }
#conn { position: absolute; right: 64px; top: 34px; }
.brand { display: flex; align-items: center; gap: 18px; }
.brand-nugget {
  flex: none; display: block;
  height: 72px; width: auto; aspect-ratio: 563 / 441;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(246, 197, 68, 0.35));
}
.brand-name {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag {
  font-size: 26px;
  color: var(--ink-mute);
  font-style: italic;
  padding-left: 18px;
  border-left: 2px solid var(--panel-line);
}
.brand-tag:empty { display: none; }
.credit {
  position: absolute;
  left: 64px; top: 80px;
  font-size: 21px; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.credit:empty { display: none; }
html.transparent .credit {
  color: var(--ink);
  background: rgba(15, 11, 5, 0.7);
  padding: 2px 10px;
  margin-left: -10px;
  border-radius: 8px;
}

.conn {
  display: flex; align-items: center; gap: 12px;
  font-size: 26px; font-weight: 700;
  color: #ffd2d2;
  background: rgba(142, 20, 22, 0.55);
  border: 2px solid rgba(255, 77, 79, 0.6);
  padding: 8px 22px;
  border-radius: 999px;
}
.conn-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--dsq);
  animation: blink 1.4s ease-in-out infinite;
}
#stage.offline .run, #stage.offline .side, #stage.offline .next, #stage.offline .bar { opacity: 0.55; }
html.transparent .conn { display: none; }

/* --------------------------------------------------------------- run card */
.run {
  position: absolute;
  left: 64px; top: 150px;
  width: 1180px; height: 690px;
  padding: 36px 56px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(40, 29, 13, 0.92), rgba(20, 14, 6, 0.94));
  border: 3px solid var(--panel-line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 231, 160, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.run > * { flex: none; }
.run.enter { animation: card-in 0.45s cubic-bezier(.2, .8, .2, 1) both; }
.run-finish { border-color: rgba(246, 197, 68, 0.65); }
.run-dsq { border-color: rgba(255, 77, 79, 0.7); background: linear-gradient(180deg, rgba(48, 16, 14, 0.94), rgba(20, 8, 6, 0.95)); }

.run-meta { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.bib {
  font-size: 34px; font-weight: 800;
  color: var(--bg);
  background: var(--gold-grad);
  padding: 6px 20px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}
.run-name { font-size: 32px; color: var(--ink-dim); font-weight: 600; }
.live {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold-hi);
}
.live-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(246, 197, 68, 0.7);
  animation: pulse 1.2s ease-out infinite;
}

.dog {
  margin-top: 18px;
  font-size: 128px;
  line-height: 1.12;
  padding-bottom: 0.04em;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.run-start .dog { font-size: 150px; margin-top: 70px; }
.run-finish .dog, .run-dsq .dog {
  display: block; font-size: 120px; line-height: 1.2; margin-top: 4px;
  white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal;
}
.handler {
  margin-top: 10px;
  font-size: 52px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* finish: time + nugget */
.result {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.time { display: flex; align-items: baseline; gap: 18px; line-height: 0.9; }
.time-value {
  font-size: 236px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
}
.time-unit { font-size: 80px; font-weight: 800; color: var(--gold); }

.nugget {
  flex: none;
  width: 290px; height: 250px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #2a1803;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.65), transparent 22%),
    radial-gradient(circle at 40% 35%, var(--gold-hi), var(--gold) 45%, var(--gold-lo) 80%, var(--gold-deep) 100%);
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset -10px -14px 24px rgba(90, 55, 5, 0.45);
  transform: rotate(-4deg);
}
.nugget-label { font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.nugget-value { font-size: 130px; font-weight: 900; line-height: 0.95; font-variant-numeric: tabular-nums; }
.nugget-first { box-shadow: 0 0 60px rgba(255, 220, 120, 0.55), 0 16px 40px rgba(0, 0, 0, 0.5), inset -10px -14px 24px rgba(90, 55, 5, 0.45); }
.nugget-pending { opacity: 0.55; filter: grayscale(0.4); }
.nugget-pending .nugget-label { font-size: 30px; text-align: center; }
.run.enter .nugget { animation: nugget-drop 0.7s 0.15s cubic-bezier(.3, 1.4, .5, 1) both; }

.pens { display: flex; gap: 18px; margin-top: 22px; }
.pen {
  display: flex; align-items: baseline; gap: 14px;
  padding: 8px 22px;
  border-radius: 14px;
  background: rgba(255, 77, 79, 0.16);
  border: 2px solid rgba(255, 120, 100, 0.55);
  font-size: 34px;
}
.pen-label { color: var(--ink-dim); font-weight: 600; }
.pen-value { font-weight: 900; font-size: 44px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pen-zero { background: rgba(126, 226, 168, 0.10); border-color: rgba(126, 226, 168, 0.45); }

.fun {
  position: absolute;
  right: 56px; top: 50px;
  font-size: 30px; font-weight: 700; font-style: italic;
  color: var(--gold-hi);
}

/* disqualification */
.dsq {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 64px;
  padding-left: 16px;
}
.dsq-stamp {
  font-size: 190px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--dsq);
  padding: 4px 40px 10px;
  border: 14px solid var(--dsq);
  border-radius: 26px;
  transform: rotate(-7deg);
  text-shadow: 0 0 30px rgba(255, 77, 79, 0.35);
  box-shadow: 0 0 40px rgba(255, 77, 79, 0.25), inset 0 0 30px rgba(255, 77, 79, 0.15);
}
.run.enter .dsq-stamp { animation: stamp 0.5s 0.1s cubic-bezier(.3, 1.6, .5, 1) both; }
.dsq-copy { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dsq-text { font-size: 56px; overflow-wrap: anywhere; font-weight: 900; text-transform: uppercase; color: #ffd6d6; }
.dsq-fun { font-size: 32px; font-style: italic; color: var(--ink-mute); }
.run-dsq .dog { color: #ffe9e9; }

/* sparkle (finish only, plays once) */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute;
  width: 26px; height: 26px;
  background: var(--gold-hi);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0;
  animation: sparkle 1.6s ease-out both;
}
.s0  { left: 62%; top: 52%; animation-delay: .20s; }
.s1  { left: 80%; top: 48%; animation-delay: .35s; transform: scale(1.4); }
.s2  { left: 92%; top: 66%; animation-delay: .50s; }
.s3  { left: 70%; top: 88%; animation-delay: .30s; }
.s4  { left: 8%;  top: 60%; animation-delay: .45s; }
.s5  { left: 30%; top: 58%; animation-delay: .60s; }
.s6  { left: 50%; top: 92%; animation-delay: .25s; }
.s7  { left: 86%; top: 30%; animation-delay: .70s; }
.s8  { left: 18%; top: 90%; animation-delay: .55s; }
.s9  { left: 44%; top: 62%; animation-delay: .80s; }
.s10 { left: 96%; top: 86%; animation-delay: .40s; }
.s11 { left: 74%; top: 62%; animation-delay: .90s; }

/* ------------------------------------------------------------ side panels */
.side {
  position: absolute;
  right: 64px; top: 150px;
  width: 548px; height: 690px;
  display: flex; flex-direction: column; gap: 26px;
}
.panel {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(246, 197, 68, 0.10), rgba(246, 197, 68, 0.03));
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.45);
  padding: 0 26px 16px;
  overflow: hidden;
  backdrop-filter: blur(2px);
}
html.transparent .panel { background: rgba(15, 11, 5, 0.85); }
.panel-title {
  display: flex; align-items: center; gap: 14px;
  margin: 0 -26px 12px;
  padding: 10px 26px;
  background: var(--gold-grad);
  color: #241503;
  font-size: 26px; font-weight: 900; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: inset 0 -2px 0 rgba(90, 55, 5, 0.45);
}
.panel-title-text { flex: 1; }
/* results icons (dark on gold) */
.icon-trophy {
  position: relative; flex: none;
  width: 30px; height: 22px; margin-bottom: 10px;
  background: #241503;
  border-radius: 3px 3px 50% 50% / 3px 3px 70% 70%;
  box-shadow: -7px 2px 0 -3px #241503, 7px 2px 0 -3px #241503;
}
.icon-trophy::after {
  content: ""; position: absolute; left: 7px; bottom: -11px;
  width: 16px; height: 11px; background: #241503;
  clip-path: polygon(35% 0, 65% 0, 65% 50%, 100% 70%, 100% 100%, 0 100%, 0 70%, 35% 50%);
}
.icon-nugget {
  flex: none; width: 30px; height: 26px;
  background: radial-gradient(circle at 35% 30%, #6b450b, #241503 70%);
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
}

.tag {
  font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold-hi); background: #241503; padding: 3px 12px; border-radius: 8px;
}

.top5 { flex: 1; min-height: 0; overflow: hidden; }
.top5 .rank-row { padding: 9px 12px; }
.top5 .rank-dog { font-size: 32px; }
.top5 .rank-time { font-size: 34px; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 5px 12px;
  border-radius: 14px;
}
.rank-row + .rank-row { border-top: 1px solid rgba(255, 205, 90, 0.12); }
.rank-place { font-size: 36px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.rank-who { display: flex; flex-direction: column; min-width: 0; }
.rank-dog { font-size: 28px; line-height: 1.15; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-handler { font-size: 19px; line-height: 1.2; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-res { display: flex; flex-direction: column; align-items: flex-end; }
.rank-time { font-size: 30px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-pen { font-size: 19px; line-height: 1.1; color: #ffb3a8; font-weight: 700; }
.rank-first .rank-place {
  color: #2a1803;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 50%, var(--gold-lo));
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
  text-align: center;
  font-size: 32px;
  padding: 4px 0;
}
.rank-hl { background: rgba(246, 197, 68, 0.18); box-shadow: inset 0 0 0 2px rgba(246, 197, 68, 0.7); }

/* ------------------------------------------------------------- next strip */
.next {
  position: absolute;
  left: 64px; right: 64px; bottom: 40px;
  height: 180px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(150, 175, 200, 0.13), rgba(110, 130, 150, 0.05));
  border: 3px dashed var(--steel);
}
html.transparent .next { background: rgba(14, 18, 24, 0.88); }
.next-title {
  flex: none;
  width: 220px;
  display: flex; align-items: center; gap: 14px;
  font-size: 28px; font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--steel-hi);
  line-height: 1.12;
}
.icon-queue { flex: none; display: flex; }
.chev {
  width: 18px; height: 34px;
  margin-right: -4px;
  background: var(--steel);
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}
.chev:nth-child(2) { opacity: 0.7; }
.chev:nth-child(3) { opacity: 0.4; }
.next-list {
  list-style: none; margin: 0; padding: 0;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.next-item {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(10, 14, 20, 0.45);
  border: 2px solid rgba(184, 198, 214, 0.25);
  min-width: 0;
}
.next-first { border: 3px solid var(--steel); background: rgba(150, 175, 200, 0.16); }
.next-bib {
  flex: none;
  min-width: 84px;
  text-align: center;
  font-size: 32px; font-weight: 900;
  color: var(--steel-hi); background: transparent;
  border: 3px solid var(--steel);
  padding: 3px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.next-who { display: flex; flex-direction: column; min-width: 0; }
.next-dog { font-size: 42px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-handler { font-size: 24px; color: #aab6c3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* When the next strip is hidden, give the card and side panels the room. */
#stage:has(#next[hidden]) .run,
#stage:has(#next[hidden]) .side { height: 890px; }

/* ------------------------------------------------------ fullscreen button */
.fs-btn {
  position: fixed;
  left: 50%; top: 16px;
  transform: translateX(-50%);
  z-index: 10;
  font: 700 18px var(--font);
  color: var(--bg);
  background: var(--gold-grad);
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  opacity: 0.92;
}
.fs-btn:hover, .fs-btn:focus-visible { opacity: 1; outline: 3px solid var(--gold-hi); outline-offset: 2px; }

/* ------------------------------------------------------------- animation */
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes nugget-drop { from { opacity: 0; transform: translateY(-60px) rotate(-18deg) scale(0.7); } to { opacity: 1; transform: rotate(-4deg); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-7deg) scale(1.8); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }
@keyframes sparkle {
  0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  30% { opacity: 1; transform: scale(1.1) rotate(45deg); }
  100% { opacity: 0; transform: scale(0.4) rotate(120deg); }
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 197, 68, 0.7); } 100% { box-shadow: 0 0 0 26px rgba(246, 197, 68, 0); } }
@keyframes blink { 50% { opacity: 0.3; } }
@keyframes float { 50% { transform: translateY(-14px) rotate(3deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Without Top 5 the result card uses the full width. */
#stage:has(#top5[hidden]) .run { width: 1792px; }


/* ------------------------------------------------- start: lower-third bar */
.bar {
  position: absolute;
  left: 64px; right: 64px; bottom: 26px;
  display: flex; flex-direction: column;
}
.bar.enter { animation: bar-in 0.45s cubic-bezier(.2, .8, .2, 1) both; }

/* small tab above the bar: next starter (steel = upcoming) + credit */
.bar-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  min-height: 34px;
  padding-left: 110px;
}
.bar-tab {
  display: flex; align-items: center; gap: 12px;
  height: 36px;
  padding: 0 20px 0 16px;
  border-radius: 12px 12px 0 0;
  background: rgba(14, 18, 24, 0.92);
  border: 2px dashed var(--steel);
  border-bottom: 0;
  font-size: 21px;
  color: var(--steel-hi);
  max-width: 1100px;
  white-space: nowrap;
  overflow: hidden;
}
.bar-tab .chev { width: 11px; height: 20px; }
.bar-tab-label { font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel); }
.bar-tab-bib {
  font-weight: 900; font-variant-numeric: tabular-nums;
  border: 2px solid var(--steel); border-radius: 999px; padding: 0 10px; line-height: 1.25;
}
.bar-tab-dog { font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.bar-tab-sep { color: var(--steel-lo); }
.bar-tab-handler { color: #aab6c3; overflow: hidden; text-overflow: ellipsis; }
.bar-credit {
  margin-left: auto;
  padding: 0 6px 6px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

/* main strap */
.strap {
  position: relative;
  height: 100px;
  display: flex; align-items: center;
  gap: 18px;
  padding: 0 0 0 10px;
  border-radius: 50px 16px 16px 50px;
  background: linear-gradient(180deg, rgba(36, 26, 11, 0.95), rgba(14, 10, 4, 0.96));
  border: 3px solid var(--gold);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 231, 160, 0.18);
}
.bar-dsq .strap { border-color: var(--dsq); }
.bar-logo {
  /* Real Gold Rush logo (563×441): fits the 100 px strap with a little air, drawn from the full-size PNG. */
  flex: none;
  display: block;
  height: 88px; width: auto;
  aspect-ratio: 563 / 441;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.bar-bib {
  flex: none;
  min-width: 96px;
  padding: 6px 16px;
  text-align: center;
  font-size: 44px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--gold-hi);
  background: #0b0803;
  border: 2px solid rgba(246, 197, 68, 0.55);
  border-radius: 16px;
}
.bar-who { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.bar-line1, .bar-line2 { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.bar-handler {
  font-size: 44px; font-weight: 900; line-height: 1.08;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-club { flex: none; font-size: 22px; color: var(--ink-mute); white-space: nowrap; }
.bar-dog {
  font-size: 36px; font-weight: 800; line-height: 1.08;
  color: var(--gold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-run { flex: none; font-size: 20px; color: var(--ink-mute); }

/* right-hand stat columns */
.bar-cols { flex: none; display: flex; align-self: stretch; }
.bar-col {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 132px;
  padding: 0 18px;
  border-left: 2px solid rgba(255, 205, 90, 0.22);
}
.bar-col-label {
  font-size: 17px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.bar-col-value {
  font-size: 54px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bar-col-zero .bar-col-value { color: var(--ink-dim); }
.bar-col-pen { background: rgba(255, 77, 79, 0.16); }
.bar-col-pen .bar-col-label { color: #ffb3a8; }
.bar-col-pen .bar-col-value { color: #ffd6d0; }
.bar-col-time {
  min-width: 250px;
  border-radius: 0 13px 13px 0;
  background: linear-gradient(180deg, rgba(246, 197, 68, 0.16), rgba(246, 197, 68, 0.05));
}
.bar-col-time .bar-col-label { color: var(--gold); }
.bar-col-time .bar-col-value { color: var(--gold-hi); font-size: 60px; }
.bar-col-time.unknown .bar-col-value { color: var(--ink-mute); }
.bar-col-dis { min-width: 264px; background: rgba(255, 77, 79, 0.14); }
.bar-dis {
  font-size: 52px; font-weight: 900; letter-spacing: 0.08em; line-height: 1;
  color: var(--dsq);
  border: 5px solid var(--dsq);
  border-radius: 12px;
  padding: 2px 16px 4px;
  transform: rotate(-5deg);
  animation: stamp 0.4s cubic-bezier(.3, 1.6, .5, 1) both;
}

/* placement line under the bar (state set by web/obs-pace.mjs) */
.pace-line {
  --progress: 0%;
  --pace-color: #b9c2cc;
  position: relative;
  height: 10px;
  margin: 14px 24px 8px 110px;
  border-radius: 999px;
  background: rgba(15, 11, 5, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 231, 160, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.pace-line[hidden] { display: block !important; visibility: hidden; } /* keep bar position stable */
.pace-line[data-pace="1"] { --pace-color: #f6c544; }
.pace-line[data-pace="2"] { --pace-color: #dfe6ee; }
.pace-line[data-pace="3"] { --pace-color: #d98a52; }
.pace-line[data-pace="clear"] { --pace-color: #fff1c4; }
.pace-line[data-pace="out"] { --pace-color: #7c7468; }
.pace-fill {
  position: absolute; inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: var(--pace-color);
}
.pace-standard {
  position: absolute; left: 66.667%; top: -6px; height: 22px;
  border-left: 3px dotted var(--ink);
}
.pace-marker {
  position: absolute; top: 50%; z-index: 1;
  width: 30px; height: 30px; margin-left: -15px; margin-top: -15px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 18px; font-weight: 900;
  color: #1a1206;
  border: 2px solid rgba(0, 0, 0, 0.6);
}
.pace-marker[data-place="1"] { background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 60%, var(--gold-lo)); }
.pace-marker[data-place="2"] { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d3de 60%, #8b98a6); }
.pace-marker[data-place="3"] { background: radial-gradient(circle at 35% 30%, #ffd2ad, #d98a52 60%, #8f4f22); }
.pace-marker[data-lane="1"] { margin-top: -38px; }
.pace-marker[data-lane="2"] { margin-top: 8px; }
.pace-marker[data-passed="true"] { opacity: 0.35; filter: grayscale(1); }
.pace-ball {
  position: absolute; z-index: 2;
  left: var(--progress); top: 50%;
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--pace-color) 55%, rgba(0, 0, 0, 0.5));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55), 0 0 14px var(--pace-color);
}
@keyframes bar-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------- working dog partner logo */
.bar-wd {
  flex: none;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  width: 150px;
  padding: 0 16px;
  border-left: 2px solid rgba(255, 205, 90, 0.22);
  border-radius: 0 13px 13px 0;
  background: rgba(0, 0, 0, 0.35);
}
.bar-wd-img { display: block; width: 116px; height: auto; }
.strap.has-wd .bar-col-time { border-radius: 0; }
.wd-corner {
  margin-left: 28px;
  width: 150px; height: auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}
#stage.offline .wd-corner { margin-right: 300px; }
html.transparent .bar-wd-img, html.transparent .wd-corner { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9)); }
