.batch-challenge { overflow: clip; }
.batch-timing {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 5px 0 9px;
  background: var(--paper);
  color: #3e516c;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.batch-timing progress { width: 100%; height: 7px; accent-color: var(--blue); }
.batch-timing[data-low] { color: var(--red); }
.batch-timing[data-low] progress { accent-color: var(--red); }
.batch-seconds { text-align: right; }
.batch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.batch-box {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 79px;
  border: 1px solid #c4cfde;
  border-radius: 3px;
  background: white;
  overflow: hidden;
}
.batch-rule {
  margin: 0;
  padding: 6px 7px;
  background: #eef3fb;
  color: #233b61;
  font-size: 11px;
  line-height: 1.25;
}
.batch-actions { display: grid; grid-template-columns: 32px 1fr 1fr; gap: 4px; align-items: center; padding: 4px; }
.batch-actions button {
  min-width: 0;
  min-height: 33px;
  padding: 2px;
  border: 1px solid #c8d3e5;
  border-radius: 3px;
  background: #f9fbff;
  color: #385073;
  font-size: 10px;
  font-weight: 700;
}
.batch-actions .batch-verify { border-color: var(--blue); background: var(--blue); color: white; }
.batch-actions button:focus-visible, .batch-check:focus-within { outline: 2px solid var(--blue); outline-offset: -2px; }
.batch-check { display: grid; place-items: center; min-height: 33px; border-radius: 3px; cursor: pointer; }
.batch-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); cursor: inherit; }
.batch-check input:focus-visible { outline-offset: 1px; }
.batch-box[data-wrong] { border-color: #b9514c; }
.batch-box[data-wrong] .batch-rule { background: #f9ecea; color: #833830; }
.batch-box[data-solved] { border-color: #a7cab6; background: #f0f8f2; }
.batch-box[data-solved] .batch-actions { display: none; }
.batch-box[data-solved] .batch-rule { background: #e8f2eb; color: #365749; }
.batch-done { display: grid; place-items: center; min-height: 41px; color: var(--green); font-size: 11px; font-weight: 700; }
.batch-reset { margin-left: auto; padding-inline: 12px; }

.change-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 92px);
  gap: 6px;
  padding: 7px;
  border: 1px solid #c8d4e4;
  border-radius: 4px;
  background: #eef3f9;
}
.change-item { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; min-width: 0; }
.change-tray .change-item { grid-row: var(--tray-row); grid-column: var(--tray-column); }
.change-coin {
  position: relative;
  width: min(var(--coin-size), 66px);
  aspect-ratio: 1;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e1e8f2;
}
.change-coin:hover { box-shadow: 0 0 0 2px #86a1cf; }
.change-photo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("assets/change-coins.jpg") var(--coin-x) var(--coin-y) / 300% 300%;
  pointer-events: none;
}
.change-inspect {
  min-height: 26px;
  padding: 2px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #3c577d;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.change-inspect:hover { background: #dfe9f8; }
.change-counter { margin-top: 10px; }
.change-counter p { display: flex; justify-content: space-between; gap: 6px; margin: 0 0 5px; color: #354861; font-size: 12px; font-weight: 700; }
.change-total { color: var(--ink); font-variant-numeric: tabular-nums; }
.change-picked {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-height: 47px;
  padding: 4px;
  border: 1px solid #bfcbda;
  border-radius: 3px;
  background: #f4f7fb;
}
.change-picked[data-empty] { border-style: dashed; }
.change-picked .change-item { grid-template-rows: minmax(0, 1fr) auto auto; min-height: 96px; }
.change-picked .change-coin { width: min(var(--coin-size), 52px); }
.change-value {
  padding: 2px 5px;
  border-radius: 3px;
  background: #e4ecf8;
  color: #263e61;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.change-dialog {
  width: min(285px, calc(100% - 24px));
  max-height: calc(100svh - 16px);
  padding: 12px;
  border: 1px solid #b7c6da;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 36px #17264055;
}
.change-dialog::backdrop { background: #18243a82; }
.change-dialog h3 { margin: 0; font-size: 15px; }
.change-enlarged {
  position: relative;
  width: min(100%, 165px, max(65px, calc(100svh - 165px)));
  margin: 6px auto;
  aspect-ratio: 1;
}
.change-reading { min-height: 30px; margin: 8px 0 2px; color: var(--muted); font-size: 11px; text-align: center; }
.change-inspection-actions { display: flex; justify-content: space-between; gap: 5px; }
.change-close { margin-left: auto; }
