/* Game Time — sideline styles
   Vernacular: the pitch (green + chalk), the 4th official's sub board (red off / green on),
   the keeper's yellow jersey. Everything else stays quiet so those three read in sunlight. */

:root {
  --pitch: #146b3a;
  --pitch-deep: #0e4f2b;
  --pitch-tint: #e4efe6;
  --chalk: #f4f6f1;
  --paper: #ffffff;
  --line: #c9d3c8;
  --ink: #000000;
  --ink-soft: #3d4a41;
  --off: #d7263d;
  --off-tint: #fde8ea;
  --on: #1e9e55;
  --on-tint: #e3f4e8;
  --keeper: #f5c518;
  --keeper-tint: #fff4c2;
  --board-black: #111111;
  --tap: 48px;
  --radius: 6px;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; max-width: 100%; }
body {
  font: 16px/1.4 var(--text);
  color: var(--ink);
  background: var(--chalk);
  padding: env(safe-area-inset-top) 12px calc(env(safe-area-inset-bottom) + 32px);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: .01em; margin: 0; line-height: 1.05; }
h1 { font-size: 30px; }
h2 { font-size: 22px; color: var(--pitch-deep); margin-bottom: 6px; }
h3 { font-size: 20px; color: var(--pitch-deep); margin-bottom: 8px; }
.muted { color: var(--ink-soft); font-size: 14px; font-weight: 400; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 4px 0 10px; line-height: 1.4; }
.center { text-align: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--keeper); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.view { width: 100%; max-width: 680px; margin: 0 auto; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 10px; gap: 8px; }
.bar h1 { flex: 1; }

/* Sections: flat white sheets with a chalk rule, not stacked cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-title .muted { text-align: right; }

/* ---- buttons ---- */
button {
  font: 600 16px/1 var(--text);
  min-height: var(--tap);
  padding: 0 18px;
  border: 2px solid transparent; border-radius: var(--radius);
  background: var(--pitch-tint); color: var(--pitch-deep);
  cursor: pointer;
}
button:active { filter: brightness(.94); }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--pitch); border-color: var(--pitch); color: #fff; }
button.secondary { background: var(--paper); border-color: var(--pitch); color: var(--pitch-deep); }
button.link { background: none; border-color: transparent; color: var(--pitch-deep); padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
button.danger { color: var(--off); }
button.small { min-height: 42px; font-size: 15px; width: 100%; margin-top: 8px; }
.actions { display: flex; gap: 10px; margin: 12px 0 4px; }
.actions button { flex: 1; }
.actions.tight { margin: 2px 0 10px; }
.actions.tight .link { flex: 0 0 auto; }
.actions.tight button { font-size: 14px; padding: 0 8px; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--pitch); }
.warn-text { color: var(--off); font-weight: 600; }

/* ---- roster (team sheet) ---- */
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; align-items: center; gap: 10px; min-height: var(--tap); border-top: 1px solid var(--line); }
.roster li:first-child { border-top: 0; }
.roster .name { flex: 1; min-width: 0; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; font-size: 17px; cursor: pointer; overflow-wrap: anywhere; }
.roster li.absent .name { color: var(--ink-soft); text-decoration: line-through; font-weight: 400; }
.roster .tag {
  font: 700 13px/1 var(--display); letter-spacing: .04em;
  padding: 0 10px; border-radius: 4px; min-height: 34px; min-width: 48px;
  background: var(--paper); border: 2px solid var(--line); color: var(--ink-soft);
}
.roster .tag.on { background: var(--keeper-tint); border-color: var(--keeper); color: #5a4400; }
.roster .tag.present-tag.on { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.roster .edit { padding: 0 8px; background: none; border: 0; color: var(--ink-soft); min-width: 40px; }
.roster.games li { cursor: pointer; flex-wrap: wrap; padding: 8px 0; }
.roster.games .name { flex: 1 1 100%; min-height: 0; }
.roster.games .muted { flex: 1; font-size: 14px; }
.roster.games li { align-items: center; row-gap: 2px; }
.roster.games .name { flex: 1 1 auto; font-size: 18px; }
.roster.games .muted { flex: 1 1 100%; order: 3; }
.roster.games .chev {
  order: 2; flex: 0 0 auto; background: none; border: 0; color: var(--pitch);
  font: 400 26px/1 var(--text); min-height: 44px; min-width: 44px; padding: 0;
}

/* ---- positions ---- */
.roster li { flex-wrap: wrap; padding-bottom: 4px; }
.roster li.open { background: var(--pitch-tint); border-radius: var(--radius); padding: 4px 6px; margin: 4px -6px; border-top-color: transparent; }
.roster li.open + li { border-top-color: transparent; }
.ptags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ptag { font: 700 12px/1 var(--display); letter-spacing: .04em; color: var(--pitch-deep); background: var(--pitch-tint); border-radius: 3px; padding: 5px 6px; }
.roster li.open .ptag { background: #fff; }
.ptag.any { background: transparent; color: var(--ink-soft); font-family: var(--text); font-weight: 500; font-size: 13px; letter-spacing: 0; }
.roster li.absent .ptag { opacity: .45; }
.roster .edit { font: 600 14px var(--text); }
.roster .posrow { display: flex; gap: 5px; flex: 1 1 100%; margin: 4px 0 2px; }
.roster .tag.pos { flex: 1; min-width: 0; min-height: 42px; padding: 0 2px; }
.roster .tag.pos.on { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.roster .tag.rename { flex: 0 0 auto; min-height: 42px; font-family: var(--text); font-weight: 600; font-size: 14px; letter-spacing: 0; }

/* the sub board: one row per swap, position chip on the centre rail */
.board-subs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.sub-head { font: 800 13px/1 var(--display); letter-spacing: .06em; padding: 7px 12px 5px; color: rgba(255,255,255,.82); }
.sub-head.off { background: var(--off); box-shadow: inset 0 -1px 0 rgba(0,0,0,.18); }
.sub-head.on { background: var(--on); text-align: right; box-shadow: inset 0 -1px 0 rgba(0,0,0,.18); }
.sub-cell { display: flex; align-items: center; padding: 6px 12px; font: 700 20px/1.1 var(--display); color: #fff; overflow-wrap: break-word; min-width: 0; }
.sub-cell.off { background: var(--off); }
.sub-cell.on { background: var(--on); justify-content: flex-end; text-align: right; }
.sub-cell .none { font: 400 14px var(--text); opacity: .7; }
.sub-rail { background: var(--board-black); display: flex; align-items: center; justify-content: center; padding: 3px 8px; }
.sub-rail .slotchip {
  display: block; min-width: 52px; text-align: center; white-space: nowrap;
  font: 700 13px/1 var(--display); letter-spacing: .06em; color: rgba(255,255,255,.92);
}
.sub-rail .slotchip.gk { background: var(--keeper); color: #000; border-radius: 3px; padding: 4px 3px; }
.board.quiet .sub-rail { background: var(--ink-soft); }
.board-foot .moves { color: var(--ink-soft); }

.players .slot { display: inline-block; font: 700 12px/1 var(--display); letter-spacing: .04em; background: var(--pitch-tint); color: var(--pitch-deep); padding: 3px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
.players li.gk .slot { background: rgba(0,0,0,.14); color: #000; }
.players .slot.next { background: transparent; color: var(--on); }
.posline { display: block; margin-top: 2px; font: 600 12px/1.3 var(--text); color: var(--ink-soft); }
.posline span + span { margin-left: 8px; }
.posline .offpref { color: var(--off); }

/* ---- starters ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--paper); border: 2px solid var(--line); color: var(--ink); font-weight: 600; }
.chip.on { background: var(--pitch-tint); border-color: var(--pitch); color: var(--pitch-deep); }
.chip.gk { background: var(--keeper-tint); border-color: var(--keeper); color: #5a4400; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row .label { font-weight: 600; font-size: 15px; }
.row select { font: inherit; min-height: 44px; padding: 0 10px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--paper); flex: 1; min-width: 120px; }

/* ---- stepper ---- */
.stepper { display: flex; align-items: center; gap: 16px; margin: 4px 0 6px; }
.stepper button { width: 56px; font: 800 28px/1 var(--display); }
.stepper span { font: 800 36px/1 var(--display); min-width: 40px; text-align: center; }

/* ---- plan grid ---- */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
table.plan { border-collapse: collapse; font-size: 13px; white-space: nowrap; min-width: 100%; }
table.plan th, table.plan td { padding: 5px 6px; text-align: center; border-bottom: 1px solid var(--line); }
@media (max-width: 420px) {
  table.plan { font-size: 12px; }
  table.plan th, table.plan td { padding: 4px 3px; }
  table.plan td.player { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}
table.plan th { font: 700 13px/1 var(--display); letter-spacing: .03em; color: var(--ink-soft); }
table.plan th.half-start, table.plan td.half-start { border-left: 2px solid var(--ink-soft); }
table.plan td.player { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--paper); }
table.plan td.on { background: var(--on-tint); color: var(--pitch-deep); font-weight: 700; }
table.plan td.gk { background: var(--keeper-tint); color: #5a4400; font: 700 12px/1 var(--display); }
table.plan td.total { font-weight: 700; font-variant-numeric: tabular-nums; }
table.plan th.now, table.plan td.now { border-left: 2px dashed var(--keeper); border-right: 2px dashed var(--keeper); }
table.plan th.now { border-top: 2px dashed var(--keeper); color: var(--ink); font-weight: 800; }
table.plan tr:last-child td.now { border-bottom: 2px dashed var(--keeper); }
.swaps { padding-left: 20px; margin: 10px 0 0; font-size: 15px; }
.swaps li { margin: 6px 0; }
.swaps b { color: var(--pitch-deep); }
.swaps .off { color: var(--off); font-weight: 700; }
.swaps .on { color: var(--on); font-weight: 700; }

/* ---- scoreboard (clock) ---- */
.clock { background: var(--pitch); color: #fff; border-radius: var(--radius); padding: 10px 14px 12px; margin: 8px 0 10px; text-align: center; }
.clock-meta { display: flex; align-items: center; justify-content: center; gap: 8px; }
#clock-time { font: 800 76px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; margin: 2px 0 0; }
.pill { font: 700 14px/1 var(--display); letter-spacing: .05em; background: rgba(255,255,255,.16); padding: 6px 10px; border-radius: 4px; }
.next { text-align: center; margin: 4px 0 2px; font: 700 18px/1.2 var(--display); font-variant-numeric: tabular-nums; min-height: 22px; letter-spacing: .02em; }
.next.soon { color: var(--keeper); }
.timeline { position: relative; height: 10px; background: rgba(255,255,255,.22); border-radius: 5px; margin: 8px 0 12px; }
#timeline-fill { height: 100%; width: 0; background: #fff; border-radius: 5px; }
#timeline-marks { position: absolute; inset: 0; }
#timeline-marks span { position: absolute; top: -3px; width: 2px; height: 16px; background: rgba(255,255,255,.65); margin-left: -1px; }
#timeline-marks span.water { background: #7fd1ff; width: 4px; margin-left: -2px; }
#timeline-marks span.half { background: #fff; width: 3px; }
.clock-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.clock-actions button { white-space: nowrap; }
.clock-actions .link { flex: 0 0 auto; }
.clock-actions .primary { flex: 1 1 50%; background: #fff; border-color: #fff; color: var(--pitch-deep); font-family: var(--display); font-size: 20px; font-weight: 800; }
.clock-actions .secondary { flex: 1 1 40%; font-size: 15px; min-height: 48px; padding: 0 12px; background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.clock-actions .link { color: #ffd6dc; }
.clock.paused #clock-time { opacity: .55; }
.clock.halftime { background: var(--board-black); }
.clock.halftime .clock-actions .primary { color: var(--board-black); }
.clock.editing { background: var(--pitch-deep); }

/* ---- the sub board ---- */
.board { border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; border: 2px solid var(--board-black); background: var(--board-black); }
.board-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; padding: 8px 12px; color: #fff; font: 700 17px/1.2 var(--display); letter-spacing: .03em; }
.board-strip .muted { color: rgba(255,255,255,.7); font: inherit; }
.board-strip button.link { color: #fff; font-family: var(--text); font-size: 15px; min-height: 36px; padding: 0 6px; }
.board-foot { background: var(--paper); padding: 8px 12px; font-size: 15px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-foot .gkline { font-weight: 600; }
.board-foot .gkline b { background: var(--keeper); color: #000; padding: 2px 6px; border-radius: 3px; font: 700 13px/1 var(--display); margin-right: 4px; }
.board .warn { color: var(--off); font-weight: 700; }
.board.now { border-color: var(--keeper); box-shadow: 0 0 0 3px var(--keeper); }
.board.now .board-strip { background: var(--keeper); color: #000; }
.board.now .board-strip .muted { color: rgba(0,0,0,.6); }
.board-actions { display: flex; gap: 8px; padding: 10px 12px; background: var(--paper); border-top: 1px solid var(--line); }
.board-actions .primary { flex: 2 1 auto; font-family: var(--display); font-size: 20px; font-weight: 800; white-space: nowrap; }
.board-actions .muted { flex: 1 1 100px; font-size: 14px; }
.board.editing .board-actions { background: var(--paper); }
.board.quiet { border-color: var(--line); background: var(--paper); }
.board.quiet .board-strip { color: var(--ink); }
.board.quiet .board-strip .muted { color: var(--ink-soft); }
.board.quiet .board-strip button.link { color: var(--pitch-deep); }
.board.editing { border-color: var(--pitch-deep); }
.board.editing .board-strip { background: var(--pitch-deep); }
.board .edit-actions { display: flex; gap: 8px; }
.board.editing .board-strip button.link { color: #fff; min-height: 36px; }
.board.editing .board-strip #btn-edit-done { background: #fff; color: var(--pitch-deep); border-radius: 4px; padding: 0 14px; text-decoration: none; }

/* ---- sub times ---- */
.times { list-style: none; margin: 0 0 6px; padding: 0; }
.times li { display: flex; align-items: center; gap: 6px; min-height: var(--tap); border-top: 1px solid var(--line); }
.times li:first-child { border-top: 0; }
.tlabel { font: 800 19px/1 var(--display); font-variant-numeric: tabular-nums; min-width: 62px; }
.tlen { flex: 1; font-size: 13px; color: var(--ink-soft); }
.times .tag { min-height: 40px; min-width: 52px; padding: 0 8px; font-family: var(--text); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.times .tag.drop { color: var(--off); border-color: var(--off-tint); }

/* ---- plan editor ---- */
.tabs { display: flex; gap: 6px; padding: 2px 0 8px; }
.tab { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font: 700 14px/1 var(--display); letter-spacing: .03em;
  background: var(--paper); border: 2px solid var(--line); color: var(--ink-soft); border-radius: 6px; white-space: nowrap; }
.tab.on { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.tab.half { margin-left: 14px; position: relative; }
.tab.half::before {
  content: ''; position: absolute; left: -11px; top: 3px; bottom: 3px;
  width: 2px; border-radius: 1px; background: var(--ink-soft);
}
.roster.games li.on .name { color: var(--pitch-deep); }
button.done { border-color: var(--on); color: var(--on); }
button.done .tick { font-weight: 800; margin-right: 2px; }
button:disabled.done { opacity: .75; }

/* ---- the pitch ---- */
.pitch-wrap { margin-bottom: 8px; }
.pitch {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07) 0 12.5%, transparent 0 25%) 0 0/100% 100%,
    var(--pitch);
  border: 2px solid var(--pitch-deep);
}
/* halfway line and centre circle, so the shape reads as a pitch at a glance */
.pitch::before, .pitch::after { content: ''; position: absolute; border: 2px solid rgba(255,255,255,.22); }
.pitch::before { left: 0; right: 0; top: 27%; height: 0; border-width: 2px 0 0; }
.pitch::after { width: 30%; aspect-ratio: 1; border-radius: 50%; left: 35%; top: 27%; transform: translateY(-50%); }
.spot {
  position: absolute; transform: translate(-50%, -50%);
  width: 27%; min-height: 0; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--paper); border: 2px solid var(--paper); border-radius: 8px;
  color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.28);
}
.spot .pos { font: 700 10px/1 var(--display); letter-spacing: .06em; color: var(--ink-soft); }
.spot .who { font: 700 16px/1.05 var(--display); text-align: center; overflow-wrap: anywhere; }
.spot .sub { font: 700 13px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.spot .note:not(:empty) { font: 700 10px/1.1 var(--display); letter-spacing: .04em; margin-top: 1px; }
.spot.outgoing .note { color: var(--off); }
.spot.incoming .note { color: var(--on); }
.spot.gk { background: var(--keeper); border-color: var(--keeper); }
.spot.gk .pos { color: #5a4400; }
.spot.empty { background: rgba(255,255,255,.14); border-style: dashed; border-color: rgba(255,255,255,.7); color: #fff; box-shadow: none; }
.spot.empty .pos, .spot.empty .sub { color: rgba(255,255,255,.8); }
.spot.behind { border-color: var(--off); }
.spot.incoming { border-color: var(--on); box-shadow: 0 0 0 3px var(--on); }
.spot.outgoing { border-color: var(--off); box-shadow: 0 0 0 3px var(--off); }
.spot.sel { outline: 3px dashed var(--keeper); outline-offset: 3px; z-index: 2; }

.benchbar { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 8px 0 2px; }
.blabel { flex: 0 0 auto; align-self: center; font: 700 12px/1.1 var(--display); letter-spacing: .06em; color: var(--ink-soft); width: 42px; }
.bnone { align-self: center; color: var(--ink-soft); font-size: 14px; }
.bchip {
  flex: 0 0 auto; min-width: 88px; min-height: 52px; padding: 6px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 8px; color: var(--ink);
}
.bchip .who { font: 700 15px/1.05 var(--display); }
.bchip .bpos { font: 700 10px/1 var(--display); letter-spacing: .06em; color: var(--pitch-deep); background: var(--pitch-tint); border-radius: 3px; padding: 3px 5px; }
.bchip .bpos.any { background: transparent; color: var(--ink-soft); font-family: var(--text); font-weight: 500; letter-spacing: 0; }
.bchip .sub { font: 700 14px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.bchip .note:not(:empty) { font: 700 10px/1.1 var(--display); letter-spacing: .04em; color: var(--on); margin-top: 1px; }
.bchip.behind { border-color: var(--off); }
.bchip.behind .sub { color: var(--off); }
.bchip.incoming { border-color: var(--on); background: var(--on-tint); }
.bchip.sel { outline: 3px dashed var(--pitch); outline-offset: 2px; }

/* ---- summary tables ---- */
table.summary { width: 100%; border-collapse: collapse; font-size: 16px; }
table.summary td, table.summary th { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.summary th { font: 700 14px/1 var(--display); letter-spacing: .04em; color: var(--ink-soft); }
table.summary td:nth-child(n+2), table.summary th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
table.summary .neg { color: var(--off); font-weight: 700; }
table.summary.pos { font-size: 15px; white-space: nowrap; min-width: 100%; }
table.summary.pos th, table.summary.pos td { padding: 8px 6px; }
table.summary.pos td:first-child, table.summary.pos th:first-child { position: sticky; left: 0; background: var(--paper); text-align: left; }
table.summary.pos .zero { color: var(--line); }
table.summary.pos .total { font-weight: 700; }
#paste-text, #csv-text { width: 100%; font: 400 12px/1.4 ui-monospace, Menlo, Consolas, monospace; border: 2px solid var(--line); border-radius: var(--radius); padding: 8px; resize: vertical; }
table.summary .pos { color: var(--on); font-weight: 700; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.modal-box { background: var(--paper); width: 100%; max-width: 640px; max-height: 85vh; overflow-y: auto; border-radius: 12px 12px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px); }
.modal-box .primary { width: 100%; margin-top: 12px; }
#modal-note { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
#modal-note .secondary { width: 100%; }

@media (max-width: 380px) {
  #clock-time { font-size: 60px; }
  .sub-cell { font-size: 19px; padding: 7px 9px; }
}

/* ---------- teams, codes and sync ---------- */
.field {
  width: 100%; min-height: var(--tap); box-sizing: border-box;
  padding: 0 12px; margin: 2px 0 4px;
  font: 600 17px/1 'Barlow', system-ui, sans-serif; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.field:focus-visible { outline: 2px solid var(--pitch); outline-offset: 1px; border-color: var(--pitch); }
.field::placeholder { color: var(--ink-soft); font-weight: 400; }
.field:disabled { opacity: .55; }

/* A code is read off one screen and typed into another, so give it room */
.code-field { letter-spacing: .12em; text-transform: uppercase; }
.code {
  margin: 6px 0 2px; padding: 12px 10px;
  font: 800 23px/1.2 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  letter-spacing: .14em; text-align: center; color: var(--pitch-deep);
  background: var(--pitch-tint); border: 1px dashed var(--pitch);
  border-radius: 10px; user-select: all; overflow-wrap: anywhere;
}

.teamlist .name { font-size: 18px; }
.teamlist .muted { white-space: nowrap; }

.syncrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.syncrow .muted { flex: 1; min-width: 0; line-height: 1.35; }
.syncrow button { flex: 0 0 auto; width: auto; min-height: 40px; margin: 0; padding: 0 14px; font-size: 15px; }

/* The sync line pulses only while a sync is actually in flight, so pressing
   the button is visibly doing something even on a fast connection. */
.syncrow.busy .muted { animation: syncpulse 1s ease-in-out infinite; }
@keyframes syncpulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .syncrow.busy .muted { animation: none; opacity: .6; }
}
