*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #E6F7FA;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #E6F7FA;
  color: #10262B;
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
}

.counter {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 12px;
}

.paper-shadow {
  width: min(320px, 100%);
  filter: drop-shadow(0 10px 18px rgba(16, 38, 43, 0.13)) drop-shadow(0 1px 2px rgba(16, 38, 43, 0.08));
}

.slip {
  position: relative;
  background: #FFFFFF;
  padding: 30px 22px 34px;
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 14px 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 51% repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 14px 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 51% repeat-x;
}

.slip-head {
  text-align: center;
}

.slip-brand {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.slip-ref {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #4A6166;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cut {
  margin: 16px 0;
  border: 0;
  border-top: 1px dashed #4A6166;
}

.slip-title {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.slip-note {
  margin: 10px 0 0;
  text-align: center;
  color: #4A6166;
  font-size: 0.8125rem;
}

.tally {
  margin: 0;
}

.tally-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0 0 6px;
}

.tally-row:last-child {
  margin-bottom: 0;
}

.tally-row dt {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  min-width: 0;
  font-weight: 700;
}

.tally-row dt::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  margin: 0 6px;
  border-bottom: 2px dotted #4A6166;
  transform: translateY(-4px);
}

.tally-row dd {
  margin: 0;
  flex: 0 0 auto;
  text-align: right;
}

.bars {
  height: 46px;
  margin: 4px 8px 0;
  background:
    repeating-linear-gradient(90deg, #10262B 0 2px, transparent 2px 5px, #10262B 5px 6px, transparent 6px 9px),
    repeating-linear-gradient(90deg, transparent 0 11px, #10262B 11px 14px, transparent 14px 23px);
}

.bars-digits {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  color: #4A6166;
}

.slip-foot {
  margin-top: 18px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inkmark {
  position: absolute;
  top: 55%;
  left: 50%;
  margin: 0;
  padding: 6px 16px;
  color: #0E7490;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.1;
  white-space: nowrap;
  border: 3px solid #0E7490;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px #FFFFFF, inset 0 0 0 5px #0E7490;
  opacity: 0.86;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
  -webkit-mask-image: repeating-radial-gradient(circle at 20% 30%, #000 0 3px, rgba(0, 0, 0, 0.78) 3px 4px);
  mask-image: repeating-radial-gradient(circle at 20% 30%, #000 0 3px, rgba(0, 0, 0, 0.78) 3px 4px);
}

@media (max-width: 359px) {
  .slip {
    padding: 28px 16px 32px;
  }

  .inkmark {
    font-size: 1.5rem;
  }
}
