/* ShootingTargets7 Climb to Glory Scorekeeper: palette, fonts and buttons mirror the ST7 Shot Timer, Angle Indicator and KYL Scorekeeper */
:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --soft: #d4d4d4;
  --brand: #e30613;
  --surface: #161616;
  --border: rgba(245, 245, 245, 0.12);
  --border-strong: rgba(245, 245, 245, 0.22);
  --ok: #3ddc84;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.app {
  max-width: 30rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 0.75rem) 1rem calc(env(safe-area-inset-bottom) + 1rem);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
header.top { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
header.top img { width: 4rem; height: 4rem; border-radius: 999px; display: block; }
h1 {
  margin: 0;
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.vet { margin: 0; font-size: 0.9rem; color: var(--soft); }

.screen { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { filter: brightness(1.25); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-xl {
  min-height: 6rem;
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.btn-lg { min-height: 3.75rem; font-size: 1.2rem; font-weight: 600; }
.btn-danger { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.5); }
.btn-shop { margin-top: 0.25rem; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.caveat {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 6px;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.4;
}
.err { margin: 0; color: #ff6b6b; font-weight: 600; text-align: center; line-height: 1.4; }
.hint { margin: 0; font-size: 0.9rem; color: var(--soft); line-height: 1.35; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card-title {
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 1rem; }
.field b { color: var(--fg); }
.field input[type=number] {
  font: inherit;
  font-size: 1.25rem;
  min-height: 3rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}
input[type=range] { width: 100%; height: 2.5rem; accent-color: var(--brand); }
.toggle { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; font-size: 1.05rem; }
.toggle input { width: 1.75rem; height: 1.75rem; accent-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.meter {
  position: relative;
  height: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
}
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ok); transition: width 40ms linear; }
.meter-fill.hot { background: var(--brand); }
.meter-thr { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; left: 50%; }
.meter-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-variant-numeric: tabular-nums; }

/* Run / review readouts */
.status {
  margin: 0;
  text-align: center;
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.status.go { color: var(--brand); }
.big {
  margin: 0;
  text-align: center;
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: clamp(5rem, 28vw, 8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.stats div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.stats span { font-size: 0.9rem; color: var(--soft); }
.stats b {
  font-family: "Barlow Condensed", "Segoe UI", sans-serif;
  font-size: 2.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.par-line { margin: 0; text-align: center; font-size: 1.1rem; font-weight: 600; }

.shots, .hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.shots li {
  display: grid;
  grid-template-columns: 2.5rem 1fr 1fr auto;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  min-height: 3.25rem;
}
.shots li .n { color: var(--soft); font-weight: 600; }
.shots li .t { font-weight: 600; }
.shots li .s { color: var(--fg); }
.shots li .s small, .shots li .t small { color: var(--soft); font-size: 0.8rem; display: block; }
.shots li.over .t { color: #ffb020; }
.del {
  width: 3rem; height: 3rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 107, 0.5);
  background: transparent;
  color: #ff6b6b;
  font-size: 1.4rem;
  font-weight: 700;
}
.hist li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-variant-numeric: tabular-nums;
}
.hist .h-top { display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 600; font-size: 1.05rem; }
.hist .h-date { color: var(--soft); font-size: 0.9rem; }
.hist .h-splits { margin-top: 0.3rem; font-size: 0.95rem; color: var(--fg); word-break: break-word; }
.hist .empty { color: var(--soft); }

.help h2 { margin: 0.4rem 0 0; font-family: "Barlow Condensed", "Segoe UI", sans-serif; font-size: 1.3rem; }
.help ol, .help ul { margin: 0; padding-left: 1.25rem; line-height: 1.45; display: flex; flex-direction: column; gap: 0.35rem; }
.help p { margin: 0; }
.link { text-decoration: underline; font-weight: 600; }

.foot { margin-top: 1rem; display: flex; justify-content: center; }
.shop {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--muted);
}
body.running .foot, body.running header.top .vet { display: none; }

/* How-to video button + modal */
.btn-howto { border-color: var(--brand); font-weight: 600; }
.btn-howto .play { color: var(--brand); font-size: 0.85rem; }
.link-btn { background: none; border: 0; padding: 0.5rem 0; color: var(--fg); font-size: 1rem; text-align: left; min-height: 2.75rem; }
.modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  width: 100%;
  max-width: 30rem;
  max-height: 100dvh;
  margin: auto;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.85); }
.modal-box {
  margin: 0 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.35rem 0.35rem 0.9rem; }
.modal-head h2 { margin: 0; font-family: "Barlow Condensed", "Segoe UI", sans-serif; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.modal-close { width: 3rem; height: 3rem; flex: none; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); font-size: 1.3rem; font-weight: 700; }
.modal video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: calc(100dvh - 5.5rem);
  background: #000;
  object-fit: contain;
}
body.modal-open { overflow: hidden; }

/* Secondary buttons: How-to, Install, Share */
.sec-btns { display: flex; flex-direction: column; gap: 0.5rem; }
.sec-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.5rem; }
.btn-sec { min-height: 2.75rem; font-size: 0.95rem; font-weight: 600; padding: 0 0.75rem; }
.btn-sec .ico { color: var(--brand); font-weight: 700; }
.help-links { display: flex; flex-direction: column; }

/* Install modal */
.install-body { padding: 0 0.9rem 0.9rem; display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto; max-height: calc(100dvh - 5rem); }
.inapp { border-left: 4px solid #ffb020; background: var(--bg); border-radius: 6px; padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.inapp p { margin: 0; line-height: 1.4; }
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.install-steps li { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); line-height: 1.4; color: var(--soft); }
.install-steps li b { color: var(--fg); font-size: 1.02rem; }
.install-steps li .badge { display: none; align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--brand); color: #fff; border-radius: 4px; padding: 0.1rem 0.4rem; }
.install-steps li.current { border: 2px solid var(--brand); color: var(--fg); }
.install-steps li.current .badge { display: inline-block; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.5rem); transform: translate(-50%, 1rem); background: var(--fg); color: var(--bg); font-weight: 600; padding: 0.7rem 1.1rem; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 1000; max-width: calc(100% - 2rem); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Shared scorekeeper styles (from KYL) ---------- */
:root { --subtle: #6b6b6b; --danger: #ff6b6b; }
.center { text-align: center; }
body.scoring .foot, body.scoring header.top .vet, body.scoring header.top h1 { display: none; }
body.scoring header.top img { width: 2.5rem; height: 2.5rem; }
body.scoring .screen { margin-top: 0.5rem; gap: 0.6rem; }

/* Setup */
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
input[type=text], .field input[type=number], select {
  font: inherit; font-size: 1.1rem; min-height: 3rem; padding: 0 0.75rem; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); width: 100%;
}
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.75rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2rem; }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; counter-reset: p; }
.plist li { counter-increment: p; display: grid; grid-template-columns: 2rem 1fr auto auto; align-items: center; gap: 0.4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.25rem 0.25rem 0.25rem 0.6rem; font-weight: 600; font-size: 1.05rem; }
.plist li::before { content: counter(p); color: var(--muted); font-family: "Barlow Condensed", sans-serif; font-size: 1.2rem; }
.plist li.empty { display: block; color: var(--muted); font-weight: 400; padding: 0.6rem; }
.plist li.empty::before { content: none; }
.mini { width: 2.6rem; height: 2.6rem; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font-size: 1rem; font-weight: 700; }
.mini.x { color: var(--danger); border-color: rgba(255, 107, 107, 0.5); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { min-height: 2.5rem; padding: 0 0.8rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); font-size: 0.95rem; font-weight: 500; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .plus { color: var(--brand); font-weight: 700; margin-right: 0.2rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.35rem; }
.seg button { min-height: 3rem; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); font-size: 1.05rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 0.3rem 0.2rem; }
.seg button small { font-size: 0.75rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg button.on small { color: rgba(255, 255, 255, 0.85); }
.seg3 button { min-height: 3.6rem; font-size: 1rem; }

/* Scoring */
.sc-top { display: flex; justify-content: space-between; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: 0.06em; color: var(--soft); }
.sc-name { margin: 0; text-align: center; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: clamp(2.4rem, 12vw, 3.4rem); line-height: 1; overflow-wrap: anywhere; }
.paddles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.25rem; align-items: end; }
.pad { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.pad .dot { border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--bg); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.pad .lbl { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pad .pts { font-size: 0.68rem; color: var(--subtle); }
.pad.cur .dot { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.35); }
.pad.cur .lbl { color: var(--fg); font-weight: 700; }
.pad.hit .dot { background: var(--ok); border-color: var(--ok); }
.pad.miss .dot { border-color: var(--danger); color: var(--danger); }
.pad.miss .dot::after { content: "✕"; font-size: 0.8rem; }
.pad.off .dot { opacity: 0.35; }
.sc-score { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0.5rem; }
.sc-score div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem; text-align: center; display: flex; flex-direction: column; }
.sc-score span { font-size: 0.85rem; color: var(--soft); }
.sc-score b { font-family: "Barlow Condensed", sans-serif; font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-score .sec b { font-size: 2rem; font-weight: 600; color: var(--soft); margin-top: auto; }
.sc-next { margin: 0; text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--soft); }
.clock { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-items: center; }
.clock b { font-family: "Barlow Condensed", sans-serif; font-size: 2.6rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.clock.warn b { color: #ffb020; }
.clock.over b { color: var(--danger); }
.btn-hit { background: var(--ok); border-color: var(--ok); color: #05210f; min-height: 7rem; font-size: 3.25rem; }
.btn-miss { background: #3a0a0d; border-color: var(--danger); color: var(--danger); min-height: 5rem; font-family: "Barlow Condensed", sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: 0.04em; }
.btn-stopbank { border-color: var(--fg); min-height: 5rem; font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.03em; line-height: 1.05; }
.btn:disabled { opacity: 0.35; filter: none; cursor: default; }
.banner { margin: 0; text-align: center; padding: 0.55rem 0.75rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; line-height: 1.35; }
.banner.bust { border-color: rgba(255, 107, 107, 0.6); }
.banner.good { border-color: rgba(61, 220, 132, 0.6); }

/* Results */
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.board li { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; gap: 0.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.55rem 0.8rem; }
.board li.first { border-color: var(--brand); }
.board .rk { font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; font-weight: 700; color: var(--muted); text-align: center; }
.board li.first .rk { color: var(--brand); }
.board .nm { font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
.board .sub { display: block; font-size: 0.85rem; color: var(--soft); font-weight: 400; }
.board .sc { font-family: "Barlow Condensed", sans-serif; font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.board .sc small { display: block; font-family: "IBM Plex Sans", sans-serif; font-size: 0.78rem; font-weight: 500; color: var(--soft); }
.tbl-wrap { overflow-x: auto; }
table.sets { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.sets th, table.sets td { padding: 0.4rem 0.35rem; text-align: center; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
table.sets th { color: var(--soft); font-weight: 600; font-size: 0.85rem; }
table.sets td:first-child, table.sets th:first-child { text-align: left; font-weight: 600; }
table.sets td b { display: block; font-size: 1.1rem; }
table.sets td small { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
table.sets td.bust b { color: var(--danger); }
table.sets td.tot b { color: var(--fg); font-size: 1.2rem; }

/* History & stats */
.hist li { cursor: pointer; }
.hist .h-top b { font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.4rem; text-align: center; display: flex; flex-direction: column; gap: 0.1rem; }
.tile span { font-size: 0.78rem; color: var(--soft); line-height: 1.2; }
.tile b { font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 0.3rem; }
.bar { display: grid; grid-template-columns: 3.2rem 1fr 4.6rem; gap: 0.5rem; align-items: center; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.bar .track { height: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--ok); }
.bar .v { text-align: right; color: var(--soft); }
table.split { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.split th, table.split td { padding: 0.35rem 0.25rem; border-bottom: 1px solid var(--border); text-align: right; font-size: 0.92rem; }
table.split th { color: var(--soft); font-weight: 600; font-size: 0.8rem; }
table.split td:first-child, table.split th:first-child { text-align: left; }
.trend svg { width: 100%; height: auto; display: block; }
#stat-body { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
#hist-stats { display: flex; flex-direction: column; gap: 0.6rem; }


/* ---------- Climb to Glory ---------- */
.muted { color: var(--muted); font-weight: 400; }
.field > input[type=number] { margin-top: 0.15rem; }
.seg2 button { min-height: 3.6rem; }
.adv summary { cursor: pointer; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: " ▸"; color: var(--muted); }
.adv[open] summary::after { content: " ▾"; }

/* Shot strip: the score card's 10 boxes */
.strip { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.2rem; }
.strip .c { min-height: 2.5rem; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; line-height: 1; }
.strip .c b { font-family: "Barlow Condensed", sans-serif; font-size: 1.25rem; font-weight: 700; }
.strip .c small { font-size: 0.55rem; color: var(--muted); margin-top: 0.1rem; }
.strip .c.h { border-color: var(--ok); }
.strip .c.h b { color: var(--ok); }
.strip .c.m { border-color: rgba(255, 107, 107, 0.6); }
.strip .c.m b { color: var(--danger); }
.strip .c.now { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.35); }

/* Paddle ladder: 2-1/4" (1 pt) on the left climbing to 1/2" (8 pts) */
.ladder { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.25rem; align-items: end; }
.rung { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.35rem 0 0.3rem; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--fg); min-height: 5.6rem; justify-content: flex-end; }
.rung .disc { border-radius: 50%; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 0.95rem; color: var(--soft); background: transparent; }
.rung .sz { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rung .pp { font-size: 0.65rem; color: var(--subtle); }
.rung .cnt { position: absolute; top: 0.1rem; right: 0.1rem; min-width: 1.1rem; height: 1.1rem; border-radius: 999px; background: var(--ok); color: #05210f; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 0.2rem; }
.rung.climbed .disc { background: rgba(61, 220, 132, 0.18); border-color: var(--ok); color: var(--ok); }
.rung.locked { opacity: 0.38; }
.rung.allowed { border-color: rgba(61, 220, 132, 0.55); border-style: dashed; cursor: pointer; }
.rung.aim { border-color: var(--brand); border-style: solid; background: rgba(227, 6, 19, 0.12); }
.rung.aim .disc { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.35); color: var(--fg); }
.rung.aim .sz { color: var(--fg); font-weight: 700; }
.rung.missed .disc { border-color: var(--danger); }
.sc-mode { margin: 0; text-align: center; font-size: 0.98rem; font-weight: 600; color: var(--soft); line-height: 1.3; min-height: 2.6em; }
.sc-mode.open { color: #f5c542; }
.btn-hit small { font-size: 1.4rem; font-weight: 600; margin-left: 0.4rem; }
.btn-hit { flex-direction: row; }
.live .board li { padding: 0.35rem 0.6rem; }
.mini-board .rk { font-size: 1.4rem; }
.mini-board .sc { font-size: 1.8rem; }
.mini-board li.cur { border-color: var(--ok); }

/* Results tie + tie-breaker */
.tie { border-color: #f5c542; }
.board .tb-tag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #0a0a0a; background: #f5c542; border-radius: 4px; padding: 0 0.3rem; margin-left: 0.3rem; vertical-align: middle; }
.tb-target { display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 1px solid var(--brand); border-radius: 10px; padding: 0.4rem; }
.tb-target span { font-size: 0.85rem; color: var(--soft); text-transform: uppercase; letter-spacing: 0.06em; }
.tb-target b { font-family: "Barlow Condensed", sans-serif; font-size: 3.2rem; font-weight: 700; line-height: 1; }
.tb-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; color: var(--soft); }
.tb-log li { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; }
.pts-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pts-tbl th, .pts-tbl td { border: 1px solid var(--border); text-align: center; padding: 0.3rem 0.1rem; font-size: 0.8rem; }
.pts-tbl td { font-family: "Barlow Condensed", sans-serif; font-size: 1.2rem; font-weight: 700; }
.pbar { display: grid; grid-template-columns: 3.2rem 1fr 5.6rem; gap: 0.5rem; align-items: center; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
/* How-to video player: full screen on tap; this full-viewport overlay is the fallback.
   The video is 9:16 with a flat #0a0a0a background, so every surface behind it uses that same colour: on phones
   taller than 9:16 the letterbox blends into the frame (no visible bars) and nothing is cropped. */
:root { --vid-bg: #0a0a0a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.modal.player {
  position: fixed;
  inset: 0;
  width: 100vw; width: 100dvw;
  height: 100vh; height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--vid-bg);
  overflow: hidden;
}
.modal.player::backdrop { background: var(--vid-bg); }
.player-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--vid-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.player-wrap video,
.modal.player video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--vid-bg);
}
.player-wrap:fullscreen { width: 100%; height: 100%; background: var(--vid-bg); }
.player-wrap:-webkit-full-screen { width: 100%; height: 100%; background: var(--vid-bg); }
#howto-video:fullscreen, #howto-video:-webkit-full-screen { background: var(--vid-bg); object-fit: contain; }
.player-wrap::backdrop, #howto-video::backdrop { background: var(--vid-bg); }
.player-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 0.6rem);
  right: calc(env(safe-area-inset-right) + 0.6rem);
  z-index: 2;
  width: 3.25rem;
  height: 3.25rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}
.player-close:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Scoring-method picker (Method A / Method B) */
.seg.seg-method button { min-height: 3.6rem; line-height: 1.15; }
.method-card { border-left: 3px solid var(--brand); padding-left: 0.6rem; margin: 0.4rem 0; }
.method-tag { display: inline-block; font-family: "Barlow Condensed", "Segoe UI", sans-serif; font-weight: 700; color: var(--brand); letter-spacing: 0.03em; }
.seg.seg-method button small { text-transform: none; letter-spacing: 0; font-size: 0.72rem; }
.sc-method { margin: -0.2rem 0 0.4rem; text-align: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
/* v2: miss method must be picked at setup */
.seg.seg-method.need button { border-color: var(--brand); }
.seg.seg2.seg-method button small { display: block; }

/* ST7 site CTA orange (matches shootingtargets7.com .btn--primary: #D14100, hover #B23700, white text) - Oct 30, 2026 */
.btn-primary, .btn-shop { background: #D14100; border-color: #D14100; color: #fff; }
.btn-primary:hover, .btn-shop:hover, .btn-primary:active, .btn-shop:active { background: #B23700; border-color: #B23700; color: #fff; filter: none; }
.btn-primary:disabled, .btn-primary:disabled:hover { background: #D14100; border-color: #D14100; }
